@import url('https://unpkg.com/normalize.css') layer(normalize);
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Space+Mono:wght@400;700&display=swap');

@layer normalize, base, nav, reveal, sections, responsive;

@layer base {
  :root {
    --bg: #f6fbff;
    --grid-bg:
      linear-gradient(90deg, rgba(7, 21, 27, 0.07) 1px, transparent 1px) 0 0 / 64px 64px,
      linear-gradient(rgba(7, 21, 27, 0.06) 1px, transparent 1px) 0 0 / 64px 64px,
      var(--bg);
    --ink: #07151b;
    --muted: #52646d;
    --dark: #081820;
    --paper: #ffffff;
    --line: rgba(7, 21, 27, 0.18);
    --accent: #006d77;
    --accent-2: #83c5be;
    --accent-3: #ffb703;
    --accent-4: #ef476f;
    --surface-blue: #e9f6fb;
    --radius: 8px;
    --gutter: clamp(1rem, 4vw, 4rem);
    --font-size-min: 14;
    --font-size-max: 20;
    --font-ratio-min: 1.1;
    --font-ratio-max: 1.33;
    --font-width-min: 375;
    --font-width-max: 1500;
    color-scheme: light;
    font-family: 'Geist', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    scroll-behavior: auto;
  }

  * {
    box-sizing: border-box;
  }

  html.lenis,
  html.lenis body {
    height: auto;
  }

  html {
    scrollbar-width: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .lenis.lenis-smooth {
    scroll-behavior: auto !important;
  }

  .lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
  }

  body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--paper);
    cursor: default;
  }

  body.is-loading {
    overflow: hidden;
  }

  body.menu-open {
    overflow: hidden;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  :is(#intro, #about, #skills, #story) {
    scroll-margin-top: 0;
  }

  button {
    font: inherit;
  }

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

  :where(.fluid) {
    --fluid-min: calc(var(--font-size-min) * pow(var(--font-ratio-min), var(--font-level, 0)));
    --fluid-max: calc(var(--font-size-max) * pow(var(--font-ratio-max), var(--font-level, 0)));
    --fluid-preferred: calc((var(--fluid-max) - var(--fluid-min)) / (var(--font-width-max) - var(--font-width-min)));
    --fluid-type: clamp(
      (var(--fluid-min) / 16) * 1rem,
      ((var(--fluid-min) / 16) * 1rem) - (((var(--fluid-preferred) * var(--font-width-min)) / 16) * 1rem) + (var(--fluid-preferred) * 100vi),
      (var(--fluid-max) / 16) * 1rem
    );
    font-size: var(--fluid-type);
  }

  .site-frame {
    position: fixed;
    inset: 0;
    z-index: 50;
    border: 5px solid var(--ink);
    pointer-events: none;
  }

  .page-wipe {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    background: var(--accent);
    clip-path: circle(0 at 0 0);
    will-change: clip-path, opacity;
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }

  .preloader {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--accent);
    color: var(--paper);
  }

  .skip-home-preloader .preloader {
    display: none;
  }

  .preloader::before {
    content: '';
    position: absolute;
    inset: 1.35rem;
    border: 2px solid rgba(255, 255, 255, 0.34);
    pointer-events: none;
  }

  .loader-bg-mark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 4vw, 3rem);
    color: rgba(255, 255, 255, 0.1);
    font-size: clamp(13rem, 38vw, 36rem);
    font-weight: 860;
    line-height: 0.78;
    pointer-events: none;
  }

  .loader-bg-mark span {
    display: grid;
    place-items: center;
    width: 0.9em;
    aspect-ratio: 1;
    border: 0.035em solid currentColor;
    border-radius: 50%;
  }

  .loader-stage {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    position: relative;
    z-index: 1;
    display: grid;
    width: min(84vw, 980px);
    min-height: min(60vw, 460px);
    align-content: space-between;
    gap: clamp(2rem, 5vw, 4rem);
    transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    will-change: transform;
  }

  .loader-meta,
  .loader-status {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.68rem, 1.1vw, 0.9rem);
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.84);
  }

  .loader-status {
    align-items: end;
  }

  .loader-count {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    font-weight: 700;
  }

  .loader-logo {
    display: flex;
    justify-content: center;
    gap: clamp(0.35rem, 1.2vw, 0.8rem);
    font-size: clamp(6rem, 19vw, 18rem);
    font-weight: 860;
    line-height: 0.78;
    letter-spacing: 0;
  }

  .loader-logo span {
    display: grid;
    place-items: center;
    width: 0.92em;
    aspect-ratio: 1;
    border: 0.045em solid currentColor;
    border-radius: 50%;
  }

  .loader-rail {
    position: relative;
    height: 0.46rem;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.88);
    border-radius: 999px;
  }

  .loader-rail span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--paper);
    transform: scaleX(0);
    transform-origin: 0 50%;
  }
}

@layer nav {
  .topbar {
    position: fixed;
    inset: 1.35rem 1.35rem auto;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    pointer-events: none;
  }

  .brand-mark,
  .motion-pill,
  .menu-button,
  .site-menu {
    pointer-events: auto;
  }

  .brand-mark {
    display: inline-flex;
    gap: 0.18rem;
  }

  .brand-mark span {
    display: grid;
    place-items: center;
    width: 2.05rem;
    aspect-ratio: 1;
    border: 2px solid currentColor;
    border-radius: 50%;
    background: var(--paper);
    font-family: 'Space Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
  }

  .motion-pill,
  .menu-button,
  .site-menu a {
    border: 2px solid currentColor;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    font-family: 'Space Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: lowercase;
    box-shadow: 0 6px 0 rgba(0, 109, 119, 0.18);
  }

  .motion-pill {
    padding: 0.65rem 1.1rem;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-left: auto;
    padding: 0.65rem 0.95rem 0.65rem 1.05rem;
    color: var(--ink);
    cursor: pointer;
  }

  .menu-button svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
  }

  .site-menu {
    position: absolute;
    top: 3.6rem;
    right: 0;
    display: grid;
    gap: 0.35rem;
    opacity: 0;
    transform: translateY(-0.75rem);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease, visibility 0s linear 220ms;
  }

  .site-menu a {
    padding: 0.75rem 1.1rem;
    text-align: right;
  }

  body.menu-open .site-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }
}

