:root {
  color-scheme: dark;
  --bg: #050705;
  --bg-2: #090d0a;
  --ink: #e8e1d1;
  --muted: #8d887b;
  --dim: #4f5448;
  --line: rgba(232, 225, 209, 0.18);
  --line-strong: rgba(232, 225, 209, 0.34);
  --acid: #c7ff5a;
  --danger: #ff5f3d;
  --panel: rgba(7, 11, 8, 0.72);
  --mono: "Berkeley Mono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  --sans: "Suisse Intl", "Neue Haas Grotesk Text", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 28%, rgba(199, 255, 90, 0.055), transparent 32rem),
    linear-gradient(180deg, #050705 0%, #080b08 50%, #050705 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "ss01" on, "kern" on;
  letter-spacing: -0.035em;
}

body::selection {
  background: var(--acid);
  color: #050705;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(232, 225, 209, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 225, 209, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 86%, transparent);
}

.background-singularity {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(5, 7, 5, 0.9) 0%, rgba(5, 7, 5, 0.72) 46%, rgba(5, 7, 5, 0.3) 100%), url("public/assets/alef-one-crush.webp");
  background-position: center;
  background-size: cover;
  opacity: 0.24;
  filter: grayscale(1) contrast(1.12);
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.055;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(232, 225, 209, 0.22) 4px);
  mix-blend-mode: overlay;
}

.page {
  width: min(1480px, calc(100vw - 32px));
  margin: 16px auto 56px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.cell {
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 8, 0.84);
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 88px;
  background: #050705;
}

.brand {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 20px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: clamp(1.6rem, 2.8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.12em;
  line-height: 0.86;
}

.brand span:last-child {
  color: var(--acid);
}

.nav {
  grid-column: span 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 42px);
  padding: 20px;
}

.nav a,
.button,
.contact-links a,
.project,
.company {
  color: inherit;
  text-decoration: none;
}

.nav a,
.role,
.eyebrow,
.section-label,
.button,
.project span,
.method-line span,
.footer .cell {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav a {
  color: var(--muted);
  transition: color 140ms ease-out;
}

.nav a:hover,
.project:hover h3,
.company:hover h3,
.contact-links a:hover {
  color: var(--acid);
}

.role {
  grid-column: span 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 20px;
  color: var(--muted);
  text-align: right;
}

.hero {
  min-height: 760px;
  border-top: 0;
}

.hero-copy {
  grid-column: span 7;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 6.5vw, 86px);
}

.eyebrow,
.section-label {
  margin: 0 0 22px;
  color: var(--acid);
}

h1,
h2,
h3,
p,
pre {
  margin: 0;
}

h1 {
  max-width: 790px;
  font-size: clamp(4rem, 7.1vw, 7.6rem);
  line-height: 0.84;
  letter-spacing: -0.09em;
  text-transform: uppercase;
  text-wrap: balance;
}

.lede {
  max-width: 720px;
  margin-top: 32px;
  color: #bdb5a4;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  line-height: 1.45;
  letter-spacing: -0.03em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  padding: 0 16px;
  color: var(--ink);
  background: rgba(232, 225, 209, 0.03);
  transition: transform 120ms ease-out, background 120ms ease-out, color 120ms ease-out;
}

.button:hover {
  background: rgba(232, 225, 209, 0.08);
}

.button:active {
  transform: scale(0.98);
}

.button.primary {
  border-color: var(--acid);
  background: var(--acid);
  color: #050705;
}

.ascii-card {
  position: relative;
  grid-column: span 5;
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
  padding: clamp(18px, 3vw, 36px);
  background:
    linear-gradient(180deg, rgba(5, 7, 5, 0.08), rgba(5, 7, 5, 0.52) 48%, rgba(5, 7, 5, 0.94)),
    url("public/assets/alef-one-crush.webp");
  background-position: center, 64% 20%;
  background-size: cover, 1160px auto;
  background-repeat: no-repeat;
}

.ascii-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(199, 255, 90, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(199, 255, 90, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.22;
}

.ascii-card pre {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  padding: clamp(14px, 2vw, 24px);
  background: rgba(0, 0, 0, 0.58);
  color: #d9d2c2;
  font-family: var(--mono);
  font-size: clamp(0.68rem, 1.02vw, 0.92rem);
  line-height: 1.4;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(199, 255, 90, 0.08);
}

.section {
  scroll-margin-top: 96px;
  border-top: 0;
}

.section-label {
  grid-column: 1 / -1;
  min-height: 52px;
  padding: 18px 22px;
}

.statement {
  grid-column: span 6;
  padding: clamp(28px, 5vw, 64px);
}

.statement h2,
.stack-copy h2,
.asset-copy h2,
.contact-copy h2 {
  font-size: clamp(2rem, 4.3vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
  text-transform: uppercase;
}

.compact {
  grid-column: span 3;
  padding: 22px;
}

.compact h3,
.project h3,
.company h3,
.method-line strong {
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.compact p,
.project p,
.company p,
.method-line p,
.stack-copy p,
.asset-copy p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  letter-spacing: -0.025em;
}

.asset-panel {
  position: relative;
  grid-column: span 4;
  display: flex;
  min-height: 460px;
  align-items: flex-end;
  background-position: center;
  background-size: cover;
}

.asset-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(5, 7, 5, 0.04), rgba(5, 7, 5, 0.42) 44%, rgba(5, 7, 5, 0.96));
}

