/* ── Ryan Fortin · v3 · "The Answer Engine" ─────────────────────────────
   Dark glass, single electric-cyan accent, mono-forward type.
   Signature: WebGL particle field morphing SEO → GEO → AI, and section
   headers framed as typed queries that scrub in with scroll.            */

@property --gx { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --gy { syntax: "<percentage>"; inherits: false; initial-value: 50%; }

:root {
    color-scheme: dark;

    --bg: oklch(0.135 0.008 250);
    --bg-deep: oklch(0.10 0.006 250);
    --text: oklch(0.965 0.004 250);
    --muted: oklch(0.74 0.012 250);
    --faint: oklch(0.56 0.014 250);
    --accent: oklch(0.87 0.132 205);            /* electric cyan */
    --accent-ink: oklch(0.22 0.05 220);          /* text on cyan */
    --accent-soft: oklch(0.87 0.132 205 / 0.12);
    --glow: oklch(0.87 0.132 205 / 0.35);

    --surface: color-mix(in oklab, white 4.5%, transparent);
    --surface-strong: color-mix(in oklab, white 8%, transparent);
    --line: color-mix(in oklab, white 11%, transparent);
    --line-strong: color-mix(in oklab, white 22%, transparent);
    --glass-border: color-mix(in oklab, white 14%, transparent);

    --display: "Space Grotesk", system-ui, sans-serif;
    --sans: "Inter Tight", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;

    /* springy overshoot, generated linear() easing */
    --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%,
        1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%,
        1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%,
        0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    overflow-x: hidden;
}

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

.mono { font-family: var(--mono); }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

/* ── scroll progress hairline ── */
.progress { display: none; }

@supports (animation-timeline: scroll()) {
    .progress {
        display: block;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 2px;
        background: var(--accent);
        transform-origin: 0 50%;
        transform: scaleX(0);
        z-index: 30;
        animation: progress-grow linear both;
        animation-timeline: scroll(root);
    }
    @keyframes progress-grow { to { transform: scaleX(1); } }
}

/* ── nav ── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
    background: linear-gradient(to bottom, oklch(0.10 0.006 250 / 0.9), transparent);
}

.nav-mark {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text);
    letter-spacing: 0.06em;
}
.nav-mark:hover { text-decoration: none; }

.blink { color: var(--accent); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-links {
    display: flex;
    gap: clamp(0.9rem, 2.5vw, 2rem);
    align-items: center;
}

.nav-links a,
.dropdown-toggle {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    text-shadow: 0 1px 6px oklch(0.10 0.006 250 / 0.6);
    transition: color 0.25s;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.nav-cta {
    border: 1px solid var(--line-strong);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
}
.nav-cta:hover { border-color: var(--accent); }

.dropdown { position: relative; }

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
}
.dropdown-toggle::after { content: " ▾"; color: var(--faint); }
.dropdown:hover .dropdown-toggle,
.dropdown:focus-within .dropdown-toggle { color: var(--accent); }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    translate: -50% 14px;
    min-width: 230px;
    background: var(--surface-strong);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 18px 50px oklch(0 0 0 / 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, translate 0.25s var(--spring), visibility 0.2s;
}

/* invisible bridge so the cursor can cross the gap without losing hover */
.dropdown-menu::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: -0.7rem;
    height: 0.7rem;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    translate: -50% 6px;
}

.dropdown-menu a {
    font-size: 0.74rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    text-transform: none;
    letter-spacing: 0.04em;
}
.dropdown-menu a:hover { background: var(--accent-soft); text-decoration: none; }

/* ── hero ── */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

#gl {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.4s ease;
}
.gl-ready #gl { opacity: 1; }

