/* =====================================================================
   Zayd Aziz — Portfolio stylesheet
   ---------------------------------------------------------------------
   Design language: Vercel Geist — an exercise in subtraction. A near-white
   canvas (#fafafa) carries near-black ink (#171717) and almost nothing
   else. Depth is a 1px hairline, never a heavy shadow. The ONE place colour
   is allowed is the hero, where a soft multi-stop mesh gradient blooms
   behind the headline — the brand's entire decorative system. Type does the
   work: Geist Sans in tightly-tracked 600 for display, Geist Mono uppercase
   for section eyebrows. Buttons are black marketing pills or 6px squares.
   See Design.md for the full token reference.
   ===================================================================== */

/* Geist is Vercel's own family, free on Google Fonts. Inter / JetBrains
   Mono are the documented fallbacks if Geist fails to load. */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500&display=swap');


/* =====================================================================
   1. DESIGN TOKENS
   ===================================================================== */
:root {
    /* --- Ink & greys — the black-and-white duet -------------------- */
    --ink:            #171717;   /* headings, primary CTA fill, borders' darkest */
    --body:           #4d4d4d;   /* paragraphs, nav links                        */
    --mute:           #8f8f8f;   /* captions, eyebrows, metadata                 */
    --faint:          #a1a1a1;   /* placeholders, disabled                       */
    --on-ink:         #ffffff;   /* text on the ink pill                         */

    /* --- Surfaces -------------------------------------------------- */
    --canvas:         #fafafa;   /* the near-white page sheet                    */
    --elevated:       #ffffff;   /* cards, buttons, inputs lifted off canvas     */
    --hairline-soft:  #f2f2f2;   /* faint alternating panels                     */
    --hairline:       #ebebeb;   /* THE 1px border — structural workhorse        */

    /* --- Accent (links / focus only) ------------------------------ */
    --link:           #0070f3;   /* Vercel blue — links, focus, highlights       */
    --link-deep:      #0761d1;
    --link-soft:      #d3e5ff;

    /* --- Mesh-gradient stops (hero only) -------------------------- */
    --g-develop-a: #007cf0;  --g-develop-b: #00dfd8;   /* blue → cyan   */
    --g-preview-a: #7928ca;  --g-preview-b: #ff0080;   /* violet → pink */
    --g-ship-a:    #ff4d4d;  --g-ship-b:    #f9cb28;   /* red → amber   */

    /* --- Constellation accent (script.js reads --accent literally) - */
    --accent:         #d4d4d4;   /* faint ink node-graph texture, not colour     */

    /* --- Typography ----------------------------------------------- */
    --font:      "Geist", "Inter", system-ui, -apple-system, Arial, sans-serif;
    --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", monospace;

    /* --- Spacing (4px base) --------------------------------------- */
    --space-xxs: 4px;
    --space-xs:  8px;
    --space-sm:  12px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  32px;
    --space-2xl: 40px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    --space-section: 128px;

    /* --- Layout --------------------------------------------------- */
    --container: 1200px;
    --gutter:    24px;

    /* --- Radius (bimodal: 6px squares / full pills, 12–16 cards) --- */
    --radius-sm:   6px;      /* nav & app buttons, inputs        */
    --radius-md:   12px;     /* feature cards, code blocks        */
    --radius-lg:   16px;     /* pricing / larger panels           */
    --radius-pill: 100px;    /* marketing CTA pills               */
    --radius-full: 9999px;   /* icon buttons, chips, ghost links  */

    /* --- Elevation — hairline first, whisper shadow at most -------- */
    --shadow-whisper: 0 1px 1px rgba(0, 0, 0, 0.04);
    --shadow-float:   0 2px 2px rgba(0, 0, 0, 0.04), 0 8px 16px -4px rgba(0, 0, 0, 0.06);

    /* --- Motion --------------------------------------------------- */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Optional dark theme (JS toggles .dark-mode) — Vercel's night ---- */
body.dark-mode {
    --ink:            #ededed;
    --body:           #a1a1a1;
    --mute:           #8f8f8f;
    --faint:          #707070;
    --on-ink:         #171717;
    --canvas:         #000000;
    --elevated:       #0a0a0a;
    --hairline-soft:  #1a1a1a;
    --hairline:       #2e2e2e;
    --link:           #3291ff;
    --accent:         #333333;   /* faint node-graph on black */
}


/* =====================================================================
   2. GLOBAL RESET & BASE
   ===================================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
}

body {
    font-family: var(--font);
    color: var(--body);
    background-color: var(--canvas);
    /* Vercel prose sits at 16px / 24px, neutral tracking */
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

.container {
    width: 100%;
    max-width: var(--w, var(--container));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

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


/* =====================================================================
   3. TYPOGRAPHY
   Weight is binary: 600 headings, 500 buttons/labels, 400 everything else.
   Display tracking is tight and negative; body sits neutral.
   ===================================================================== */
h1, h2, h3 {
    font-family: var(--font);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--ink);
}

p { max-width: 68ch; color: var(--body); }
.hero-lead, .section-intro, .contact-lead { color: var(--body); }

/* Uppercase Geist Mono eyebrow — labels a section like a spec-sheet header */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--mute);
    margin-bottom: var(--space-md);
}

