/* ==========================================================================
   Dylan Uijthof — portfolio stylesheet
   Plain CSS. No build step, no dependencies.
   Light + dark themes are driven by [data-theme] on <html>.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --maxw: 940px;
  --maxw-prose: 68ch;
  --radius: 14px;
  --radius-sm: 9px;
  --gutter: 22px;

  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-elev: #ffffff;
  --fg: #15181e;
  --muted: #5c616c;
  --faint: #8b919c;
  --border: #e6e8ec;
  --border-strong: #d2d6de;
  --accent: #2f6df6;
  --accent-hover: #1d55d8;
  --accent-soft: #eaf0fe;
  --accent-fg: #ffffff;
  --code-bg: #f3f4f7;
  --mark: #fff2a8;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 28px rgba(16, 24, 40, .07);

  /* code syntax tokens */
  --tok-com: #6a737d;
  --tok-str: #032f62;
  --tok-num: #005cc5;
  --tok-kw: #cf222e;
  --tok-typ: #6f42c1;
  --tok-fn: #8250df;
  --tok-bi: #953800;
  --tok-op: #57606a;
  --tok-meta: #b31d28;
  --tok-anno: #953800;
}

[data-theme="dark"] {
  --bg: #0d0f13;
  --bg-soft: #13161c;
  --bg-elev: #161a21;
  --fg: #e9ebef;
  --muted: #a2a8b4;
  --faint: #79808d;
  --border: #242932;
  --border-strong: #343b47;
  --accent: #7aa2ff;
  --accent-hover: #9bb9ff;
  --accent-soft: #182137;
  --accent-fg: #0b1220;
  --code-bg: #1a1f27;
  --mark: #4a3f13;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 34px rgba(0, 0, 0, .45);

  /* code syntax tokens */
  --tok-com: #6b7b8c;
  --tok-str: #98c379;
  --tok-num: #d19a66;
  --tok-kw: #c678dd;
  --tok-typ: #e5c07b;
  --tok-fn: #61afef;
  --tok-bi: #56b6c2;
  --tok-op: #8b93a1;
  --tok-meta: #56b6c2;
  --tok-anno: #d19a66;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

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

::selection { background: var(--accent); color: var(--accent-fg); }

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 .6em;
  color: var(--fg);
}

p { margin: 0 0 1.1em; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.4rem 0;
}

mark { background: var(--mark); color: inherit; padding: 0 .15em; border-radius: 3px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main { flex: 1 0 auto; }

/* --------------------------------------------------------------------------
   3. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

@supports not (backdrop-filter: blur(2px)) {
  .site-header { background: var(--bg); }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand:hover { color: var(--fg); text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--fg);
  color: var(--bg);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand-text { font-size: 15.5px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.site-nav a:hover { color: var(--fg); background: var(--bg-soft); text-decoration: none; }
.site-nav a.is-active { color: var(--fg); }

.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 6px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--border-strong); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 1.8px;
  margin-inline: auto;
  border-radius: 2px;
  background: var(--fg);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before,
.nav-toggle span::after { content: ""; }
.nav-toggle span::before { transform: translateY(-5px); }
.nav-toggle span::after { transform: translateY(3.2px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg) translateY(-1.8px); }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-fg); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--fg); }

.btn-sm { padding: 7px 14px; font-size: 13.5px; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

/* --------------------------------------------------------------------------
   5. Page scaffolding
   -------------------------------------------------------------------------- */
.page { padding-block: 56px 72px; }

.page-head { max-width: var(--maxw-prose); margin-bottom: 36px; }
.page-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.6rem); margin-bottom: .3em; }
.page-head .lede { font-size: 1.12rem; color: var(--muted); margin: 0; }

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section { margin-top: 64px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head h2 { font-size: 1.3rem; margin: 0; }
.section-head .more { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* --------------------------------------------------------------------------
   6. Home hero
   -------------------------------------------------------------------------- */
.hero { padding-block: 40px 8px; max-width: 46rem; }
.hero .eyebrow { margin-bottom: 16px; }
.hero h1 {
  font-size: clamp(2.2rem, 1.4rem + 4vw, 3.4rem);
  margin-bottom: .25em;
}
.hero .role {
  font-size: clamp(1.15rem, 1rem + .8vw, 1.45rem);
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 1em;
}
.hero .role b { color: var(--fg); font-weight: 700; }
.hero .tagline { font-size: 1.08rem; color: var(--muted); margin-bottom: 0; }

.hero-status { margin: 22px 0 0; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 25%, transparent);
}

/* --------------------------------------------------------------------------
   7. Project grid / cards
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow); }

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.card h3 { font-size: 1.06rem; margin: 0; }
.card h3 a { color: var(--fg); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }

/* Make the whole card clickable without nesting interactive elements. */
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }

