/* Personal website. No external fonts or assets, so the CSP can stay 'self'-only. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #17202b;
  --muted: #536074;
  --border: #dde2e9;
  --accent: #0a6a8c;
  --accent-ink: #ffffff;
  --accent-soft: #e2f0f5;
  --topbar: rgba(246, 247, 249, 0.86);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 2px 6px rgba(16, 24, 40, 0.06);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* Dark palette: follows the OS setting unless the visitor picked a theme with the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117;
    --surface: #141a22;
    --surface-2: #19212b;
    --text: #e6eaf0;
    --muted: #9ba7b9;
    --border: #263040;
    --accent: #5cc6ec;
    --accent-ink: #062330;
    --accent-soft: #11303c;
    --topbar: rgba(13, 17, 23, 0.86);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #141a22;
  --surface-2: #19212b;
  --text: #e6eaf0;
  --muted: #9ba7b9;
  --border: #263040;
  --accent: #5cc6ec;
  --accent-ink: #062330;
  --accent-soft: #11303c;
  --topbar: rgba(13, 17, 23, 0.86);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--topbar);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; white-space: nowrap; }
.mark {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 750; letter-spacing: 0.02em;
}
/* min-width: 0 lets the nav shrink and scroll sideways instead of widening the page. */
.nav { display: flex; gap: 4px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }

@media (max-width: 760px) {
  .brand-name { display: none; }
  .nav a { padding: 6px 8px; font-size: 14px; }
}

/* ---- Hero ---- */
.hero { padding: 84px 0 64px; border-bottom: 1px solid var(--border); }
.eyebrow {
  margin: 0 0 14px; color: var(--accent); font-weight: 650; font-size: 14px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); font-weight: 760; letter-spacing: -0.025em; }
.lede { max-width: 44ch; margin: 18px 0 0; font-size: clamp(1.15rem, 2.4vw, 1.35rem); color: var(--muted); line-height: 1.5; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 26px 0 0; color: var(--text); font-size: 15px; }
.facts li { position: relative; padding-left: 16px; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent);
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 15px;
  text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border);
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }

/* ---- Sections ---- */
.section { padding: 64px 0; }
.section.alt { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { font-size: 1.75rem; font-weight: 720; margin-bottom: 18px; }
.section h2::after { content: ""; display: block; width: 40px; height: 3px; border-radius: 2px; background: var(--accent); margin-top: 10px; }
.prose { max-width: 70ch; margin: 0 0 8px; }
.sub { margin: 30px 0 14px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px; }

.cards { display: grid; gap: 16px; margin-top: 22px; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.card h4 { font-size: 1.05rem; font-weight: 680; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card.accent { border-top: 3px solid var(--accent); }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px !important; font-weight: 650; color: var(--accent) !important; margin-bottom: 6px !important; }

/* ---- Experience timeline ---- */
.company { position: relative; margin-top: 34px; padding-left: 26px; border-left: 2px solid var(--border); }
.company:first-of-type { margin-top: 8px; }
.company-head { position: relative; margin-bottom: 8px; }
.company-head::before {
  content: ""; position: absolute; left: -35px; top: 5px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.company-head h3 { font-size: 1.3rem; font-weight: 720; }
.company-head .meta { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.role { padding: 16px 0 10px; border-top: 1px dashed var(--border); }
.company-head + .role { border-top: 0; }
.role-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.role-head h4 { font-size: 1.08rem; font-weight: 680; }
.dates { margin: 0; color: var(--muted); font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.role > p { margin: 6px 0 0; max-width: 75ch; }
details { margin-top: 8px; }
summary {
  cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14.5px; width: fit-content; list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: inline-block; width: 1.1em; font-weight: 700; }
details[open] > summary::before { content: "\2212"; }
.group { margin: 12px 0 2px; font-weight: 650; font-size: 14.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.role ul { margin: 6px 0 0; padding-left: 20px; max-width: 78ch; }
.role li { margin: 5px 0; }
.role li::marker { color: var(--accent); }

/* ---- Expertise ---- */
.skill-groups { display: grid; gap: 26px 32px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 8px; }
.skill-group h3 { font-size: 14px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 12px; font-size: 14.5px;
}

/* ---- Footer ---- */
.footer { padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.footer p { margin: 0; }

/* ---- 404 ---- */
.notfound { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 14px; }
.notfound h1 { font-size: 2rem; }
.notfound p { color: var(--muted); margin: 0; }

/* ---- Print: a clean one-column copy for anyone who prints the page ---- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --text: #000; --muted: #333; --border: #bbb; --accent: #000; color-scheme: light; }
  body { font-size: 11pt; }
  .topbar, .skip, .cta, .icon-btn { display: none !important; }
  .hero { padding: 0 0 12pt; }
  .section { padding: 14pt 0; }
  .section.alt { background: none; border: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .role { break-inside: avoid; }
  summary { display: none; }
  .footer { padding-top: 12pt; }
}