.section-title {
    /* heading-lg: 32px / 600 / -1.28px */
    font-size: clamp(26px, 4vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.04em;
}


/* =====================================================================
   4. NAV BAR  (component: nav-bar — canvas bg, bottom hairline)
   ===================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: color-mix(in srgb, var(--canvas) 85%, transparent);
    backdrop-filter: saturate(1.1) blur(8px);
    border-bottom: 1px solid var(--hairline);
    transition: border-color 0.3s var(--ease);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    font-family: var(--font);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* nav-link: body-grey, fully rounded hit area, transparent until interacted */
.nav-links a {
    color: var(--body);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    position: relative;
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--hairline-soft); }

/* Text-swap hover (script.js wraps each label in .nav-swap) */
.nav-swap {
    position: relative;
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}
.nav-swap-real,
.nav-swap-clone {
    display: block;
    transition: transform 0.35s var(--ease);
}
.nav-swap-clone {
    position: absolute;
    inset: 0;
    transform: translateY(100%);
    color: var(--link);
}
.nav-links a:hover .nav-swap-real  { transform: translateY(-100%); }
.nav-links a:hover .nav-swap-clone { transform: translateY(0); }

.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] .nav-swap-real { font-weight: 500; }

/* Theme toggle — quiet ghost control */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: var(--space-xs);
    border-radius: var(--radius-full);
    color: var(--ink);
}
.theme-toggle:hover { background: var(--hairline-soft); }

/* Hamburger — built by script.js, mobile only */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* =====================================================================
   5. BAND RHYTHM  (generous vertical gaps; hairline separators)
   ===================================================================== */
.section,
.hero,
.cta {
    padding-block: var(--space-4xl);
    position: relative;
}

/* Alternate onto pure white to lift a band off the near-white canvas */
.section--alt { background: var(--elevated); border-block: 1px solid var(--hairline); }

.section-head { margin-bottom: var(--space-xl); }

.section-intro {
    font-size: 16px;
    line-height: 1.5;
    margin-top: var(--space-md);
    max-width: 60ch;
}


/* =====================================================================
   6. HERO  (component: hero-band — the one place colour lives)
   ===================================================================== */
.hero {
    padding-block: var(--space-section);
    overflow: hidden;
}

/* THE mesh gradient — a soft multi-stop bloom of the brand accents,
   the entire decorative system. Confined to the hero, blurred, low-alpha. */
.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 130%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(38% 45% at 18% 22%, color-mix(in srgb, var(--g-develop-a) 55%, transparent), transparent 70%),
        radial-gradient(34% 42% at 78% 14%, color-mix(in srgb, var(--g-preview-a) 50%, transparent), transparent 70%),
        radial-gradient(44% 52% at 68% 58%, color-mix(in srgb, var(--g-preview-b) 42%, transparent), transparent 70%),
        radial-gradient(40% 48% at 32% 68%, color-mix(in srgb, var(--g-develop-b) 45%, transparent), transparent 70%),
        radial-gradient(34% 42% at 90% 78%, color-mix(in srgb, var(--g-ship-b) 42%, transparent), transparent 70%);
    filter: blur(40px) saturate(1.05);
    opacity: 0.5;
}
body.dark-mode .hero::before { opacity: 0.35; }

@media (prefers-reduced-motion: no-preference) {
    .hero::before { animation: mesh-drift 18s ease-in-out infinite alternate; }
}
@keyframes mesh-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-3%, 2%, 0) scale(1.06); }
}

/* Faint ink node-graph texture over the mesh (drawn in script.js) */
.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.45;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
    mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.hero-inner { position: relative; z-index: 1; }

.hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}
.hero-inner:has(.hero-photo) { grid-template-columns: 1.35fr 0.9fr; }

/* Photo as a flat hairline card — no heavy shadow */
.hero-photo { margin: 0; max-width: 440px; }
.hero-photo img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center 6%;
    border-radius: var(--radius-md);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-whisper);
}

/* "Currently" status — small pill with a hairline and a blue dot */
.status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 12px;
    color: var(--mute);
    background: var(--elevated);
    border: 1px solid var(--hairline);
    padding: var(--space-xxs) var(--space-sm);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
}
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--link);
    animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--link) 55%, transparent); }
    70%  { box-shadow: 0 0 0 6px color-mix(in srgb, var(--link) 0%, transparent); }
    100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--link) 0%, transparent); }
}

