/* ==========================================================================
   AndySchenck.com
   Design tokens → base → layout → components → pages → utilities
   ========================================================================== */

:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #eef0f7;
    --ink: #10142a;
    --ink-2: #2d3352;
    --muted: #586080;
    --line: #e1e4ef;

    --brand: #4f46e5;
    --brand-strong: #4338ca;
    --brand-soft: #eef0ff;
    --teal: #0d9488;
    --magenta: #db2777;
    --amber: #d97706;
    --green: #16a34a;

    /* Dark "stage" used by heroes and CTA bands in both themes */
    --stage: #0a0e1f;
    --stage-ink: #f4f5fb;
    --stage-muted: #b7bdd6;
    --stage-line: rgba(255, 255, 255, .14);

    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(16, 20, 42, .06), 0 1px 3px rgba(16, 20, 42, .05);
    --shadow: 0 10px 30px -12px rgba(16, 20, 42, .18), 0 4px 10px -6px rgba(16, 20, 42, .08);
    --shadow-lg: 0 30px 60px -20px rgba(10, 14, 31, .45), 0 12px 24px -12px rgba(10, 14, 31, .25);

    --container: 1180px;
    --gutter: clamp(16px, 4vw, 32px);
    --header-h: 68px;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0e1a;
        --surface: #12162a;
        --surface-2: #1a1f38;
        --ink: #eceef8;
        --ink-2: #cdd2e6;
        --muted: #9aa1bd;
        --line: #262c48;

        --brand: #8b8cfb;
        --brand-strong: #a5a6ff;
        --brand-soft: #1d2147;
        --teal: #2dd4bf;
        --magenta: #f472b6;
        --amber: #fbbf24;
        --green: #4ade80;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
        color-scheme: dark;
    }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin: 0 0 .5em;
    color: var(--ink);
    text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }

p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--brand-strong); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

ul, ol { padding-left: 1.2em; }

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

main:focus { outline: none; }

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

.skip-link {
    position: absolute;
    left: 16px; top: -60px;
    z-index: 100;
    background: var(--brand);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: top .15s;
}
.skip-link:focus { top: 12px; }

.icon { flex: none; vertical-align: middle; }

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

.narrow { max-width: 780px; }
.center { text-align: center; }
.center.actions, .actions.center { justify-content: center; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .7em 1.2em;
    border-radius: 999px;
    border: 1px solid transparent;
    font: 600 .95rem/1.2 var(--font-body);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn .icon { width: 18px; height: 18px; }
.btn-sm { padding: .5em .95em; font-size: .875rem; }
.btn-lg { padding: .85em 1.45em; font-size: 1rem; }

.btn-primary {
    background: linear-gradient(135deg, #5b50f0, #4338ca);
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .7);
}
.btn-primary:hover { box-shadow: 0 12px 26px -10px rgba(79, 70, 229, .85); }

.btn-accent {
    background: var(--accent, var(--brand));
    color: #fff;
    box-shadow: 0 8px 20px -10px var(--accent, var(--brand));
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink-2); }

.btn-light { background: #fff; color: #10142a; }
.btn-light:hover { box-shadow: 0 10px 24px -10px rgba(255, 255, 255, .5); }

.btn-outline-light {
    background: rgba(255, 255, 255, .04);
    color: var(--stage-ink);
    border-color: rgba(255, 255, 255, .32);
}
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Header & navigation ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: saturate(1.6) blur(14px);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 750;
    font-size: 1.1rem;
    letter-spacing: -.01em;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 11px;
    background: conic-gradient(from 210deg, #4f46e5, #0ea5a4, #ec4899, #f59e0b, #4f46e5);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .02em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 6px 14px -6px rgba(79, 70, 229, .6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
    transition: background-color .15s, color .15s;
}
.site-nav ul a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav ul a[aria-current="page"] { color: var(--brand-strong); background: var(--brand-soft); font-weight: 600; }

.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    place-items: center;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 900px) {
    .nav-toggle { display: grid; }
    .site-nav {
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px var(--gutter) 24px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        display: none;
    }
    .site-nav.is-open { display: flex; }
    .site-nav ul { flex-direction: column; }
    .site-nav ul a { padding: 12px 14px; border-radius: 12px; font-size: 1.05rem; }
    .nav-resume { align-self: flex-start; padding: .8em 1.3em; font-size: 1rem; }
}

