/* Deskbound blog — the night-sky shell of the new identity. Geist only,
   gold as the single accent, translucent cards. Fonts are referenced
   absolutely (/fonts/...) because this file lives one level deep in /blog/.
   Self-hosted only, to satisfy the site CSP. */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Regular.otf') format('opentype');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Medium.otf') format('opentype');
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-SemiBold.otf') format('opentype');
  font-weight: 600; font-display: swap;
}

:root {
  --bone: #05070F;                       /* night sky base */
  --card: rgba(255, 255, 255, 0.06);     /* translucent card */
  --ink: #F4F2EC;
  --mute: rgba(244, 242, 236, 0.74);
  --dim: rgba(244, 242, 236, 0.52);
  --hairline: rgba(244, 242, 236, 0.16);
  --clay: #F2B23E;                       /* solar gold, the only accent */
  --gold-ink: #1E1606;
  --prose: rgba(244, 242, 236, 0.84);

  --serif: 'Geist', system-ui, sans-serif;  /* no serif anywhere anymore */
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist', system-ui, sans-serif;

  --t-small: 13px; --t-label: 15px;
  --t-body: 17px; --t-lead: 21px; --t-read: 19px; --t-h3: 24px;
  --t-h2: clamp(26px, 3.8vw, 38px);
  --t-h1: clamp(36px, 5.6vw, 62px);

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px;
  --s6: 48px; --s8: 64px; --s10: 80px; --s12: 96px; --s16: 128px;
  --edge: 40px;
  --col: 820px;
  --r: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bone); color: var(--ink);
  font-family: var(--sans); font-size: var(--t-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* The night sky: static fixed gradient behind everything. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, #05070F 0%, #0D1526 55%, #1A2440 100%);
}
a { color: inherit; text-decoration: none; }
.edge { padding-left: var(--edge); padding-right: var(--edge); }
.eyebrow {
  font-family: var(--sans); font-weight: 500; font-size: var(--t-small);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim);
}

/* ── Nav ─────────────────────────────────────────────── */
nav { position: sticky; top: 0; z-index: 20; background: rgba(5, 7, 15, 0.42); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-in { display: flex; justify-content: space-between; align-items: center; height: 66px; max-width: 1120px; margin: 0 auto; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.mark .sun { width: 34px; height: auto; flex: none; }
.mark .word { font-family: var(--sans); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); }
.nav-links { display: flex; gap: var(--s3); }
.nav-links a { font-size: var(--t-label); color: var(--mute); transition: color .12s; }
.nav-links a:hover, .nav-links a.on { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: var(--s3); white-space: nowrap; }
.lang-toggle { white-space: nowrap; }
.lang { font-family: var(--sans); font-weight: 500; font-size: var(--t-small); background: none; border: none; cursor: pointer; color: var(--dim); padding: 0; }
.lang.on { color: var(--ink); }
.lang-sep { color: var(--hairline); font-size: var(--t-small); }
.btn {
  display: inline-block; background: var(--clay); color: var(--gold-ink);
  font-family: var(--sans); font-weight: 600; font-size: var(--t-label);
  padding: 11px 22px; border-radius: 18px; border: none; transition: filter .15s;
}
.btn:hover { filter: brightness(1.06); }

/* Hamburger: hidden on desktop. The .nav-menu wrapper is transparent
   (display:contents) so its children flow into the bar exactly as before. */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; width: 42px; height: 42px; padding: 10px; margin-right: -10px; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .18s ease; }
.nav-menu { display: contents; }

/* ── Blog index ──────────────────────────────────────── */
.blog-head { max-width: 1120px; margin: 0 auto; padding-top: var(--s12); padding-bottom: var(--s8); }
.blog-head h1, article h1, .post-title, .article-body h2 { overflow-wrap: break-word; }
.blog-head h1 { font-family: var(--serif); font-weight: 560; font-size: var(--t-h1); line-height: 1.06; letter-spacing: -0.015em; max-width: 18ch; margin-top: var(--s2); }
.blog-head p { margin-top: var(--s4); max-width: 56ch; font-size: var(--t-lead); color: var(--mute); line-height: 1.5; }

