/* nickgcamp.com · look C
   Big condensed display type (Archivo), Inter body, JetBrains Mono for data.
   One purple accent; gold is the second chart series and the "watch" status.
   Every text color below passes WCAG AA (4.5:1) on the page, cards and thumbnails. */
:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --thumb: #f1f0eb;
  --ink: #0f1012;
  --body: #2c2f35;
  --muted: #50545c;
  --faint: #6b6f76;
  --line: #e6e6e1;
  --line-strong: #cfcfc8;
  --accent: #7042c4;
  --accent-ink: #ffffff;
  --accent-soft: #ebe3f8;
  --amber: #7d5c00;
  --amber-soft: #f6ecd2;
  --good: #1d7a4e;
  --good-soft: #dff1e7;
  --bad: #b42f2f;
  --bad-soft: #f8e1e1;
  --code-bg: #16181d;

  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.15rem;
  --step-2: 1.45rem;
  --step-3: clamp(1.8rem, 4vw, 2.5rem);
  --step-4: clamp(2.6rem, 9vw, 6.2rem);
  --radius: 18px;
  --radius-sm: 10px;
  --wrap: 1100px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114; --surface: #181b20; --thumb: #1f232a; --ink: #f1f1ec; --body: #d4d6da; --muted: #a3a8b1; --faint: #9aa0a8;
    --line: #2a2e35; --line-strong: #3a3f47; --accent: #c4b0f7; --accent-ink: #0f1114; --accent-soft: #33285a;
    --amber: #e0b44c; --amber-soft: #352e1a; --good: #5cc795; --good-soft: #15291f; --bad: #f08484; --bad-soft: #321b1d; --code-bg: #0a0b0d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1114; --surface: #181b20; --thumb: #1f232a; --ink: #f1f1ec; --body: #d4d6da; --muted: #a3a8b1; --faint: #9aa0a8;
  --line: #2a2e35; --line-strong: #3a3f47; --accent: #c4b0f7; --accent-ink: #0f1114; --accent-soft: #33285a;
  --amber: #e0b44c; --amber-soft: #352e1a; --good: #5cc795; --good-soft: #15291f; --bad: #f08484; --bad-soft: #321b1d; --code-bg: #0a0b0d;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: var(--step-0); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -0.015em; font-stretch: 108%; }
h1 { font-size: var(--step-4); font-weight: 850; font-stretch: 118%; line-height: .92; letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.025em; }
h3 { font-size: var(--step-2); font-weight: 750; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
p { margin: 0; }
.mono { font-family: var(--f-mono); }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Header: wordmark plus pill nav. Not sticky, so focus is never hidden under it. */
.site-header { background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding-block: 16px; }
.brand { font-family: var(--f-display); font-weight: 800; font-stretch: 112%; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: 0; text-transform: uppercase; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 7px 13px; border-radius: 999px; font-size: .92rem; font-weight: 500; min-height: 36px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--accent-soft); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.nav { margin-left: auto; }
/* LinkedIn and GitHub, always in the header so recruiters can reach them from any page */
.social { display: flex; gap: 6px; }
.icon-link { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); }
.icon-link svg { fill: currentColor; }
.icon-link:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn:focus-visible, .chip:focus-visible, .nav a:focus-visible, .icon-link:focus-visible { border-radius: 999px; }