/* static fallback when WebGL2 is unavailable or motion is reduced */
.hero-fallback {
    position: absolute;
    inset: 0;
    opacity: 1;
    background:
        radial-gradient(60% 55% at 68% 38%, var(--accent-soft), transparent 70%),
        radial-gradient(40% 40% at 30% 70%, oklch(0.87 0.132 205 / 0.05), transparent 70%);
    transition: opacity 1.4s ease;
}
.hero-fallback::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(oklch(0.87 0.132 205 / 0.35) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(65% 60% at 65% 40%, black, transparent 75%);
    -webkit-mask-image: radial-gradient(65% 60% at 65% 40%, black, transparent 75%);
}
.gl-ready .hero-fallback { opacity: 0; }

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 0 clamp(1.5rem, 6vw, 6rem) clamp(5rem, 12vh, 8rem);
    max-width: 46rem;
}

.hero-query {
    font-size: 0.9rem;
    color: var(--muted);
    letter-spacing: 0.03em;
    margin-bottom: 1.4rem;
    min-height: 1.5em;
}
.hero-query .prompt { color: var(--accent); }

.caret {
    display: inline-block;
    width: 0.6em;
    height: 1.1em;
    margin-left: 2px;
    background: var(--accent);
    vertical-align: text-bottom;
    animation: blink 1.1s steps(2) infinite;
}

.hero-name {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(3.2rem, 9.5vw, 7.5rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin-bottom: 1.1rem;
    text-wrap: balance;
}
.accent-dot { color: var(--accent); }

.hero-role {
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    letter-spacing: 0.24em;
    color: var(--accent);
    margin-bottom: 1.4rem;
}

.hero-sub {
    color: var(--muted);
    max-width: 38rem;
    margin-bottom: 2.2rem;
    text-wrap: pretty;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* staggered hero entrance via @starting-style */
.hero-query, .hero-name, .hero-role, .hero-sub, .hero-actions {
    opacity: 1;
    translate: 0 0;
    transition: opacity 0.9s ease, translate 0.9s var(--spring);
}
@starting-style {
    .hero-query, .hero-name, .hero-role, .hero-sub, .hero-actions {
        opacity: 0;
        translate: 0 26px;
    }
}
.hero-name { transition-delay: 0.08s; }
.hero-role { transition-delay: 0.16s; }
.hero-sub { transition-delay: 0.24s; }
.hero-actions { transition-delay: 0.32s; }

.btn {
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    transition: all 0.25s;
}
.btn:hover { text-decoration: none; }

.btn-solid {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
}
.btn-solid:hover { box-shadow: 0 0 32px var(--glow); translate: 0 -1px; }

.btn-line {
    border: 1px solid var(--line-strong);
    color: var(--text);
}
.btn-line:hover { border-color: var(--accent); color: var(--accent); }

.scroll-cue {
    position: absolute;
    bottom: 1.2rem;
    left: 50%;
    translate: -50% 0;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text);
    text-shadow: 0 1px 6px oklch(0.10 0.006 250 / 0.6);
    z-index: 2;
    animation: cue-bob 2.2s ease-in-out infinite;
}
@keyframes cue-bob { 50% { translate: -50% 7px; } }

/* ── statline ── */
.statline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(14px) saturate(1.3);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
}

.stat {
    padding: 1.6rem clamp(1rem, 3vw, 2.5rem);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.stat:last-child { border-right: none; }

.stat-num {
    font-family: var(--mono);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 500;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--faint);
    letter-spacing: 0.02em;
}

/* ── sections ── */
.section {
    padding-block: clamp(5rem, 12vh, 8.5rem);
    border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: none; }

.wrap {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: clamp(1.5rem, 5vw, 3rem);
}
.wrap-wide { max-width: 1240px; }

.section-head { margin-bottom: clamp(2.5rem, 6vh, 4rem); }

/* typed query eyebrows: scrub in with scroll where supported */
.q {
    font-size: 0.82rem;
    color: var(--faint);
    letter-spacing: 0.03em;
    margin-bottom: 0.9rem;
}
.q > span {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: bottom;
    letter-spacing: 0;
    color: var(--muted);
}
.q > span::after {
    content: "▌";
    color: var(--accent);
    animation: blink 1.1s steps(2) infinite;
}

