/* =========================================================
   Site theme (Nov 2026): makes the project pages match the
   homepage. Loaded after style.css. Dark by default; light when
   <html data-theme="light"> (shared with the homepage toggle).
   ========================================================= */
.blog-style {
  --bg: #0a0a0a;
  --paper: #121211;
  --ink: #f2f1ec;
  --text: #d4d3cd;
  --muted: #8a8a85;
  --faint: #6a6a66;
  --line: #1f1f1e;
  --line-strong: #2a2a28;
  --accent: #e8b04a;
  --accent-soft: rgba(232, 176, 74, 0.12);
  --tint: rgba(242, 241, 236, 0.04);
  --glass: rgba(10, 10, 10, 0.82);
  --badge-bg: rgba(10, 10, 10, 0.74);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Newsreader, Georgia, serif;
  --radius: 4px;
  color-scheme: dark;
}
:root[data-theme="light"] .blog-style {
  --bg: #fafaf8;
  --paper: #ffffff;
  --ink: #161615;
  --text: #33332f;
  --muted: #6b6b66;
  --faint: #a3a39e;
  --line: #e7e6e1;
  --line-strong: #dcdbd5;
  --accent: #b07714;
  --accent-soft: #f6eedd;
  --tint: rgba(22, 22, 21, 0.035);
  --glass: rgba(250, 250, 248, 0.85);
  --badge-bg: rgba(255, 255, 255, 0.88);
  color-scheme: light;
}

body.blog-style {
  background: var(--bg); color: var(--text); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; transition: background .25s, color .25s;
}
body.blog-style ::selection { background: var(--accent); color: var(--bg); }