/* Sections */
.section { padding-block: 56px; }
.section.tight { padding-top: 8px; }
.eyebrow { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.kicker { font-size: .74rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.section-head { display: grid; gap: 10px; margin-bottom: 26px; max-width: 68ch; }
.section-head p { color: var(--muted); }
.section-row { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.section-row .section-head { margin-bottom: 0; }
.lead { font-size: 1.15rem; color: var(--body); max-width: 46ch; }
.prose { max-width: 68ch; display: grid; gap: 14px; }
.prose p { color: var(--body); }

/* Hero */
.hero { padding-block: 36px 40px; }
.hero .wrap { display: grid; gap: 22px; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: end; }
.hero.compact h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: .84rem; background: var(--surface); color: var(--ink); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.chip.live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 8px; }
a.chip:hover { border-color: var(--accent); }
.chip.cta { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.chip.cta:hover { filter: brightness(1.08); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; min-height: 44px; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn svg { fill: currentColor; flex: none; width: 18px; height: 18px; }
.hero-text { display: grid; gap: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Work cards: picture first, then what it is and what it shows */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.work-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
a.work-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.work-card .thumb { background: var(--thumb); aspect-ratio: 16 / 8; display: grid; align-items: end; overflow: hidden; }
.work-card .thumb svg { display: block; width: 100%; height: auto; padding: 18px 18px 8px; }
.work-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.work-card .thumb.code { background: var(--code-bg); }
.work-card .body { padding: 16px 18px 20px; display: grid; gap: 6px; align-content: start; }
.work-card h3 { font-size: 1.3rem; }
.work-card p { color: var(--muted); font-size: .94rem; }
.work-card .shows { font-size: .86rem; font-weight: 600; color: var(--ink); }
.work-card .go { font-size: .9rem; font-weight: 600; color: var(--accent); margin-top: 4px; }

/* Thumbnail drawing classes, so pictures follow the palette and dark mode */
.t-ink { stroke: var(--ink); fill: none; } .t-acc { stroke: var(--accent); fill: none; }
.t-ink-f { fill: var(--ink); } .t-acc-f { fill: var(--accent); } .t-soft-f { fill: var(--accent-soft); } .t-mut-f { fill: var(--muted); opacity: .45; }
.t-gold { stroke: var(--amber); fill: none; } .t-gold-f { fill: var(--amber); }
.t-text { fill: var(--muted); font-family: var(--f-mono); font-size: 11px; }

/* Skill ledger */
.ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ledger > div { padding: 22px; display: grid; gap: 8px; align-content: start; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ledger h3 { font-size: var(--step-1); }
.ledger p { color: var(--muted); font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { font-family: var(--f-mono); font-size: .72rem; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; }
.facts { display: grid; gap: 0; border-top: 1px solid var(--line); align-content: start; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding-block: 11px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }

/* Contact band */
.band { background: var(--ink); color: var(--bg); border-radius: var(--radius); padding: clamp(24px, 5vw, 48px); display: grid; gap: 18px; }
.band h2 { color: var(--bg); }
.band h2 em { color: var(--accent-soft); }
.band p { color: var(--bg); max-width: 56ch; }
.band .btn { background: transparent; color: var(--bg); border-color: var(--muted); }
.band .btn:hover { border-color: var(--bg); }
.band .btn.primary { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.band :focus-visible { outline-color: var(--bg); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; }
.site-footer .wrap { padding-block: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: var(--step--1); }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

/* Case studies (projects page): outcome first, then problem, approach, result */
.case { padding-block: 40px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; align-items: start; scroll-margin-top: 16px; }
.case .body { display: grid; gap: 14px; min-width: 0; }
.case .outcome { font-size: 1.12rem; color: var(--body); }
.par { display: grid; gap: 12px; margin: 4px 0 0; }
.par div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; }
.par dt { font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); padding-top: 3px; }
.par dd { margin: 0; color: var(--body); }
.case .visual { min-width: 0; display: grid; gap: 10px; }
.case .visual .frame { background: var(--thumb); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.case .visual a.frame { display: block; }
a.frame:hover { border-color: var(--accent); }
.case .visual .frame svg { display: block; width: 100%; height: auto; padding: 18px; }
.case .visual .frame.code { background: var(--code-bg); }
.case figure { margin: 0; min-width: 0; }
.case figure img { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.case figcaption, .caption { font-size: .8rem; color: var(--muted); font-family: var(--f-mono); }
.note { font-size: .86rem; color: var(--muted); }

.flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flow .node { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.flow .node b { font-size: .9rem; }
.flow .node span { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.flow .arrow { color: var(--muted); font-family: var(--f-mono); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; min-width: 0; }

.private-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.private-list > div { padding-block: 14px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.private-list b { font-size: 1rem; }
.private-list p { color: var(--muted); font-size: .95rem; }

/* Resume page */
.resume-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.resume { display: grid; gap: 40px; }
.resume h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); }
.resume section { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 24px; padding-top: 28px; border-top: 1px solid var(--line); }
.resume section > h2 { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 500; padding-top: 5px; font-stretch: 100%; }
.resume .content { display: grid; gap: 26px; min-width: 0; }
.job { display: grid; gap: 8px; }
.job-top { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; align-items: baseline; }
.job h3 { font-size: var(--step-1); }
.job .where { color: var(--muted); font-size: .95rem; }
.job .when { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); white-space: nowrap; }
.job ul, .case ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; color: var(--body); }
.job ul li::marker, .case ul li::marker { color: var(--accent); }
.skills-grid { display: grid; gap: 10px; }
.skills-grid div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 12px; }
.skills-grid b { font-weight: 600; }
.skills-grid span { color: var(--muted); }

/* Deep Dives list */
.post-list { display: grid; gap: 16px; }
.post-card { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; }
a.post-card:hover { border-color: var(--accent); }
.post-card .thumb { background: var(--thumb); display: grid; align-items: center; min-height: 170px; }
.post-card .thumb svg { width: 100%; height: auto; display: block; padding: 18px; }
.post-card .body { padding: 20px 22px; display: grid; gap: 8px; align-content: center; }
.post-card h2, .post-card h3 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.post-card p { color: var(--muted); }
.post-card .go { font-size: .9rem; font-weight: 600; color: var(--accent); }
.post-card.soon { border-style: dashed; }
.post-card.soon .thumb { background: repeating-linear-gradient(135deg, var(--thumb) 0 12px, var(--bg) 12px 24px); }
.meta-line { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.badge { display: inline-block; font-family: var(--f-mono); font-size: .72rem; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); }

/* Article (one deep dive) */
.article { max-width: 760px; margin-inline: auto; }
.article-head { display: grid; gap: 14px; padding-block: 28px 8px; }
.article-head h1 { font-size: clamp(2.2rem, 6.5vw, 4rem); line-height: .98; }
.article-head .dek { font-size: 1.15rem; color: var(--body); }
.takeaway { background: var(--accent-soft); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 8px; margin-block: 22px; }
.takeaway .eyebrow { color: var(--ink); }
.takeaway p { font-size: 1.1rem; color: var(--ink); line-height: 1.5; }
.article-body { display: grid; gap: 16px; padding-bottom: 32px; }
.article-body > h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); margin-top: 26px; scroll-margin-top: 16px; }
.article-body > h3 { font-size: 1.2rem; margin-top: 10px; }
.article-body p, .article-body li { color: var(--body); }
.article-body ul, .article-body ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 8px; }
.article-body li::marker { color: var(--accent); }
.article-body blockquote { margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); font-size: 1.08rem; color: var(--ink); }
.article-body blockquote cite { display: block; font-style: normal; font-size: .85rem; color: var(--muted); margin-top: 6px; }
.formula { font-family: var(--f-mono); font-size: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; color: var(--ink); overflow-x: auto; }
.formula b { color: var(--accent); font-weight: 600; }
.tldr { display: grid; gap: 10px; counter-reset: t; padding: 0 !important; list-style: none; }
.tldr li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px 14px 52px; position: relative; color: var(--body); }
.tldr li::before { counter-increment: t; content: counter(t); position: absolute; left: 16px; top: 13px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: var(--f-mono); font-size: .8rem; display: grid; place-items: center; }
.tldr li b { color: var(--ink); }

.fig { margin: 8px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; display: grid; gap: 10px; min-width: 0; }
.fig-title { font-family: var(--f-display); font-weight: 750; font-size: 1.12rem; line-height: 1.25; }
.fig-sub { font-size: .9rem; color: var(--muted); }
.fig svg { width: 100%; height: auto; display: block; overflow: visible; }
.fig figcaption { font-family: var(--f-mono); font-size: .74rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Chart marks */
.c-axis { stroke: var(--line-strong); stroke-width: 1; }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-lbl { fill: var(--muted); font-family: var(--f-mono); font-size: 13px; }
.c-lbl-ink { fill: var(--ink); font-family: var(--f-body); font-size: 14px; font-weight: 500; }
.c-val { fill: var(--ink); font-family: var(--f-mono); font-size: 13.5px; font-weight: 600; }
.c-val-acc { fill: var(--accent); font-family: var(--f-mono); font-size: 13.5px; font-weight: 700; }
.c-acc { fill: var(--accent); } .c-acc-s { stroke: var(--accent); }
.c-soft { fill: var(--accent-soft); }
.c-ink { fill: var(--ink); } .c-ink-s { stroke: var(--ink); }
.c-mut { fill: var(--line-strong); }
.c-gold { fill: var(--amber); } .c-gold-s { stroke: var(--amber); }
.c-bad { fill: var(--bad); } .c-bad-s { stroke: var(--bad); }

.stat-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { border-radius: var(--radius-sm); padding: 16px; display: grid; gap: 2px; background: var(--bg); border: 1px solid var(--line); }
.stat small { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat strong { font-family: var(--f-display); font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 850; font-stretch: 110%; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .88rem; color: var(--muted); }
.stat.up strong { color: var(--amber); }
.stat.down strong { color: var(--accent); }

.regimes { display: grid; gap: 0; border-top: 1px solid var(--line); }
.regime { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 6px 16px; padding-block: 12px; border-bottom: 1px solid var(--line); align-items: start; }
.regime .when { grid-column: 1; grid-row: 1; font-family: var(--f-mono); font-size: .8rem; color: var(--muted); padding-top: 2px; }
.regime .cpl { grid-column: 1; grid-row: 2; justify-self: start; }
.regime .what { grid-column: 2; grid-row: 1 / span 2; color: var(--body); font-size: .94rem; }
.regime .what b { color: var(--ink); font-weight: 600; }
.cpl { font-family: var(--f-mono); font-size: .72rem; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.cpl.pos { background: var(--accent-soft); color: var(--ink); }
.cpl.ext { background: var(--accent); color: var(--accent-ink); }
.cpl.brk { background: var(--amber-soft); color: var(--amber); }

.quad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quad .cell { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: grid; gap: 4px; align-content: start; }
.quad .cell .dir { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); }
.quad .cell b { font-size: .98rem; }
.quad .cell span { font-size: .88rem; color: var(--muted); }
.quad .cell.hot { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.quad .cell.wide { grid-column: 1 / -1; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.article table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.article th, .article td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { font-family: var(--f-mono); font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.article tr:last-child td { border-bottom: 0; }
.article code { font-family: var(--f-mono); font-size: .85em; background: var(--thumb); padding: 1px 5px; border-radius: 4px; }

.sources { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 10px; }
.sources ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; color: var(--body); font-size: .92rem; }
.disclaimer { background: var(--amber-soft); border-radius: var(--radius-sm); padding: 14px 16px; font-size: .92rem; color: var(--ink); }
.disclaimer b { color: var(--amber); }
.toc { display: flex; flex-wrap: wrap; gap: 6px; }
.toc a { font-size: .84rem; text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--surface); min-height: 32px; display: inline-flex; align-items: center; }
.toc a:hover { border-color: var(--accent); }

/* 404 */
.lost { padding-block: 64px; display: grid; gap: 18px; }

@media (max-width: 820px) {
  .site-header .social { order: 1; margin-left: auto; }
  .site-header .nav { order: 2; flex-basis: 100%; margin-left: -13px; }
  .hero-row, .about-grid, .case { grid-template-columns: minmax(0, 1fr); }
  .chips { justify-content: flex-start; }
  .cards, .ledger { grid-template-columns: minmax(0, 1fr); }
  .post-card { grid-template-columns: minmax(0, 1fr); }
  .post-card .thumb { min-height: 0; }
  .resume section { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .skills-grid div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .par div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .regime { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .regime .when { padding-top: 0; }
  .regime .cpl { grid-column: 2; grid-row: 1; }
  .regime .what { grid-column: 1 / -1; grid-row: 2; }
  .section { padding-block: 40px; }
  .case { gap: 20px; }
}
@media (max-width: 520px) {
  .quad, .stat-pair { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  a.work-card:hover { transform: none; }
}

/* Copy-email button and toast (assets/site.js) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
button.btn, button.icon-link { font: inherit; cursor: pointer; }
button.icon-link { padding: 0; }
.copy-email { position: relative; }
.ce-icons { display: inline-grid; width: 20px; height: 20px; flex: none; }
.btn .ce-icons { width: 18px; height: 18px; }
.ce-icons svg { grid-area: 1 / 1; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .25s; }
.ce-check { opacity: 0; transform: scale(.4) rotate(-25deg); stroke-dasharray: 22; stroke-dashoffset: 22; }
.is-copied .ce-mail { opacity: 0; transform: translate(10px, -12px) rotate(14deg) scale(.6); }
.is-copied .ce-check { opacity: 1; transform: none; stroke-dashoffset: 0; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1) .1s, opacity .2s .1s, stroke-dashoffset .35s ease .18s; }
.ce-label { display: inline-grid; }
.ce-label > span { grid-area: 1 / 1; transition: opacity .2s, transform .25s; }
.ce-label .ce-b { opacity: 0; transform: translateY(6px); }
.is-copied .ce-label .ce-a { opacity: 0; transform: translateY(-6px); }
.is-copied .ce-label .ce-b { opacity: 1; transform: none; }
.btn.is-copied { border-color: var(--accent); }
.icon-link.is-copied { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ce-burst { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--accent); pointer-events: none; animation: ce-burst .6s cubic-bezier(.2, .7, .3, 1) forwards; }
.ce-burst:nth-child(odd) { background: var(--amber); }
.band .ce-burst { background: var(--accent-soft); }
@keyframes ce-burst { from { transform: rotate(var(--a)) translateX(10px) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateX(var(--d)) scale(.3); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 50; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 12px 12px 12px 12px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: 0 12px 32px rgba(0, 0, 0, .28); transform: translate(-50%, 140%); opacity: 0; visibility: hidden; transition: transform .45s cubic-bezier(.2, .9, .3, 1.25), opacity .25s, visibility 0s .45s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .45s cubic-bezier(.2, .9, .3, 1.25), opacity .25s; }
.toast .t-badge { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; flex: none; }
.toast .t-badge svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; }
.toast.show .t-badge svg { stroke-dashoffset: 0; transition: stroke-dashoffset .4s ease .2s; }
.toast.manual .t-badge { display: none; }
.toast .t-body { display: grid; gap: 2px; min-width: 0; }
.toast b { font-size: .95rem; }
.toast .t-addr { font-family: var(--f-mono); font-size: .86rem; user-select: all; overflow-wrap: anywhere; min-height: 1.3em; }
.toast .t-addr.typing::after { content: "▍"; animation: ce-blink .8s steps(1) infinite; }
@keyframes ce-blink { 50% { opacity: 0; } }
.toast .t-close { margin-left: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; opacity: .7; }
.toast .t-close:hover { opacity: 1; }
.toast :focus-visible { outline-color: var(--bg); }
@media (prefers-reduced-motion: reduce) {
  .ce-icons svg, .ce-label > span, .toast, .toast .t-badge svg { transition: none !important; }
  .toast { transform: translate(-50%, 0); }
  .ce-burst { display: none; }
}

/* Flow diagrams inside posts */
.fig .flow { gap: 8px 6px; }
.flow .branch { display: grid; gap: 8px; }
.flow-loop { margin: 0; font-size: .9rem; color: var(--muted); }
.flow-loop span { color: var(--accent); font-weight: 700; margin-right: 4px; }

/* Photos */
.intro { display: flex; align-items: center; gap: 18px; }
.intro picture, .resume-id picture { flex: none; }
.avatar { display: block; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; background: var(--thumb); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.about-side { display: grid; gap: 22px; align-content: start; }
.portrait img { display: block; width: 100%; height: auto; border-radius: var(--radius); background: var(--thumb); }
.resume-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.resume-id .avatar { width: 72px; height: 72px; }
@media (max-width: 820px) { .portrait { max-width: 340px; } }
@media (max-width: 520px) {
  .intro { align-items: flex-start; gap: 14px; }
  .avatar { width: 64px; height: 64px; }
  .resume-id .avatar { width: 60px; height: 60px; }
}