@layer reveal {
  .reveal {
    --start: 50vh;
    --space: 0vh;
    --accent-dynamic: hsl(var(--hue, 186) 73% 42%);
    --font-level: 4;
    --font-size-min: 24;
    position: sticky;
    top: calc((var(--count) - 1) * -1lh);
    z-index: 2;
    width: 100%;
    margin-bottom: 0;
    line-height: 1.08;
    background: var(--grid-bg);
    background-attachment: fixed, fixed, scroll;
  }

  .reveal-inner {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    min-height: calc(var(--count) * 1lh + var(--start));
    padding-top: calc(var(--start) - 0.5lh);
  }

  .reveal h1 {
    position: sticky;
    top: calc(var(--start) - 0.5lh);
    height: fit-content;
    margin: 0;
    font-size: inherit;
    font-weight: 680;
    letter-spacing: 0;
  }

  .reveal ul {
    padding: 0;
    margin: 0;
    list-style: none;
    font-weight: 680;
  }

  .reveal li {
    --dimmed: rgba(8, 9, 10, 0.18);
    scroll-snap-align: center;
    color: transparent;
    background: linear-gradient(
      180deg,
      var(--dimmed) 0 calc(var(--start) - 0.5lh),
      var(--accent-dynamic) calc(var(--start) - 0.55lh) calc(var(--start) + 0.55lh),
      var(--dimmed) calc(var(--start) + 0.5lh)
    );
    background-attachment: fixed;
    background-clip: text;
  }
}