@supports (animation-timeline: view()) {
    .q > span {
        width: calc(var(--n) * 1ch + 1ch);
        animation: type both steps(var(--n), end);
        animation-timeline: view();
        animation-range: entry 15% entry 60%;
    }
    @keyframes type { from { width: 0.7ch; } }
}

.section-head h2,
h2 {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-wrap: balance;
}

.lede {
    color: var(--muted);
    max-width: 46rem;
    margin-bottom: clamp(2.5rem, 5vh, 3.5rem);
    font-size: 1.1rem;
    text-wrap: pretty;
}
.lede strong { color: var(--text); }

/* scroll reveals */
@supports (animation-timeline: view()) {
    .rv {
        animation: rise both;
        animation-timeline: view();
        animation-range: entry 0% entry 38%;
    }
    @keyframes rise {
        from { opacity: 0; transform: translateY(30px); }
    }
}

/* ── experience timeline ── */
.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 6vh, 4rem);
    padding-left: clamp(1.4rem, 3vw, 2.2rem);
}
.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background: var(--line-strong);
}

@supports (animation-timeline: view()) {
    .timeline::after {
        content: "";
        position: absolute;
        left: 0;
        top: 0.5rem;
        bottom: 0.5rem;
        width: 1px;
        background: var(--accent);
        box-shadow: 0 0 12px var(--glow);
        transform-origin: top;
        transform: scaleY(0);
        animation: draw linear both;
        animation-timeline: view();
        animation-range: cover 5% cover 80%;
    }
    @keyframes draw { to { transform: scaleY(1); } }
}

.job {
    position: relative;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: clamp(1.2rem, 3vw, 2.5rem);
}
.job::before {
    content: "";
    position: absolute;
    left: calc(-1 * clamp(1.4rem, 3vw, 2.2rem) - 3.5px);
    top: 0.55rem;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--glow);
}

.job-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
}
.job-dates { color: var(--accent); }
.job-loc { color: var(--faint); }

.job-body h3 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.9rem;
}
.job-title { color: var(--muted); font-weight: 400; font-size: 1.05rem; }

.job-phase {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--text);
    margin: 1.3rem 0 0.5rem;
}
.phase-dates { color: var(--faint); font-size: 0.76rem; font-weight: 400; margin-left: 0.5rem; }

.job-body ul { list-style: none; }
.job-body li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.96rem;
}
.job-body li::before {
    content: "·";
    position: absolute;
    left: 0.2rem;
    color: var(--accent);
}

/* ── projects: glass tilt cards ── */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    perspective: 1200px;
}

.project {
    position: relative;
    background: var(--surface);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: border-color 0.3s, box-shadow 0.3s;
    will-change: transform;
    overflow: hidden;
}
.project.settle { transition: border-color 0.3s, box-shadow 0.3s, transform 0.5s var(--spring); }

/* pointer-tracked glare, animated via registered @property */
.project::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(340px circle at var(--gx) var(--gy),
        oklch(0.87 0.132 205 / 0.10), transparent 65%);
    transition: opacity 0.35s, --gx 0.12s, --gy 0.12s;
}
.project:hover::before { opacity: 1; }
.project:hover {
    border-color: color-mix(in oklab, var(--accent) 50%, transparent);
    box-shadow: 0 18px 50px oklch(0 0 0 / 0.45), 0 0 40px oklch(0.87 0.132 205 / 0.14);
}

.project-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.project h3 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.proj-alias { color: var(--faint); font-weight: 400; font-size: 1rem; }

.project p { color: var(--muted); font-size: 0.94rem; }
.project strong { color: var(--text); }

.project-stack {
    font-size: 0.74rem;
    color: var(--faint);
    margin-top: auto;
}