/* ---------- Dark "stage" backgrounds ---------- */

.hero, .page-hero, .case-hero, .cta-band {
    position: relative;
    isolation: isolate;
    background: var(--stage);
    color: var(--stage-ink);
    overflow: hidden;
}
.hero h1, .hero h2, .page-hero h1, .case-hero h1, .cta-band h2 { color: #fff; }

.hero-bg, .case-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.hero-bg {
    background:
        radial-gradient(60% 70% at 12% 10%, rgba(99, 102, 241, .55), transparent 60%),
        radial-gradient(45% 55% at 88% 18%, rgba(236, 72, 153, .38), transparent 60%),
        radial-gradient(50% 60% at 70% 95%, rgba(20, 184, 166, .40), transparent 62%),
        radial-gradient(30% 35% at 35% 90%, rgba(245, 158, 11, .18), transparent 60%);
}
.hero-bg::after, .case-hero-bg::after {
    /* Fine grid that fades out: gives the dark stage some texture */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(80% 70% at 50% 30%, #000 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000 30%, transparent 85%);
}

/* ---------- Home hero ---------- */

.hero { padding: clamp(28px, 4vw, 52px) 0 40px; }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 10px;
    border: 1px solid var(--stage-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    color: var(--stage-muted);
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: 26px;
}
.kicker-date { color: #e7e9f6; font-weight: 600; white-space: nowrap; }
.hero-kicker .dot { flex: none; }
.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, .18);
}

.hero-title { font-size: clamp(2.8rem, 7vw, 5rem); margin-bottom: .25em; }

.hero-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0 .4em;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.3vw, 1.6rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.01em;
    margin-bottom: 22px;
}
.hero-roles span:nth-child(1) { color: #a5b4fc; }
.hero-roles span:nth-child(2) { color: #5eead4; }
.hero-roles span:nth-child(3) { color: #f9a8d4; }

.hero-lede { color: var(--stage-muted); font-size: 1.15rem; max-width: 36em; }

/* Hero image: one desktop shot, flat. When the same app's phone shot is marked too, the desktop frame
   shrinks slightly and the phone overlaps only its lower-right corner, extending below it. */
.hero-visual { position: relative; }
.hero-shot-main .frame { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08); }
.hero-visual.has-phone { padding-bottom: 14%; }
.hero-visual.has-phone .hero-shot-main { width: 88%; }
.hero-shot-phone {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 24%;
    max-width: 150px;
}
.hero-shot-phone .frame { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .1); }

.stack-strip {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: clamp(40px, 6vw, 72px);
    padding-top: 22px;
    border-top: 1px solid var(--stage-line);
}
.stack-label {
    flex: none;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--stage-muted);
}
.stack-strip ul { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; }
.stack-strip li { color: #e7e9f6; font-weight: 600; font-size: .95rem; }

@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { max-width: 620px; }
    .stack-strip { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 6vw, 72px); }
.page-hero .section-kicker { color: #a5b4fc; }
.page-lede { color: var(--stage-muted); font-size: 1.15rem; max-width: 42em; margin-bottom: 0; }
.page-hero-full { min-height: 60vh; display: grid; align-items: center; }
.page-hero-split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 32px; }
.page-hero-split .actions { margin-top: 0; }

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tint { background: var(--surface); border-block: 1px solid var(--line); }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-kicker {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand-strong);
    margin-bottom: 12px;
}
.section-intro { color: var(--muted); font-size: 1.1rem; }

