@layer reset, base, layout, components, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, ul, ol { margin: 0; }
  ul, ol { padding: 0; }
  button, input, textarea { font: inherit; }
  button, a { -webkit-tap-highlight-color: transparent; }
  img, svg { display: block; }
  img { max-width: 100%; }
}

@layer base {
  :root {
    --blue: #78a2d2;
    --blue-deep: #000000;
    --yellow: #feffaf;
    --maroon: #881719;
    --ink: #000000;
    --paper: #78a2d2;
    --white: #ffffff;
    --muted: rgba(0, 0, 0, 0.7);
    --line: rgba(0, 0, 0, 0.25);
    --line-dark: rgba(255, 255, 255, 0.28);
    --display: "Sora", sans-serif;
    --editorial: "Instrument Serif", serif;
    --body: "Manrope", sans-serif;
    --mono: "IBM Plex Mono", monospace;
    --gutter: clamp(1.25rem, 4vw, 4.5rem);
    --radius: 1rem;
    --header-h: 4.5rem;
  }

  html { overflow-x: clip; scroll-padding-top: calc(var(--header-h) + 1rem); }

  body {
    position: relative;
    isolation: isolate;
    min-width: 20rem;
    overflow-x: clip;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 0.96rem;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
  }

  body.nav-open, body.intro-active { overflow: hidden; }
  ::selection { background: var(--yellow); color: var(--ink); }
  a { color: inherit; text-decoration: none; }
  button { color: inherit; }
  :focus-visible { outline: 3px solid var(--maroon); outline-offset: 4px; }
  em { font: inherit; }
  .heading-color-accent { color: var(--maroon); }
  .about-accent { color: var(--maroon); font-family: inherit; font-style: normal; font-weight: 800; text-decoration: none; transition: none; }
  [hidden] { display: none !important; }

  .skip-link {
    position: fixed;
    z-index: 200;
    top: 0.75rem;
    left: 0.75rem;
    transform: translateY(-160%);
    padding: 0.7rem 1rem;
    background: var(--ink);
    color: var(--white);
    border-radius: 0.5rem;
  }
  .skip-link:focus { transform: translateY(0); }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
  .svg-sprite symbol, svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

  main { position: relative; z-index: 1; }
  .signal-field { position: absolute; z-index: 0; top: 0; left: 0; width: 100%; pointer-events: none; opacity: 1; }
  .intro-screen { position: fixed; z-index: 300; inset: 0; display: grid; place-items: center; overflow: hidden; background: var(--maroon); color: var(--blue); opacity: 1; pointer-events: auto; clip-path: inset(0); }
  .intro-screen span { display: inline-block; min-width: 7ch; font-family: var(--display); font-size: clamp(4.5rem, 11vw, 10rem); font-weight: 800; letter-spacing: -0.075em; line-height: 0.9; text-align: center; white-space: nowrap; }
  .intro-screen.is-leaving { visibility: hidden; opacity: 0; clip-path: inset(0 0 100% 0); pointer-events: none; transition: opacity 850ms cubic-bezier(0.22, 1, 0.36, 1), clip-path 1100ms cubic-bezier(0.76, 0, 0.24, 1), visibility 1100ms; }
  .intro-screen.is-leaving span { transform: translateY(-0.18em); opacity: 0; transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1), opacity 500ms ease; }
  .scroll-progress { position: fixed; z-index: 140; top: 0; left: 0; width: 100%; height: 2px; background: rgba(0, 0, 0, 0.16); pointer-events: none; }
  .scroll-progress span { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left center; background: var(--maroon); will-change: transform; }
  .signal-scout { position: fixed; z-index: 78; top: 0; left: 0; display: none; width: 2.55rem; height: 2.55rem; opacity: 0; transform: translate3d(var(--scout-x, calc(50vw - 1.3rem)), var(--scout-y, 30vh), 0); pointer-events: none; transition: opacity 120ms ease; will-change: transform; }
  .signal-scout.is-active { opacity: 1; }
  .signal-scout svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--ink); stroke-width: 1.6; transform: rotate(-135deg); transform-origin: center; }
  .signal-scout .scout-body { fill: var(--maroon); stroke: var(--ink); }
  .signal-scout .scout-trace { stroke: var(--white); stroke-width: 1.35; }
  .signal-scout .scout-lead, .signal-scout .scout-sensor-link { stroke: var(--ink); stroke-width: 1.65; }
  .signal-scout .scout-sensor { fill: var(--yellow); stroke: var(--ink); }
  .signal-scout.is-hovering-button .scout-body,
  .signal-scout.is-hovering-link .scout-body { fill: var(--ink); }

  body.intro-active .hero-identity,
  body.intro-active .hero-copy,
  body.intro-active .hero-foot { opacity: 0; transform: translate3d(0, 1.1rem, 0); }
  .hero-identity, .hero-copy, .hero-foot { transition: opacity 720ms ease, transform 900ms cubic-bezier(0.22, 1, 0.36, 1); }
  .hero-copy { transition-delay: 90ms; }
  .hero-foot { transition-delay: 170ms; }

}