.project-link {
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

/* ── capabilities: numbered ledger ── */
.ledger { border-top: 1px solid var(--line); }

.row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: clamp(1rem, 3vw, 2.5rem);
    padding: clamp(1.6rem, 4vh, 2.4rem) clamp(0.5rem, 2vw, 1.5rem);
    border-bottom: 1px solid var(--line);
    transition: background 0.3s;
}
.row:hover { background: var(--surface); }

.row-num {
    font-size: 0.85rem;
    color: var(--faint);
    padding-top: 0.4rem;
}
.row:hover .row-num { color: var(--accent); }

.row-body h3 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}
.row-body p { color: var(--muted); max-width: 52rem; }

.row-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    margin-top: 0.7rem;
}
.row-links a { font-family: var(--mono); font-size: 0.8rem; }

/* ── galaxy ── */
.orbit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-bottom: clamp(3rem, 7vh, 4.5rem);
}

.orbit {
    background: var(--surface);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    transition: border-color 0.3s, translate 0.3s;
}
.orbit:hover {
    border-color: color-mix(in oklab, var(--accent) 42%, transparent);
    translate: 0 -3px;
}

.orbit-id {
    font-size: 0.8rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.orbit-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--glow);
    flex-shrink: 0;
}

.orbit h3 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}
.orbit h3 a { color: var(--text); }
.orbit h3 a:hover { color: var(--accent); text-decoration: none; }

.orbit p { color: var(--muted); font-size: 0.92rem; }
.orbit strong { color: var(--text); }
.orbit code { font-family: var(--mono); font-size: 0.85em; color: var(--accent); }

.orbit-stack { font-size: 0.72rem; color: var(--faint); margin-top: auto; }

.constellation-head {
    font-size: 0.85rem;
    color: var(--faint);
    letter-spacing: 0.06em;
    margin-bottom: 1.4rem;
}

.minor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: clamp(3rem, 6vh, 4rem);
}

.minor {
    background: var(--surface);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.4rem;
    transition: border-color 0.3s, translate 0.3s;
}
.minor:hover {
    border-color: color-mix(in oklab, var(--accent) 42%, transparent);
    translate: 0 -2px;
}

.minor-name { font-size: 0.76rem; color: var(--accent); margin-bottom: 0.4rem; }

.minor h4 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.45rem;
}
.minor h4 a { color: var(--text); }
.minor h4 a:hover { color: var(--accent); text-decoration: none; }

.minor p { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

.galaxy-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    border-top: 1px solid var(--line);
    padding-top: 1.75rem;
}

.gnum { font-size: 0.82rem; letter-spacing: 0.05em; color: var(--muted); }
.gnum strong {
    color: var(--accent);
    font-weight: 500;
    font-size: 1.05rem;
    margin-right: 0.35rem;
}

/* ── skills: definition sheet ── */
.skill-sheet {
    border-top: 1px solid var(--line);
    margin-bottom: clamp(3rem, 6vh, 4rem);
}

.skill-row {
    display: grid;
    grid-template-columns: minmax(200px, 280px) 1fr;
    gap: clamp(1rem, 3vw, 2.5rem);
    padding: 1.5rem clamp(0.5rem, 2vw, 1.5rem);
    border-bottom: 1px solid var(--line);
    transition: background 0.3s;
}
.skill-row:hover { background: var(--surface); }

.skill-row dt {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.skill-row dd { color: var(--muted); font-size: 0.94rem; }

.creds {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cred h4 {
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.cred p { color: var(--muted); font-size: 0.94rem; }

/* ── contact ── */
.section-contact { text-align: center; }
.section-contact .q { margin-bottom: 1.2rem; }

.contact-big {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 7rem);
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}
.contact-big .accent { color: var(--accent); }

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2.5rem;
}
.contact-links a { font-family: var(--mono); font-size: 0.92rem; }

/* ── footer ── */
.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 2rem;
    padding: 2rem clamp(1.5rem, 5vw, 3rem);
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-size: 0.85rem;
}
.footer-sig { color: var(--accent); opacity: 0.7; }
.footer-versions { font-size: 0.75rem; }
.footer-versions a { color: var(--faint); }
.footer-versions a:hover { color: var(--accent); }