.h-small {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

/* ---------- Tags & pills ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li {
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink-2);
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.5;
}
.tags-sm li { font-size: .76rem; padding: 2px 9px; }

.eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}
.eyebrow-light { color: var(--stage-muted); }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: none;
    border: 1px solid;
}
.status-pill .icon { width: 13px; height: 13px; }
.status-pill.is-live { color: #15803d; background: #ecfdf3; border-color: #bbf7d0; }
.status-pill.is-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.status-pill.is-private { color: #b45309; background: #fffbeb; border-color: #fde68a; }
@media (prefers-color-scheme: dark) {
    .status-pill.is-live { color: #86efac; background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .35); }
    .status-pill.is-private { color: #fcd34d; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); }
}
.case-hero .status-pill.is-live, .hero .status-pill.is-live { color: #86efac; background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .4); }
.case-hero .status-pill.is-private { color: #fcd34d; background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .4); }

.check-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.check-list .icon { width: 18px; height: 18px; margin-top: 4px; color: var(--accent, var(--teal)); }

/* ---------- Screenshot frames ---------- */

.frame {
    position: relative;
    overflow: hidden;
    background: #0d1020;
}
.frame img { width: 100%; height: auto; }

.frame-browser {
    border-radius: 12px;
    box-shadow: var(--shadow), 0 0 0 1px rgba(16, 20, 42, .08);
}
.frame-bar {
    display: flex;
    gap: 6px;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    background: linear-gradient(#1f2337, #191c2d);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3b4060; }
.frame-bar i:nth-child(1) { background: #ff6159; }
.frame-bar i:nth-child(2) { background: #ffbd2e; }
.frame-bar i:nth-child(3) { background: #28c941; }

.frame-phone {
    border-radius: 26px;
    border: 6px solid #0b0c12;
    box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .06);
    background: #0b0c12;
}
.frame-phone img { border-radius: 19px; }

/* Video stills and artwork: plain 16:9-friendly frame, no browser chrome */
.frame-media {
    border-radius: 14px;
    box-shadow: var(--shadow), 0 0 0 1px rgba(16, 20, 42, .08);
    background: #000;
}

/* ---------- Product showcase ---------- */

.showcase-list { display: grid; gap: clamp(56px, 8vw, 104px); }

.showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}
.showcase.is-flipped .showcase-media { order: 2; }

.showcase-media {
    position: relative;
    isolation: isolate;
    border-radius: var(--radius-lg);
    padding: clamp(20px, 4vw, 44px);
    background:
        radial-gradient(80% 90% at 0% 0%, color-mix(in srgb, var(--accent) 70%, transparent), transparent 70%),
        radial-gradient(70% 80% at 100% 100%, color-mix(in srgb, var(--accent-2) 65%, transparent), transparent 70%),
        #0d1124;
    overflow: hidden;
}
.media-glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, #000, transparent);
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
}
.showcase-media .frame-browser { box-shadow: var(--shadow-lg); }

.media-phones {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 2vw, 22px);
    align-items: center;
}
/* Children are: glow, phone, phone, phone. Raise the middle phone for a fanned look. */
.media-phones > :nth-child(2), .media-phones > :nth-child(4) { transform: translateY(6%); }
.media-phones > :nth-child(3) { transform: translateY(-4%); }
.zoom-frame .gallery-zoom { right: 10px; bottom: 10px; }
.media-phones .zoom-frame .gallery-zoom { width: 30px; height: 30px; right: 8px; bottom: 8px; }
.media-phones .zoom-frame .gallery-zoom .icon { width: 16px; height: 16px; }

.showcase-title { font-size: clamp(1.6rem, 2.8vw, 2.15rem); margin-bottom: 12px; }
.showcase-title a { color: inherit; text-decoration: none; }
.showcase-title a:hover { color: var(--accent); }
.showcase-summary { color: var(--ink-2); font-size: 1.05rem; }
.showcase .tags { margin: 6px 0 0; }
.showcase .actions { margin-top: 26px; }

@media (max-width: 900px) {
    .showcase { grid-template-columns: 1fr; }
    .showcase.is-flipped .showcase-media { order: 0; }
}

/* Creative-technology projects: a secondary group after the flagship software products */
.section-creative { padding-top: 0; }
.section-creative .section-head {
    max-width: none;
    padding-top: clamp(40px, 6vw, 64px);
    border-top: 1px solid var(--line);
    margin-bottom: clamp(28px, 4vw, 40px);
}
.section-creative h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.section-creative .section-intro { max-width: 760px; }

.showcase-compact {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    padding: clamp(18px, 3vw, 28px);
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
}
.showcase-compact .showcase-media { padding: clamp(14px, 2.4vw, 24px); border-radius: var(--radius); }
.showcase-compact .showcase-title { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
.showcase-compact .showcase-summary { font-size: 1rem; }
.showcase.is-creative .showcase-media .frame-media { box-shadow: var(--shadow-lg); }
@media (max-width: 900px) { .showcase-compact { grid-template-columns: 1fr; } }

/* ---------- Capabilities ---------- */

.capability-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}
.capability {
    --c: var(--brand);
    position: relative;
    padding: 24px 24px 22px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.capability::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 20%, transparent));
}
.capability:nth-child(4n+2) { --c: var(--teal); }
.capability:nth-child(4n+3) { --c: var(--magenta); }
.capability:nth-child(4n+4) { --c: var(--amber); }
.capability:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c) 40%, var(--line)); }
.capability h3 { font-size: 1.06rem; margin-bottom: 8px; }
.capability p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- Process ---------- */

