/* ===== Fonts (self-hosted, no Google Fonts) ===== */
@font-face{
  font-family:'Space Grotesk'; font-style:normal; font-weight:500;
  font-display:swap; src:url('/fonts/space-grotesk-500.woff2') format('woff2');
}
@font-face{
  font-family:'Space Grotesk'; font-style:normal; font-weight:700;
  font-display:swap; src:url('/fonts/space-grotesk-700.woff2') format('woff2');
}

/* ===== Tokens ===== */
:root{
  --bg:#fbfaf8; --surface:#ffffff; --ink:#16181d; --muted:#5a5f6a;
  --border:#e6e4df; --accent:#2f6d6a; --accent-soft:#eaf3f2;
  --shadow:0 2px 12px rgba(0,0,0,.05);
  --display:'Space Grotesk', system-ui, sans-serif;
  --sans:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --mono:'SF Mono',ui-monospace,Menlo,Consolas,monospace;
  --maxw:1040px; --radius:12px;
}
@media (prefers-color-scheme:dark){
  :root{
    --bg:#0f1115; --surface:#161922; --ink:#e7e9ee; --muted:#9aa1ad;
    --border:#262a33; --accent:#5fb6ad; --accent-soft:#16302e;
    --shadow:0 2px 14px rgba(0,0,0,.4);
  }
}

/* ===== Base ===== */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:var(--sans); line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }
h1,h2,h3{ font-family:var(--display); line-height:1.15; }
code,.mono{ font-family:var(--mono); }
.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 20px; }

.skip-link{
  position:absolute; left:-9999px; top:0; background:var(--accent); color:#fff;
  padding:8px 14px; border-radius:6px; z-index:100;
}
.skip-link:focus{ left:12px; top:12px; }

/* visible placeholder marker for scaffold copy */
.todo{
  display:inline-block; font-family:var(--mono); font-size:.72rem;
  background:var(--accent-soft); color:var(--accent);
  padding:1px 6px; border-radius:5px; margin-left:6px; vertical-align:middle;
}

/* ===== Topbar ===== */
.topbar{
  position:sticky; top:0; z-index:50; background:var(--bg);
  border-bottom:1px solid var(--border);
}
.topbar .wrap{ display:flex; align-items:center; justify-content:space-between; height:60px; }
.brand{ font-family:var(--display); font-weight:700; font-size:1.15rem; color:var(--ink); }
.brand:hover{ text-decoration:none; }
.nav{ display:flex; align-items:center; gap:22px; }
.nav-links{ display:flex; gap:18px; }
.nav-links a{ color:var(--ink); font-size:.92rem; }
.icon-link{ color:var(--muted); display:inline-flex; }
.icon-link:hover{ color:var(--accent); }
.icon-link svg{ width:20px; height:20px; }

/* ===== Hero ===== */
.hero{ padding:64px 0 40px; }
.kicker{
  text-transform:uppercase; letter-spacing:.12em; font-size:.72rem;
  font-weight:700; color:var(--accent); margin:0 0 10px;
}
.hero h1{ font-size:clamp(2.2rem,6vw,3.4rem); font-weight:700; margin:0 0 6px; }
.descriptor{ font-family:var(--display); font-weight:500; color:var(--muted); font-size:1.05rem; margin:0 0 16px; }
.lede{ font-size:1.12rem; max-width:60ch; color:var(--ink); margin:0; }

/* ===== Sections ===== */
.section{ padding:36px 0; }
.section-head{ display:flex; align-items:baseline; justify-content:space-between; margin:0 0 18px; }
.section-head h2{ font-size:1.4rem; margin:0; }
.section-head a{ font-size:.9rem; }

/* ===== Work grid + cards ===== */
.work-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:18px; box-shadow:var(--shadow);
}
.card h3{ margin:0 0 4px; font-size:1.05rem; }
.card h3 .mono{ font-weight:700; }
.card p{ margin:0 0 12px; color:var(--muted); font-size:.92rem; }
.card--hero{ grid-column:1 / -1; border-color:var(--accent); }
.card--hero h3{ font-size:1.35rem; }
.card--hero p{ color:var(--ink); font-size:1rem; max-width:64ch; }
.card-kicker{
  text-transform:uppercase; letter-spacing:.1em; font-size:.68rem;
  font-weight:700; color:var(--accent); margin:0 0 6px;
}
.tag{
  display:inline-block; background:var(--accent-soft); color:var(--accent);
  border-radius:20px; padding:2px 10px; font-size:.72rem; margin:0 4px 4px 0;
}
.linkcard{ display:flex; align-items:center; justify-content:space-between; }
.linkcard h3{ margin:0; }

/* ===== Writing teaser / post cards ===== */
.post-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:18px; box-shadow:var(--shadow); margin-bottom:14px;
}
.post-card h3{ margin:0 0 4px; font-size:1.1rem; }
.post-card time{ color:var(--muted); font-size:.82rem; }
.post-card p{ color:var(--muted); margin:8px 0 0; font-size:.92rem; }

/* ===== About ===== */
.about p{ max-width:64ch; }
.degrees{ list-style:none; padding:0; margin:14px 0 0; }
.degrees li{ padding:6px 0; border-top:1px solid var(--border); font-size:.95rem; }

/* ===== Footer ===== */
.site-footer{
  border-top:1px solid var(--border); margin-top:48px; padding:28px 0;
  color:var(--muted); font-size:.88rem;
}
.site-footer .wrap{ display:flex; flex-wrap:wrap; gap:14px; justify-content:space-between; }
.footer-links{ display:flex; gap:16px; flex-wrap:wrap; }

/* ===== Responsive ===== */
@media (max-width:720px){
  .work-grid{ grid-template-columns:1fr; }
  .nav-links{ display:none; }      /* simple v1: icon links remain; full nav links hidden on small screens */
  .hero{ padding:44px 0 28px; }
}
