:root {
  color-scheme: dark;
  --bg: #090b0c;
  --bg-soft: #0e1112;
  --bg-raised: #141819;
  --text: #edf1ef;
  --muted: #9aa39f;
  --faint: #77807c;
  --line: #2a3031;
  --accent: #63c7b8;
  --accent-ink: #07110f;
  --font-sans: "Segoe UI Variable", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --header-height: 68px;
  --shell: min(1200px, calc(100vw - 64px));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  overflow-x: clip;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  margin-bottom: 0;
  font-weight: 560;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
}

@supports (animation-timeline: scroll()) {
  .page-progress {
    animation: page-progress linear both;
    animation-timeline: scroll(root block);
  }
}

@keyframes page-progress {
  to {
    transform: scaleX(1);
  }
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 max(32px, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid transparent;
  background: rgb(9 11 12 / 74%);
  backdrop-filter: blur(18px);
  transition:
    border-color 300ms ease,
    background 300ms ease;
}

.site-header.is-scrolled {
  border-color: rgb(255 255 255 / 8%);
  background: rgb(9 11 12 / 92%);
}

.header-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.wordmark {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 42px);
}

.desktop-nav a,
.mobile-nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--accent);
  transition: transform 240ms var(--ease);
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a:focus-visible {
  color: var(--text);
}

.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after,
.desktop-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
  justify-self: end;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 650 0.84rem/1 var(--font-sans);
  cursor: pointer;
}

.mobile-nav {
  display: none;
}

.scene {
  position: relative;
  isolation: isolate;
}

.hero {
  min-height: 160dvh;
  background: var(--bg);
  view-timeline-name: --hero-scene;
  view-timeline-axis: block;
}

.hero-sticky {
  position: sticky;
  top: 0;
  min-height: 100dvh;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100dvh;
  width: var(--shell);
  margin: 0 auto;
  padding: calc(var(--header-height) + 7vh) 0 7vh;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-kicker {
  margin-bottom: clamp(30px, 5vh, 54px);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(4.2rem, 7.7vw, 8rem);
}

.hero-title-line {
  display: inline;
}

.hero-summary {
  max-width: 40rem;
  margin: clamp(28px, 4vh, 44px) 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.35vw, 1.22rem);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: clamp(26px, 4vh, 42px);
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 180ms var(--ease),
    background 180ms ease,
    border-color 180ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #82d4c8;
}

.button-secondary {
  border-color: var(--line);
  background: var(--bg-soft);
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--muted);
  background: var(--bg-raised);
}

.hero-portrait {
  position: absolute;
  right: max(0px, calc((100vw - 1500px) / 2));
  bottom: 0;
  z-index: 1;
  width: min(54vw, 790px);
  height: calc(100dvh - var(--header-height));
  margin: 0;
  pointer-events: none;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: brightness(0.91) saturate(0.8) contrast(1.03);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 85%, transparent 100%);
}

.capabilities {
  min-height: 116dvh;
  background: var(--bg-soft);
  view-timeline-name: --capabilities-scene;
  view-timeline-axis: block;
}