.process {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    counter-reset: step;
}
.process li {
    padding: 22px 20px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}
.process-step {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #6366f1, #14b8a6 50%, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.process h3 { margin-bottom: 6px; }
.process p { color: var(--muted); font-size: .94rem; margin: 0; }

@media (max-width: 1000px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */

.cta-band {
    padding: clamp(56px, 7vw, 88px) 0;
    background:
        radial-gradient(50% 120% at 0% 0%, rgba(99, 102, 241, .5), transparent 60%),
        radial-gradient(40% 120% at 100% 100%, rgba(236, 72, 153, .35), transparent 60%),
        radial-gradient(30% 90% at 60% 0%, rgba(20, 184, 166, .3), transparent 60%),
        var(--stage);
}
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 40px; }
.cta-inner h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); max-width: 22em; }
.cta-inner p { color: var(--stage-muted); margin: 0; }
.cta-inner .actions { margin-top: 12px; }

/* ---------- Case study ---------- */

.case-hero { padding: 28px 0 clamp(72px, 9vw, 112px); }
.case-hero-bg {
    background:
        radial-gradient(65% 80% at 8% 0%, color-mix(in srgb, var(--accent) 60%, transparent), transparent 62%),
        radial-gradient(55% 75% at 100% 30%, color-mix(in srgb, var(--accent-2) 50%, transparent), transparent 62%),
        var(--stage);
}

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 clamp(28px, 5vw, 48px); padding: 0; font-size: .875rem; }
.breadcrumbs li { color: var(--stage-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumbs a { color: var(--stage-muted); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.breadcrumbs [aria-current] { color: #fff; }

.case-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}
.case-hero-grid.has-phone { grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); }
.case-hero-grid.has-phone .case-hero-media { max-width: 300px; justify-self: center; }
.case-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.case-tagline { color: var(--stage-muted); font-size: 1.15rem; max-width: 34em; }
.case-hero-media .frame { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08); }

.private-notice {
    display: flex;
    gap: 14px;
    margin-top: 26px;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(252, 211, 77, .35);
    max-width: 34em;
}
.private-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(245, 158, 11, .16);
    color: #fcd34d;
}
.private-notice strong { display: block; color: #fff; margin-bottom: 2px; }
.private-notice p { color: var(--stage-muted); margin: 0; font-size: .95rem; }

@media (max-width: 900px) {
    .case-hero-grid, .case-hero-grid.has-phone { grid-template-columns: 1fr; }
    .case-hero-grid.has-phone .case-hero-media { max-width: 240px; justify-self: start; }
}

.facts {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: -44px 0 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.facts div { padding: 18px 22px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; }
.facts dt { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; color: var(--ink); font-size: .95rem; line-height: 1.45; }
@media (max-width: 900px) {
    .facts { grid-template-columns: 1fr 1fr; }
    .facts div:nth-child(3) { border-left: 0; }
    .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
    .facts { grid-template-columns: 1fr; }
    .facts div { border-left: 0; }
    .facts div + div { border-top: 1px solid var(--line); }
}

.case-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: clamp(32px, 5vw, 72px);
    padding-top: clamp(48px, 7vw, 80px);
    padding-bottom: clamp(48px, 7vw, 80px);
}

.case-toc { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; }
.toc-title { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.case-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.case-toc a {
    display: block;
    margin-left: -2px;
    padding: 6px 0 6px 14px;
    border-left: 2px solid transparent;
    color: var(--muted);
    text-decoration: none;
    font-size: .92rem;
    transition: color .15s, border-color .15s;
}
.case-toc a:hover { color: var(--ink); }
.case-toc a.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }

@media (max-width: 980px) {
    .case-layout { grid-template-columns: 1fr; }
    .case-toc { display: none; }
}

.case-body { max-width: 820px; }
.case-section { padding-bottom: clamp(40px, 5vw, 56px); margin-bottom: clamp(40px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.case-section:last-child { border-bottom: 0; margin-bottom: 0; }
.case-section > h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); position: relative; padding-top: 18px; }
.case-section > h2::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 36px; height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.case-body p { color: var(--ink-2); }
.prose-lead:first-of-type { font-size: 1.15rem; color: var(--ink); }

.role-grid {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}
.role-grid li {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--line);
    font-weight: 500;
    font-size: .95rem;
}
.role-grid .icon { width: 18px; height: 18px; color: var(--accent); }

