/* =========================================================================
   Matthew Zamat personal site
   "Warm editorial" design system (Claude-style): cream paper, clay accent,
   Spectral serif headlines / Hanken Grotesk body / JetBrains Mono.
   ========================================================================= */

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

:root {
  /* ---- Base neutrals (warm) ---- */
  --paper-0:   #faf8f2;
  --paper-1:   #f3f0e7;
  --paper-2:   #ece7da;
  --white:     #fcfbf6;

  --ink-900:   #26231d;
  --ink-700:   #4f4a40;
  --ink-500:   #6f695c;
  --ink-300:   #918a7a;
  --line:      #e6e0d2;
  --line-strong:#d6cfbd;

  /* ---- Clay accent (terracotta) ---- */
  --clay-700:  #9d4f2f;
  --clay-600:  #c96a45;
  --clay-500:  #d97757;
  --clay-400:  #e49678;
  --clay-soft: rgba(217, 119, 87, 0.10);
  --clay-line: rgba(217, 119, 87, 0.26);

  /* ---- Severity (warmed) ---- */
  --sev-critical-fg: #bc3350; --sev-critical-bg: rgba(188, 51, 80, 0.09); --sev-critical-bd: rgba(188, 51, 80, 0.26);
  --sev-high-fg:     #b26a12; --sev-high-bg:     rgba(178, 106, 18, 0.10); --sev-high-bd:     rgba(178, 106, 18, 0.26);
  --sev-medium-fg:   #94781a; --sev-medium-bg:   rgba(148, 120, 26, 0.10); --sev-medium-bd:   rgba(148, 120, 26, 0.26);
  --sev-low-fg:      #5a7d6a; --sev-low-bg:      rgba(90, 125, 106, 0.10); --sev-low-bd:      rgba(90, 125, 106, 0.26);

  /* ---- Code surface (warm charcoal, both themes) ---- */
  --code-bg:     #211f1a;
  --code-header: #2a2720;
  --code-border: #393428;
  --code-text:   #e6e0d0;
  --code-muted:  #8d8674;
  --code-dot:    #5a5045;

  /* warm syntax highlighting */
  --hl-keyword: #e08a6a;
  --hl-string:  #a7c08f;
  --hl-number:  #e3b25f;
  --hl-attr:    #d8a974;
  --hl-title:   #cdb38c;
  --hl-comment: #8d8674;
  --hl-meta:    #b6ad97;

  /* ---- Semantic aliases ---- */
  --bg: var(--paper-0); --bg-subtle: var(--paper-1); --bg-deep: var(--paper-2);
  --surface: var(--white); --surface-hover: #f6f3ea;
  --text: var(--ink-900); --text-secondary: var(--ink-700); --text-muted: var(--ink-500); --text-faint: var(--ink-300);
  --border: var(--line); --border-strong: var(--line-strong);
  --accent: var(--clay-600); --accent-text: var(--clay-700); --accent-hover: var(--clay-700);
  --accent-bright: var(--clay-400); --accent-contrast: #fdfbf5; --accent-soft: var(--clay-soft); --accent-line: var(--clay-line);

  --glow: radial-gradient(70% 90% at 15% -10%, rgba(217,119,87,0.16), transparent 62%);
  --nav-bg: rgba(250, 248, 242, 0.80);

  /* Fonts */
  --font-display: 'Spectral', Georgia, 'Times New Roman', serif;
  --font-sans:    'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'SFMono-Regular', ui-monospace, 'Fira Code', monospace;

  /* Type scale */
  --fs-display: clamp(2.6rem, 5.4vw, 4rem);
  --fs-h1:      clamp(2.1rem, 4vw, 2.9rem);
  --fs-h2:      clamp(1.6rem, 2.6vw, 2rem);
  --fs-lead:    clamp(1.05rem, 1.6vw, 1.2rem);

  /* Spacing / radii */
  --radius-sm: 8px; --radius: 12px; --radius-lg: 18px;

  /* Shadows (warm-tinted) */
  --shadow-sm: 0 1px 2px rgba(54, 44, 28, 0.05), 0 1px 1px rgba(54, 44, 28, 0.04);
  --shadow-md: 0 6px 20px -6px rgba(54, 44, 28, 0.10), 0 2px 6px -2px rgba(54, 44, 28, 0.06);
  --shadow-lg: 0 22px 50px -16px rgba(54, 44, 28, 0.18), 0 4px 12px -6px rgba(54, 44, 28, 0.08);

  /* Layout / motion */
  --max-width: 1120px; --reading-width: 720px; --nav-height: 64px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.15s; --dur: 0.22s;
}

