/* Robin Singh — portfolio design system.
   One stylesheet for every page. Theme lives on <html data-theme>, motion is opt-in via <html class="js">. */

/* ---------- Tokens ---------- */
:root {
    --paper: #f6f4ee;
    --paper-2: #eeebe3;
    --card: #ffffff;
    --ink: #141414;
    --ink-2: #3b3936;
    --muted: #6b6862;
    --line: #dfdbd2;
    --line-strong: #c9c4b9;
    --red: #f23838;
    --red-text: #d1271f;
    --red-soft: #fde8e4;
    --block: #111318;
    --block-2: #1a1d23;
    --block-line: rgba(255, 255, 255, .12);
    --on-block: #f3f1ec;
    --on-block-muted: #a9a59d;
    --accent: var(--red);
    --shadow-sm: 0 1px 2px rgba(20, 20, 20, .05), 0 4px 12px rgba(20, 20, 20, .04);
    --shadow-lg: 0 24px 60px rgba(20, 20, 20, .10);
    --radius: 22px;
    --radius-lg: 30px;
    --ease: cubic-bezier(.16, 1, .3, 1);
    --wrap: 1040px;
    --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --paper: #0f1115;
    --paper-2: #15181d;
    --card: #181b21;
    --ink: #f3f1ec;
    --ink-2: #d3d0c9;
    --muted: #9d998f;
    --line: #2a2e35;
    --line-strong: #3a3f48;
    --red: #ff4b42;
    --red-text: #ff6b63;
    --red-soft: #2a1716;
    --block: #181b21;
    --block-2: #20242b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-width: 320px;
    overflow-x: clip;
    background: var(--paper);
    color: var(--ink);
    font: 400 1rem/1.6 var(--font-body);
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s ease, color .3s ease;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--red); color: #ffffff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: 12px; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Type ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--red-text);
    font: 600 .72rem/1 var(--font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
}
.eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: currentColor;
}
.display-1 {
    font: 600 clamp(2.6rem, 5vw, 4.4rem)/.98 var(--font-display);
    letter-spacing: -.035em;
}
.display-2 {
    font: 600 clamp(1.9rem, 3.4vw, 2.75rem)/1.05 var(--font-display);
    letter-spacing: -.03em;
}
.display-1 em,
.display-2 em { color: var(--red); font-style: italic; }
.lede { color: var(--ink-2); font-size: clamp(1.02rem, 1.3vw, 1.14rem); line-height: 1.65; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: none;
    font: 600 .9rem/1 var(--font-body);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--ease), box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--red); color: #ffffff; box-shadow: 0 8px 22px color-mix(in srgb, var(--red) 30%, transparent); }
.btn-primary:hover { background: var(--ink); color: var(--paper); box-shadow: 0 10px 26px rgba(20, 20, 20, .18); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--card); }
.btn-light { background: #ffffff; color: var(--red-text); }
.btn-light:hover { background: var(--block); color: #ffffff; }
.btn-outline-light { border-color: rgba(255, 255, 255, .5); color: #ffffff; }
.btn-outline-light:hover { border-color: #ffffff; background: rgba(255, 255, 255, .12); }
.btn-sm { padding: 9px 15px; font-size: .82rem; }
.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
    transition: border-color .2s ease, transform .3s var(--ease);
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 14px 0;
    transition: padding .3s ease;
}
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-bottom: 1px solid transparent;
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
    opacity: 0;
    transition: opacity .3s ease, border-color .3s ease;
}
.site-header.is-scrolled { padding: 9px 0; }
.site-header.is-scrolled::before,
.site-header.menu-open::before { opacity: 1; border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; }
.brand { display: block; flex: 0 0 auto; }
.brand img { width: 86px; height: auto; }
:root[data-theme="dark"] .brand img { filter: brightness(1.45) saturate(1.1); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--ink-2);
    font-size: .88rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--red-text); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
.theme-btn:hover { transform: rotate(-18deg); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 7vw, 96px); }
main > .section:last-child { padding-bottom: 0; }
.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    align-items: end;
    gap: 20px 48px;
    margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head .display-2 { margin-top: 16px; }
.section-head .lede { padding-bottom: 6px; font-size: 1rem; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding: clamp(32px, 5vw, 64px) 0 0; }
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}
.pulse {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22a06b;
}
.pulse::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1.5px solid #22a06b;
    border-radius: 50%;
    animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse { from { opacity: .9; transform: scale(.4); } to { opacity: 0; transform: scale(1.7); } }