@layer layout {
  .section-shell { width: min(100% - (var(--gutter) * 2), 92rem); margin-inline: auto; }
  .section-space { padding-block: clamp(4.5rem, 8vw, 7.5rem); }

  .section-index, .system-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--maroon);
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  .section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 25rem);
    gap: 3rem;
    align-items: end;
    margin-bottom: clamp(2rem, 4vw, 3.75rem);
  }
  .section-heading h2, .section-intro h2 {
    max-width: 13ch;
    margin-top: 1rem;
    font-family: var(--display);
    font-size: clamp(2.25rem, 4.2vw, 4.8rem);
    font-weight: 700;
    letter-spacing: -0.06em;
    line-height: 0.96;
  }
  .section-heading > p { max-width: 34rem; color: var(--muted); font-size: clamp(1rem, 1.25vw, 1.15rem); }
}

@layer components {
  .site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    display: flex;
    width: 100%;
    height: var(--header-h);
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
    padding-inline: var(--gutter);
    border-bottom: 1px solid transparent;
    transition: background 300ms ease, border-color 300ms ease, height 300ms ease;
  }
  .site-header.is-scrolled { height: 4rem; border-color: var(--line); background: rgba(120, 162, 210, 0.96); }
  .primary-nav { display: flex; align-items: baseline; gap: clamp(0.75rem, 1.3vw, 1.4rem); }
  .primary-nav a { position: relative; padding-block: 0.5rem; color: var(--ink); font-family: var(--mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.06em; line-height: 1; text-transform: uppercase; transition: color 180ms ease; }
  .primary-nav a:hover, .primary-nav a.is-active { color: var(--maroon); }
  .nav-toggle { display: none; border: 0; background: transparent; cursor: pointer; }

  .hero { position: relative; display: flex; min-height: 100svh; overflow: clip; flex-direction: column; padding-top: calc(var(--header-h) + 1.25rem); padding-bottom: clamp(1.25rem, 2.5vh, 2rem); }
  .hero-identity { position: relative; z-index: 2; display: flex; align-items: flex-start; flex-direction: column; font-family: var(--display); font-size: clamp(0.65rem, 0.9vw, 0.78rem); letter-spacing: 0.08em; line-height: 1.55; }
  .hero-identity strong { font-weight: 700; }
  .hero-identity span { color: var(--maroon); font-family: var(--mono); }
  .hero-grid { position: absolute; z-index: 1; inset: 0; display: grid; width: 100%; min-height: 0; grid-template-columns: minmax(0, 1fr); place-items: center; padding: var(--header-h) var(--gutter); pointer-events: none; }
  .hero-copy { position: relative; isolation: isolate; width: 100%; min-width: 0; text-align: center; }
  .hero-copy h1 { position: relative; z-index: 2; width: min(74vw, 22ch); margin-inline: auto; color: var(--ink); font-family: var(--display); font-size: clamp(2.35rem, 4.25vw, 4.55rem); font-style: normal; font-weight: 800; letter-spacing: -0.055em; line-height: 0.96; text-align: center; }
  .hero-line { display: block; white-space: nowrap; }
  .hero-line:nth-child(1) { font-size: 0.92em; letter-spacing: -0.06em; }
  .hero-line:nth-child(2) { font-size: 1.04em; letter-spacing: -0.055em; }
  .hero-line:nth-child(3) { font-size: 0.98em; letter-spacing: -0.055em; }
  .hero-copy h1, .hero-copy h1 * { color: var(--ink); font-family: var(--display); font-style: normal; text-decoration: none; transition: none; }
  .signature-button {
    --mx: 0px;
    --my: 0px;
    position: relative;
    isolation: isolate;
    display: inline-flex;
    min-height: 3.3rem;
    align-items: center;
    justify-content: space-between;
    gap: 2.2rem;
    overflow: hidden;
    transform: translate3d(var(--mx), var(--my), 0);
    padding: 0.7rem 0.75rem 0.7rem 1.4rem;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: var(--ink);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 250ms ease, transform 180ms ease, box-shadow 250ms ease;
  }
  .signature-button::before { position: absolute; z-index: -1; inset: 0; transform: translateX(-105%) skewX(-18deg); background: var(--maroon); content: ""; transition: transform 420ms cubic-bezier(0.65, 0, 0.35, 1); }
  .signature-button svg { width: 2.2rem; height: 2.2rem; padding: 0.55rem; border-radius: 50%; background: var(--blue); transition: transform 250ms ease, background 250ms ease; }
  .signature-button:hover { color: var(--white); box-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.16); }
  .signature-button:hover::before { transform: translateX(0) skewX(0); }
  .signature-button:hover svg { transform: translateX(0.15rem) rotate(-4deg); background: var(--maroon); color: var(--white); }
  .text-action { --mx: 0px; --my: 0px; display: inline-flex; align-items: center; gap: 0.55rem; transform: translate3d(var(--mx), var(--my), 0); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; transition: color 200ms ease, transform 180ms ease; }
  .text-action svg { width: 1rem; height: 1rem; transition: transform 200ms ease; }
  .text-action:hover { color: var(--maroon); }
  .text-action:hover svg { transform: translate(0.15rem, -0.15rem); }

  .hero-foot { position: relative; z-index: 2; display: grid; align-items: end; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 2rem; margin-top: auto; }
  .hero-socials { display: flex; align-items: center; flex-direction: column; gap: 0.45rem; }
  .hero-socials a { display: grid; width: 2.55rem; min-height: 2.55rem; place-items: center; border: 1px solid rgba(0, 0, 0, 0.38); border-radius: 50%; background: rgba(120, 162, 210, 0.82); transition: background 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms ease; }
  .hero-socials svg { width: 1.05rem; height: 1.05rem; stroke-width: 1.65; transition: transform 180ms ease; }
  .hero-socials a:hover { transform: translateY(-0.18rem); border-color: var(--maroon); background: var(--maroon); color: var(--white); }
  .hero-socials a:hover svg { transform: scale(1.06); }
  .hero-divider { display: block; width: 100%; height: 1px; grid-column: 1 / -1; background: var(--line); }
  .hero-socials a, .contact-links a { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
  .contact-links a:hover { color: var(--maroon); }
  .scroll-cue { justify-self: end; padding-block: 0.2rem; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

  .about { position: relative; display: grid; min-height: 100svh; align-items: center; border-bottom: 1px solid var(--ink); padding-block: clamp(5.5rem, 10vh, 8rem); }
  .about-intro { position: relative; display: flex; min-height: auto; justify-content: center; flex-direction: column; padding-block: clamp(2rem, 5vh, 4rem); }
  .about-intro h2 { max-width: 23ch; margin-top: clamp(1.5rem, 3vw, 2.5rem); color: var(--ink); font-family: var(--display); font-size: clamp(2rem, 3.55vw, 4rem); font-style: normal; font-weight: 700; letter-spacing: -0.045em; line-height: 1.05; overflow-wrap: break-word; }
  .skills { overflow: clip; }
  .skills-network { position: relative; display: grid; min-height: 34rem; grid-template-areas: "left detail right"; grid-template-columns: minmax(13rem, 0.9fr) minmax(20rem, 1.2fr) minmax(13rem, 0.9fr); gap: clamp(1.25rem, 3vw, 3rem); align-items: stretch; padding: clamp(1.25rem, 2.6vw, 2.5rem); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
  .network-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
  .network-lines path { fill: none; stroke: rgba(0, 0, 0, 0.2); stroke-width: 1.2; stroke-dasharray: 3 6; transition: stroke 180ms ease, stroke-width 180ms ease, stroke-dashoffset 360ms ease; }
  .network-lines path.is-active { stroke: var(--maroon); stroke-width: 2.2; stroke-dashoffset: -18; }
  .skill-node-column { position: relative; z-index: 2; display: grid; align-content: center; gap: clamp(0.65rem, 1.5vw, 1rem); }
  .skill-node-column-left { grid-area: left; }
  .skill-node-column-right { grid-area: right; }
  .skill-node { position: relative; display: flex; width: 100%; min-height: 4rem; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid transparent; background: transparent; text-align: left; cursor: pointer; transition: transform 220ms ease, background 220ms ease, color 220ms ease; }
  .skill-node::before { width: 0.55rem; aspect-ratio: 1; flex: 0 0 auto; border: 1px solid var(--ink); border-radius: 50%; background: var(--blue); content: ""; }
  .skill-node::after { width: clamp(1.5rem, 4vw, 4rem); height: 1px; margin-left: auto; background: var(--ink); content: ""; }
  .skill-node small { color: var(--maroon); font-size: 0.62rem; font-weight: 800; }
  .skill-node span { font-family: var(--display); font-size: clamp(0.78rem, 1.15vw, 1rem); font-weight: 700; line-height: 1.2; }
  .skill-node:hover, .skill-node:focus-visible, .skill-node.is-active { transform: translateX(0.35rem); background: var(--maroon); color: var(--white); }
  .skill-node.is-active::before { border-color: var(--yellow); background: var(--yellow); }
  .skill-node.is-active::after { background: var(--yellow); }
  .skill-node:hover small, .skill-node:focus-visible small, .skill-node.is-active small { color: var(--yellow); }
  .skill-details { position: relative; z-index: 2; grid-area: detail; width: min(100%, 21rem); min-height: 18.5rem; align-self: center; justify-self: center; text-align: left; }
  .skill-detail { position: relative; display: flex; min-height: 18.5rem; align-items: flex-start; flex-direction: column; gap: 0.85rem; padding: clamp(1.3rem, 2vw, 1.65rem); border-block: 1px solid var(--ink); border-left: 0.28rem solid var(--maroon); background: var(--blue); color: var(--ink); text-align: left; animation: skill-panel-in 360ms cubic-bezier(0.22, 1, 0.36, 1); }
  .skill-detail::after { position: absolute; top: 1rem; right: 1rem; width: 0.48rem; aspect-ratio: 1; border: 1px solid var(--ink); border-radius: 50%; background: var(--yellow); content: ""; }
  .skill-detail > p { color: var(--maroon); font-family: var(--mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
  .skill-detail h3 { max-width: 16ch; margin-inline: 0; font-family: var(--display); font-size: clamp(1.25rem, 1.75vw, 1.75rem); font-weight: 700; line-height: 1.08; }
  .skill-detail ul { display: grid; width: 100%; gap: 0.42rem; margin-top: auto; border-top: 1px solid var(--line); padding-top: 0.85rem; list-style: none; text-align: left; }
  .skill-detail li { font-size: 0.72rem; text-align: left; }
  .skill-detail li::before { display: inline-block; width: 0.3rem; margin-right: 0.5rem; aspect-ratio: 1; border-radius: 50%; background: var(--yellow); vertical-align: 0.12em; content: ""; }
  @keyframes skill-panel-in { from { opacity: 0; transform: translateX(0.65rem); } to { opacity: 1; transform: translateX(0); } }

  .project-controls { display: flex; align-items: center; gap: 1rem; justify-self: end; }
  .project-controls button { display: grid; width: 3rem; aspect-ratio: 1; place-items: center; border: 1px solid var(--ink); border-radius: 50%; background: transparent; cursor: pointer; transition: background 200ms ease, color 200ms ease, transform 200ms ease; }
  .project-controls button:hover { transform: scale(1.06); background: var(--ink); color: var(--white); }
  .project-controls span { min-width: 4.7rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-align: center; }
  .project-rail { display: grid; grid-auto-columns: minmax(23rem, 34rem); grid-auto-flow: column; gap: 1.25rem; overflow-x: auto; padding: 0.25rem 0.25rem 1.7rem; scroll-padding-inline: 0.25rem; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--maroon) transparent; }
  .project-card { display: flex; min-height: 31rem; flex-direction: column; scroll-snap-align: start; padding: 1.5rem; border: 1px solid var(--ink); border-radius: var(--radius); background: rgba(255, 255, 255, 0.9); transition: transform 280ms ease, background 280ms ease, color 280ms ease, box-shadow 280ms ease; }
  .project-card:hover, .project-card:focus-within { transform: translateY(-0.35rem); background: var(--maroon); color: var(--white); box-shadow: 0 1.2rem 2.7rem rgba(0, 0, 0, 0.17); }
  .project-featured { border-top: 0.35rem solid var(--maroon); }
  .project-number { align-self: end; font-family: var(--mono); font-size: 2.4rem; line-height: 1; }
  .project-stack { margin-top: 2.5rem; color: var(--maroon); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
  .project-card:hover .project-stack { color: var(--yellow); }
  .project-card h3 { max-width: 14ch; margin-top: 0.7rem; font-size: clamp(1.65rem, 2.3vw, 2.6rem); letter-spacing: -0.05em; line-height: 1.04; }
  .project-card > p:not(.project-stack) { margin-top: 1.5rem; color: var(--muted); font-size: 0.9rem; }
  .project-card:hover > p:not(.project-stack), .project-card:focus-within > p:not(.project-stack) { color: rgba(255, 255, 255, 0.8); }
  .project-key { margin-top: auto; padding-top: 1.5rem; border-top: 1px solid currentColor; font-size: 0.78rem; }
  .project-key span { display: block; margin-bottom: 0.45rem; color: var(--maroon); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
  .project-card:hover .project-key span { color: var(--yellow); }
  .project-card > a, .project-status { display: flex; align-items: center; gap: 0.45rem; align-self: flex-start; margin-top: 1.2rem; font-size: 0.67rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
  .project-card > a { border-bottom: 1px solid currentColor; }
  .project-card > a svg { width: 0.9rem; height: 0.9rem; transition: transform 200ms ease; }
  .project-card > a:hover svg { transform: translate(0.15rem, -0.15rem); }
  .project-status { color: var(--muted); }
  .project-card:hover .project-status { color: rgba(255, 255, 255, 0.68); }

  .experience-heading h2 { max-width: 12ch; }
  .experience-list { border-top: 1px solid var(--ink); }
  .experience-row { display: grid; grid-template-columns: minmax(12rem, 0.45fr) minmax(0, 1.55fr); gap: clamp(2rem, 6vw, 6rem); padding: clamp(1.8rem, 3.5vw, 3rem) clamp(0.9rem, 2vw, 1.5rem); border-bottom: 1px solid var(--line); transition: background 260ms ease, color 260ms ease; }
  .experience-meta { display: flex; justify-content: space-between; gap: 2rem; color: var(--muted); font-size: 0.69rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
  .experience-meta span { color: var(--maroon); }
  .experience-main > p { color: var(--blue-deep); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
  .experience-main > p a { border-bottom: 1px solid currentColor; }
  .experience-main h3 { margin-top: 0.55rem; font-size: clamp(1.6rem, 2.8vw, 3.05rem); letter-spacing: -0.05em; line-height: 0.99; }
  .experience-main ul { display: grid; gap: 0.55rem; max-width: 57rem; margin-top: 1.35rem; list-style: none; color: var(--muted); }
  .experience-main li { position: relative; padding-left: 1.25rem; font-size: 0.88rem; }
  .experience-main li::before { position: absolute; top: 0.7em; left: 0; width: 0.38rem; height: 0.38rem; border-radius: 50%; background: var(--maroon); content: ""; }
  .research-panel { display: grid; grid-template-columns: minmax(10rem, 0.42fr) minmax(0, 1.58fr); gap: clamp(2rem, 5vw, 5rem); margin-top: clamp(3rem, 5vw, 5rem); padding: clamp(1.5rem, 3vw, 2.75rem); border: 1px solid var(--ink); border-radius: var(--radius); background: transparent; transition: background 260ms ease, color 260ms ease; }
  .research-mark { display: flex; min-height: 10rem; flex-direction: column; justify-content: space-between; color: var(--ink); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
  .research-mark i { width: 1px; height: 4rem; background: rgba(0, 0, 0, 0.45); }
  .research-type { color: var(--maroon); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
  .research-panel h3 { max-width: 22ch; margin-top: 0.65rem; font-size: clamp(1.55rem, 2.8vw, 2.95rem); letter-spacing: -0.05em; line-height: 1; }
  .research-panel ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin-top: 1.7rem; border-top: 1px solid rgba(0, 0, 0, 0.42); padding-top: 1.2rem; list-style: none; }
  .research-panel li { color: rgba(0, 0, 0, 0.82); font-size: 0.75rem; }

  .education-list { position: relative; border-top: 1px solid var(--ink); }
  .education-list::before { position: absolute; top: 0; bottom: 0; left: clamp(8rem, 15vw, 13rem); width: 1px; background: var(--line); content: ""; }
  .education-row { position: relative; display: grid; grid-template-columns: clamp(8rem, 15vw, 13rem) minmax(17rem, 1fr) minmax(13rem, 0.75fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; min-height: clamp(9.5rem, 14vw, 12.5rem); padding-inline: clamp(0.9rem, 2vw, 1.5rem); border-bottom: 1px solid var(--line); transition: background 260ms ease, color 260ms ease; }
  .education-year { display: flex; height: 100%; flex-direction: column; justify-content: center; }
  .education-year strong { color: var(--blue-deep); font-family: var(--mono); font-size: clamp(2.6rem, 4.6vw, 4.6rem); font-weight: 700; letter-spacing: -0.05em; line-height: 0.84; }
  .education-year span { margin-top: 0.8rem; color: var(--maroon); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
  .education-row > div:nth-child(2) { padding-left: clamp(1rem, 2vw, 2rem); }
  .education-row > div:nth-child(2) p { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; }
  .education-row h3 { max-width: 19ch; margin-block: 0.35rem; font-size: clamp(1.45rem, 2.6vw, 2.7rem); letter-spacing: -0.045em; line-height: 1; }

  .experience-row.is-row-active, .research-panel.is-row-active, .education-row.is-row-active, .leadership-list li.is-row-active, .community-list li.is-row-active, .award-row.is-row-active { background: var(--maroon); color: var(--white); }
  .experience-row.is-row-active .experience-meta, .experience-row.is-row-active .experience-main > p, .experience-row.is-row-active .experience-main ul, .research-panel.is-row-active .research-mark, .research-panel.is-row-active .research-type, .research-panel.is-row-active li, .education-row.is-row-active p, .education-row.is-row-active .education-year strong, .education-row.is-row-active .education-year span, .leadership-list li.is-row-active p, .leadership-list li.is-row-active time, .community-list li.is-row-active p, .community-list li.is-row-active time, .award-row.is-row-active p, .award-row.is-row-active time { color: var(--white); }
  .experience-row.is-row-active .experience-meta span, .research-panel.is-row-active .research-type, .leadership-list li.is-row-active > span, .community-list li.is-row-active > span { color: var(--yellow); }
  .experience-row.is-row-active li::before, .education-row.is-row-active .education-node { background: var(--yellow); }
  .research-panel.is-row-active ul { border-color: rgba(255, 255, 255, 0.45); }
  .education-note { max-width: 28rem; color: var(--muted); font-size: 0.85rem; }
  .education-node { justify-self: end; width: 0.7rem; aspect-ratio: 1; border-radius: 50%; background: var(--maroon); box-shadow: 0 0 0 0.5rem rgba(136, 23, 25, 0.1); }

  .awards { position: relative; overflow: clip; background: var(--blue); color: var(--ink); }
  .awards .section-index { color: var(--maroon); }
  .awards-heading h2 { max-width: 18ch; }
  .awards-heading > p { color: var(--muted); }
  .awards-scanner { position: relative; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: stretch; border-top: 1px solid var(--ink); }
  .scanner-rail { position: relative; min-height: 100%; }
  .scanner-rail i { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--ink); transform: translateX(-50%); }
  .scanner-rail b { position: absolute; top: var(--award-marker-y, 3.75rem); left: 50%; width: 0.65rem; aspect-ratio: 1; border: 2px solid var(--maroon); border-radius: 50%; background: var(--yellow); transform: translate(-50%, -50%); transition: top 140ms linear; }
  .award-list { min-width: 0; }
  .award-row { position: relative; display: grid; grid-template-columns: 5rem minmax(0, 1fr) 1rem; gap: 1.5rem; align-items: center; min-height: 7.5rem; padding: 1.2rem 1.3rem; border-bottom: 1px solid var(--line); transition: background 260ms ease, color 260ms ease; }
  .award-row time { color: var(--maroon); font-family: var(--mono); font-size: 0.65rem; font-weight: 600; }
  .award-row h3 { font-size: clamp(1.1rem, 1.85vw, 1.7rem); letter-spacing: -0.03em; line-height: 1.08; }
  .award-row p { margin-top: 0.35rem; color: var(--muted); font-size: 0.73rem; }
  .award-row > span { width: 0.55rem; aspect-ratio: 1; justify-self: end; border: 1px solid var(--maroon); border-radius: 50%; }
  .award-row.is-row-active > span { border-color: var(--yellow); background: var(--yellow); }

  .leadership-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 26rem); gap: 3rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
  .leadership-intro h2 { margin-top: 0.8rem; font-family: var(--display); font-size: clamp(2.25rem, 4.15vw, 4.45rem); letter-spacing: -0.055em; line-height: 0.98; }
  .leadership-intro > p { color: var(--muted); }
  .leadership-list { border-top: 1px solid var(--ink); list-style: none; }
  .subsection-label { margin-bottom: 0.75rem; color: var(--maroon); font-family: var(--mono); font-size: 0.63rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
  .leadership-list li, .community-list li { position: relative; display: grid; grid-template-columns: 4rem minmax(0, 1fr) 13rem; gap: 2rem; align-items: center; min-height: 7.4rem; padding-inline: 1rem; border-bottom: 1px solid var(--line); transition: background 250ms ease, color 250ms ease; }
  .leadership-list > li > span { color: var(--maroon); font-size: 0.66rem; font-weight: 800; }
  .leadership-list h3, .community-list h3 { font-size: clamp(1.15rem, 1.85vw, 1.85rem); letter-spacing: -0.035em; line-height: 1.07; }
  .leadership-list p, .community-list p { margin-top: 0.35rem; color: var(--muted); font-size: 0.76rem; }
  .leadership-list p a { border-bottom: 1px solid currentColor; }
  .leadership-list time, .community-list time { justify-self: end; color: var(--muted); font-family: var(--mono); font-size: 0.64rem; font-weight: 600; text-transform: uppercase; }
  .community-block { margin-top: 2.5rem; }
  .community-list { border-top: 1px solid var(--ink); list-style: none; }
  .community-list > li > span { color: var(--maroon); font-size: 0.66rem; font-weight: 800; }

  .collaborate-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(19rem, 0.8fr); gap: clamp(2.5rem, 6vw, 6rem); padding: clamp(1.75rem, 4vw, 3.5rem); border: 1px solid var(--maroon); border-left-width: 0.4rem; border-radius: var(--radius); background: rgba(255, 255, 255, 0.14); color: var(--ink); }
  .collaborate-panel .section-index { color: var(--maroon); }
  .collaborate-panel h2 { max-width: 14ch; margin-top: 0.8rem; font-family: var(--display); font-size: clamp(2.25rem, 4.15vw, 4.45rem); letter-spacing: -0.055em; line-height: 0.97; }
  .collaborate-panel > div > p:not(.section-index) { max-width: 34rem; margin-top: 1.7rem; color: var(--muted); }
  .signature-button-light { margin-top: 2rem; border-color: var(--maroon); background: var(--maroon); color: var(--white); }
  .signature-button-light::before { background: var(--ink); }
  .collaborate-fields { border-top: 1px solid var(--line); }
  .collaborate-fields span { display: flex; align-items: center; justify-content: space-between; padding-block: 1.15rem; border-bottom: 1px solid var(--line); font-size: clamp(1.1rem, 1.7vw, 1.5rem); font-weight: 700; letter-spacing: -0.03em; }
  .collaborate-fields i { color: var(--maroon); font-size: 0.6rem; font-style: normal; letter-spacing: 0.12em; }

  .contact-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(20rem, 0.7fr); gap: clamp(2.5rem, 6vw, 6.5rem); align-items: start; }
  .contact-statement { position: relative; padding-top: 1rem; }
  .contact-statement h2 { max-width: 13ch; margin-top: 1rem; font-family: var(--display); font-size: clamp(2.6rem, 4.8vw, 5.1rem); letter-spacing: -0.055em; line-height: 0.94; }
  .contact-intro { max-width: 35rem; margin-top: 1.5rem; color: var(--muted); font-size: clamp(0.95rem, 1.2vw, 1.08rem); }
  .email-cta { --mx: 0px; --my: 0px; display: inline-flex; min-height: 3.25rem; align-items: center; gap: 1.3rem; transform: translate3d(var(--mx), var(--my), 0); margin-top: 1.6rem; padding: 0.7rem 0.8rem 0.7rem 1.2rem; border: 1px solid var(--maroon); border-radius: 999px; background: var(--maroon); color: var(--white); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: background 200ms ease, color 200ms ease, transform 180ms ease; }
  .email-cta svg { width: 1.8rem; height: 1.8rem; padding: 0.35rem; border: 1px solid var(--yellow); border-radius: 50%; }
  .email-cta:hover { background: var(--ink); }
  .contact-links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.5rem; }
  .contact-form { padding: clamp(1.4rem, 2.5vw, 2rem); border: 1px solid var(--ink); border-radius: var(--radius); background: var(--white); }
  .form-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 2rem; color: var(--maroon); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
  .form-head i { flex: 1; height: 1px; background: var(--line); }
  .contact-form label { display: block; margin-top: 1.1rem; color: var(--muted); font-size: 0.63rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
  .contact-form input, .contact-form textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; outline: 0; background: transparent; color: var(--ink); padding: 0.7rem 0; }
  .contact-form textarea { min-height: 6rem; resize: vertical; }
  .contact-form input:focus, .contact-form textarea:focus { border-color: var(--maroon); box-shadow: 0 1px 0 var(--maroon); }
  .signature-button-dark { width: 100%; margin-top: 2rem; cursor: pointer; }
  .signature-button-dark:disabled { cursor: wait; opacity: 0.72; }

  .site-footer { display: flex; min-height: 9rem; align-items: center; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--ink); }
  .site-footer p, .site-footer > a:last-child { font-size: 0.67rem; font-weight: 700; letter-spacing: 0.06em; }
  .site-footer > a:last-child { border-bottom: 1px solid var(--ink); }

  [data-reveal] { --reveal-x: 0; --reveal-y: 1.6rem; opacity: 0; transform: translate3d(var(--reveal-x), var(--reveal-y), 0); clip-path: inset(0 0 10% 0); transition: opacity 520ms ease var(--reveal-delay, 0ms), transform 720ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms), clip-path 720ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms), background-color 260ms ease, color 260ms ease; }
  [data-reveal="left"] { --reveal-x: -1.8rem; --reveal-y: 0; }
  [data-reveal="right"] { --reveal-x: 1.8rem; --reveal-y: 0; }
  [data-reveal].is-visible { opacity: 1; transform: translate3d(0, 0, 0); clip-path: inset(0); }
  .hero-copy[data-reveal] .hero-line { opacity: 0; transform: translate3d(0, 0.75em, 0); clip-path: inset(0 0 18% 0); transition: opacity 460ms ease, transform 680ms cubic-bezier(0.22, 1, 0.36, 1), clip-path 680ms cubic-bezier(0.22, 1, 0.36, 1); }
  .hero-copy[data-reveal].is-visible .hero-line { opacity: 1; transform: translate3d(0, 0, 0); clip-path: inset(0); }
  .hero-copy[data-reveal].is-visible .hero-line:nth-child(1) { transition-delay: 40ms; }
  .hero-copy[data-reveal].is-visible .hero-line:nth-child(2) { transition-delay: 105ms; }
  .hero-copy[data-reveal].is-visible .hero-line:nth-child(3) { transition-delay: 170ms; }
  .section-heading[data-reveal] .section-index,
  .section-heading[data-reveal] h2,
  .section-heading[data-reveal] > p,
  .section-heading[data-reveal] > .project-controls,
  .leadership-intro[data-reveal] .section-index,
  .leadership-intro[data-reveal] h2,
  .leadership-intro[data-reveal] > p,
  .about-intro[data-reveal] .section-index,
  .about-intro[data-reveal] h2 { opacity: 0; translate: 0 0.7rem; transition: opacity 440ms ease, translate 620ms cubic-bezier(0.22, 1, 0.36, 1); }
  .section-heading[data-reveal].is-visible .section-index,
  .leadership-intro[data-reveal].is-visible .section-index,
  .about-intro[data-reveal].is-visible .section-index { opacity: 1; translate: 0; transition-delay: 45ms; }
  .section-heading[data-reveal].is-visible h2,
  .leadership-intro[data-reveal].is-visible h2,
  .about-intro[data-reveal].is-visible h2 { opacity: 1; translate: 0; transition-delay: 105ms; }
  .section-heading[data-reveal].is-visible > p,
  .section-heading[data-reveal].is-visible > .project-controls,
  .leadership-intro[data-reveal].is-visible > p { opacity: 1; translate: 0; transition-delay: 165ms; }
}

@layer responsive {
  @media (max-width: 1180px) {
    :root { --header-h: 4.25rem; }
    .nav-toggle { position: relative; z-index: 102; display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.8rem; border: 1px solid var(--ink); border-radius: 999px; background: var(--paper); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
    .nav-toggle i, .nav-toggle i::after { display: block; width: 1rem; height: 1px; background: currentColor; content: ""; transition: transform 250ms ease; }
    .nav-toggle i::after { transform: translateY(0.28rem); }
    .nav-toggle[aria-expanded="true"] i { transform: rotate(45deg); }
    .nav-toggle[aria-expanded="true"] i::after { transform: rotate(-90deg); }
    .primary-nav { position: fixed; z-index: 101; inset: 0; display: flex; align-items: flex-start; justify-content: center; flex-direction: column; gap: 0; transform: translateY(-105%); padding: 6rem var(--gutter) 3rem; background: var(--blue); color: var(--ink); visibility: hidden; transition: transform 550ms cubic-bezier(0.22, 1, 0.36, 1), visibility 550ms; }
    .primary-nav.is-open { transform: translateY(0); visibility: visible; }
    .primary-nav a { width: 100%; padding: 0.5rem 0; border-bottom: 1px solid var(--line-dark); color: var(--ink); font-size: clamp(1.9rem, 5vw, 3.5rem); font-weight: 600; letter-spacing: -0.04em; text-transform: none; }
    .primary-nav a.is-active { color: var(--maroon); }
    .skills-network { grid-template-columns: minmax(11rem, 0.85fr) minmax(18rem, 1.2fr) minmax(11rem, 0.85fr); gap: 1.5rem; }
  }

  @media (max-width: 900px) {
    .section-heading { grid-template-columns: 1fr; gap: 1.5rem; }
    .section-heading > p { max-width: 32rem; }
    .hero-copy h1 { width: min(82vw, 22ch); font-size: clamp(2.05rem, 5.25vw, 3.45rem); }
    .skills-network { min-height: auto; grid-template-areas: "left right" "detail detail"; grid-template-columns: repeat(2, 1fr); gap: 1rem; padding: 1.2rem; }
    .network-lines { display: none; }
    .skill-node-column { gap: 0.8rem; }
    .skill-node { min-height: 4.5rem; }
    .skill-details { width: min(100%, 22rem); min-height: 18.5rem; }
    .project-rail { grid-auto-columns: minmax(21rem, 65vw); }
    .research-panel { grid-template-columns: 1fr; }
    .research-mark { min-height: auto; flex-direction: row; align-items: center; }
    .research-mark i { width: auto; height: 1px; flex: 1; margin-inline: 1rem; }
    .research-panel ul { grid-template-columns: 1fr; }
    .education-list::before { left: 8rem; }
    .education-row { grid-template-columns: 8rem 1fr; padding-block: 2.5rem; }
    .education-note, .education-node { grid-column: 2; justify-self: start; }
    .awards-scanner { grid-template-columns: 2rem minmax(0, 1fr); gap: 1rem; }
    .leadership-intro { grid-template-columns: 1fr; }
    .leadership-list li, .community-list li { grid-template-columns: 3rem 1fr; gap: 1rem; padding-block: 1.3rem; }
    .leadership-list time, .community-list time { grid-column: 2; justify-self: start; }
    .collaborate-panel, .contact-layout { grid-template-columns: 1fr; }
    .contact-form { width: min(100%, 38rem); justify-self: end; }
  }

  @media (max-width: 620px) {
    :root { --gutter: 1.1rem; }
    .site-header.is-scrolled { height: 4.1rem; }
    .section-space { padding-block: 4.25rem; }
    .section-heading h2 { font-size: clamp(2.15rem, 10.8vw, 3.25rem); }
    .hero { min-height: 100svh; padding-top: 5.5rem; }
    .hero-grid { padding: 5.75rem 1rem; }
    .hero-copy h1 { width: min(92vw, 22ch); max-width: 100%; font-size: clamp(0.92rem, 4.3vw, 1.8rem); letter-spacing: -0.05em; line-height: 1; }
    .hero-line { max-width: 100%; }
    .hero-foot { grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem 1rem; }
    .hero-socials { flex-flow: row nowrap; gap: 0.25rem; }
    .hero-socials a { min-height: 1.75rem; }
    .scroll-cue { justify-self: end; text-align: right; }
    .hero-divider { grid-column: 1 / -1; }
    .about-intro h2 { font-size: clamp(1.62rem, 6.8vw, 2.4rem); line-height: 1.08; }
    .skills-network { grid-template-areas: "left" "right" "detail"; grid-template-columns: 1fr; }
    .skill-node-column { grid-column: 1; }
    .skill-details { grid-column: 1; width: 100%; min-height: 18.5rem; }
    .skill-detail { min-height: 18.5rem; padding: 1.3rem; }
    .project-controls { justify-self: start; }
    .project-rail { grid-auto-columns: calc(100vw - 3rem); }
    .project-card { min-height: 30rem; padding: 1.25rem; }
    .experience-row { grid-template-columns: 1fr; gap: 1.4rem; }
    .experience-meta { justify-content: flex-start; }
    .experience-main h3 { font-size: 2.15rem; }
    .research-panel { padding: 1.4rem; }
    .research-panel h3 { font-size: 2rem; }
    .education-list::before { left: 0; }
    .education-row { grid-template-columns: 1fr; gap: 1.2rem; padding: 2rem 0 2rem 1.2rem; }
    .education-row > div:nth-child(2), .education-note, .education-node { grid-column: 1; padding-left: 0; }
    .education-year strong { font-size: 3.4rem; }
    .awards-scanner { grid-template-columns: 1rem minmax(0, 1fr); gap: 0.75rem; }
    .award-row { grid-template-columns: 3.5rem minmax(0, 1fr) 0.7rem; gap: 0.8rem; min-height: 6.5rem; padding: 1rem 0.7rem; }
    .leadership-intro h2 { font-size: 2.55rem; }
    .leadership-list li, .community-list li { grid-template-columns: 2rem 1fr; }
    .leadership-list h3 { font-size: 1.35rem; }
    .collaborate-panel { padding: 1.4rem; }
    .collaborate-panel h2 { font-size: 2.55rem; }
    .contact-statement h2 { font-size: clamp(2.5rem, 11vw, 3.5rem); }
    .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 2rem; }
    .signal-scout { width: 2rem; height: 2rem; opacity: 0.72; }
  }

  @media (hover: none), (pointer: coarse) {
    .skill-node:hover { transform: none; background: transparent; }
    .skill-node.is-active { transform: none; background: var(--maroon); color: var(--white); }
    .signal-scout { display: none; }
  }

  @media (hover: hover) and (pointer: fine) {
    html, body, a, button, input, textarea, select, summary { cursor: none; }
    .signal-scout { display: block; }
  }

  @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; }
    html, body, a, button, input, textarea, select, summary { cursor: auto; }
    [data-reveal],
    .hero-copy[data-reveal] .hero-line,
    .section-heading[data-reveal] .section-index,
    .section-heading[data-reveal] h2,
    .section-heading[data-reveal] > p,
    .section-heading[data-reveal] > .project-controls,
    .leadership-intro[data-reveal] .section-index,
    .leadership-intro[data-reveal] h2,
    .leadership-intro[data-reveal] > p,
    .about-intro[data-reveal] .section-index,
    .about-intro[data-reveal] h2 { opacity: 1; transform: none; translate: none; clip-path: none; }
    .intro-screen { display: none; }
    .signal-field { opacity: 0.46; }
    .signal-scout { display: none; }
  }
}