.card time { flex: none; color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.card p { color: var(--muted); font-size: 14.6px; margin: 0 0 16px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; list-style: none; padding: 0; }
.tag {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}
.filter-btn {
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.filter-btn:hover { color: var(--fg); border-color: var(--border-strong); }
.filter-btn.is-active { background: var(--fg); border-color: var(--fg); color: var(--bg); }

.empty-state {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   8. Prose (rendered Markdown)
   -------------------------------------------------------------------------- */
.prose {
  max-width: var(--maxw-prose);
  font-size: 17px;
}
.prose > *:first-child { margin-top: 0; }

.prose h1,
.prose h2,
.prose h3,
.prose h4 { position: relative; scroll-margin-top: 90px; }

.prose h1 { font-size: 2rem; margin: 2.4rem 0 .7rem; }
.prose h2 {
  font-size: 1.5rem;
  margin: 2.4rem 0 .7rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid var(--border);
}
.prose h3 { font-size: 1.2rem; margin: 1.9rem 0 .5rem; }
.prose h4 { font-size: 1.03rem; margin: 1.6rem 0 .4rem; color: var(--muted); }

.heading-anchor {
  margin-left: .4em;
  color: var(--faint);
  font-weight: 400;
  opacity: 0;
  transition: opacity .15s ease;
}
.prose h1:hover .heading-anchor,
.prose h2:hover .heading-anchor,
.prose h3:hover .heading-anchor,
.prose h4:hover .heading-anchor,
.heading-anchor:focus { opacity: 1; text-decoration: none; }

.prose ul,
.prose ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose li > ul,
.prose li > ol { margin-top: .35em; margin-bottom: .35em; }

.prose blockquote {
  margin: 1.5rem 0;
  padding: .2rem 0 .2rem 1.2rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.prose blockquote > :last-child { margin-bottom: 0; }

.prose code {
  font-family: var(--font-mono);
  font-size: .875em;
  padding: .15em .42em;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--code-bg);
  overflow-wrap: break-word;
}

.prose .code-block {
  position: relative;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  overflow: hidden;
}
.prose .code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.6px;
  line-height: 1.6;
}
.prose .code-block code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  white-space: pre;
}

/* Syntax highlighting tokens (see assets/markdown.js) */
.tok-com { color: var(--tok-com); font-style: italic; }
.tok-str { color: var(--tok-str); }
.tok-num { color: var(--tok-num); }
.tok-kw  { color: var(--tok-kw); }
.tok-typ { color: var(--tok-typ); }
.tok-fn  { color: var(--tok-fn); }
.tok-bi  { color: var(--tok-bi); }
.tok-op  { color: var(--tok-op); }
.tok-meta { color: var(--tok-meta); }
.tok-anno { color: var(--tok-anno); }

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-elev);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease, color .15s ease;
}
.code-block:hover .copy-btn,
.copy-btn:focus { opacity: 1; }
.copy-btn:hover { color: var(--fg); }

.prose .table-wrap { margin: 1.5rem 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th,
.prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.prose thead th { background: var(--bg-soft); font-size: 13px; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.prose tbody tr:last-child td { border-bottom: 0; }

.prose img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 1.5rem 0; }

.prose .task { display: flex; align-items: flex-start; gap: 8px; list-style: none; margin-left: -1.3em; }
.prose .task input { margin-top: .45em; }

/* --------------------------------------------------------------------------
   9. Article / project page
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--faint);
  font-size: 13.5px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb .sep { color: var(--faint); }

.article-head { max-width: var(--maxw-prose); margin-bottom: 34px; }
.article-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.7rem); margin-bottom: .35em; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--faint);
  font-size: 13.5px;
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.article-summary { margin-top: 16px; font-size: 1.08rem; color: var(--muted); }

.article-tags { margin-top: 18px; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: var(--maxw-prose);
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.pager a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.pager a:hover { border-color: var(--border-strong); background: var(--bg-soft); text-decoration: none; }
.pager .dir { display: block; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.pager .name { color: var(--fg); font-weight: 600; font-size: 15px; }
.pager .next { text-align: right; }
.pager .next.empty,
.pager .prev.empty { visibility: hidden; }

.loading {
  padding: 40px 0;
  color: var(--muted);
}
.loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  vertical-align: -2px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  max-width: var(--maxw-prose);
  padding: 22px 24px;
  border: 1px solid var(--border-strong);
  border: 1px solid color-mix(in srgb, #ef4444 40%, var(--border));
  border-radius: var(--radius);
  background: var(--bg-soft);
  background: color-mix(in srgb, #ef4444 7%, var(--bg));
}
.error-box h2 { margin-top: 0; }

/* --------------------------------------------------------------------------
   10. About / contact
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.sidebar { display: grid; gap: 26px; }
.sidebar h2 { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 0; padding: 0; }

.skill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.skill-list li { font-size: 14.5px; }
.skill-head { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); }
.skill-bar { height: 6px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); overflow: hidden; }
.skill-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 26px 24px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline .when { display: block; color: var(--faint); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 3px; }
.timeline .what { font-weight: 600; }
.timeline .where { color: var(--muted); font-size: 14.5px; margin: 2px 0 0; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
  margin-top: 8px;
}
.contact-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.contact-card h3 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.contact-card p { margin: 0; overflow-wrap: anywhere; }
.contact-card .big { font-size: 1.02rem; font-weight: 600; }

.copy-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.copy-inline:hover { color: var(--fg); border-color: var(--border-strong); }

.muted-note { margin-top: 10px; color: var(--muted); font-size: 14px; }
.sidebar .btn-row { margin-top: 14px; }

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  flex: none;
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding-block: 26px;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner p { margin: 0; }
.footer-brand { font-weight: 600; color: var(--fg); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.footer-note { width: 100%; color: var(--faint); font-size: 12.5px; }

/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { position: static; }

  .nav-toggle { display: grid; place-items: center; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 11px 12px; font-size: 16px; }
  .site-nav a.is-active::after { left: 12px; right: auto; width: 18px; bottom: 8px; }

  .header-inner { position: relative; flex-wrap: wrap; }
  .brand-text { font-size: 15px; }

  .page { padding-block: 38px 54px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .card h3 a::after { inset: 0; }
}

@media (max-width: 400px) {
  :root { --gutter: 16px; }
  .brand-text { display: none; }
}

/* --------------------------------------------------------------------------
   13. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .pager,
  .copy-btn,
  .btn-row,
  .filter-bar { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { color: #000; }
  .prose .code-block { border: 1px solid #ccc; }
}