/* ── mobile menu ── */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    cursor: pointer;
}
.nav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s var(--spring), opacity 0.2s;
}
.menu-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 15;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    padding: 5.5rem clamp(1.5rem, 8vw, 3rem) 3rem;
    background: oklch(0.10 0.006 250 / 0.88);
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    overflow-y: auto;
}
.menu-open .mobile-menu {
    opacity: 1;
    visibility: visible;
}
body.menu-open { overflow: hidden; }

.mobile-menu > a {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.55rem;
    letter-spacing: -0.01em;
    color: var(--text);
    padding: 0.35rem 0;
}
.mobile-menu > a:hover { color: var(--accent); text-decoration: none; }
.mobile-menu > a.nav-cta {
    border: none;
    padding: 0.35rem 0;
    font-size: 1.55rem;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--accent);
}

.mm-label {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
    margin-top: 0.9rem;
}
.mm-sub {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.9rem;
    padding-left: 0.9rem;
    border-left: 1px solid var(--line-strong);
}
.mm-sub a {
    font-family: var(--mono);
    font-size: 0.95rem;
    color: var(--muted);
    padding: 0.25rem 0;
}
.mm-sub a:hover, .mm-sub a.active { color: var(--accent); text-decoration: none; }

/* ── responsive ── */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-burger { display: flex; }
    .mobile-menu { display: flex; }

    .hero { align-items: center; }
    .hero-inner { padding-bottom: 3rem; }

    .job { grid-template-columns: 1fr; gap: 0.6rem; }
    .job-meta { flex-direction: row; gap: 1rem; }

    .row { grid-template-columns: 1fr; gap: 0.4rem; }
    .row-num { padding-top: 0; }

    .skill-row { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ── expertise sub-pages ── */
.accent { color: var(--accent); }

.dropdown-menu a.active { color: var(--accent); }

.page-hero {
    padding-top: clamp(8rem, 18vh, 11rem);
    padding-bottom: clamp(2.5rem, 5vh, 3.5rem);
}

.page-hero h1 {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.7rem, 7vw, 5.5rem);
    letter-spacing: -0.03em;
    line-height: 1.02;
    margin-bottom: 1.2rem;
    text-wrap: balance;
}

.page-hero .q { margin-bottom: 1.3rem; }

.page-lede {
    color: var(--muted);
    font-size: 1.15rem;
    max-width: 44rem;
    text-wrap: pretty;
}

.page-hero .q, .page-hero h1, .page-lede, .page-art {
    opacity: 1;
    translate: 0 0;
    transition: opacity 0.8s ease, translate 0.8s var(--spring);
}
@starting-style {
    .page-hero .q, .page-hero h1, .page-lede, .page-art {
        opacity: 0;
        translate: 0 22px;
    }
}
.page-hero h1 { transition-delay: 0.07s; }
.page-lede { transition-delay: 0.14s; }
.page-art { transition-delay: 0.21s; }

.page-art {
    margin-top: clamp(2rem, 4vh, 3rem);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px oklch(0 0 0 / 0.5), 0 0 60px oklch(0.87 0.132 205 / 0.07);
}
.page-art img {
    display: block;
    width: 100%;
    height: auto;
}

.page-section { padding-block: clamp(3rem, 7vh, 4.5rem); }
.page-section .section-head { margin-bottom: clamp(1.8rem, 4vh, 2.5rem); }
.page-section h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.prose { max-width: 46rem; color: var(--muted); }
.prose p { margin-bottom: 1.2rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); }