.cap-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cap-group {
    padding: 22px 22px 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
}
.cap-group:nth-child(even) { border-top-color: var(--accent-2); }
.cap-group h3 { font-size: 1.05rem; }
.cap-group ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); font-size: .95rem; }
.cap-group li { margin-bottom: 6px; }
.cap-group li::marker { color: var(--accent); }

.arch { list-style: none; margin: 8px 0 0; padding: 0; position: relative; }
.arch::before {
    content: "";
    position: absolute;
    left: 9px; top: 12px; bottom: 12px;
    width: 2px;
    background: linear-gradient(var(--accent), var(--accent-2));
    opacity: .5;
}
.arch-layer { position: relative; padding: 0 0 26px 40px; }
.arch-layer:last-child { padding-bottom: 0; }
.arch-head { display: flex; align-items: center; gap: 0; margin-bottom: 6px; }
.arch-node {
    position: absolute;
    left: 0; top: 4px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent);
}
.arch-layer:nth-child(even) .arch-node { border-color: var(--accent-2); }
.arch-head h3 { margin: 0; font-size: 1.08rem; }
.arch-layer p { margin-bottom: 10px; font-size: .98rem; }

.challenges { display: grid; gap: 16px; }
.challenge {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}
.challenge-num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.challenge h3 { margin-bottom: 8px; }
.challenge p { margin: 0; }
@media (max-width: 520px) { .challenge { grid-template-columns: 1fr; gap: 6px; } }