[data-theme="dark"] {
  --paper-0: #1f1d19; --paper-1: #26231e; --paper-2: #2d2a23; --white: #2a2722;
  --ink-900: #ece7da; --ink-700: #c0b9a8; --ink-500: #948c7b; --ink-300: #756e5f;
  --line: #38342b; --line-strong: #4a4438;
  --clay-700: #e9a182; --clay-600: #e08a6a; --clay-500: #d97757; --clay-400: #d97757;
  --clay-soft: rgba(224, 138, 106, 0.13); --clay-line: rgba(224, 138, 106, 0.32);
  --sev-critical-fg: #ef7088; --sev-high-fg: #e0a64a; --sev-medium-fg: #cdb24e; --sev-low-fg: #87b39a;
  --surface-hover: #322e27; --accent-contrast: #1f1d19; --accent-text: var(--clay-700);
  --glow: radial-gradient(70% 90% at 15% -10%, rgba(217,119,87,0.14), transparent 62%);
  --nav-bg: rgba(31, 29, 25, 0.78);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.30);
  --shadow-md: 0 6px 20px -6px rgba(0,0,0,0.45), 0 2px 6px -2px rgba(0,0,0,0.30);
  --shadow-lg: 0 22px 55px -16px rgba(0,0,0,0.62), 0 4px 12px -6px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
html.no-smooth { scroll-behavior: auto; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv01";
  overflow-x: hidden;
}

/* Display serif for headings */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; color: var(--text); }

a { color: var(--accent-text); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
::selection { background: var(--accent-soft); color: var(--text); }

/* ===== Layout ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5.5rem 0; }
.section-alt { background: var(--bg-subtle); border-block: 1px solid var(--border); }

.eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 0.9rem;
}

/* ===== Navigation ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: var(--nav-height); }
.nav-logo { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.nav-logo .mark {
  width: 28px; height: 28px; border-radius: var(--radius-sm); display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: -0.04em;
  color: #fdfbf5; background: linear-gradient(135deg, var(--clay-400), var(--clay-700)); box-shadow: var(--shadow-sm);
}
.nav-links { display: flex; gap: 1.7rem; list-style: none; }
.nav-links a { position: relative; color: var(--text-muted); font-size: 0.85rem; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -21px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav-right { display: flex; align-items: center; gap: 0.6rem; }

.theme-toggle {
  background: none; border: 1px solid var(--border); color: var(--text-muted);
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer; display: grid; place-items: center;
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: block; } .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; } [data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.3rem; cursor: pointer; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.15rem; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 2px 12px -4px var(--accent-line); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-contrast); transform: translateY(-1px); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-1px); }
.btn .arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .arrow { transform: translateX(2px); }

/* ===== Hero ===== */
.hero { position: relative; padding: 6rem 0 5rem; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: var(--glow); pointer-events: none; z-index: 0; }
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 760px; }
.hero-title { font-family: var(--font-display); font-size: var(--fs-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.025em; color: var(--text); margin-bottom: 1.4rem; }
.hero-title .accent { font-style: italic; color: var(--accent-text); }
.hero-lead { font-size: var(--fs-lead); color: var(--text-secondary); line-height: 1.65; max-width: 620px; margin-bottom: 2.2rem; }
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 3.2rem; }