.capabilities-sticky {
  position: sticky;
  top: 0;
  display: grid;
  min-height: 100dvh;
  width: var(--shell);
  margin: 0 auto;
  padding: calc(var(--header-height) + 7vh) 0 6vh;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.capabilities-intro h2 {
  max-width: 13ch;
  font-size: clamp(3rem, 5.6vw, 6.2rem);
}

.capabilities-intro p {
  max-width: 36rem;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.capability-lines {
  align-self: end;
  margin-top: 5vh;
}

.capability-line {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) 1fr;
  align-items: baseline;
  gap: 24px;
  padding: clamp(12px, 1.7vh, 20px) 0;
  border-bottom: 1px solid var(--line);
}

.capability-line strong {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.capability-line span {
  color: var(--muted);
  font-size: clamp(0.86rem, 1.1vw, 1rem);
}

.work-intro {
  min-height: 145dvh;
  background: var(--accent);
  color: var(--accent-ink);
  view-timeline-name: --work-intro-scene;
  view-timeline-axis: block;
}

.work-intro-sticky {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 100dvh;
  width: var(--shell);
  margin: 0 auto;
  padding: calc(var(--header-height) + 7vh) 0 8vh;
  flex-direction: column;
  justify-content: center;
}

.work-intro-sticky > p {
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-intro h2 {
  max-width: 11ch;
  font-size: clamp(3.6rem, 7.5vw, 8rem);
  font-weight: 650;
}

.project-stack {
  position: relative;
  isolation: isolate;
  background: var(--bg);
}

.project-scene {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 100dvh;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid rgb(255 255 255 / 8%);
}

.project-mitso {
  z-index: 1;
  background: #090b0c;
}

.project-sinarra {
  z-index: 2;
  background: #101314;
}

.project-cheqbase {
  z-index: 3;
  background: #0c1011;
}

.project-liftpad {
  z-index: 4;
  background: #131718;
}

.project-aldakheel {
  z-index: 5;
  background: #0b0e0f;
}

.project-scene::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  transform: scaleX(1);
  transform-origin: left;
  background: var(--accent);
}

.project-ghost {
  position: absolute;
  right: -0.04em;
  bottom: -0.22em;
  color: rgb(237 241 239 / 3.5%);
  font-size: clamp(10rem, 28vw, 34rem);
  font-weight: 750;
  letter-spacing: -0.09em;
  line-height: 0.8;
  user-select: none;
}

.project-content {
  position: relative;
  z-index: 1;
  display: grid;
  width: var(--shell);
  margin: 0 auto;
  padding: calc(var(--header-height) + 7vh) 0 8vh;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 0.7fr);
  gap: clamp(70px, 10vw, 170px);
  align-items: end;
}

.project-heading > p,
.education-lockup > p,
.research-paper > p {
  margin-bottom: 26px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.project-heading h3 {
  font-size: clamp(4.8rem, 10vw, 10rem);
}

.project-summary {
  margin-bottom: 30px;
  color: var(--text);
  font-size: clamp(1.08rem, 1.5vw, 1.36rem);
  line-height: 1.48;
}

.project-scope {
  display: grid;
  margin: 0 0 34px;
  padding: 0;
  gap: 9px;
  color: var(--muted);
  list-style: none;
}

.project-scope li {
  position: relative;
  padding-left: 18px;
}

.project-scope li::before {
  content: "/";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

.project-body > a,
.unreal-copy > a {
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.unreal {
  min-height: 122dvh;
  background: var(--bg-soft);
  view-timeline-name: --unreal-scene;
  view-timeline-axis: block;
}

.unreal-sticky {
  position: sticky;
  top: 0;
  display: grid;
  min-height: 100dvh;
  width: var(--shell);
  margin: 0 auto;
  padding: calc(var(--header-height) + 7vh) 0 7vh;
  grid-template-columns: minmax(0, 0.8fr) minmax(440px, 1fr);
  gap: clamp(60px, 9vw, 150px);
  align-items: center;
  overflow: hidden;
}

.unreal-copy h2 {
  max-width: 9ch;
  font-size: clamp(4rem, 7vw, 7.2rem);
}

.unreal-summary {
  max-width: 32rem;
  margin: 30px 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.asset-sequence {
  display: grid;
}

.asset-sequence article {
  padding: clamp(22px, 3.8vh, 42px) 0;
  border-bottom: 1px solid var(--line);
}

.asset-sequence article:last-child {
  border-bottom: 0;
}

.asset-sequence span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.asset-sequence h3 {
  margin-top: 10px;
  font-size: clamp(2.2rem, 4.2vw, 4.8rem);
}

.asset-sequence p {
  max-width: 34rem;
  margin: 14px 0 0;
  color: var(--muted);
}

.research {
  min-height: 118dvh;
  background: var(--bg);
  view-timeline-name: --research-scene;
  view-timeline-axis: block;
}

.research-sticky {
  position: sticky;
  top: 0;
  display: grid;
  min-height: 100dvh;
  width: var(--shell);
  margin: 0 auto;
  padding: calc(var(--header-height) + 8vh) 0 8vh;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 0.72fr);
  gap: clamp(70px, 10vw, 180px);
  align-items: center;
  overflow: hidden;
}

.education-lockup h2 {
  max-width: 10ch;
  font-size: clamp(4rem, 7vw, 7.3rem);
}

.research-paper {
  align-self: end;
  padding: 34px 0 0;
  border-top: 1px solid var(--accent);
}

.research-paper h3 {
  max-width: 14ch;
  margin-bottom: 30px;
  font-size: clamp(2rem, 3.3vw, 3.6rem);
  line-height: 1.02;
}

.research-paper div {
  display: grid;
  gap: 18px;
  color: var(--muted);
}

.research-paper div p {
  margin-bottom: 0;
}

.contact {
  display: flex;
  min-height: 100dvh;
  align-items: flex-end;
  background: var(--accent);
  color: var(--accent-ink);
  view-timeline-name: --contact-scene;
  view-timeline-axis: block;
}

.contact-inner {
  width: var(--shell);
  margin: 0 auto;
  padding: calc(var(--header-height) + 10vh) 0 10vh;
}

.contact h2 {
  max-width: 10ch;
  font-size: clamp(4.2rem, 9vw, 9.4rem);
}

.contact-email {
  display: inline-block;
  max-width: 100%;
  margin-top: clamp(50px, 8vh, 90px);
  padding-bottom: 6px;
  border-bottom: 2px solid currentColor;
  font-size: clamp(1.2rem, 2.5vw, 2.6rem);
  font-weight: 650;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-meta {
  display: flex;
  gap: 34px;
  margin-top: 26px;
}

.contact-meta a {
  font-weight: 650;
  text-decoration: none;
}

.back-to-top {
  position: fixed;
  right: max(24px, calc((100vw - 1200px) / 2));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 70;
  display: inline-flex;
  min-height: 44px;
  transform: translate3d(0, 14px, 0);
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgb(9 11 12 / 88%);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(14px);
  transition:
    transform 260ms var(--ease),
    border-color 180ms ease,
    background 180ms ease,
    opacity 180ms ease,
    visibility 180ms ease;
}

.back-to-top.is-visible {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: var(--accent);
  background: var(--bg-raised);
}

.back-to-top:active {
  transform: translate3d(0, 1px, 0);
}

.hero-exit-sentinel {
  position: absolute;
  top: 52dvh;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-kicker,
  .hero h1,
  .hero-summary,
  .hero-actions {
    animation: hero-element-enter 760ms var(--ease) both;
  }

  .hero h1 {
    animation-delay: 90ms;
  }

  .hero-summary {
    animation-delay: 170ms;
  }

  .hero-actions {
    animation-delay: 240ms;
  }

  .hero-portrait img {
    transform-origin: right bottom;
    animation: hero-image-enter 980ms var(--ease) 120ms both;
  }

  .hero-copy,
  .hero-portrait {
    transition:
      transform 820ms var(--ease),
      opacity 620ms ease;
  }

  .hero.is-exiting .hero-copy {
    transform: translate3d(-9vw, -3vh, 0) scale(0.86);
    opacity: 0;
  }

  .hero.is-exiting .hero-portrait {
    transform: translate3d(9vw, 4vh, 0) scale(0.84);
    opacity: 0;
  }

  .motion-ready .capabilities-intro.is-revealed {
    animation: reveal-up-scale 900ms var(--ease) both;
  }

  .motion-ready .line-left.is-revealed {
    animation: reveal-from-left 820ms var(--ease) both;
  }

  .motion-ready .line-right.is-revealed {
    animation: reveal-from-right 820ms var(--ease) both;
  }

  .motion-ready .capability-line:nth-child(1).is-revealed {
    animation-delay: 80ms;
  }

  .motion-ready .capability-line:nth-child(2).is-revealed {
    animation-delay: 140ms;
  }

  .motion-ready .capability-line:nth-child(3).is-revealed {
    animation-delay: 200ms;
  }

  .motion-ready .capability-line:nth-child(4).is-revealed {
    animation-delay: 260ms;
  }

  .motion-ready .capability-line:nth-child(5).is-revealed {
    animation-delay: 320ms;
  }

  .motion-ready .capability-line:nth-child(6).is-revealed {
    animation-delay: 380ms;
  }

  .motion-ready .work-intro-sticky.is-revealed {
    animation: manifesto-arrive 1050ms var(--ease) both;
  }

  .motion-ready .unreal-copy.is-revealed,
  .motion-ready .education-lockup.is-revealed {
    animation: reveal-from-left 900ms var(--ease) both;
  }

  .motion-ready .asset-sequence article.is-revealed,
  .motion-ready .research-paper.is-revealed {
    animation: reveal-from-right 900ms var(--ease) both;
  }

  .motion-ready .asset-sequence article:nth-child(2).is-revealed {
    animation-delay: 90ms;
  }

  .motion-ready .asset-sequence article:nth-child(3).is-revealed {
    animation-delay: 180ms;
  }

  .motion-ready .contact-inner.is-revealed {
    animation: reveal-up-scale 950ms var(--ease) both;
  }
}

@keyframes hero-element-enter {
  from {
    transform: translate3d(0, 28px, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes hero-image-enter {
  from {
    transform: translate3d(54px, 24px, 0) scale(0.94);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

@keyframes reveal-up-scale {
  from {
    transform: translate3d(0, 56px, 0) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

@keyframes reveal-from-left {
  from {
    transform: translate3d(-64px, 0, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes reveal-from-right {
  from {
    transform: translate3d(64px, 0, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes manifesto-arrive {
  from {
    transform: translate3d(0, 64px, 0) scale(0.86) rotate(-1.5deg);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .capabilities-intro {
      animation: reveal-up-scale linear both;
      animation-timeline: --capabilities-scene;
      animation-range: entry 0% cover 30%;
    }

    .line-left {
      animation: reveal-from-left linear both;
      animation-timeline: --capabilities-scene;
      animation-range: entry 4% cover 34%;
    }

    .line-right {
      animation: reveal-from-right linear both;
      animation-timeline: --capabilities-scene;
      animation-range: entry 4% cover 34%;
    }

    .work-intro-sticky {
      animation: manifesto-arrive linear both;
      animation-timeline: --work-intro-scene;
      animation-range: entry 0% cover 38%;
    }

    .unreal-copy {
      animation: reveal-from-left linear both;
      animation-timeline: --unreal-scene;
      animation-range: entry 0% cover 32%;
    }

    .asset-sequence article {
      animation: reveal-from-right linear both;
      animation-timeline: --unreal-scene;
      animation-range: entry 4% cover 38%;
    }

    .education-lockup {
      animation: reveal-from-left linear both;
      animation-timeline: --research-scene;
      animation-range: entry 0% cover 32%;
    }

    .research-paper {
      animation: reveal-from-right linear both;
      animation-timeline: --research-scene;
      animation-range: entry 4% cover 38%;
    }

    .contact-inner {
      animation: reveal-up-scale linear both;
      animation-timeline: --contact-scene;
      animation-range: entry 0% cover 34%;
    }
  }

  @media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
    .capabilities-intro,
    .capability-line,
    .unreal-copy,
    .asset-sequence article,
    .education-lockup,
    .research-paper {
      animation-timeline: view(block);
      animation-range: entry 0% entry 28%;
    }
  }
}

@media (max-width: 1100px) {
  .hero-copy {
    width: min(1200px, calc(100vw - 48px));
  }

  .hero h1 {
    max-width: 9ch;
    font-size: clamp(4.2rem, 8.4vw, 6.8rem);
  }

  .hero-portrait {
    right: -6vw;
    width: min(61vw, 700px);
  }

  .project-content,
  .unreal-sticky,
  .research-sticky {
    gap: 52px;
  }
}

@media (max-width: 880px) {
  :root {
    --shell: min(1200px, calc(100vw - 40px));
  }

  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 20px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    display: grid;
    transform: translateY(-16px);
    padding: 20px;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    background: rgb(9 11 12 / 98%);
    visibility: hidden;
    opacity: 0;
    transition:
      transform 240ms var(--ease),
      opacity 180ms ease,
      visibility 180ms ease;
  }

  .mobile-nav.is-open {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
  }

  .mobile-nav a {
    padding: 13px 0;
    font-size: 1rem;
  }

  .hero-copy {
    width: var(--shell);
  }

  .hero-portrait {
    right: -16vw;
    width: min(72vw, 650px);
    opacity: 0.76;
  }

  .hero h1 {
    max-width: 9ch;
  }

  .project-content,
  .unreal-sticky,
  .research-sticky {
    grid-template-columns: 1fr;
  }

  .project-content {
    gap: 46px;
  }

  .project-body {
    max-width: 42rem;
  }

  .unreal-sticky,
  .research-sticky {
    align-content: center;
  }

  .unreal-copy h2,
  .education-lockup h2 {
    max-width: 12ch;
  }
}

@media (max-width: 640px) {
  :root {
    --shell: calc(100vw - 32px);
    --header-height: 62px;
  }

  .hero {
    min-height: 125dvh;
  }

  .hero-copy {
    padding-top: calc(var(--header-height) + 6vh);
    padding-bottom: 5vh;
    justify-content: flex-start;
  }

  .hero-kicker {
    margin-bottom: 24px;
    font-size: 0.66rem;
  }

  .hero h1 {
    width: 100%;
    max-width: none;
    font-size: clamp(1.48rem, 7.4vw, 2.65rem);
    line-height: 0.96;
  }

  .hero-title-line {
    display: block;
    white-space: nowrap;
  }

  .hero-summary {
    width: min(43vw, 190px);
    max-width: none;
    margin-top: clamp(40px, 7vh, 64px);
    font-size: clamp(0.78rem, 3.1vw, 0.94rem);
    line-height: 1.55;
  }

  .hero-actions {
    width: min(43vw, 190px);
    margin-top: 18px;
    flex-direction: column;
    gap: 8px;
  }

  .button {
    width: 100%;
    min-height: 43px;
    padding: 0 12px;
    font-size: 0.76rem;
  }

  .hero-portrait {
    right: -28vw;
    width: min(106vw, 610px);
    height: 74dvh;
    opacity: 0.92;
  }

  .capabilities {
    min-height: auto;
  }

  .capabilities-sticky {
    position: relative;
    min-height: auto;
    padding: 110px 0 90px;
    overflow: visible;
  }

  .capabilities-intro h2 {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

  .capability-lines {
    margin-top: 54px;
  }

  .capability-line {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px 0;
  }

  .work-intro {
    min-height: 115dvh;
  }

  .work-intro h2 {
    max-width: 10ch;
    font-size: clamp(3.2rem, 16vw, 5rem);
  }

  .project-scene {
    min-height: 100dvh;
    align-items: flex-start;
  }

  .project-content {
    min-height: 100dvh;
    padding: calc(var(--header-height) + 7vh) 0 7vh;
    gap: 34px;
    align-content: center;
  }

  .project-heading > p,
  .education-lockup > p,
  .research-paper > p {
    margin-bottom: 18px;
    font-size: 0.65rem;
  }

  .project-heading h3 {
    font-size: clamp(4rem, 20vw, 6.5rem);
  }

  .project-summary {
    margin-bottom: 22px;
    font-size: 1rem;
  }

  .project-scope {
    margin-bottom: 26px;
    gap: 6px;
    font-size: 0.88rem;
  }

  .project-ghost {
    right: -0.06em;
    bottom: -0.08em;
    font-size: 44vw;
  }

  .unreal,
  .research {
    min-height: auto;
  }

  .unreal-sticky,
  .research-sticky {
    position: relative;
    min-height: auto;
    padding: 110px 0 100px;
    gap: 72px;
    overflow: visible;
  }

  .unreal-copy h2,
  .education-lockup h2 {
    font-size: clamp(3.6rem, 17vw, 5.7rem);
  }

  .asset-sequence h3 {
    font-size: 2.6rem;
  }

  .research-paper h3 {
    font-size: 2.4rem;
  }

  .contact {
    min-height: 92dvh;
  }

  .contact h2 {
    max-width: 9ch;
    font-size: clamp(3.8rem, 18vw, 5.8rem);
  }

  .contact-meta {
    flex-direction: column;
    gap: 12px;
  }

  .back-to-top {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.74rem;
  }
}

@media (max-width: 640px) {
  .hero-exit-sentinel {
    top: 20dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero,
  .capabilities,
  .work-intro,
  .unreal,
  .research {
    min-height: auto;
  }

  .hero-sticky,
  .capabilities-sticky,
  .work-intro-sticky,
  .project-scene,
  .unreal-sticky,
  .research-sticky {
    position: relative;
  }

  .project-scene {
    min-height: auto;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
