/* ==========================================================
   Alakh Sharma — portfolio
   ========================================================== */

:root {
    --bg: #f7f6f2;
    --bg-alt: #efede6;
    --surface: #ffffff;
    --ink: #13202a;
    --ink-soft: #46535d;
    --ink-faint: #6f7a82;
    --line: #dedbd2;
    --accent: #0e6f78;
    --accent-strong: #0a5960;
    --accent-soft: #dcefee;
    --dark: #0f1d24;
    --dark-surface: #172a33;
    --dark-ink: #e8eef0;
    --dark-ink-soft: #a9b8be;

    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Source Serif 4", Georgia, serif;
    --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

    --radius: 14px;
    --shadow: 0 1px 2px rgba(19, 32, 42, .05), 0 8px 24px rgba(19, 32, 42, .06);
    --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e171c;
        --bg-alt: #121f26;
        --surface: #16252d;
        --ink: #e8eef0;
        --ink-soft: #b4c1c6;
        --ink-faint: #8a989e;
        --line: #26373f;
        --accent: #4fb8bf;
        --accent-strong: #79d0d5;
        --accent-soft: #173a3e;
        --dark: #081014;
        --dark-surface: #11222a;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    }
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 28px; } }
.narrow { max-width: 820px; }
.center { text-align: center; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5em; padding: .8em 1.4em; border-radius: 999px;
    font: 600 .95rem/1 var(--font-body); text-decoration: none;
    border: 1.5px solid transparent; cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #071215; } }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-light { background: #fff; color: var(--dark); }
.btn-light:hover { background: var(--accent-soft); color: var(--dark); }
.btn-sm { padding: .6em 1.1em; font-size: .88rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
    background: var(--accent); color: var(--surface); font: 700 .95rem var(--font-display);
}
.brand-name { font-weight: 600; letter-spacing: -.01em; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
    color: var(--ink-soft); text-decoration: none; font-size: .93rem; font-weight: 500;
    padding: .5em .8em; border-radius: 8px;
}
.site-nav a:not(.btn):hover, .site-nav a.is-active { color: var(--ink); background: var(--bg-alt); }
.site-nav .btn { margin-left: 8px; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .site-nav {
        position: absolute; top: var(--header-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--bg); border-bottom: 1px solid var(--line);
        padding: 8px 16px 16px; display: none;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a:not(.btn) { padding: .8em .5em; }
    .site-nav .btn { margin: 8px 0 0; }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 32px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.35fr 1fr; gap: 64px; } .hero { padding-top: 80px; } }

.eyebrow, .kicker {
    font: 500 .78rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
    color: var(--accent); margin-bottom: 1rem;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.lede strong { color: var(--ink); font-weight: 600; }
.currently {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; max-width: 60ch;
    margin: 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft);
    border-radius: 0 10px 10px 0; color: var(--ink); font-size: .95rem; line-height: 1.5;
}
.currently-tag { font: 500 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent-strong); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }

.social-row { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .92rem; }
.social-row a { color: var(--ink-soft); }
.social-row a:hover { color: var(--accent); }

.hero-photo { margin: 0; position: relative; max-width: 420px; justify-self: center; width: 100%; }
@media (max-width: 899px) { .hero-photo { max-width: 340px; } }
.hero-photo img { border-radius: 24px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.hero-photo figcaption {
    position: absolute; left: 16px; right: 16px; bottom: 16px;
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); color: var(--ink); font-size: .88rem; font-weight: 500;
    padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 4px rgba(34, 160, 107, .2); flex: none; }

.stats {
    margin: 56px 0 0; display: grid; grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
@media (min-width: 700px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .stats { grid-template-columns: repeat(6, 1fr); } }
.stats > div { padding: 20px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats dt { font: 600 1.7rem/1.1 var(--font-display); color: var(--ink); margin-bottom: 6px; }
.stats dd { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--ink-faint); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
@media (max-width: 640px) { .section { padding: 64px 0; } }
.section-alt { background: var(--bg-alt); }
.section-intro { color: var(--ink-soft); max-width: 62ch; font-size: 1.05rem; }
.center .section-intro { margin-left: auto; margin-right: auto; }

.two-col { display: grid; gap: 24px 64px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 2fr; } .two-col > div:first-child { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; } }

.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); }