.stats { display: flex; flex-wrap: wrap; gap: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1; color: var(--text); }
.stat-label { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

/* ===== Section header ===== */
.section-header { margin-bottom: 2.75rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.section-header .titles { max-width: 640px; }
.section-label { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.6rem; }
.section-title { font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.02em; }
.section-desc { color: var(--text-secondary); margin-top: 0.7rem; font-size: 1rem; line-height: 1.6; }
.section-link { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-text); font-weight: 500; display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.section-link:hover { color: var(--accent-hover); }
.section-link .arrow { transition: transform var(--dur); } .section-link:hover .arrow { transform: translateX(3px); }

/* ===== Skills ===== */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.skill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.skill-card:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.skill-card h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.skill-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.1rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.22rem 0.55rem; background: var(--accent-soft); color: var(--accent-text); border-radius: 6px; border: 1px solid var(--accent-line); white-space: nowrap; }

/* ===== Experience / Resume ===== */
.resume-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 3.5rem; align-items: start; }
.timeline-item { padding-bottom: 2.4rem; position: relative; padding-left: 1.6rem; }
.timeline-item::before { content: ''; position: absolute; left: 0; top: 0.5rem; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline-item::after { content: ''; position: absolute; left: 4px; top: 1.15rem; bottom: -0.3rem; width: 1px; background: var(--border); }
.timeline-item:last-child { padding-bottom: 0; } .timeline-item:last-child::after { display: none; }
.timeline-date { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.timeline-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin-bottom: 0.15rem; letter-spacing: -0.01em; }
.timeline-company { font-size: 0.88rem; color: var(--accent-text); margin-bottom: 0.7rem; font-weight: 500; }
.timeline-description { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.timeline-description li { margin-bottom: 0.3rem; list-style: none; position: relative; padding-left: 0.95rem; }
.timeline-description li::before { content: '\2013'; position: absolute; left: 0; color: var(--text-muted); }

.resume-sidebar { position: sticky; top: 84px; }
.resume-sidebar h3 { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.8rem; }
.resume-sidebar .panel + h3 { margin-top: 1.8rem; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.4rem 1rem; }
.cert-list, .edu-list { list-style: none; }
.cert-list li, .edu-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.cert-list li:last-child, .edu-list li:last-child { border-bottom: none; }
.cert-name, .edu-name { color: var(--text); font-weight: 600; display: block; }
.cert-issuer, .edu-details { font-size: 0.78rem; color: var(--text-muted); }
.resume-download { margin-top: 1.5rem; }
.resume-download .btn { width: 100%; justify-content: center; }

/* ===== Writeup cards ===== */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.1rem; }
.writeup-card { display: flex; flex-direction: column; gap: 0.7rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem 1.75rem; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.writeup-card:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.writeup-card .card-top { display: flex; align-items: center; gap: 0.6rem; }
.writeup-card .card-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); margin-left: auto; }
.writeup-card h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; color: var(--text); }
.writeup-card:hover h3 { color: var(--accent-text); }
.writeup-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; flex: 1; }
.writeup-card .card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.writeup-card .card-cta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-text); font-weight: 500; display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.2rem; }
.writeup-card .card-cta .arrow { transition: transform var(--dur); } .writeup-card:hover .card-cta .arrow { transform: translateX(3px); }

.post-list { display: flex; flex-direction: column; gap: 1.1rem; }
.empty-state { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 2.5rem; text-align: center; color: var(--text-muted); }
.empty-state h3 { font-family: var(--font-display); margin-bottom: 0.4rem; }

/* ===== Severity badge & tags ===== */
.severity-badge { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.24rem 0.6rem; border-radius: var(--radius-sm); white-space: nowrap; border: 1px solid transparent; }
.sev-critical { background: var(--sev-critical-bg); color: var(--sev-critical-fg); border-color: var(--sev-critical-bd); }
.sev-high { background: var(--sev-high-bg); color: var(--sev-high-fg); border-color: var(--sev-high-bd); }
.sev-medium { background: var(--sev-medium-bg); color: var(--sev-medium-fg); border-color: var(--sev-medium-bd); }
.sev-low, .sev-info { background: var(--sev-low-bg); color: var(--sev-low-fg); border-color: var(--sev-low-bd); }
.tag { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.22rem 0.55rem; background: var(--bg-subtle); color: var(--text-muted); border-radius: 6px; border: 1px solid var(--border); white-space: nowrap; }

/* ===== Page header ===== */
.page { padding: 4rem 0 5rem; }
.page-header { margin-bottom: 3rem; max-width: 680px; }
.page-title { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.025em; margin-bottom: 0.7rem; }
.page-lead { color: var(--text-secondary); font-size: var(--fs-lead); line-height: 1.65; }

/* ===== Reading progress ===== */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; background: transparent; }
.reading-progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); transition: width 0.1s linear; }

/* ===== Post page ===== */
.post { padding: 3rem 0 4rem; }
.post-back { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.45rem; margin-bottom: 1.8rem; }
.post-back:hover { color: var(--accent-text); }
.post-header { margin-bottom: 2.5rem; }
.post-badges { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.post-title { font-family: var(--font-display); font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 600; line-height: 1.15; letter-spacing: -0.025em; margin-bottom: 1rem; max-width: 18ch; }
.post-title.wide { max-width: 24ch; }
.post-subtitle { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.6; max-width: var(--reading-width); margin-bottom: 1.4rem; }
.post-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 1.4rem; flex-wrap: wrap; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.post-meta .dot { color: var(--accent); }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 3.5rem; align-items: start; }
.post-layout.no-toc { display: block; }