/* Pipeline: rows of numbered steps with arrows on wider screens, a vertical sequence on phones */
.pipeline {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 22px;
}
.pipeline-step {
    position: relative;
    padding: 18px 18px 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
}
.pipeline-step:nth-child(even) { border-top-color: var(--accent-2); }
.pipeline-num {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: .95rem;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.pipeline-step h3 { font-size: 1rem; margin-bottom: 6px; }
.pipeline-step p { margin: 0; font-size: .9rem; color: var(--muted); }
.pipeline-step:not(:last-child)::after {
    /* Arrow to the next step (right on wide screens, down on phones) */
    content: "";
    position: absolute;
    width: 9px; height: 9px;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    top: 50%;
    right: -16px;
    transform: translateY(-50%) rotate(45deg);
}
.pipeline-step:nth-child(3n)::after { display: none; }
@media (max-width: 700px) {
    .pipeline { grid-template-columns: 1fr; gap: 22px; }
    .pipeline-step:nth-child(3n)::after { display: block; }
    .pipeline-step:not(:last-child)::after { top: auto; right: auto; bottom: -15px; left: 26px; transform: rotate(135deg); }
}

/* Selected videos: thumbnail facades that become players on demand */
.video-grid {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 20px;
}
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .video-grid { grid-template-columns: 1fr; } }
.video-card h3 { font-size: .98rem; margin: 12px 0 4px; }
.video-card p { font-size: .88rem; color: var(--muted); margin: 0; }
.video-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
}
.video-facade { position: absolute; inset: 0; display: block; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.video-facade:hover img { transform: scale(1.03); }
.video-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 56px; height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(10, 14, 31, .72);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    transition: background-color .2s, transform .2s;
}
.video-play .icon { width: 24px; height: 24px; margin-left: 3px; }
.video-facade:hover .video-play, .video-facade:focus-visible .video-play { background: var(--accent); transform: scale(1.06); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-cta { margin: 28px 0 0; }

/* Headline numbers in the outcome section */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: 18px 0 22px;
}
.stats > div {
    display: flex;
    flex-direction: column-reverse;
    gap: 2px;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}
.stats dd {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2rem;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stats dt { font-size: .85rem; color: var(--muted); font-weight: 500; }

.tech-groups { display: grid; gap: 14px; margin: 0; }
.tech-groups > div { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: baseline; }
.tech-groups dt { font-weight: 600; color: var(--muted); font-size: .9rem; }
.tech-groups dd { margin: 0; }
@media (max-width: 560px) { .tech-groups > div { grid-template-columns: 1fr; gap: 6px; } }

.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; }

.next-project { padding-bottom: clamp(56px, 8vw, 96px); }
.next-project a {
    display: grid;
    gap: 4px;
    padding: clamp(24px, 4vw, 40px);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: #fff;
    background:
        radial-gradient(70% 140% at 0% 0%, color-mix(in srgb, var(--accent) 65%, transparent), transparent 70%),
        radial-gradient(60% 140% at 100% 100%, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent 70%),
        var(--stage);
    transition: transform .2s ease, box-shadow .2s ease;
}
.next-project a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.next-label { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--stage-muted); }
.next-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.2rem); display: inline-flex; align-items: center; gap: 12px; }
.next-name .icon { width: 28px; height: 28px; transition: transform .2s; }
.next-project a:hover .next-name .icon { transform: translateX(4px); }
.next-cat { color: var(--stage-muted); }

/* ---------- Gallery & lightbox ---------- */