@layer sections {
  main {
    position: relative;
    z-index: 3;
    background: var(--paper);
  }

  .section-shell {
    position: relative;
    min-height: 100vh;
    padding: clamp(6rem, 10vw, 10rem) var(--gutter);
    overflow: hidden;
  }

  .section-number {
    margin: 0 0 1rem;
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.78rem, 1.2vw, 0.95rem);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
  }

  .section-heading {
    width: min(960px, 100%);
  }

  .section-heading h2 {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 7.8rem);
    font-weight: 760;
    line-height: 0.93;
    letter-spacing: 0;
  }

  .hero {
    display: grid;
    grid-template-columns: 1fr;
    align-items: end;
    gap: clamp(1.5rem, 3vw, 4rem);
    min-height: 108vh;
    padding-top: clamp(5.5rem, 8vw, 7rem);
    padding-bottom: clamp(3rem, 4vw, 6.5rem);
    margin-bottom: 0;
    background:
      radial-gradient(circle at 82% 18%, rgba(131, 197, 190, 0.34), transparent 18rem),
      linear-gradient(180deg, var(--paper) 0%, var(--surface-blue) 100%);
    transform-origin: 50% 72%;
  }

  .hero-copy {
    width: min(1180px, 100%);
  }

  .hero h2 {
    margin: 0;
    max-width: min(1180px, 100%);
    font-size: clamp(5.8rem, 17vw, 18rem);
    font-weight: 860;
    line-height: 0.78;
    letter-spacing: 0;
  }

  .hero-subtitle {
    width: min(760px, 100%);
    margin: clamp(1.2rem, 2vw, 1.8rem) 0 0;
    font-size: clamp(1.45rem, 2.5vw, 3.05rem);
    font-weight: 680;
    line-height: 1.08;
  }

  .hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: clamp(1.4rem, 3vw, 2.2rem);
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.72rem, 1vw, 0.88rem);
    font-weight: 700;
    text-transform: uppercase;
  }

  .hero-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.58rem 0.74rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 5px 0 rgba(0, 109, 119, 0.2);
  }

  .hero-metrics strong {
    color: var(--accent);
  }

  .hero-build-note {
    display: grid;
    grid-template-columns: max-content minmax(0, 34rem);
    gap: clamp(0.8rem, 2vw, 1.2rem);
    align-items: start;
    width: min(760px, 100%);
    margin-top: clamp(1.4rem, 3vw, 2.4rem);
    padding-top: clamp(0.9rem, 2vw, 1.2rem);
    border-top: 2px solid rgba(7, 21, 27, 0.22);
  }

  .hero-build-note span {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.7rem, 1vw, 0.82rem);
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
  }

  .hero-build-note p {
    margin: 0;
    color: rgba(7, 21, 27, 0.78);
    font-size: clamp(1rem, 1.45vw, 1.2rem);
    font-weight: 620;
    line-height: 1.24;
  }

  .hero-build-note div {
    display: grid;
    gap: 0.4rem;
  }

  .hero-build-note p + p {
    color: rgba(7, 21, 27, 0.62);
    font-size: clamp(0.92rem, 1.25vw, 1.05rem);
  }

  .scroll-cue {
    position: absolute;
    right: var(--gutter);
    bottom: 2rem;
    display: grid;
    place-items: center;
    width: 3.3rem;
    aspect-ratio: 1;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 7px 0 rgba(8, 9, 10, 0.18);
  }

  .scroll-cue svg {
    width: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .ribbon-section {
    position: relative;
    z-index: 5;
    min-height: 132vh;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 54px 54px,
      linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 54px 54px,
      var(--dark);
    color: var(--ink);
    isolation: isolate;
  }

  .ribbon-section::before {
    content: '';
    position: absolute;
    inset: -1px 0 0;
    z-index: -1;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 54px 54px,
      linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 54px 54px,
      var(--dark);
    transform: none;
    transform-origin: 0 0;
  }

  .ribbon {
    --r: 0deg;
    --float-y: 0px;
    --scroll-x: 0px;
    --drag-x: 0px;
    --drag-y: 0px;
    --mx: 50%;
    --my: 50%;
    --skew: 0deg;
    --scale: 1;
    --shape: polygon(1.5% 7%, 98.5% 0, 99.4% 87%, 1% 100%);
    position: absolute;
    left: var(--gutter);
    display: grid;
    place-items: center;
    width: calc(100% - (var(--gutter) * 2));
    height: clamp(8.2rem, 15vw, 14rem);
    border: 0;
    border-radius: 0;
    background: var(--ink);
    clip-path: var(--shape);
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.34),
      0 0.85rem 0 rgba(255, 255, 255, 0.18),
      0 1.4rem 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    white-space: nowrap;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transform: translate3d(calc(var(--scroll-x) + var(--drag-x)), calc(var(--float-y) + var(--drag-y)), 0) rotate(var(--r)) skewX(var(--skew)) scale(var(--scale));
    will-change: transform, clip-path;
    transition: box-shadow 220ms ease, filter 220ms ease;
  }

  .ribbon.is-dragging {
    cursor: grabbing;
    z-index: 8;
  }

  .ribbon::before,
  .ribbon::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .ribbon::before {
    inset: 6px;
    background:
      radial-gradient(circle at var(--mx) var(--my), rgba(0, 109, 119, 0.18), transparent 20rem),
      linear-gradient(135deg, var(--paper), var(--surface-blue));
    border: 0;
    clip-path: var(--shape);
  }

  .ribbon::after {
    inset: auto 1.2% 6% 1.2%;
    z-index: 2;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent) 12%, var(--accent-3) 50%, var(--accent-4) 88%, transparent);
    transform: rotate(-0.4deg);
  }

  .ribbon:hover {
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.5),
      0 0.95rem 0 rgba(255, 255, 255, 0.2);
    filter: saturate(1.08);
  }

  .ribbon span {
    display: block;
    width: 100%;
    padding: 0 clamp(0.65rem, 2vw, 1.6rem);
    font-size: clamp(5.4rem, 11.6vw, 11.4rem);
    font-weight: 860;
    line-height: 0.82;
    text-align: center;
    position: relative;
    z-index: 3;
  }

  .ribbon-one {
    top: 9%;
    --r: -4deg;
    --shape: polygon(0.6% 13%, 98.6% 1%, 99.4% 86%, 2.1% 98%);
  }

  .ribbon-two {
    top: 34%;
    --r: 6deg;
    --shape: polygon(1.2% 4%, 99.2% 14%, 97.8% 94%, 0.4% 84%);
  }

  .ribbon-three {
    top: 59%;
    --r: -5deg;
    --shape: polygon(0.2% 16%, 98.4% 3%, 99.3% 82%, 1.4% 99%);
  }

  .ribbon-note {
    position: absolute;
    right: var(--gutter);
    bottom: 13vh;
    z-index: 4;
    display: grid;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.72);
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.72rem, 1.1vw, 0.9rem);
    font-weight: 700;
    text-align: right;
    text-transform: uppercase;
  }

  .ribbon-thread,
  .ribbon-blob {
    position: absolute;
    left: 0;
    pointer-events: none;
  }

  .ribbon-thread {
    right: auto;
    bottom: 4vh;
    z-index: 4;
    width: 132%;
    height: 28vh;
    margin-left: -16%;
    fill: none;
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 4;
    animation: threadDrift 8s ease-in-out infinite alternate;
  }

  .ribbon-blob {
    bottom: -1px;
    z-index: 3;
    width: 138%;
    height: 34vh;
    margin-left: -19%;
    fill: var(--dark);
    filter: drop-shadow(0 -2px 0 rgba(255, 255, 255, 0.18));
    animation: blobBreathe 7s ease-in-out infinite alternate;
  }

  .ribbon-blob path {
    transform-origin: 50% 80%;
  }

  .ribbon-section .ribbon-one,
  .ribbon-section .ribbon-two {
    z-index: 1;
  }

  .ribbon-section .ribbon-three {
    z-index: 4;
  }

  .ribbon-note {
    z-index: 5;
  }

  .ribbon-section::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    z-index: 6;
    height: 2rem;
    background: linear-gradient(0deg, var(--dark) 0%, rgba(7, 8, 10, 0) 100%);
    pointer-events: none;
  }

  .dark-panel {
    background: var(--dark);
    color: var(--paper);
  }

  .dark-panel .section-number {
    color: var(--accent-2);
  }

  .about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
    gap: clamp(2rem, 6vw, 7rem);
    align-items: end;
    min-height: 100svh;
  }

  .about-code-mark {
    position: absolute;
    right: clamp(2rem, 5vw, 5rem);
    top: clamp(4.5rem, 8vw, 7rem);
    width: clamp(13rem, 22vw, 24rem);
    opacity: 0.52;
    fill: none;
    stroke: rgba(255, 255, 255, 0.76);
    stroke-width: 18;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    animation: codeFloat 5.5s ease-in-out infinite alternate;
  }

  .about-code-mark .code-panel {
    fill: rgba(255, 255, 255, 0.055);
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 3;
  }

  .about-code-mark .code-orbit {
    fill: none;
    stroke: var(--accent);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 18 82;
    animation: borderOrbit 3.6s linear infinite;
  }

  .about-code-mark .code-slash {
    stroke: var(--paper);
  }

  .story-text {
    display: grid;
    gap: 1.2rem;
    font-size: clamp(1.05rem, 1.7vw, 1.4rem);
    font-weight: 520;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.76);
  }

  .story-text p {
    margin: 0;
  }

  .about-detail-list {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    align-self: end;
    margin-top: clamp(1rem, 3vw, 2rem);
  }

  .about-detail-list article {
    display: grid;
    align-content: start;
    gap: 0.75rem;
    min-height: clamp(8.5rem, 13vw, 12rem);
    padding-top: 1rem;
    border-top: 2px solid rgba(255, 255, 255, 0.34);
  }

  .about-detail-list span {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.68rem, 1vw, 0.82rem);
    font-weight: 700;
    color: var(--accent-2);
    text-transform: uppercase;
  }

  .about-detail-list p {
    margin: 0;
    width: min(100%, 26rem);
    color: rgba(255, 255, 255, 0.74);
    font-size: clamp(1rem, 1.45vw, 1.22rem);
    font-weight: 560;
    line-height: 1.34;
  }

  .skills {
    display: grid;
    align-content: center;
    gap: clamp(3rem, 6vw, 5.5rem);
    min-height: 112vh;
    background: var(--paper);
  }

  .skills::after {
    content: none;
  }

  .skill-marquee {
    display: none;
    width: max-content;
    gap: 1.3rem;
    transform: translateX(-5vw);
    color: transparent;
    -webkit-text-stroke: 2px var(--ink);
    font-size: clamp(3rem, 10vw, 9rem);
    font-weight: 820;
    line-height: 0.9;
    white-space: nowrap;
    animation: drift 18s linear infinite;
  }

  .section-kicker {
    width: min(760px, 100%);
    margin: 1.1rem 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    line-height: 1.35;
  }

  .skill-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.42fr);
    gap: clamp(2rem, 5vw, 5rem);
    width: min(1500px, 100%);
    align-items: start;
  }

  .skill-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.8rem, 2vw, 1.2rem);
    width: 100%;
  }

  .skill-group {
    position: relative;
    padding: clamp(1rem, 2vw, 1.4rem) 0;
    border-top: 2px solid var(--ink);
  }

  .skill-group span,
  .skill-focus span,
  .timeline time {
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
  }

  .timeline h3 {
    margin: 1rem 0 0.65rem;
    font-size: clamp(1.45rem, 3vw, 2.4rem);
    line-height: 1;
  }

  .timeline p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(0.98rem, 1.4vw, 1.08rem);
    line-height: 1.45;
  }

  .skill-group span {
    display: block;
    margin-bottom: 1rem;
  }

  .skill-focus {
    display: grid;
    align-content: start;
    gap: 1rem;
    min-height: clamp(11rem, 16vw, 15rem);
    padding-top: clamp(1rem, 2vw, 1.4rem);
    border-top: 2px solid var(--ink);
  }

  .skill-focus p {
    width: min(100%, 25rem);
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    line-height: 1.38;
  }

  .skill-focus ul {
    display: grid;
    gap: 0.65rem;
    padding: 0;
    margin: 0;
    list-style: none;
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.76rem, 0.95vw, 0.86rem);
    font-weight: 700;
    text-transform: uppercase;
  }

  .skill-focus li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .skill-focus li::before {
    content: '';
    width: 0.55rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--accent-3);
    box-shadow: 0 0 0 4px rgba(255, 183, 3, 0.16);
  }

  .skill-group ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .skill-group li {
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 0.62rem 0.86rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 5px 0 rgba(0, 109, 119, 0.16);
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.76rem, 1vw, 0.88rem);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
  }

  .story {
    display: grid;
    gap: clamp(3rem, 7vw, 6rem);
    padding-top: clamp(8rem, 12vw, 12rem);
  }

  .wave-top,
  .wave-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    fill: var(--paper);
    pointer-events: none;
  }

  .wave-top {
    top: -1px;
  }

  .wave-bottom {
    bottom: -1px;
    fill: var(--bg);
  }

  .timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.32);
  }

  .timeline article {
    min-height: 320px;
    padding: clamp(1.1rem, 2.5vw, 2rem);
    border-right: 2px solid rgba(255, 255, 255, 0.32);
  }

  .timeline article:last-child {
    border-right: 0;
  }

  .timeline h3 {
    color: var(--paper);
  }

  .timeline p {
    color: rgba(255, 255, 255, 0.66);
  }

  .credentials {
    display: grid;
    align-content: center;
    gap: clamp(2rem, 6vw, 5rem);
    min-height: 96vh;
    background:
      radial-gradient(circle at 88% 12%, rgba(255, 183, 3, 0.24), transparent 15rem),
      var(--bg);
  }

  .credentials::after {
    content: none;
  }

  .credential-list {
    display: grid;
    gap: 0;
    width: min(1080px, 100%);
    border-top: 2px solid var(--ink);
  }

  .credential-list article {
    display: grid;
    grid-template-columns: minmax(9rem, 0.34fr) minmax(0, 1fr) minmax(9rem, 0.34fr);
    align-items: center;
    gap: 1rem;
    padding: clamp(1.1rem, 2.4vw, 1.7rem) 0;
    border-bottom: 2px solid var(--ink);
  }

  .signal-code {
    width: fit-content;
    border-bottom: 2px solid var(--accent);
    font-family: 'Space Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
  }

  .credential-list h3 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2.35rem);
    line-height: 1;
  }

  .credential-list p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    text-align: right;
  }

  .contact-page {
    background:
      linear-gradient(90deg, rgba(7, 21, 27, 0.06) 1px, transparent 1px) 0 0 / 58px 58px,
      linear-gradient(rgba(7, 21, 27, 0.055) 1px, transparent 1px) 0 0 / 58px 58px,
      var(--surface-blue);
  }

  .contact-main {
    min-height: 100svh;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(233, 246, 251, 0.78)),
      var(--grid-bg);
  }

  .contact-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(28rem, 0.82fr);
    align-items: end;
    gap: clamp(2rem, 4.5vw, 5rem);
    min-height: 100svh;
    padding-top: clamp(6rem, 8vw, 7.5rem);
    padding-bottom: clamp(4rem, 7vw, 7rem);
  }

  .contact-copy {
    display: grid;
    gap: clamp(1.2rem, 2vw, 1.8rem);
  }

  .contact-copy h1 {
    max-width: 9.5ch;
    margin: 0;
    font-size: clamp(4rem, 8.2vw, 9.2rem);
    font-weight: 860;
    line-height: 0.86;
    letter-spacing: 0;
  }

  .contact-copy p:not(.section-number) {
    max-width: 40rem;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1.15rem, 2vw, 1.8rem);
    font-weight: 620;
    line-height: 1.18;
  }

  .contact-panel {
    display: grid;
    gap: 0;
    border-top: 2px solid var(--ink);
  }

  .contact-card {
    display: grid;
    grid-template-columns: minmax(6.5rem, 0.35fr) minmax(0, 1fr);
    gap: clamp(0.8rem, 1.6vw, 1.2rem);
    align-items: center;
    min-height: 5.2rem;
    padding: clamp(1rem, 1.6vw, 1.35rem) 0;
    border-bottom: 2px solid var(--ink);
    color: var(--ink);
    transition: color 180ms ease, transform 180ms ease;
  }

  .contact-card:hover,
  .contact-card:focus-visible {
    color: var(--accent);
    transform: translateX(0.25rem);
  }

  .contact-card span {
    width: fit-content;
    border-bottom: 2px solid currentColor;
    font-family: 'Space Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .contact-card strong {
    min-width: 0;
    font-size: clamp(1.2rem, 1.55vw, 1.75rem);
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .contact-card em {
    grid-column: 2;
    margin-top: -0.35rem;
    color: var(--muted);
    font-style: normal;
    font-size: clamp(0.92rem, 1.1vw, 1rem);
  }

  .primary-contact strong {
    color: var(--accent);
    white-space: nowrap;
  }

  .projects-page {
    --project-bg: #06070d;
    --project-panel: rgba(255, 255, 255, 0.075);
    --project-line: rgba(255, 255, 255, 0.18);
    --project-text: #f7fbff;
    --project-muted: #aab7c8;
    --project-cyan: #8ffdf0;
    --project-amber: #ffcc66;
    --project-pink: #ff6b8a;
    background: var(--project-bg);
    color: var(--project-text);
  }

  .projects-page .site-frame {
    border-color: rgba(255, 255, 255, 0.18);
  }

  .projects-page .brand-mark span,
  .projects-page .motion-pill,
  .projects-page .menu-button,
  .projects-page .site-menu a {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(6, 7, 13, 0.72);
    color: var(--project-text);
    box-shadow: 0 6px 0 rgba(143, 253, 240, 0.14);
  }

  .projects-main {
    position: relative;
    z-index: 3;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 58px 58px,
      linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 58px 58px,
      linear-gradient(135deg, #06070d 0%, #121522 48%, #080910 100%);
    color: var(--project-text);
  }

  .projects-main::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
      linear-gradient(112deg, transparent 0 20%, rgba(143, 253, 240, 0.16) 21% 21.4%, transparent 22% 100%),
      linear-gradient(146deg, transparent 0 55%, rgba(255, 204, 102, 0.13) 55.4% 55.8%, transparent 56.3% 100%),
      linear-gradient(24deg, transparent 0 70%, rgba(255, 107, 138, 0.13) 70.4% 70.8%, transparent 71.3% 100%);
    opacity: 0.8;
    animation: projectFieldDrift 9s ease-in-out infinite alternate;
  }

  .projects-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(22rem, 0.68fr);
    align-items: end;
    gap: clamp(2rem, 5vw, 6rem);
    min-height: 100svh;
    padding-top: clamp(7rem, 10vw, 9rem);
    padding-bottom: clamp(4rem, 7vw, 7rem);
    isolation: isolate;
  }

  .project-beam {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    opacity: 0.72;
    filter: blur(0.2px);
    transform-origin: center;
  }

  .project-beam-one {
    top: 10%;
    right: -12%;
    width: 58vw;
    height: 14rem;
    background: linear-gradient(90deg, transparent, rgba(143, 253, 240, 0.26), rgba(255, 107, 138, 0.18), transparent);
    clip-path: polygon(2% 42%, 100% 0, 96% 52%, 0 100%);
    transform: rotate(-8deg);
  }

  .project-beam-two {
    bottom: 12%;
    left: -14%;
    width: 54vw;
    height: 11rem;
    background: linear-gradient(90deg, transparent, rgba(255, 204, 102, 0.18), rgba(143, 253, 240, 0.14), transparent);
    clip-path: polygon(0 12%, 98% 0, 100% 66%, 3% 100%);
    transform: rotate(11deg);
  }

  .projects-copy {
    display: grid;
    gap: clamp(1.1rem, 2vw, 1.55rem);
  }

  .projects-eyebrow,
  .project-index,
  .projects-cta span,
  .hero-card-topline,
  .project-status {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.72rem, 0.95vw, 0.84rem);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .projects-eyebrow,
  .project-index,
  .projects-cta span {
    color: var(--project-cyan);
  }

  .projects-copy h1 {
    max-width: 10.5ch;
    margin: 0;
    font-size: clamp(4.6rem, 10.8vw, 12.5rem);
    font-weight: 880;
    line-height: 0.82;
    letter-spacing: 0;
  }

  .projects-lede {
    width: min(100%, 43rem);
    margin: 0;
    color: var(--project-muted);
    font-size: clamp(1.05rem, 1.75vw, 1.55rem);
    font-weight: 560;
    line-height: 1.32;
  }

  .projects-markers,
  .project-actions,
  .project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  .projects-markers span,
  .project-tags li,
  .project-actions a,
  .projects-cta a {
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.68rem, 0.82vw, 0.78rem);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
  }

  .projects-markers span {
    padding: 0.76rem 0.92rem;
    color: var(--project-text);
    background: rgba(255, 255, 255, 0.08);
  }

  .projects-markers span:nth-child(1) {
    border-color: rgba(143, 253, 240, 0.62);
    color: var(--project-cyan);
  }

  .projects-markers span:nth-child(2) {
    border-color: rgba(255, 204, 102, 0.62);
    color: var(--project-amber);
  }

  .projects-markers span:nth-child(3) {
    border-color: rgba(255, 107, 138, 0.62);
    color: var(--project-pink);
  }

  .project-hero-card {
    position: relative;
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 1.6vw, 1.35rem);
    border: 1px solid var(--project-line);
    border-radius: 24px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045)),
      rgba(9, 12, 20, 0.78);
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.48);
    transform: rotate(-2deg);
    transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
  }

  .project-hero-card:hover {
    border-color: rgba(143, 253, 240, 0.72);
    box-shadow: 0 36px 110px rgba(143, 253, 240, 0.16), 0 34px 100px rgba(0, 0, 0, 0.5);
    transform: rotate(-1deg) translateY(-0.35rem);
  }

  .hero-card-topline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--project-cyan);
  }

  .hero-video-frame,
  .preview-screen {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px) 0 0 / 34px 34px,
      linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
      linear-gradient(135deg, #151827, #22263a 52%, #0e101a);
  }

  .hero-video-frame {
    display: grid;
    place-items: center;
    min-height: clamp(16rem, 26vw, 23rem);
    border-radius: 18px;
  }

  .hero-video-frame::before,
  .preview-screen::before {
    content: '';
    position: absolute;
    inset: -30% -10%;
    background: linear-gradient(115deg, transparent 0 34%, rgba(143, 253, 240, 0.2) 45%, transparent 56% 100%);
    transform: translateX(-42%);
    animation: projectScan 4.8s ease-in-out infinite;
  }

  .video-play {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: clamp(4.7rem, 8vw, 6.4rem);
    aspect-ratio: 1;
    border: 2px solid currentColor;
    border-radius: 50%;
    color: var(--project-text);
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 0 52px rgba(143, 253, 240, 0.22);
  }

  .video-bars {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    gap: 0.35rem;
    align-items: end;
  }

  .video-bars span {
    display: block;
    width: 0.5rem;
    height: calc(1.2rem + var(--bar, 0) * 0.6rem);
    border-radius: 999px;
    background: var(--project-cyan);
    animation: meterPulse 1.4s ease-in-out infinite alternate;
  }

  .video-bars span:nth-child(2) {
    --bar: 1;
    animation-delay: 160ms;
    background: var(--project-amber);
  }

  .video-bars span:nth-child(3) {
    --bar: 2;
    animation-delay: 320ms;
    background: var(--project-pink);
  }

  .hero-card-meta {
    display: grid;
    gap: 0.25rem;
  }

  .hero-card-meta strong {
    font-size: clamp(1.35rem, 2vw, 2.05rem);
    line-height: 1;
  }

  .hero-card-meta span {
    color: var(--project-muted);
    font-size: clamp(0.92rem, 1.1vw, 1rem);
  }

  .projects-marquee {
    display: flex;
    gap: clamp(1.2rem, 3vw, 3rem);
    width: max-content;
    padding: 1.2rem 0;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.34);
    font-size: clamp(3.2rem, 9vw, 8.5rem);
    font-weight: 880;
    line-height: 0.8;
    white-space: nowrap;
    animation: projectsMarquee 18s linear infinite;
  }

  .project-reel {
    display: grid;
    gap: clamp(1.8rem, 4vw, 3.8rem);
    min-height: auto;
    padding-top: clamp(4rem, 6vw, 7rem);
    background: linear-gradient(180deg, rgba(6, 7, 13, 0), rgba(6, 7, 13, 0.72));
  }

  .project-card {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(24rem, 1fr);
    gap: clamp(1.2rem, 3vw, 3rem);
    align-items: stretch;
    padding: clamp(1rem, 2vw, 1.45rem);
    border: 1px solid var(--project-line);
    border-radius: 28px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
      rgba(9, 12, 20, 0.82);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.34);
    transition: transform 260ms ease, border-color 260ms ease, background 260ms ease;
  }

  .project-card:hover {
    border-color: rgba(143, 253, 240, 0.58);
    transform: translateY(-0.35rem);
  }

  .project-card-flip {
    grid-template-columns: minmax(24rem, 1fr) minmax(0, 0.82fr);
  }

  .project-card-flip .project-info {
    order: 2;
  }

  .project-info {
    display: grid;
    align-content: start;
    gap: clamp(0.9rem, 1.6vw, 1.2rem);
    min-height: clamp(20rem, 26vw, 28rem);
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid rgba(143, 253, 240, 0.28);
    border-radius: 20px;
    background: rgba(143, 253, 240, 0.055);
  }

  .project-info h2 {
    margin: 0;
    font-size: clamp(2.25rem, 4.8vw, 5.6rem);
    font-weight: 860;
    line-height: 0.88;
    letter-spacing: 0;
  }

  .project-info p {
    width: min(100%, 38rem);
    margin: 0;
    color: var(--project-muted);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.45;
  }

  .project-tags {
    padding: 0;
    margin: 0.4rem 0 0;
    list-style: none;
  }

  .project-tags li {
    padding: 0.62rem 0.78rem;
    color: var(--project-text);
    background: rgba(255, 255, 255, 0.075);
  }

  .project-status {
    width: fit-content;
    margin-top: auto;
    padding: 0.72rem 0.86rem;
    border: 1px solid rgba(143, 253, 240, 0.58);
    border-radius: 999px;
    color: var(--project-cyan);
  }

  .private-status {
    border-color: rgba(255, 204, 102, 0.58);
    color: var(--project-amber);
  }

  .project-preview {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
  }

  .preview-screen {
    display: grid;
    place-items: center;
    min-height: clamp(20rem, 32vw, 34rem);
    border-radius: 20px;
  }

  .preview-screen span {
    position: relative;
    z-index: 1;
    color: var(--project-amber);
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.2rem, 2.4vw, 2.2rem);
    font-weight: 700;
    text-transform: uppercase;
  }

  .preview-amber {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px) 0 0 / 34px 34px,
      linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
      linear-gradient(135deg, #241c0c, #342719 52%, #0e101a);
  }

  .preview-pink {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px) 0 0 / 34px 34px,
      linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
      linear-gradient(135deg, #22101a, #351728 52%, #0e101a);
  }

  .preview-pink span {
    color: var(--project-pink);
  }

  .project-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-actions a {
    display: grid;
    place-items: center;
    min-height: 3rem;
    padding: 0.85rem 0.7rem;
    color: var(--project-text);
    background: rgba(255, 255, 255, 0.08);
    transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
  }

  .project-actions a:hover,
  .project-actions a:focus-visible {
    border-color: var(--project-cyan);
    color: var(--project-cyan);
    transform: translateY(-0.16rem);
  }

  .projects-cta {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: clamp(1rem, 2vw, 1.4rem);
    min-height: 72vh;
    background:
      linear-gradient(110deg, rgba(143, 253, 240, 0.1), transparent 28%),
      linear-gradient(250deg, rgba(255, 107, 138, 0.12), transparent 32%),
      #070811;
  }

  .projects-cta h2 {
    width: min(11ch, 100%);
    margin: 0;
    font-size: clamp(3.6rem, 8vw, 8.8rem);
    font-weight: 880;
    line-height: 0.86;
  }

  .projects-cta p {
    width: min(100%, 43rem);
    margin: 0;
    color: var(--project-muted);
    font-size: clamp(1rem, 1.5vw, 1.28rem);
    line-height: 1.4;
  }

  .projects-cta a {
    display: inline-grid;
    place-items: center;
    min-height: 3.2rem;
    padding: 1rem 1.15rem;
    border-color: rgba(143, 253, 240, 0.68);
    color: var(--project-cyan);
    background: rgba(143, 253, 240, 0.08);
    transition: transform 180ms ease, background 180ms ease;
  }

  .projects-cta a:hover,
  .projects-cta a:focus-visible {
    background: rgba(143, 253, 240, 0.14);
    transform: translateY(-0.18rem);
  }

  footer {
    position: relative;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.3rem var(--gutter) 1.6rem;
    background: var(--bg);
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
  }

  @keyframes projectFieldDrift {
    from {
      transform: translate3d(-1.4vw, -0.8vh, 0);
    }

    to {
      transform: translate3d(1.4vw, 1vh, 0);
    }
  }

  @keyframes projectScan {
    0%,
    28% {
      transform: translateX(-58%);
    }

    62%,
    100% {
      transform: translateX(58%);
    }
  }

  @keyframes meterPulse {
    from {
      transform: scaleY(0.72);
      opacity: 0.55;
    }

    to {
      transform: scaleY(1.1);
      opacity: 1;
    }
  }

  @keyframes projectsMarquee {
    to {
      transform: translateX(-34vw);
    }
  }

  @keyframes drift {
    to {
      transform: translateX(-28vw);
    }
  }

  @keyframes slowSpin {
    to {
      rotate: 360deg;
    }
  }

  @keyframes floatDraw {
    from {
      transform: translateY(0) rotate(-2deg);
    }

    to {
      transform: translateY(1rem) rotate(3deg);
    }
  }

  @keyframes codeFloat {
    from {
      transform: translateY(0) rotate(-1.5deg);
    }

    to {
      transform: translateY(0.8rem) rotate(1.5deg);
    }
  }

  @keyframes borderOrbit {
    to {
      stroke-dashoffset: -100;
    }
  }

  @keyframes threadDrift {
    from {
      transform: translateX(-2vw) translateY(0);
    }

    to {
      transform: translateX(2vw) translateY(1.4rem);
    }
  }

  @keyframes blobBreathe {
    from {
      transform: translateY(0) scaleY(1);
    }

    to {
      transform: translateY(-1.2rem) scaleY(1.08);
    }
  }

  @supports (animation-timeline: view()) {
    .hero {
      opacity: 0;
      transform: translateY(90px) scale(0.9);
      animation: heroRise both ease-out;
      animation-timeline: view();
      animation-range: entry 40% entry 95%;
    }
  }

  @keyframes heroRise {
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  [data-reveal] {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 700ms ease, transform 700ms ease;
  }

  [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@layer responsive {
  @media (max-width: 920px) {
    .reveal {
      --start: 44vh;
      --font-size-min: 20;
      --font-size-max: 30;
      line-height: 1.1;
      background:
        linear-gradient(90deg, rgba(7, 21, 27, 0.06) 1px, transparent 1px) 0 0 / 52px 52px,
        linear-gradient(rgba(7, 21, 27, 0.055) 1px, transparent 1px) 0 0 / 52px 52px,
        var(--bg);
      background-attachment: fixed, fixed, scroll;
    }

    .reveal-inner {
      justify-content: center;
      min-height: calc(100svh + var(--count) * 1.12lh);
      padding-inline: var(--gutter);
    }

    .hero,
    .about,
    .contact-hero,
    .projects-hero,
    .project-card,
    .project-card-flip {
      grid-template-columns: 1fr;
    }

    .project-card-flip .project-info {
      order: 0;
    }

    .hero {
      min-height: 100svh;
      gap: clamp(1.3rem, 4vw, 2.4rem);
      padding-top: 6.5rem;
      padding-bottom: clamp(4.5rem, 9vw, 7rem);
      margin-bottom: 0;
    }

    .hero h2 {
      max-width: 100%;
    }

    .skill-area,
    .skill-board,
    .timeline,
    .credential-list article {
      grid-template-columns: 1fr;
    }

    .skill-group,
    .timeline article {
      min-height: auto;
      border-right: 0;
      border-bottom: 2px solid currentColor;
    }

    .timeline article {
      border-bottom-color: rgba(255, 255, 255, 0.32);
    }

    .skill-group:last-child,
    .timeline article:last-child {
      border-bottom: 0;
    }

    .credential-list p {
      text-align: left;
    }

    .contact-hero {
      align-items: start;
      gap: clamp(2rem, 6vw, 3rem);
      min-height: auto;
      padding-top: 6rem;
      padding-bottom: 4rem;
    }

    .contact-copy h1 {
      max-width: 12ch;
    }

    .contact-panel {
      width: min(100%, 46rem);
    }

    .projects-hero {
      align-items: start;
      gap: clamp(2rem, 6vw, 3.4rem);
      min-height: auto;
      padding-top: 7.25rem;
      padding-bottom: 4rem;
    }

    .projects-copy h1 {
      max-width: 12ch;
      font-size: clamp(4.25rem, 13.5vw, 8.8rem);
    }

    .project-hero-card {
      width: min(100%, 44rem);
      transform: rotate(-1deg);
    }

    .project-card,
    .project-card-flip {
      gap: 1rem;
    }

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

    .preview-screen {
      min-height: clamp(18rem, 48vw, 27rem);
    }

    .ribbon-section {
      min-height: 112svh;
      margin-top: 0;
      margin-bottom: 0;
      overflow: hidden;
    }

    .ribbon {
      left: var(--gutter);
      width: calc(100% - (var(--gutter) * 2));
      height: clamp(6.6rem, 16.5vw, 9.8rem);
    }

    .ribbon span {
      padding-inline: clamp(0.45rem, 2vw, 1rem);
      font-size: clamp(3.35rem, 9.8vw, 5.65rem);
      line-height: 0.88;
    }

    .ribbon-one {
      top: 9%;
    }

    .ribbon-two {
      top: 30%;
    }

    .ribbon-three {
      top: 51%;
    }

    .ribbon-note {
      bottom: 8vh;
    }

    .about-code-mark {
      display: none;
    }
  }

  @media (min-width: 921px) and (max-width: 1180px) {
    .about-code-mark {
      display: block;
      top: 3.25rem;
      right: 4rem;
      width: clamp(11rem, 23vw, 15rem);
      opacity: 0.32;
    }
  }

  @media (max-width: 640px) {
    .site-frame {
      border-width: 3px;
    }

    :is(#intro, #about, #skills, #story) {
      scroll-margin-top: 0;
    }

    .topbar {
      inset: 0.85rem 0.85rem auto;
    }

    .motion-pill {
      display: none;
    }

    .brand-mark span {
      width: 1.8rem;
    }

    .menu-button {
      padding: 0.56rem 0.78rem 0.56rem 0.86rem;
    }

    .reveal {
      --start: calc(40vh + 19px);
      --space: 0vh;
      --font-size-min: 16;
      --font-size-max: 22;
      line-height: 1.14;
      background:
        linear-gradient(90deg, rgba(7, 21, 27, 0.065) 1px, transparent 1px) 0 0 / 38px 38px,
        linear-gradient(rgba(7, 21, 27, 0.06) 1px, transparent 1px) 0 0 / 38px 38px,
        var(--bg);
      background-attachment: fixed, fixed, scroll;
    }

    .reveal-inner {
      justify-content: center;
      min-height: calc(100svh + var(--count) * 1.2lh);
      padding-inline: var(--gutter);
    }

    .section-shell {
      min-height: auto;
      padding-top: 5.8rem;
      padding-bottom: 5.8rem;
    }

    .hero {
      min-height: 100svh;
      align-content: start;
      gap: 1rem;
      padding-top: 11.75rem;
      padding-bottom: 1.35rem;
      margin-bottom: 0;
    }

    .about {
      min-height: 100svh;
    }

    .hero h2 {
      max-width: 100%;
      font-size: clamp(4.1rem, 21vw, 7.2rem);
      line-height: 0.84;
    }

    .hero-subtitle {
      width: min(100%, 24rem);
      font-size: 1.02rem;
      line-height: 1.18;
    }

    .hero-metrics {
      gap: 0.4rem;
    }

    .hero-metrics span {
      padding: 0.5rem 0.6rem;
      font-size: 0.66rem;
      box-shadow: 0 4px 0 rgba(0, 109, 119, 0.2);
    }

    .hero-build-note {
      grid-template-columns: 1fr;
      gap: 0.45rem;
      margin-top: 1.2rem;
      padding-top: 0.85rem;
    }

    .hero-build-note p {
      font-size: 0.95rem;
      line-height: 1.25;
    }

    .hero-build-note p + p {
      font-size: 0.88rem;
      line-height: 1.25;
    }

    .about-detail-list {
      grid-template-columns: 1fr;
      gap: 0.85rem;
      margin-top: 1.4rem;
    }

    .about-detail-list article {
      min-height: auto;
      padding-top: 0.85rem;
    }

    .about-detail-list p {
      font-size: 0.95rem;
      line-height: 1.28;
    }

    .contact-main {
      background:
        linear-gradient(90deg, rgba(7, 21, 27, 0.065) 1px, transparent 1px) 0 0 / 38px 38px,
        linear-gradient(rgba(7, 21, 27, 0.06) 1px, transparent 1px) 0 0 / 38px 38px,
        var(--surface-blue);
    }

    .contact-hero {
      padding-top: 5.35rem;
      padding-bottom: 3rem;
    }

    .contact-copy {
      gap: 1rem;
    }

    .contact-copy h1 {
      max-width: 100%;
      font-size: clamp(3.2rem, 15.6vw, 4.4rem);
      line-height: 0.9;
    }

    .contact-copy p:not(.section-number) {
      font-size: 1.05rem;
      line-height: 1.22;
    }

    .contact-panel {
      width: 100%;
      max-width: 100%;
    }

    .contact-card {
      width: 100%;
      grid-template-columns: 1fr;
      gap: 0.55rem;
      min-height: auto;
      padding: 1.05rem 0;
    }

    .primary-contact strong {
      white-space: normal;
    }

    .contact-card em {
      grid-column: auto;
      margin-top: -0.2rem;
    }

    .projects-main {
      background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 38px 38px,
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 38px 38px,
        linear-gradient(135deg, #06070d 0%, #101320 54%, #080910 100%);
    }

    .projects-hero {
      padding-top: 6.9rem;
      padding-bottom: 3rem;
    }

    .project-beam {
      opacity: 0.45;
    }

    .projects-copy {
      gap: 1rem;
    }

    .projects-copy h1 {
      max-width: 100%;
      font-size: clamp(3.35rem, 15.2vw, 4.8rem);
      line-height: 0.9;
    }

    .projects-lede {
      font-size: 1rem;
      line-height: 1.32;
    }

    .projects-markers {
      gap: 0.42rem;
    }

    .projects-markers span {
      padding: 0.62rem 0.68rem;
      font-size: 0.64rem;
    }

    .project-hero-card {
      gap: 0.8rem;
      padding: 0.9rem;
      border-radius: 18px;
      transform: none;
    }

    .project-hero-card:hover {
      transform: none;
    }

    .hero-video-frame {
      min-height: 14.5rem;
      border-radius: 14px;
    }

    .hero-card-meta strong {
      font-size: 1.2rem;
    }

    .projects-marquee {
      padding: 0.8rem 0;
      font-size: clamp(2.8rem, 15vw, 4.5rem);
      animation-duration: 22s;
    }

    .project-reel {
      gap: 1rem;
      padding-top: 3rem;
    }

    .project-card {
      padding: 0.7rem;
      border-radius: 18px;
      transform: none;
    }

    .project-card:hover {
      transform: none;
    }

    .project-info {
      gap: 0.85rem;
      padding: 1rem;
      border-radius: 14px;
    }

    .project-info h2 {
      font-size: clamp(2.15rem, 11.2vw, 3.6rem);
      line-height: 0.9;
    }

    .project-info p {
      font-size: 0.96rem;
      line-height: 1.38;
    }

    .project-tags {
      gap: 0.42rem;
    }

    .project-tags li,
    .project-actions a {
      font-size: 0.62rem;
    }

    .preview-screen {
      min-height: 14.5rem;
      border-radius: 14px;
    }

    .project-actions {
      grid-template-columns: 1fr;
      gap: 0.45rem;
    }

    .project-actions a {
      min-height: 2.75rem;
    }

    .projects-cta {
      min-height: auto;
      padding-top: 4rem;
      padding-bottom: 4rem;
    }

    .projects-cta h2 {
      width: min(100%, 9ch);
      font-size: clamp(3rem, 14vw, 4.4rem);
      line-height: 0.9;
    }

    .projects-cta p {
      font-size: 1rem;
      line-height: 1.35;
    }

    .scroll-cue {
      bottom: 1rem;
    }

    .ribbon-section {
      display: none;
    }

    .ribbon {
      left: 0.85rem;
      width: calc(100% - 1.7rem);
      height: clamp(4.1rem, 16vw, 5.3rem);
      border-radius: 0.4rem;
    }

    .ribbon span {
      padding-inline: 0.35rem;
      font-size: clamp(1.95rem, 9.4vw, 3rem);
      line-height: 0.98;
    }

    .ribbon-one {
      top: 12%;
    }

    .ribbon-two {
      top: 35%;
    }

    .ribbon-three {
      top: 58%;
    }

    .ribbon-thread {
      width: 160%;
      height: 25vh;
      margin-left: -30%;
      bottom: 5vh;
    }

    .ribbon-blob {
      width: 170%;
      height: 29vh;
      margin-left: -35%;
    }

    .skills::after,
    .credentials::after {
      opacity: 0.45;
      right: -2rem;
      bottom: 1rem;
    }

    footer {
      flex-direction: column;
    }
  }

  @media (max-width: 430px) {
    .reveal {
      --start: calc(38vh + 19px);
      --font-size-min: 15;
      --font-size-max: 19;
    }

    .hero h2 {
      font-size: clamp(3.7rem, 20vw, 5.4rem);
    }

    .hero-subtitle {
      font-size: 0.98rem;
    }

    .ribbon-section {
      min-height: 74svh;
    }

    .ribbon {
      height: clamp(3.55rem, 15vw, 4.45rem);
    }

    .ribbon span {
      font-size: clamp(1.55rem, 8.45vw, 2.32rem);
    }
  }

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