.post-toc { position: sticky; top: 88px; font-size: 0.83rem; }
.toc-title { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.9rem; }
.toc-list { list-style: none; border-left: 1px solid var(--border); }
.toc-list li { line-height: 1.4; }
.toc-list li.lvl-3 a { padding-left: 1.9rem; font-size: 0.8rem; }
.toc-list a { display: block; padding: 0.32rem 0 0.32rem 1rem; margin-left: -1px; color: var(--text-muted); border-left: 2px solid transparent; transition: color var(--dur-fast), border-color var(--dur-fast); }
.toc-list a:hover { color: var(--text); }
.toc-list a.active { color: var(--accent-text); border-left-color: var(--accent); font-weight: 600; }

/* ===== Prose ===== */
.post-content { max-width: var(--reading-width); font-size: 1.02rem; }
.post-content > *:first-child { margin-top: 0; }
.post-content h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin: 2.6rem 0 1rem; scroll-margin-top: 88px; }
.post-content h3 { font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; margin: 2rem 0 0.7rem; letter-spacing: -0.01em; scroll-margin-top: 88px; }
.post-content p { margin-bottom: 1.25rem; color: var(--text-secondary); line-height: 1.8; }
.post-content strong { color: var(--text); font-weight: 600; }
.post-content ul, .post-content ol { margin: 0 0 1.3rem 1.3rem; color: var(--text-secondary); }
.post-content li { margin-bottom: 0.5rem; line-height: 1.7; padding-left: 0.3rem; }
.post-content li::marker { color: var(--accent); }
.post-content a { color: var(--accent-text); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.post-content a:hover { text-decoration-color: var(--accent); }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

.post-content code { font-family: var(--font-mono); font-size: 0.85em; background: var(--accent-soft); color: var(--accent-text); padding: 0.12em 0.4em; border-radius: 5px; border: 1px solid var(--accent-line); word-break: break-word; }

.post-content blockquote { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 0.9rem 1.2rem; margin: 1.6rem 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.post-content blockquote p { margin: 0; color: var(--text); }

.post-content .table-wrap { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.post-content table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.post-content th, .post-content td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); }
.post-content thead th { background: var(--bg-subtle); font-weight: 600; color: var(--text); font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.03em; }
.post-content tbody tr:last-child td { border-bottom: none; }
.post-content td code { white-space: nowrap; }
.post-content img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 1.6rem 0; }