/* Header: plain name and quiet links, like the homepage sidebar */
.blog-style .topbar { background: var(--glass); border-bottom: 1px solid var(--line); }
.blog-style .brand-mark { display: none; }
.blog-style .brand, .blog-style .brand-name { color: var(--ink); font-size: 1.05rem; font-weight: 500; letter-spacing: -0.01em; }
.blog-style .nav { align-items: center; }
.blog-style .nav a { color: var(--muted); font-size: 0.875rem; }
.blog-style .nav a:hover { color: var(--ink); }
.blog-style .nav .btn-sm, .blog-style .nav .btn-sm:hover {
  background: none; border: 0; border-radius: 0; padding: 0; color: var(--muted);
}
.blog-style .nav .btn-sm:hover { color: var(--ink); }
.blog-style .nav .btn-sm::after { content: " ↗"; font-size: 0.7em; }
.theme-dots { display: inline-flex; gap: 2px; margin-left: 4px; }
.theme-dots button {
  width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; border-radius: 50%;
}
.theme-dots button::before {
  content: ""; width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--muted);
}
/* Each dot always shows its own theme's colour */
.theme-dots button[data-set="dark"]::before { background: #0a0a0a; }
.theme-dots button[data-set="light"]::before { background: #fafaf8; }
.theme-dots button[aria-pressed="true"]::before { outline: 1.5px solid var(--accent); outline-offset: 2px; }
.theme-dots button:focus-visible { outline: 1px solid var(--accent); }

/* Cards, media and inset blocks: hairlines, small radius, no shadows */
.blog-style .card, .blog-style #about > .wrap, .blog-style .proj-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px; box-shadow: none;
}
.blog-style .proj-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.blog-style .media, .blog-style .feat-main, .blog-style .feat-inset, .blog-style .hero-crop,
.blog-style .hero-video .media, .blog-style .minor-media { border-radius: 4px; outline: 0; box-shadow: none; }
.blog-style .proj-media { background: var(--paper); border-color: var(--line); }
.blog-style .post-note, .blog-style .eq { background: var(--tint); border-color: var(--line); }
.blog-style .mini-table th, .blog-style .credit, .blog-style .mini-table caption { background: var(--tint); color: var(--muted); }
.blog-style .mini-table, .blog-style .mini-table td, .blog-style .mini-table th, .blog-style table { border-color: var(--line); }
.blog-style hr { border-color: var(--line); }

/* Image badges */
.blog-style .kind, .blog-style .kind-real, .blog-style .kind-sim {
  background: var(--badge-bg); color: var(--ink); border-radius: 2px;
}

/* Type: titles in ink, labels in mono, accent only for emphasis */
.blog-style h1, .blog-style h2, .blog-style h3, .blog-style h4,
.blog-style .post .post-title, .blog-style .hero-text h1 { color: var(--ink); letter-spacing: -0.015em; }
.blog-style .post .post-title { font-weight: 500; }
.blog-style .post-body p, .blog-style .post-body li { color: var(--text); }
.blog-style .post-lede, .blog-style .post .lede { font-family: var(--serif); font-size: 1.2rem; line-height: 1.55; color: var(--ink); }
.blog-style .feat-big b, .blog-style .stat b { color: var(--accent); }

/* Links: ink with a faint underline, gold on hover */
.blog-style .post-body a, .blog-style .hero-about a, .blog-style .now a, .blog-style .feat-links a,
.blog-style .site-foot a, .blog-style .contact-card a, .blog-style .read-more a {
  color: var(--ink); text-decoration-color: var(--faint);
}
.blog-style .post-body a:hover, .blog-style .hero-about a:hover, .blog-style .now a:hover, .blog-style .feat-links a:hover,
.blog-style .site-foot a:hover, .blog-style .contact-card a:hover, .blog-style .read-more a:hover {
  color: var(--accent); text-decoration-color: var(--accent);
}

/* Contents rail: muted list like the homepage nav, current section in gold */
.blog-style .toc ol.root > li > a, .blog-style .toc > nav > ol > li > a { color: var(--ink); font-weight: 500; }
.blog-style .toc ol.root > li > a::before, .blog-style .toc > nav > ol > li > a::before { color: var(--faint); opacity: 1; }
.blog-style .toc a { color: var(--muted); }
.blog-style .toc a:hover,
.blog-style .toc ol.root > li > a:hover, .blog-style .toc > nav > ol > li > a:hover { color: var(--accent); }
.blog-style .toc li a.is-active,
.blog-style .toc ol.root > li > a.is-active, .blog-style .toc > nav > ol > li > a.is-active {
  color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); border-radius: 0 2px 2px 0;
}
.blog-style .toc-actions a { color: var(--muted); }

/* Buttons */
.blog-style .btn { border-radius: 2px; color: var(--ink); border-color: var(--line-strong); }
.blog-style .btn.primary, .blog-style .to-top, .blog-style .to-top:hover {
  background: var(--ink); color: var(--bg); border-color: var(--ink); border-radius: 2px;
}
.blog-style .btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* Odds and ends with hard-coded light colours in style.css */
.blog-style .site-foot { background: transparent; border-top: 1px solid var(--line); }
.blog-style .lightbox img { background: var(--paper); }
.blog-style details.more, .blog-style details.more > summary, .blog-style .tune details { border-color: var(--line); }
.blog-style code, .blog-style kbd { background: var(--tint); color: var(--ink); }

/* Reading text in the bio's serif (matches the homepage) */
.blog-style .post-body { font-size: 1.18rem; line-height: 1.6; }
.blog-style .post-body p, .blog-style .post-body li,
.blog-style .post-body figcaption, .blog-style .figure figcaption,
.blog-style .post-subtitle, .blog-style .credit p {
  font-family: var(--serif);
}
.blog-style .post-body figcaption, .blog-style .figure figcaption { font-size: 0.98rem; }
.blog-style .post-body figcaption .kind, .blog-style .post-body figcaption::before { font-family: var(--sans); }
.blog-style .post-body table, .blog-style .post-body td, .blog-style .post-body th,
.blog-style .post-body code, .blog-style .post-body pre { font-size: 1rem; }