.pill-list { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li { background: var(--accent-soft); color: var(--accent-strong); font-size: .85rem; font-weight: 500; padding: .35em .85em; border-radius: 999px; }

/* ---------- Cards ---------- */
.cards-4 { display: grid; gap: 20px; margin-top: 36px; }
@media (min-width: 640px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.card p { color: var(--ink-soft); font-size: .95rem; }
.card-index { font: 500 .8rem var(--font-mono); color: var(--accent); margin-bottom: 14px; }
.card-meta { margin-top: auto; margin-bottom: 0; padding-top: 14px; border-top: 1px dashed var(--line); font: 500 .74rem/1.6 var(--font-mono); color: var(--ink-faint) !important; }
.card-link { margin-top: 14px; font-size: .9rem; font-weight: 600; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* ---------- Case studies ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 24px; }
.filter {
    font: 500 .88rem var(--font-body); padding: .5em 1.1em; border-radius: 999px; cursor: pointer;
    background: transparent; color: var(--ink-soft); border: 1.5px solid var(--line);
}
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.case-grid { display: grid; gap: 20px; }
@media (min-width: 800px) { .case-grid { grid-template-columns: repeat(2, 1fr); } }

.case {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s;
}
.case:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.case[hidden] { display: none; }
.case-tag { font: 500 .74rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: .6rem; }
.case h3 { font-size: 1.3rem; }
.case > p { color: var(--ink-soft); font-size: .96rem; }
.label { display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink); margin-bottom: 2px; }

.case-metrics { list-style: none; padding: 0; margin: 4px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.case-metrics li { background: var(--bg-alt); border-radius: 10px; padding: .45em .8em; font-size: .84rem; color: var(--ink-soft); }
.case-metrics strong { color: var(--ink); font-weight: 700; }

details { border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 14px; }
summary { cursor: pointer; font-weight: 600; font-size: .93rem; color: var(--accent); list-style: none; display: flex; align-items: center; gap: 8px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; font: 600 1.1rem/1 var(--font-mono); width: 1em; }
details[open] summary::before { content: "−"; }
details ul { margin: 12px 0 0; padding-left: 1.2em; color: var(--ink-soft); font-size: .94rem; }
details li { margin-bottom: .45em; }
details strong { color: var(--ink); }

.case-stack { margin: auto 0 0 !important; font: 500 .74rem/1.6 var(--font-mono); color: var(--ink-faint) !important; }

/* Compact tiles (enabled by JS; without it the full cards above are shown) */
.case-grid.is-tiled { gap: 14px; }
@media (min-width: 560px) { .case-grid.is-tiled { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .case-grid.is-tiled { grid-template-columns: repeat(3, 1fr); } }
.is-tiled .case { padding: 18px 18px 16px; cursor: pointer; }
.case-grid.is-tiled .case:hover { transform: translateY(-2px); }
.case-media { position: relative; margin: 0 0 16px; }
.case-media img, .case-media video { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 10px; background: #000; }
.play-badge {
    position: absolute; left: 50%; top: 0; transform: translate(-50%, 0); margin-top: calc((100% / 3 - 44px) / 2);
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: rgba(10, 18, 22, .6); color: #fff; font-size: .95rem; padding-left: 3px; pointer-events: none;
}
.case-media figcaption { margin-top: 8px; font-size: .84rem; color: var(--ink-faint); }
.is-tiled .case-media { margin: -4px -4px 14px; }
.is-tiled .case-media figcaption { display: none; }
.case-demo a { font-weight: 600; }
.case-summary { color: var(--ink-soft); font-size: .92rem; line-height: 1.5; margin: -.2em 0 1em; }
.case-modal-body .case-summary { font-size: 1.05rem; color: var(--ink); margin-top: -.1em; }
.is-tiled .case { transition: box-shadow .2s, border-color .2s, transform .2s; }
.is-tiled .case-tag { font-size: .68rem; margin-bottom: .45rem; }
.is-tiled .case h3 { font-size: 1.02rem; line-height: 1.3; margin-bottom: .7em; }
.is-tiled .case > p, .is-tiled .case details, .is-tiled .case-metrics li:nth-child(n+2) { display: none; }
.is-tiled .case-metrics { margin: auto 0 12px; }
.is-tiled .case::after {
    content: "Read case study →"; font-size: .82rem; font-weight: 600; color: var(--accent);
    padding-top: 10px; border-top: 1px solid var(--line);
}

/* ---------- Case-study pop-up ---------- */
.case-modal {
    width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-width: none;
    padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
}
.case-modal::backdrop { background: rgba(10, 18, 22, .6); backdrop-filter: blur(3px); }
.case-modal-body { padding: 32px; }
.case-modal-body h3 { font-size: 1.55rem; padding-right: 40px; }
.case-modal-body > p { color: var(--ink-soft); }
.case-modal-body details { padding-top: 16px; }
.case-modal-body summary { display: none; }
.case-modal-body details ul { margin-top: 0; }
.case-modal-body details::before { content: "Approach & outcome"; display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.case-modal-body .case-stack { padding-top: 14px; border-top: 1px dashed var(--line); }
.case-modal .resume-modal-close { position: absolute; top: 16px; right: 16px; background: var(--surface); }
@media (max-width: 560px) {
    .case-modal { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
    .case-modal-body { padding: 24px 18px; }
}


/* ---------- Advisory (dark) ---------- */
.section-dark { background: var(--dark); color: var(--dark-ink); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark .kicker { color: #6fd0d6; }
.section-dark .section-intro { color: var(--dark-ink-soft); }
.card-dark { background: var(--dark-surface); border-color: rgba(255, 255, 255, .08); }
.card-dark p { color: var(--dark-ink-soft); }

.section-dark .card-index { color: #6fd0d6; }
.section-dark .card-meta { border-top-color: rgba(255, 255, 255, .12); color: #8fa3aa !important; }

.subhead { font-size: 1.35rem; margin: 56px 0 20px; }
.section-intro + .subhead { margin-top: 36px; }
.engage { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
@media (min-width: 640px) { .engage { grid-template-columns: repeat(2, 1fr); column-gap: 40px; } }
@media (min-width: 1040px) { .engage { grid-template-columns: repeat(4, 1fr); } }
.engage li { padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.engage h4 { font-size: 1rem; margin-bottom: .35em; }
.engage p { color: var(--dark-ink-soft); font-size: .9rem; margin: 0; }

.process { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 24px; counter-reset: step; }
@media (min-width: 800px) { .process { grid-template-columns: repeat(4, 1fr); } }
.process li { display: flex; gap: 14px; }
.process span {
    flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    border: 1.5px solid #6fd0d6; color: #6fd0d6; font: 600 .9rem var(--font-mono);
}
.process p { color: var(--dark-ink-soft); font-size: .92rem; margin: 0; }
.cta-row { margin-top: 44px; }

/* ---------- Experience ---------- */
.career { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.career > li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.career-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; }
.career-head h3 { margin: 0; font-size: 1.15rem; }
.career-head p { margin: 0; }
.role-inline { font-family: var(--font-body); font-weight: 500; font-size: .95rem; color: var(--ink-soft); }
.when { font: 500 .76rem var(--font-mono); color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.career > li > p, .edu li > p { color: var(--ink-soft); font-size: .95rem; margin: 6px 0 0; }

.ladder { list-style: none; margin: 14px 0 0; padding: 0 0 0 20px; border-left: 2px solid var(--line); }
.ladder li { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 16px; padding: 4px 0; font-size: .93rem; color: var(--ink-soft); }
.ladder li::before { content: ""; position: absolute; left: -26px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); }
.ladder li:first-child { color: var(--ink); font-weight: 600; }
.ladder li:first-child::before { border-color: var(--accent); background: var(--accent); }

.title-note { font-size: .84rem !important; color: var(--ink-faint) !important; margin-top: 10px !important; }
.subhead-sm { font: 600 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 36px 0 4px; }
.edu { list-style: none; margin: 0; padding: 0; }
.edu li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.edu .career-head p:not(.when) { color: var(--ink-soft); font-size: .95rem; }
.edu strong { color: var(--ink); }

.toolkit { margin: 0; }
.toolkit > div { display: grid; gap: 2px 20px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
@media (min-width: 640px) { .toolkit > div { grid-template-columns: 170px 1fr; } }
.toolkit dt { font-weight: 600; color: var(--ink); }
.toolkit dd { margin: 0; color: var(--ink-soft); }

/* ---------- Writing ---------- */
.articles { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.articles a {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: center;
    padding: 20px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
    transition: background-color .2s, padding .2s;
}
@media (min-width: 760px) { .articles a { grid-template-columns: 170px 1fr auto; } }
.articles a:hover { background: var(--surface); padding-left: 14px; padding-right: 14px; }
.pub { font: 500 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.pub-date { display: block; color: var(--ink-faint); margin-top: 2px; }
@media (max-width: 759px) { .pub-date { display: inline; margin-left: .6em; } }
.articles .title { font: 600 1.12rem/1.35 var(--font-display); grid-column: 1; }
.articles .desc { grid-column: 1; color: var(--ink-soft); font-size: .92rem; line-height: 1.5; }
@media (min-width: 760px) {
    .pub { grid-row: 1 / span 2; align-self: start; padding-top: 3px; }
    .articles .title, .articles .desc { grid-column: 2; }
}
.arrow { color: var(--ink-faint); font-size: 1.2rem; grid-row: 1 / span 3; grid-column: 2; transition: transform .2s; }
@media (min-width: 760px) { .arrow { grid-row: 1 / span 2; grid-column: 3; } }
.articles a:hover .arrow { transform: translateX(4px); color: var(--accent); }

/* ---------- Testimonial ---------- */
.quotes { display: grid; gap: 20px; margin-top: 32px; }
@media (min-width: 860px) { .quotes { grid-template-columns: repeat(2, 1fr); } .quote-featured { grid-column: 1 / -1; } }
.quote.quote-featured { border-left: 4px solid var(--accent); }
.quote.quote-featured p { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
.quote footer strong a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.quote footer strong a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.quote {
    margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px; display: flex; flex-direction: column;
}
.quote p { font: 500 1.12rem/1.55 var(--font-display); color: var(--ink); }
.quote footer { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.quote img, .avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); font: 600 1rem var(--font-display); }
.quote footer strong { display: block; }
.quote footer span:not(.avatar) { display: block; color: var(--ink-faint); font-size: .86rem; line-height: 1.45; }
.quotes-more { margin: 20px 0 0; font-size: .93rem; font-weight: 500; }
.quote-dark { margin-top: 48px; background: var(--dark-surface); border-color: rgba(255, 255, 255, .08); border-left-color: #6fd0d6; }
.quote.quote-dark p { color: #fff; }
.quote-dark footer { flex-wrap: wrap; border-top-color: rgba(255, 255, 255, .12); }
.quote-dark footer strong a { color: #fff; border-bottom-color: rgba(255, 255, 255, .3); }
.quote-dark footer strong a:hover { color: #6fd0d6; border-bottom-color: #6fd0d6; }
.quote-dark footer span:not(.avatar) { color: var(--dark-ink-soft); }
.quote-dark .avatar { background: rgba(111, 208, 214, .15); color: #6fd0d6; }
.quote-more { margin-left: auto; font-size: .88rem; font-weight: 600; color: #6fd0d6; }
.quote-more:hover { color: #fff; }

/* ---------- Contact & footer ---------- */
.contact-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.15fr; gap: 64px; } }
.contact-links { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.contact-links li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.contact-links span { font: 500 .74rem/1.9 var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }

.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.field-row { display: grid; gap: 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.contact-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%; font: 400 1rem/1.5 var(--font-body); color: var(--ink);
    background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: .7em .85em;
    transition: border-color .2s, box-shadow .2s;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form .btn { justify-self: start; padding: .9em 1.8em; }
.contact-form .btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; font-size: .95rem; min-height: 1.5em; }
.form-status.is-ok { color: #1f8a5b; font-weight: 600; }
.form-status.is-error { color: #c0392b; }
@media (prefers-color-scheme: dark) { .form-status.is-ok { color: #4cc38a; } .form-status.is-error { color: #ff7b6b; } }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .9rem; color: var(--ink-faint); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }


/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: 32px; z-index: 200;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 20px;
    width: max-content; max-width: calc(100vw - 32px); padding: 18px 26px; border-radius: 16px;
    background: var(--ink); color: var(--bg); font-size: 1.05rem; font-weight: 500;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .2s, transform .2s;
}
.toast::before { content: "✓"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .95rem; flex: none; }
.toast a { display: inline-block; padding: .45em 1em; border-radius: 999px; background: var(--bg); color: var(--ink); font-weight: 600; font-size: .92rem; text-decoration: none; }
.toast a:hover { background: var(--accent-soft); color: var(--ink); }
.toast.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- Resume viewer ---------- */
.resume-modal {
    width: min(960px, calc(100vw - 32px)); height: calc(100vh - 48px); max-height: none; max-width: none;
    padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
    overflow: hidden;
}
.resume-modal[open] { display: flex; flex-direction: column; }
.resume-modal::backdrop { background: rgba(10, 18, 22, .6); backdrop-filter: blur(3px); }
.resume-modal-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
    padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.resume-modal-bar h2 { font-size: 1.05rem; margin: 0; }
.resume-modal-actions { display: flex; align-items: center; gap: 8px; }
.resume-modal-close {
    width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line);
    background: transparent; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.resume-modal-close:hover { border-color: var(--accent); color: var(--accent); }
.resume-modal iframe { flex: 1; width: 100%; border: 0; background: #525659; }
@media (max-width: 560px) {
    .resume-modal { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
    .resume-modal-actions .btn-ghost { display: none; }
}

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

@media print {
    .site-header, .filters, .hero-photo figcaption, .cta-row, .contact-form { display: none; }
    details > *:not(summary) { display: block; }
    .section { padding: 24px 0; }
    .section-dark { background: none; color: var(--ink); }
}