.cap-list { list-style: none; max-width: 46rem; }
.cap-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.7rem;
    color: var(--muted);
}
.cap-list li::before {
    content: "·";
    position: absolute;
    left: 0.2rem;
    color: var(--accent);
}
.cap-list strong { color: var(--text); }

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.8rem;
}

.chip {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--muted);
}

.page-next {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--mono);
    font-size: 0.85rem;
}
.page-next .back { color: var(--faint); }
.page-next .back:hover { color: var(--accent); }

/* ── de-slop: texture, depth, editorial rhythm ── */

/* film grain + faint depth glows so the background is never a flat slab */
body {
    background-color: var(--bg);
    background-image:
        radial-gradient(70rem 45rem at 85% 2%, oklch(0.87 0.132 205 / 0.09), transparent 70%),
        radial-gradient(55rem 40rem at 8% 38%, oklch(0.87 0.132 205 / 0.07), transparent 70%),
        radial-gradient(65rem 45rem at 92% 78%, oklch(0.87 0.132 205 / 0.06), transparent 70%);
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* project cards open with art instead of a wall of text */
.project-art {
    display: block;
    width: calc(100% + 4rem);
    max-width: none;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    margin: -2rem -2rem 0.3rem;
    border-bottom: 1px solid var(--glass-border);
}

/* ambient video band in the lab section */
.lab-band {
    margin-bottom: clamp(2.5rem, 5vh, 3.5rem);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px oklch(0 0 0 / 0.5), 0 0 60px oklch(0.87 0.132 205 / 0.07);
}
.lab-band video {
    display: block;
    width: 100%;
    height: clamp(220px, 32vw, 400px);
    object-fit: cover;
}

.page-art video {
    display: block;
    width: 100%;
    height: auto;
}

/* per-section atmospheric backdrops */
.section {
    position: relative;
}
.section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--sbg, none);
    background-size: cover;
    background-position: center;
    opacity: 0.28;
    filter: saturate(1.6) brightness(1.35);
    pointer-events: none;
    mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
}
.section > .wrap { position: relative; }

.section-contact { overflow: hidden; }
.section-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    filter: saturate(1.5) brightness(1.25);
    pointer-events: none;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

/* orbit cards: ambient art behind the text, not a wall of grey boxes */
.orbit {
    position: relative;
    overflow: hidden;
}
.orbit::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, oklch(0.10 0.006 250 / 0.72), transparent 60%), var(--art);
    background-size: cover;
    background-position: center;
    opacity: 0.30;
    filter: saturate(1.5) brightness(1.25);
    transition: opacity 0.4s;
    pointer-events: none;
}
.orbit:hover::before { opacity: 0.48; }
.orbit > * { position: relative; }

/* the 14 minor properties: editorial index sheet, not a wall of cards */
.minor-grid {
    display: block;
    border-top: 1px solid var(--line);
}
.minor {
    display: grid;
    grid-template-columns: 150px 260px 1fr;
    gap: 1.5rem;
    align-items: baseline;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 1.1rem 0.5rem;
}
.minor:hover {
    background: var(--surface);
    border-color: var(--line);
    translate: 0 0;
}
.minor-name { margin-bottom: 0; }
.minor h4 { margin-bottom: 0; font-size: 1rem; }
.minor p { font-size: 0.88rem; }

@media (max-width: 900px) {
    .minor { grid-template-columns: 1fr; gap: 0.25rem; }
    .project-art { width: calc(100% + 4rem); }
}

/* ── reduced motion: calm everything ── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .rv, .q > span, .timeline::after, .progress { animation: none; }
    .q > span { width: auto; }
    .caret, .blink, .q > span::after, .scroll-cue { animation: none; }
    .hero-query, .hero-name, .hero-role, .hero-sub, .hero-actions,
    .page-hero .q, .page-hero h1, .page-lede, .page-art,
    .mobile-menu, .nav-burger span { transition: none; }
    .project { transform: none; }
}