/* ===== Code block ===== */
.code-block { margin: 1.6rem 0; border: 1px solid var(--code-border); border-radius: var(--radius-sm); overflow: hidden; background: var(--code-bg); box-shadow: var(--shadow-md); }
.code-block-header { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.85rem; background: var(--code-header); border-bottom: 1px solid var(--code-border); }
.code-lang { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--code-muted); }
.code-dots { display: flex; gap: 6px; margin-right: auto; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--code-dot); }
.copy-btn { font-family: var(--font-mono); font-size: 0.68rem; color: var(--code-muted); background: transparent; border: 1px solid var(--code-border); border-radius: 6px; padding: 0.24rem 0.6rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast); }
.copy-btn:hover { color: #fff; border-color: #4a4438; background: rgba(255,255,255,0.04); }
.copy-btn.copied { color: #9fd9a7; border-color: rgba(159,217,167,0.4); }
.code-block pre { margin: 0; padding: 1.05rem 1.15rem; overflow-x: auto; background: var(--code-bg); }
.code-block pre code { font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.6; color: var(--code-text); background: none; border: none; padding: 0; white-space: pre; }

/* highlight.js warm theme on --code-bg */
.hljs { color: var(--code-text); background: transparent; }
.hljs-comment, .hljs-quote { color: var(--hl-comment); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-section, .hljs-name { color: var(--hl-keyword); }
.hljs-string, .hljs-attr, .hljs-meta-string { color: var(--hl-string); }
.hljs-number, .hljs-symbol, .hljs-bullet { color: var(--hl-number); }
.hljs-attribute, .hljs-variable, .hljs-template-variable { color: var(--hl-attr); }
.hljs-title, .hljs-built_in, .hljs-type { color: var(--hl-title); }
.hljs-meta { color: var(--hl-meta); }
.hljs-tag { color: var(--hl-meta); }
.hljs-deletion { color: #ef7088; }
.hljs-addition { color: var(--hl-string); }
.hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: 700; }

/* ===== Prev / next ===== */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 3.5rem 0 0; padding-top: 2rem; border-top: 1px solid var(--border); max-width: var(--reading-width); }
.post-nav a { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color var(--dur), transform var(--dur); }
.post-nav a:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.post-nav .dir { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.post-nav .nav-next { text-align: right; }
.post-nav .ttl { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.35; }

/* ===== Disclosure note ===== */
.disclosure-note { max-width: var(--reading-width); margin: 2.5rem 0 0; padding: 1.1rem 1.3rem; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; }
.disclosure-note strong { color: var(--text-secondary); }

/* draft banner (preview builds only) */
.draft-banner { position: sticky; top: var(--nav-height); z-index: 90; background: repeating-linear-gradient(45deg, var(--sev-high-bg), var(--sev-high-bg) 12px, transparent 12px, transparent 24px); border-bottom: 1px solid var(--sev-high-bd); color: var(--sev-high-fg); font-family: var(--font-mono); font-size: 0.78rem; text-align: center; padding: 0.55rem 1rem; font-weight: 600; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.contact-card { display: flex; align-items: center; gap: 0.9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; transition: border-color var(--dur), transform var(--dur), box-shadow var(--dur); }
.contact-card:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.contact-icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex-shrink: 0; }
.contact-icon svg { width: 18px; height: 18px; }
.contact-info { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.contact-info .label { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.contact-info .value { font-size: 0.88rem; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 2.5rem 0; background: var(--bg-subtle); }
.footer .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer p { font-size: 0.8rem; color: var(--text-muted); }
.footer .footer-links { display: flex; gap: 1.3rem; }
.footer .footer-links a { font-size: 0.8rem; color: var(--text-muted); }
.footer .footer-links a:hover { color: var(--accent-text); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: 1fr; gap: 0; }
  .post-toc { display: none; }
}
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--nav-bg); backdrop-filter: blur(14px); flex-direction: column; padding: 0.5rem 1.5rem; gap: 0; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: block; }
  .featured-grid, .contact-grid { grid-template-columns: 1fr; }
  .resume-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .resume-sidebar { position: static; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .nav-next { text-align: left; }
  section { padding: 4rem 0; }
  .hero { padding: 4rem 0 3rem; }
  .stats { gap: 1.6rem; }
}
@media (max-width: 520px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .stat-num { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ===== Government / Capability Statement pages ===== */
.gov-hero { border-bottom: 1px solid var(--border); padding-bottom: 2.5rem; margin-bottom: 3rem; }
.gov-hero .page-lead { max-width: 640px; }
.gov-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }

.reg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.reg-item { background: var(--surface); padding: 1.1rem 1.3rem; display: flex; flex-direction: column; gap: 0.35rem; }
.reg-label { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.reg-value { font-family: var(--font-mono); font-size: 0.92rem; color: var(--text); font-weight: 500; word-break: break-word; line-height: 1.4; }
.reg-value.pending { color: var(--text-muted); font-weight: 400; }

.svc-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.55rem 1.6rem; margin: 0; padding: 0; }
.svc-list li { position: relative; padding-left: 1.4rem; color: var(--text-secondary); line-height: 1.5; font-size: 0.92rem; }
.svc-list li::before { content: "\25B8"; position: absolute; left: 0; color: var(--accent-text); }
.svc-list li strong { color: var(--text); font-weight: 600; }

.cap-layout { display: grid; grid-template-columns: 1fr 340px; gap: 3rem; align-items: start; }
.cap-main > .cap-block + .cap-block { margin-top: 2.6rem; }
.cap-block h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 0.9rem; }
.cap-block p { color: var(--text-secondary); line-height: 1.7; font-size: 0.98rem; }
.cap-block p + p { margin-top: 0.9rem; }
.cap-sidebar { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 1.4rem; }
.cap-sidebar h3 { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.9rem; }
.cap-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.data-list { list-style: none; margin: 0; padding: 0; }
.data-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.data-list li:last-child { border-bottom: none; }
.data-list .k { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.data-list .v { color: var(--text); font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; text-align: right; word-break: break-word; }
.data-list .v.pending { color: var(--text-muted); font-weight: 400; }

.gov-poc { display: flex; flex-direction: column; gap: 0.3rem; }
.gov-poc .poc-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--text); }
.gov-poc .poc-role { font-size: 0.82rem; color: var(--accent-text); font-weight: 500; margin-bottom: 0.5rem; }
.gov-poc a { color: var(--text-secondary); font-size: 0.88rem; font-family: var(--font-mono); }
.gov-poc a:hover { color: var(--accent-hover); }

@media (max-width: 820px) {
  .cap-layout { grid-template-columns: 1fr; }
  .cap-sidebar { position: static; }
  .reg-grid { grid-template-columns: 1fr; }
  .svc-list { grid-template-columns: 1fr; }
}