.asset-doc {
  background-image: url("public/assets/alef-one-doc-forensics.webp");
}

.asset-memory {
  background-image: url("public/assets/alef-one-memory.webp");
}

.asset-bridge {
  background-image: url("public/assets/alef-one-bridge.webp");
}

.asset-copy {
  position: relative;
  z-index: 1;
  padding: clamp(22px, 3vw, 42px);
}

.asset-copy span,
.company span {
  display: block;
  margin-bottom: 16px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.asset-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(1.9rem, 3.1vw, 3.8rem);
}

.project,
.company {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  transition: background 140ms ease-out;
}

.project {
  grid-column: span 4;
}

.project.wide {
  grid-column: span 6;
}

.company {
  grid-column: span 2;
}

.company.current {
  grid-column: span 4;
}

.project:hover,
.company:hover {
  background: rgba(199, 255, 90, 0.055);
}

.project span,
.method-line span {
  color: var(--acid);
}

.method-line {
  grid-column: span 3;
  min-height: 180px;
  padding: 22px;
}

.contact-copy {
  grid-column: span 8;
  padding: clamp(30px, 6vw, 72px);
}

.contact-links {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 12px;
  padding: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: -0.03em;
}

.footer {
  border-top: 0;
}

.footer .cell {
  grid-column: span 4;
  padding: 18px 20px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .page {
    width: calc(100vw - 20px);
    margin-top: 10px;
  }

  .header {
    top: 0;
    min-height: auto;
  }

  .hero-copy,
  .ascii-card,
  .asset-panel,
  .section-label,
  .statement,
  .compact,
  .project,
  .project.wide,
  .company,
  .company.current,
  .method-line,
  .contact-copy,
  .contact-links,
  .footer .cell {
    grid-column: 1 / -1;
  }

  .brand {
    grid-column: span 4;
    min-height: 72px;
  }

  .nav {
    grid-column: span 5;
    justify-content: center;
    gap: clamp(10px, 2vw, 20px);
    overflow-x: visible;
    padding: 18px 12px;
  }

  .role {
    grid-column: span 3;
    justify-content: flex-end;
    padding: 16px 14px;
    text-align: right;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    min-height: 72vh;
    padding: 34px 20px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(3rem, 14.2vw, 4.25rem);
    line-height: 0.88;
    letter-spacing: -0.078em;
  }

  .lede {
    font-size: 1rem;
  }

  .ascii-card pre {
    font-size: clamp(0.54rem, 2.3vw, 0.68rem);
  }

  .asset-panel {
    min-height: 520px;
  }

  .asset-copy h2 {
    font-size: clamp(1.85rem, 9vw, 3.2rem);
  }

  .section-label {
    min-height: auto;
  }

  .background-singularity {
    opacity: 0.28;
    background-position: 68% center;
  }
}

@media (max-width: 520px) {
  .page {
    width: 100vw;
    margin-top: 0;
  }

  .brand {
    grid-column: span 5;
    grid-row: 1;
    min-height: 64px;
    padding: 14px 16px;
    font-size: 1.35rem;
  }

  .role {
    grid-column: 6 / -1;
    grid-row: 1;
    align-items: center;
    min-height: 64px;
    padding: 12px 14px;
    font-size: 0.54rem;
    line-height: 1.35;
    letter-spacing: 0.12em;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0;
  }

  .nav a {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--line);
    font-size: 0.56rem;
    letter-spacing: 0.1em;
  }

  .nav a:last-child {
    border-right: 0;
  }

  .section {
    scroll-margin-top: 112px;
  }
}

@media (max-width: 340px) {
  .brand {
    min-height: 58px;
    padding: 12px 14px;
    font-size: 1.18rem;
  }

  .role {
    min-height: 58px;
    padding: 10px 12px;
    font-size: 0.46rem;
    letter-spacing: 0.07em;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav a {
    min-height: 34px;
    font-size: 0.45rem;
    letter-spacing: 0.035em;
  }

  .section {
    scroll-margin-top: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