.hero-title {
    /* display-xl: 48px / 600 / -2.4px (≈ -0.05em), scaling up on wide screens */
    font-size: clamp(40px, 7vw, 64px);
    line-height: 1.0;
    letter-spacing: -0.05em;
    margin-bottom: var(--space-md);
}

.hero-statement {
    font-size: clamp(18px, 2.4vw, 20px);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--ink);
    max-width: 30ch;
    margin-bottom: var(--space-lg);
}

.hero-lead {
    font-size: 16px;
    line-height: 1.5;
    max-width: 50ch;
    margin-bottom: var(--space-xl);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

.greeting {
    margin-top: var(--space-md);
    min-height: 1.5rem;
    color: var(--link);
    font-weight: 500;
}


/* =====================================================================
   7. ABOUT
   ===================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-3xl);
    align-items: start;
}
.about-body p + p { margin-top: var(--space-md); }

.quick-facts {
    list-style: none;
    margin-top: var(--space-xl);
    border-top: 1px solid var(--hairline);
}
.quick-facts li {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--hairline);
    font-size: 14px;
}
.quick-facts span {
    flex: 0 0 6rem;
    color: var(--mute);
    font-weight: 500;
}


/* =====================================================================
   8. PROJECTS  (component: feature-card — flat hairline tile)
   ===================================================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.project {
    display: flex;
    flex-direction: column;
    background: var(--elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.project:hover { box-shadow: var(--shadow-whisper); border-color: var(--faint); }

.project-title {
    /* heading-md: 20px / 600 / -0.4px */
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: var(--space-xs);
}
.project-desc { color: var(--body); font-size: 14px; flex-grow: 1; }

.project-link {
    margin-top: var(--space-lg);
    color: var(--link);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    align-self: flex-start;
}
.project-link:hover { color: var(--link-deep); }

/* Optional screenshot at the top of a card, framed as a hairline well */
.project-media {
    margin: calc(-1 * var(--space-lg)) calc(-1 * var(--space-lg)) var(--space-lg);
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: 1px solid var(--hairline);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: var(--hairline-soft);
}
.project-media img { width: 100%; height: 100%; object-fit: cover; }


/* =====================================================================
   9. SKILLS
   ===================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}
.skill-group h3 {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--mute);
    margin-bottom: var(--space-md);
}

/* Tags — small category pills (elevated white, hairline) */
.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}
.tags li {
    font-size: 13px;
    padding: 5px 12px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-full);
    color: var(--body);
    background: var(--elevated);
}
.project .tags { margin-top: var(--space-md); }


/* =====================================================================
   10. EXPERIENCE / LEADERSHIP  (timeline)
   ===================================================================== */
.timeline {
    list-style: none;
    margin-top: var(--space-2xl);
    border-left: 1px solid var(--hairline);
}
.timeline-item {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: var(--space-lg);
    padding: 0 0 var(--space-xl) var(--space-lg);
    position: relative;
}
.timeline-item::before {
    content: "";
    position: absolute;
    left: -4px;
    top: 0.45rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ink);
}
.timeline-date { color: var(--mute); font-size: 13px; }
.timeline-body h3 { font-size: 20px; letter-spacing: -0.02em; }
.timeline-org { color: var(--link); font-size: 14px; margin-bottom: var(--space-xxs); }


/* =====================================================================
   11. CONTACT
   ===================================================================== */
.contact-lead {
    font-size: 18px;
    line-height: 1.5;
    margin: var(--space-lg) 0 var(--space-xl);
}
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: var(--space-md);
    margin: var(--space-xl) 0 var(--space-lg);
}
.contact-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xxs);
    padding: var(--space-lg);
    border: 1px solid var(--hairline);
    background: var(--elevated);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--ink);
    transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.contact-card:hover { box-shadow: var(--shadow-whisper); border-color: var(--faint); }
.contact-icon {
    width: 24px;
    height: 24px;
    color: var(--ink);
    margin-bottom: var(--space-xs);
}
.contact-card-label { font-weight: 500; font-size: 14px; }
.contact-card-value { color: var(--mute); font-size: 13px; word-break: break-word; }


/* =====================================================================
   12. BUTTONS  (component: button-primary — the black marketing pill)
   Marketing CTAs are full pills; the fill inverts by variant.
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    padding: 0 20px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
                color 0.2s var(--ease), transform 0.12s var(--ease);
}
.btn:active { transform: translateY(1px); }

/* Primary = solid ink pill */
.btn--primary {
    background: var(--ink);
    color: var(--on-ink);
}
.btn--primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--canvas)); }