.hero h1 { margin-top: 24px; }
.hero-name {
    display: block;
    margin-bottom: 16px;
    color: var(--ink-2);
    font: 600 clamp(1.05rem, 1.5vw, 1.3rem)/1.2 var(--font-body);
    letter-spacing: 0;
}
.hero .lede { max-width: 50ch; margin-top: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Pipeline console */
.console {
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    border: 1px solid var(--block-line);
    border-radius: var(--radius-lg);
    background: var(--block);
    color: var(--on-block);
    box-shadow: var(--shadow-lg);
}
.console-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--block-line);
    font: 500 .74rem/1 var(--font-mono);
    color: var(--on-block-muted);
}
.console-dots { display: flex; gap: 6px; }
.console-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a3e47; }
.console-dots i:first-child { background: var(--red); }
.console-health { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: #6ee7b7; }
.console svg { width: 100%; height: auto; padding: 8px 14px 4px; }
.pl-link { fill: none; stroke: #4a505b; stroke-width: 1.5; stroke-dasharray: 3 6; animation: flow 1.2s linear infinite; }
.pl-node rect { stroke-width: 1.4; }
.pl-node text { fill: #e9e6df; font: 500 12px var(--font-mono); text-anchor: middle; dominant-baseline: central; }
.pl-src rect, .pl-out rect { fill: #1e2128; stroke: #3a3f49; }
.pl-ingest rect { fill: #2a1716; stroke: var(--red); }
.pl-bronze rect { fill: #33241a; stroke: #b8763f; }
.pl-bronze text { fill: #f0c49b; }
.pl-silver rect { fill: #262a31; stroke: #9aa3ae; }
.pl-silver text { fill: #dfe4ea; }
.pl-gold rect { fill: #342d17; stroke: #d6a92e; }
.pl-gold text { fill: #f6dc8d; }
.pl-packet { fill: var(--red); }
.pl-packet.alt { fill: #f6dc8d; }
@keyframes flow { to { stroke-dashoffset: -18; } }


/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: start;
    gap: clamp(28px, 4vw, 56px);
}
.portrait {
    position: relative;
    margin: 0;
}
.portrait img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    border-radius: 999px 999px 18px 18px;
    background: var(--paper-2);
}
.portrait::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px 999px 18px 18px;
    background: var(--red);
    transform: translate(8px, 8px);
}
.about-copy .display-2 { margin-top: 18px; }
.about-copy .lede { margin-top: 18px; max-width: 60ch; }
.about-copy .lede + .lede { margin-top: 14px; }
.link-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ---------- Stack ---------- */
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.section-tight + .section { padding-top: clamp(48px, 6vw, 80px); }
.stack-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; list-style: none; }
.chip {
    --chip: var(--red);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--ink-2);
    font-size: .9rem;
    font-weight: 500;
    transition: border-color .25s ease, color .25s ease;
}
.chip:hover { border-color: var(--chip); color: var(--ink); }
.chip svg { width: 18px; height: 18px; flex: 0 0 18px; }
.section-title { margin-bottom: 28px; }

/* ---------- Work: news-style list + Instagram box (matches the Vox reference) ---------- */
.work-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 40px;
}
.proj-list { list-style: none; }
.proj-list li + li { border-top: 1px solid var(--line); }
.proj {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
    color: var(--ink);
    text-decoration: none;
}
.proj-list li:first-child .proj { padding-top: 0; }
.proj-text { display: flex; flex-direction: column; gap: 6px; }
.proj-kicker {
    color: var(--ink);
    font: 600 .7rem/1 var(--font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
}
.proj-title {
    font: 800 1.06rem/1.2 var(--font-body);
    letter-spacing: -.005em;
}
.proj:hover .proj-title,
.proj:focus-visible .proj-title { text-decoration: underline; text-underline-offset: 3px; }
.proj-thumb { display: block; overflow: hidden; aspect-ratio: 1; background: var(--paper-2); }
.proj-thumb img { width: 100%; height: 100%; object-fit: cover; }

.ig-box { padding: 24px 18px 26px; border: 1px solid var(--line); background: var(--card); }
.ig-title {
    padding: 0 0 16px;
    border-bottom: 1px solid var(--line);
    font: 800 .875rem/1 var(--font-body);
    letter-spacing: .04em;
    text-transform: uppercase;
}
.ig-list { display: grid; gap: 24px; margin-top: 24px; list-style: none; counter-reset: ig; }
.ig-list li { position: relative; padding-left: 33px; counter-increment: ig; }
.ig-list li::before {
    content: counter(ig);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff200;
    color: #111111;
    font: 700 .75rem/1 var(--font-body);
}
.ig-list a {
    color: var(--ink);
    font-size: 1.06rem;
    line-height: 1.2;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.ig-list a:hover { text-decoration-thickness: 2px; }
.ig-empty { margin-top: 24px; color: var(--ink); font-size: 1.06rem; line-height: 1.25; }
.ig-follow {
    display: inline-block;
    margin-top: 22px;
    color: var(--ink);
    font-size: .95rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Contact ---------- */
.contact-block {
    position: relative;
    overflow: hidden;
    padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
    border-radius: var(--radius-lg);
    background: var(--red);
    color: #ffffff;
    text-align: center;
}
:root[data-theme="dark"] .contact-block { background: #c62a24; }
.contact-block h2 {
    max-width: 14ch;
    margin: 0 auto;
    font: 600 clamp(2.2rem, 4.6vw, 3.6rem)/1 var(--font-display);
    letter-spacing: -.035em;
}
.contact-block h2 em { color: var(--block); font-style: italic; }
.contact-block p { max-width: 46ch; margin: 22px auto 0; color: rgba(255, 255, 255, .9); font-size: 1.05rem; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.text-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px; }
.text-links a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--line-strong); padding-bottom: 2px; transition: border-color .2s ease, color .2s ease; }
.text-links a:hover { color: var(--red-text); border-color: currentColor; }


/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(64px, 8vw, 104px); padding: 28px 0 32px; border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; color: var(--muted); font-size: .88rem; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-row a { color: var(--ink-2); text-decoration: none; }
.footer-row a:hover { color: var(--red-text); }

/* ---------- Page hero (case studies, topics, resume) ---------- */
.page-hero {
    position: relative;
    padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 64px);
    background: color-mix(in srgb, var(--accent) 7%, var(--paper));
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
    font: 500 .78rem/1 var(--font-mono);
    letter-spacing: .04em;
    text-decoration: none;
}
.back-link:hover { color: var(--accent); }
.page-hero .eyebrow { display: flex; width: fit-content; margin-top: 34px; color: var(--accent); }
:root[data-theme="dark"] .page-hero .eyebrow,
:root[data-theme="dark"] .back-link:hover { color: color-mix(in srgb, var(--accent) 55%, #ffffff); }
.page-hero h1 { max-width: 16ch; margin-top: 18px; }
.page-hero .lede { max-width: 62ch; margin-top: 22px; }
.meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 36px 0 0;
    border-top: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
}
.meta-grid div { padding: 16px 18px 0 0; }
.meta-grid dt { color: var(--muted); font: 500 .68rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.meta-grid dd { margin: 8px 0 0; font-size: .92rem; font-weight: 600; line-height: 1.4; }

.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 36px;
}
.metric {
    padding: 22px 22px 20px;
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
    border-radius: 20px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
}
.metric strong {
    display: block;
    color: var(--accent);
    font: 600 clamp(2rem, 3.4vw, 2.6rem)/1 var(--font-display);
    letter-spacing: -.04em;
}
:root[data-theme="dark"] .metric strong { color: color-mix(in srgb, var(--accent) 55%, #ffffff); }
.metric span { display: block; margin-top: 8px; color: var(--muted); font: 500 .7rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }

/* Article body with sticky table of contents */
.article { padding-block: clamp(48px, 7vw, 88px) 0; }
.prose { max-width: 720px; }
.prose section + section { margin-top: 56px; }
.prose h2 {
    font: 600 clamp(1.6rem, 2.6vw, 2rem)/1.1 var(--font-display);
    letter-spacing: -.02em;
}
.prose p { margin-top: 16px; color: var(--ink-2); font-size: 1.02rem; line-height: 1.75; }
.figure {
    margin: 24px 0 0;
    padding: clamp(14px, 2.4vw, 24px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
}
.figure img { width: 100%; border-radius: 12px; background: #ffffff; }
.figure figcaption { margin-top: 12px; color: var(--muted); font: 400 .76rem/1.5 var(--font-mono); }

.next-case {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin-top: clamp(64px, 8vw, 104px);
    padding: clamp(28px, 4vw, 44px);
    border-radius: var(--radius-lg);
    background: var(--block);
    color: var(--on-block);
    text-decoration: none;
    transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
:root[data-theme="dark"] .next-case { border: 1px solid var(--line); }
.next-case:hover { transform: translateY(-4px); box-shadow: 0 28px 60px color-mix(in srgb, var(--next) 25%, transparent); }
.next-case small { color: var(--on-block-muted); font: 500 .7rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.next-case strong { display: block; margin-top: 12px; font: 600 clamp(1.6rem, 3.4vw, 2.4rem)/1 var(--font-display); letter-spacing: -.03em; }
.next-case .next-arrow {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--next);
    color: #ffffff;
    font-size: 1.4rem;
    transition: transform .45s var(--ease);
}
.next-case:hover .next-arrow { transform: rotate(-45deg); }

/* Topic pages: card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    padding-top: clamp(40px, 6vw, 72px);
    border-top: 1px solid var(--ink);
    margin-top: clamp(40px, 6vw, 72px);
}
.card {
    --case: var(--accent);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px 8px;
    color: var(--ink);
    text-decoration: none;
}
.card + .card { border-left: 1px solid var(--line); }
.card:first-child { padding-left: 0; }
.card-img { display: block; overflow: hidden; aspect-ratio: 3 / 2; margin-bottom: 6px; background: color-mix(in srgb, var(--case) 14%, var(--paper)); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-img img { transform: scale(1.05); }
.card-title { font: 700 1.2rem/1.2 var(--font-body); letter-spacing: -.01em; }
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card-meta { color: var(--muted); font: 500 .72rem/1.4 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.card-meta strong { color: var(--case); }

/* ---------- Resume ---------- */
.resume-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.contact-list { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; list-style: none; font-size: .92rem; }
.contact-list a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.contact-list a:hover { color: var(--accent); border-color: currentColor; }
.resume {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: clamp(32px, 6vw, 80px);
    padding-top: clamp(48px, 7vw, 80px);
}
.resume-side { display: grid; align-content: start; gap: 34px; }
.resume h2 {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font: 500 .72rem/1 var(--font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
}
.resume-side ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; list-style: none; }
.resume-side li { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .8rem; font-weight: 500; }
.resume-side h3 { margin-top: 18px; font: 600 .8rem/1 var(--font-body); }
.resume-main { display: grid; align-content: start; gap: 44px; }
.resume-main p { margin-top: 16px; color: var(--ink-2); line-height: 1.7; }
.highlights { display: grid; gap: 12px; margin-top: 18px; list-style: none; }
.highlights li { position: relative; padding-left: 22px; color: var(--ink-2); line-height: 1.6; }
.highlights li::before { content: ""; position: absolute; top: .62em; left: 0; width: 8px; height: 8px; border-radius: 2px; background: var(--red); }
.project-rows { display: grid; margin-top: 8px; list-style: none; }
.project-rows a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 6px 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}
.project-rows strong { font: 600 1.45rem/1.1 var(--font-display); }
.project-rows span { color: var(--muted); font-size: .88rem; }
.project-rows em { grid-row: span 2; color: var(--red-text); font: 600 1.9rem/1 var(--font-display); font-style: normal; }
.project-rows a:hover strong { color: var(--red-text); }


/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .console { justify-self: start; max-width: 420px; }
    .about-grid { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
    .resume { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .wrap { width: calc(100% - 32px); }
    .nav {
        position: absolute;
        top: 100%;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        gap: 2px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: var(--card);
        box-shadow: var(--shadow-lg);
    }
    .nav a { padding: 13px 14px; font-size: 1rem; }
    .site-header.menu-open .nav { display: flex; }
    .menu-btn { display: inline-grid; }
    .header-actions { margin-left: auto; }
    .header-cta { display: none; }
    .section-head { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .portrait { max-width: 160px; }
    .work-layout { grid-template-columns: 1fr; gap: 36px; }
    .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .next-case { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .proj { grid-template-columns: minmax(0, 1fr) 72px; gap: 16px; }
    .card { padding: 0 0 24px; }
    .card + .card { border-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
    .stack-list { gap: 8px; }
    .chip { padding: 8px 12px; font-size: .82rem; }
    .chip svg { width: 16px; height: 16px; flex-basis: 16px; }
    .metrics { grid-template-columns: 1fr; }
    .hero-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .pl-packet { display: none; }
}

/* ---------- Print (resume) ---------- */
@media print {
    :root { --paper: #ffffff; --card: #ffffff; --ink: #000000; --ink-2: #222222; --muted: #555555; --line: #cccccc; --accent: #000000; --red-text: #000000; }
    .site-header, .site-footer, .resume-actions, .back-link, .skip-link { display: none !important; }
    body { background: #ffffff; font-size: 11pt; }
    .page-hero { padding: 0 0 18px; background: none; border-bottom: 1px solid #cccccc; }
    .page-hero .eyebrow { margin-top: 0; }
    .resume { padding-top: 20px; grid-template-columns: 220px 1fr; gap: 28px; }
    a { text-decoration: none; }
}