.posts { max-width: 1120px; margin: 0 auto; padding-bottom: var(--s4); }
.post-item {
  display: block; background: var(--card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: var(--r); padding: var(--s4); margin-bottom: var(--s2);
  transition: background .15s;
}
.post-item:hover { background: rgba(255, 255, 255, 0.1); }
.post-meta { font-size: var(--t-small); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.post-title { font-family: var(--serif); font-weight: 560; font-size: var(--t-h3); letter-spacing: -0.01em; line-height: 1.2; margin-top: var(--s1); max-width: 30ch; transition: color .12s; }
.post-item:hover .post-title { color: var(--clay); }
.post-excerpt { margin-top: var(--s2); color: var(--mute); max-width: 62ch; line-height: 1.55; font-size: var(--t-label); }
.post-read { margin-top: var(--s3); font-size: var(--t-label); font-weight: 500; color: var(--ink); }
.post-read::after { content: " →"; }

/* ── Article ─────────────────────────────────────────── */
.article-head { max-width: var(--col); margin: 0 auto; padding-top: var(--s10); padding-bottom: var(--s6); }
.article-head h1 { font-family: var(--serif); font-weight: 560; font-size: clamp(30px, 4.6vw, 50px); line-height: 1.1; letter-spacing: -0.015em; margin-top: var(--s2); }
.article-meta { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--hairline); font-size: var(--t-small); color: var(--dim); display: flex; gap: var(--s3); flex-wrap: wrap; }

.article-body { max-width: var(--col); margin: 0 auto; padding-bottom: var(--s10); }
.article-body > p { margin-bottom: var(--s3); font-size: var(--t-read); line-height: 1.65; color: var(--prose); }
.article-body > p.lead { font-size: 23px; line-height: 1.45; color: var(--ink); margin-bottom: var(--s4); }
.article-body h2 { margin: var(--s8) 0 var(--s3); font-family: var(--serif); font-weight: 560; font-size: var(--t-h2); letter-spacing: -0.015em; line-height: 1.12; }
.article-body strong { font-weight: 600; color: var(--ink); }
.article-body a { color: var(--clay); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(242, 178, 62, 0.5); }
.article-body a:hover { text-decoration-color: var(--clay); }
.article-body ul { margin: 0 0 var(--s3) var(--s3); }
.article-body li { font-size: var(--t-read); line-height: 1.6; color: var(--prose); margin-bottom: var(--s1); }

/* A cited source: the reference in mono, then the plain-language reading. */
.cite { margin: var(--s4) 0; padding: var(--s3) var(--s4); border-left: 2px solid var(--clay); background: var(--card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 0 var(--r) var(--r) 0; }
.cite .src { font-family: var(--sans); font-variant-numeric: tabular-nums; font-size: var(--t-small); color: var(--mute); line-height: 1.5; }
.cite .plain { margin-top: var(--s2); font-size: var(--t-body); line-height: 1.6; color: var(--ink); }

/* End-of-article Deskbound tie-in. */
.takeaway { margin: var(--s10) auto 0; max-width: var(--col); padding: var(--s6); background: var(--card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: var(--r); }
.takeaway .eyebrow { color: var(--dim); }
.takeaway h3 { margin-top: var(--s2); font-family: var(--serif); font-weight: 560; font-size: var(--t-h3); letter-spacing: -0.01em; line-height: 1.2; }
.takeaway p { margin: var(--s2) 0 var(--s4); color: var(--mute); font-size: var(--t-body); line-height: 1.55; }

.more { max-width: var(--col); margin: var(--s10) auto 0; border-top: 1px solid var(--hairline); padding-top: var(--s4); }
.more .eyebrow { display: block; margin-bottom: var(--s3); }
.more a { display: block; padding: var(--s2) 0; font-family: var(--serif); font-weight: 560; font-size: var(--t-body); border-bottom: 1px solid var(--hairline); }
.more a:hover { color: var(--clay); }

/* ── Footer ──────────────────────────────────────────── */
footer { border-top: 1px solid var(--hairline); padding: var(--s6) 0; margin-top: var(--s12); }
.foot-in { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s3); max-width: 1120px; margin: 0 auto; font-size: var(--t-small); color: var(--mute); }
.foot-in a { color: var(--mute); transition: color .12s; }
.foot-in a:hover { color: var(--ink); }
.foot-links { display: flex; gap: var(--s3); }

/* ── Smooth cursor (desktop, fine pointer only) ──────── */
#smooth-cursor { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none;
  opacity: 0; transition: opacity .15s ease; will-change: transform; }
@media (hover: none), (pointer: coarse) { #smooth-cursor { display: none; } }

@media (max-width: 960px) {
  :root { --edge: 22px; }
  .nav-toggle { display: inline-flex; }
  /* The dropdown, anchored to the sticky <nav> (full width). Collapsed by
     default; visibility is delayed on close so the fade can finish. */
  .nav-menu {
    display: flex; flex-direction: column; align-items: stretch; gap: var(--s3);
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(6, 9, 18, 0.96);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hairline);
    padding: var(--s3) var(--edge) var(--s4);
    transform: translateY(-10px); opacity: 0; visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
  }
  nav.open .nav-menu {
    transform: translateY(0); opacity: 1; visibility: visible;
    transition: opacity .22s ease, transform .22s ease;
  }
  .nav-links { display: flex; flex-direction: column; gap: var(--s1); }
  .nav-links a { font-size: var(--t-body); padding: 6px 0; }
  .nav-right { flex-direction: column; align-items: stretch; gap: var(--s3); white-space: normal; }
  .nav-right .btn { width: 100%; text-align: center; }
  /* Three bars → X */
  nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

.nav-back { font-size: var(--t-label, 13px); color: var(--dim, rgba(244,242,236,.6)); text-decoration: none; transition: color .12s; white-space: nowrap; }
.nav-back:hover { color: var(--ink, #F4F2EC); }