/* Secondary = white pill, ink text, hairline border (inverted fill) */
.btn--ghost {
    background: var(--elevated);
    color: var(--ink);
    border-color: var(--hairline);
}
.btn--ghost:hover { border-color: var(--faint); }

/* The playful "say hi" — a quiet ghost text button */
.wave {
    font: inherit;
    background: none;
    border: none;
    color: var(--mute);
    cursor: pointer;
    padding: var(--space-xs);
    font-size: 14px;
}
.wave:hover { color: var(--ink); }


/* =====================================================================
   13. HOME: "all projects" link + closing CTA band (cta-band, light)
   ===================================================================== */
.more-link {
    display: inline-block;
    margin-top: var(--space-xl);
    color: var(--link);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.more-link:hover { color: var(--link-deep); }

/* Vercel's CTA band stays light — big ink headline + a black pill */
.cta {
    text-align: center;
    border-top: 1px solid var(--hairline);
}
.cta h2 { font-size: clamp(28px, 5vw, 40px); letter-spacing: -0.04em; margin-bottom: var(--space-md); }
.cta p { max-width: 46ch; margin: 0 auto var(--space-xl); color: var(--body); }
.cta-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}


/* =====================================================================
   14. CERTIFICATIONS  (about page)
   ===================================================================== */
.cert-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-2xl);
}
.cert-list li {
    border: 1px solid var(--hairline);
    background: var(--elevated);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
}
.cert-list strong { display: block; font-weight: 500; color: var(--ink); }
.cert-list span { color: var(--mute); font-size: 13px; }


/* =====================================================================
   15. RÉSUMÉ VIEWER
   ===================================================================== */
.resume-view { padding-block: var(--space-2xl); }
.resume-frame {
    width: 100%;
    height: 82vh;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    background: #fff;
    margin-top: var(--space-lg);
}


/* =====================================================================
   16. FOOTER  (component: footer — canvas, top hairline)
   ===================================================================== */
.site-footer {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
    padding-block: var(--space-3xl);
    color: var(--body);
    font-size: 14px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
}
.site-footer .brand { color: var(--ink); font-size: 15px; }


/* =====================================================================
   17. RESPONSIVE  (Design.md breakpoints: 640 / 768 / 1024 / 1200)
   ===================================================================== */
@media (max-width: 1024px) {
    :root { --space-section: 96px; }
    .about-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
}

@media (max-width: 640px) {
    :root { --space-section: 72px; --space-4xl: 64px; }

    .hero-inner { grid-template-columns: 1fr; gap: var(--space-xl); }
    .hero-photo { order: -1; max-width: 260px; }
    .timeline-item { grid-template-columns: 1fr; gap: var(--space-xxs); }

    /* Pill CTAs go full-width on mobile */
    .hero-actions .btn, .cta-actions .btn { width: 100%; }

    /* --- Mobile menu --- */
    .nav-toggle { display: flex; }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: var(--space-xs) var(--gutter) var(--space-lg);
        background: var(--canvas);
        border-bottom: 1px solid var(--hairline);
        opacity: 0;
        transform: translateY(-10px);
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
                    visibility 0s linear 0.25s;
    }
    .site-header.nav-open .nav-links {
        opacity: 1;
        transform: none;
        visibility: visible;
        pointer-events: auto;
        transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
                    visibility 0s;
    }
    .nav-links a {
        width: 100%;
        padding: 14px var(--space-sm);
        font-size: 16px;
        border-radius: var(--radius-sm);
    }
    .theme-toggle { margin-top: var(--space-sm); align-self: flex-start; }
}


/* =====================================================================
   18. SCROLL / TEXT REVEAL ANIMATIONS  (class hooks used by script.js)
   ===================================================================== */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
    .hero-text > * { animation: hero-in 0.7s var(--ease) both; }
    .hero-text > *:nth-child(1) { animation-delay: 0.05s; }
    .hero-text > *:nth-child(2) { animation-delay: 0.12s; }
    .hero-text > *:nth-child(3) { animation-delay: 0.19s; }
    .hero-text > *:nth-child(4) { animation-delay: 0.26s; }
    .hero-text > *:nth-child(5) { animation-delay: 0.33s; }
    .hero-text > *:nth-child(6) { animation-delay: 0.40s; }
    .hero-text > *:nth-child(7) { animation-delay: 0.47s; }
    .hero-text > .hero-title { animation: none; }
}
@keyframes hero-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.reveal-mask {
    overflow: hidden;
    padding-bottom: 0.1em;
}
.reveal-mask .mask-inner {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 0.85s var(--ease);
    will-change: transform;
}
.reveal-mask.is-revealed .mask-inner { transform: translateY(0); }


/* =====================================================================
   19. ACCESSIBILITY
   ===================================================================== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