.gallery { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 28px 24px; }
.gallery-desktop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-mobile { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery + .gallery { margin-top: 36px; }
@media (max-width: 760px) {
    .gallery-desktop { grid-template-columns: 1fr; }
    .gallery-mobile { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.case-section-wide .gallery-desktop:has(> li:only-child) { grid-template-columns: 1fr; }

.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 10px; font-size: .88rem; color: var(--muted); line-height: 1.5; }

.gallery-open {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    border-radius: 14px;
    text-align: left;
}
.gallery-open .frame { transition: transform .25s ease, box-shadow .25s ease; }
.gallery-open:hover .frame { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.gallery-zoom {
    position: absolute;
    right: 12px; bottom: 12px;
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(10, 14, 31, .75);
    color: #fff;
    opacity: 0;
    transition: opacity .2s;
}
.gallery-open:hover .gallery-zoom, .gallery-open:focus-visible .gallery-zoom { opacity: 1; }
.case-hero-media .gallery-open { cursor: zoom-in; }

.shot-placeholder {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    min-height: 220px;
    padding: 20px;
    text-align: center;
    border: 2px dashed color-mix(in srgb, var(--amber) 60%, var(--line));
    border-radius: 14px;
    background: color-mix(in srgb, var(--amber) 6%, var(--surface));
    color: var(--ink-2);
    font-size: .9rem;
}
.shot-placeholder.is-mobile { min-height: 360px; }
.shot-placeholder .icon { width: 28px; height: 28px; color: var(--amber); }
.shot-placeholder small { color: var(--muted); font-size: .78rem; }

.lightbox {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(6, 8, 18, .94);
    color: #fff;
}
.lightbox::backdrop { background: rgba(6, 8, 18, .7); }
.lightbox[open] { display: grid; animation: fade-in .2s ease; }
.lightbox-inner {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 14px;
    width: 100%;
    height: 100%;
    padding: 56px clamp(12px, 3vw, 40px) 20px;
}
.lightbox-figure { margin: 0; display: grid; grid-template-rows: 1fr auto; gap: 12px; min-height: 0; place-items: center; }
.lightbox-figure img {
    max-width: 100%;
    max-height: calc(100vh - 190px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.lightbox-figure figcaption { color: #d4d8ea; text-align: center; max-width: 60em; font-size: .95rem; }
.lightbox-controls { display: flex; align-items: center; justify-content: center; gap: 18px; }
.lightbox-count { min-width: 4em; text-align: center; color: #b7bdd6; font-variant-numeric: tabular-nums; }
.lightbox-btn, .lightbox-close {
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
}
.lightbox-btn:hover, .lightbox-close:hover { background: rgba(255, 255, 255, .18); }
.lightbox-close { position: absolute; top: 12px; right: 12px; }
.lightbox.is-single .lightbox-controls { display: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- About ---------- */

.about-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
.prose p { color: var(--ink-2); font-size: 1.08rem; }
.about-aside {
    align-self: start;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}
.employer-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.employer-list li { display: grid; gap: 1px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.employer-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.employer-list span { color: var(--muted); font-size: .9rem; }
.edu { margin: 0; font-weight: 600; }
.edu span { color: var(--muted); font-weight: 400; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.duo-card {
    padding: clamp(24px, 3vw, 36px);
    border-radius: var(--radius-lg);
    background: var(--bg);
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}
.duo-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #14b8a6);
}
.duo-card + .duo-card::before { background: linear-gradient(90deg, #ec4899, #f59e0b); }
.duo-card:first-child { --accent: var(--brand); }
.duo-card + .duo-card { --accent: var(--magenta); }
.duo-card .check-list { margin: 0; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }

/* ---------- Experience ---------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.job {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: clamp(16px, 4vw, 48px);
    padding: 36px 0;
    border-top: 1px solid var(--line);
}
.job:first-child { border-top: 0; padding-top: 0; }
.job-meta { display: grid; gap: 8px; align-content: start; }
.job-dates { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.job-domain {
    justify-self: start;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: .78rem;
    font-weight: 600;
}
.job:nth-child(3n+2) .job-domain { background: color-mix(in srgb, var(--teal) 12%, transparent); color: var(--teal); }
.job:nth-child(3n+3) .job-domain { background: color-mix(in srgb, var(--magenta) 12%, transparent); color: var(--magenta); }
.job-body h3 { font-size: 1.3rem; margin-bottom: 4px; }
.job-company { font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.job-company span { font-weight: 400; color: var(--muted); }
.job-body > p:not(.job-company):not(.job-links) { color: var(--ink-2); }
.job-highlights { color: var(--ink-2); margin: 0 0 16px; }
.job-highlights li { margin-bottom: 6px; }
.job-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.job-links a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; }
.job-links a:hover { text-decoration: underline; }
.job-links .icon { width: 16px; height: 16px; }
@media (max-width: 760px) { .job { grid-template-columns: 1fr; gap: 10px; } .job-meta { grid-auto-flow: column; justify-content: start; align-items: center; } }

.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.skill-card {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--line);
}
.skill-card h3 { font-size: 1.02rem; margin-bottom: 14px; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card, .form-card {
    padding: clamp(24px, 3.5vw, 40px);
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 12px; align-items: center; overflow-wrap: anywhere; }
.contact-list .icon { color: var(--brand-strong); }
.placeholder-note { color: var(--amber); font-size: .88rem; }

.contact-form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent);
}
.field .input-validation-error { border-color: #dc2626; }
.field-error { color: #dc2626; font-size: .88rem; }
@media (prefers-color-scheme: dark) { .field-error { color: #f87171; } }
.form-error:empty, .form-error.validation-summary-valid { display: none; }
.form-error {
    padding: 12px 16px;
    border-radius: 12px;
    background: color-mix(in srgb, #dc2626 10%, transparent);
    border: 1px solid color-mix(in srgb, #dc2626 35%, transparent);
    color: var(--ink);
    font-size: .95rem;
}
.form-error ul { margin: 0; padding-left: 1.1em; }
.form-note { margin: 0; color: var(--muted); font-size: .85rem; }
.contact-form .btn { justify-self: start; }

.secret-panel {
    width: min(360px, calc(100vw - 32px));
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-lg);
}
.secret-panel::backdrop { background: rgba(6, 8, 18, .6); }
.secret-panel h2 { font-size: 1.15rem; margin-bottom: 4px; }
.secret-panel form { display: grid; gap: 10px; }
.secret-state { margin: 0; color: var(--muted); font-size: .95rem; }
.secret-message { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; }
.secret-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-success { display: flex; gap: 18px; align-items: flex-start; }
.form-success h2 { font-size: 1.4rem; }
.form-success p { margin: 0; color: var(--muted); }
.success-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--green) 15%, transparent);
    color: var(--green);
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 56px 0 28px;
    font-size: .95rem;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-roles { color: var(--muted); margin: 14px 0 8px; max-width: 26em; }
.footer-loc { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 0; }
.footer-loc .icon { width: 18px; height: 18px; }
.footer-heading { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-nav a { color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.footer-nav a:hover { color: var(--brand-strong); text-decoration: underline; }
.footer-base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .85rem;
}
.footer-base p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Motion ---------- */

.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .6s ease, transform .6s ease;
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
    .js-reveal [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Phone refinements ----------
   Everything below applies only at phone widths, so the desktop layout is untouched. */

@media (max-width: 600px) {
    /* Long button labels ("Visit Neon Streak Animation Studio") may wrap instead of pushing past the screen edge */
    .btn { white-space: normal; text-align: center; max-width: 100%; }

    /* Fixed-minimum grid columns collapse to one column so nothing is wider than the screen */
    .skill-grid, .cap-groups, .role-grid, .capability-grid { grid-template-columns: minmax(0, 1fr); }

    /* Comfortable tap targets */
    .brand { min-height: 44px; }
    .nav-toggle { width: 46px; height: 46px; }
    .footer-nav ul { gap: 2px; }
    .footer-nav a { display: inline-block; padding: 7px 0; }
    .breadcrumbs a { display: inline-block; padding: 6px 0; }
    .showcase-title a { display: inline-block; padding: 4px 0; }

    /* Screenshot viewer: solid background so the page doesn't show through behind the image */
    .lightbox { background: #06081a; }
    .lightbox-inner { padding: 60px 8px 16px; }
    .lightbox-figure img { max-height: calc(100vh - 220px); border-radius: 6px; }

    /* Small labels stay readable */
    .facts dt { font-size: .8rem; }

    /* Long words and URLs never force sideways scrolling */
    h1, h2, h3, p, li, dd, figcaption { overflow-wrap: break-word; }
}

@media (max-width: 380px) {
    /* Small phones (iPhone SE / 360px Android and below) */
    .hero-title { font-size: 2.5rem; }
    .case-hero h1, .page-hero h1 { font-size: 2.1rem; }
    .actions .btn-lg { width: 100%; }
    .tags li { font-size: .78rem; }

    /* Availability badge: date on its own line instead of an awkward mid-phrase break */
    .hero-kicker { border-radius: 16px; }
    .kicker-date { display: block; }
    .kicker-sep { display: none; }

    /* Breadcrumb: keep each separator with the item that follows it */
    .breadcrumbs li { white-space: nowrap; }
}

@media print {
    .site-header, .site-footer, .cta-band, .case-toc, .lightbox { display: none !important; }
    .hero, .page-hero, .case-hero { background: none; color: #000; }
}
