/* ============================================================
   硅基手记 · Silicon Notes
   editorial design system
   ============================================================ */

:root {
  --bg: #faf8f4;
  --bg-alt: #f3f0e9;
  --surface: #ffffff;
  --ink: #14141a;
  --ink-2: #4c4c58;
  --ink-3: #85858f;
  --line: #e3dfd6;
  --line-strong: #cfc9bc;
  --accent: #1f45e8;
  --accent-soft: #e9ecff;
  --lime: #d8ff4d;
  --code-bg: #14161a;
  --code-ink: #e6e8ee;

  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia,
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo,
    Consolas, "Liberation Mono", monospace;

  --wrap: 1160px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(20, 20, 26, 0.04), 0 12px 32px -18px rgba(20, 20, 26, 0.22);
}

[data-theme="dark"] {
  --bg: #0a0b0d;
  --bg-alt: #0f1114;
  --surface: #12151a;
  --ink: #f0f2f6;
  --ink-2: #a7adba;
  --ink-3: #7b8392;
  --line: #22262d;
  --line-strong: #333a44;
  --accent: #8b9dff;
  --accent-soft: #1a2033;
  --lime: #c8f04a;
  --code-bg: #06070a;
  --code-ink: #dfe3ea;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -24px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.75;
  letter-spacing: 0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color 0.35s ease, color 0.35s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--lime); color: #101014; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 34px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand .mark {
  width: 22px; height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.brand .en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  transform: translateY(1px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav a {
  position: relative;
  color: var(--ink-2);
  padding: 4px 0;
  transition: color 0.2s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 0;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }

.tools { display: flex; align-items: center; gap: 8px; margin-left: 4px; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.icon-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.icon-btn svg { width: 15px; height: 15px; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }

/* ---------- hero ---------- */
.hero {
  padding: 78px 0 56px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 75% 20%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 75% 20%, #000 0%, transparent 75%);
  pointer-events: none;
}

.hero .wrap { position: relative; }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
}
.kicker::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 6.2vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 0 0 26px;
  max-width: 17em;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero p.lede {
  font-size: clamp(16px, 2vw, 18.5px);
  color: var(--ink-2);
  max-width: 34em;
  margin: 0 0 34px;
}

.hero .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  max-width: 640px;
}
.hero .stats div { min-width: 92px; }
.hero .stats b {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.hero .stats span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- section head ---------- */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 54px 0 26px;
}
.sec-head h2 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}
.sec-head .more {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.sec-head .more:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- featured ---------- */
.featured {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(20,20,26,.05), 0 22px 48px -26px rgba(20,20,26,.35); }

.featured .body { padding: 44px 42px; display: flex; flex-direction: column; }
.featured .tagline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 22px;
}
.badge {
  background: var(--lime);
  color: #101014;
  padding: 3px 8px;
  border-radius: 2px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.featured h3 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.24;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 18px;
}
.featured p {
  color: var(--ink-2);
  font-size: 15.5px;
  margin: 0 0 28px;
  flex: 1;
}
.byline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.readmore {
  margin-left: auto;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.readmore svg { width: 13px; height: 13px; transition: transform 0.25s; }
.featured:hover .readmore svg, .row:hover .readmore svg { transform: translateX(4px); }

.art {
  position: relative;
  min-height: 340px;
  background: var(--bg-alt);
  border-left: 1px solid var(--line);
  overflow: hidden;
}
.art i { position: absolute; display: block; }
.art .g1 {
  inset: 0;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 62%),
    radial-gradient(circle at 74% 68%, color-mix(in srgb, var(--lime) 55%, transparent), transparent 58%),
    radial-gradient(circle at 66% 22%, #ff6b3d33, transparent 55%);
  filter: blur(6px);
}
.art .g2 {
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.8;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 20%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, #000 20%, transparent 72%);
}
.art .ring {
  width: 210px; height: 210px;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 26s linear infinite;
}
.art .ring::before {
  content: "";
  position: absolute;
  top: -4px; left: 50%;
  width: 7px; height: 7px;
  background: var(--ink);
  border-radius: 50%;
  transform: translateX(-50%);
}
.art .ring2 {
  width: 120px; height: 120px;
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 18s;
}
.art .mono-label {
  position: absolute;
  bottom: 18px; left: 20px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ---------- toolbar: search + chips ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 8px 0 4px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.search {
  position: relative;
  margin-left: auto;
  min-width: 210px;
}
.search svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--ink-3);
  pointer-events: none;
}
.search input {
  width: 100%;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 8px 14px 8px 34px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- post rows ---------- */
.postlist { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 26px;
  align-items: start;
  padding: 28px 10px 28px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s, padding-left 0.25s;
  position: relative;
}
.row:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); padding-left: 10px; }
.row .date {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  padding-top: 6px;
  line-height: 1.5;
}
.row .date b { display: block; color: var(--ink-2); font-weight: 500; }
.row h3 {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.32;
  letter-spacing: -0.012em;
  font-weight: 600;
  margin: 0 0 8px;
  transition: color 0.2s;
}
.row:hover h3 { color: var(--accent); }
.row p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 62ch;
}
.row .metas {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.row .cat { color: var(--accent); }
.row .readmore { padding-top: 6px; font-size: 11.5px; }

.empty {
  padding: 60px 0;
  text-align: center;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

/* ---------- newsletter ---------- */
.subscribe {
  margin: 70px 0 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 46px 42px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.subscribe::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 68%);
  pointer-events: none;
}
.subscribe h3 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.subscribe p { margin: 0; color: var(--ink-2); font-size: 14.5px; max-width: 34em; }
.subform { display: flex; gap: 8px; }
.subform input {
  flex: 1;
  font-family: var(--sans);
  font-size: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 3px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.subform input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 12px 22px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s;
}
.btn:hover { opacity: 0.86; transform: translateY(-1px); }
.formnote {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-top: 10px;
  min-height: 16px;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  background: var(--bg-alt);
}
.site-footer .grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer .brand { font-size: 17px; margin-bottom: 12px; }
.site-footer p { margin: 0; color: var(--ink-3); font-size: 13px; max-width: 30em; }
.foot-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.foot-cols h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 12px;
  font-weight: 500;
}
.foot-cols a { display: block; font-size: 13.5px; color: var(--ink-2); padding: 4px 0; transition: color 0.2s; }
.foot-cols a:hover { color: var(--accent); }
.colophon {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* ---------- article ---------- */
.post-head { padding: 56px 0 34px; border-bottom: 1px solid var(--line); }
.post-head .kicker { margin-bottom: 18px; }
.post-head h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.6vw, 50px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 22px;
  max-width: 20em;
}
.post-head .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.post-head .meta .sep { color: var(--line-strong); }

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 68px;
  padding: 46px 0 0;
  align-items: start;
}

.prose { max-width: 68ch; }
.prose > *:first-child { margin-top: 0; }
.prose p {
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
}
.prose h2 {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 600;
  margin: 52px 0 18px;
  padding-top: 8px;
  scroll-margin-top: 90px;
}
.prose h2::before {
  content: "§";
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-right: 10px;
  vertical-align: 3px;
  font-weight: 400;
}
.prose h3 {
  font-family: var(--sans);
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  margin: 34px 0 12px;
  scroll-margin-top: 90px;
}
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 22px; }
.prose li { margin: 8px 0; line-height: 1.8; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 600; }
.prose a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  transition: border-color 0.2s, background 0.2s;
}
.prose a:hover { border-color: var(--accent); background: var(--accent-soft); }
.prose blockquote {
  margin: 30px 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
}
.prose blockquote p { font-size: inherit; color: inherit; margin-bottom: 10px; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 42px 0; }
.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--ink);
}
.prose pre {
  position: relative;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--radius);
  padding: 20px 22px;
  overflow-x: auto;
  margin: 0 0 24px;
  font-size: 13.5px;
  line-height: 1.7;
  border: 1px solid var(--line);
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 13.5px;
}
.prose pre .lang {
  position: absolute;
  top: 10px; right: 12px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7c8290;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 14.5px;
}
.prose th, .prose td {
  border-bottom: 1px solid var(--line);
  padding: 11px 14px 11px 0;
  text-align: left;
}
.prose th {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line-strong);
}
.prose figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }

/* toc */
.toc {
  position: sticky;
  top: 96px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.toc h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
  font-weight: 500;
}
.toc a {
  display: block;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-3);
  padding: 5px 0;
  transition: color 0.2s, padding-left 0.2s;
  border-left: 2px solid transparent;
  margin-left: -22px;
  padding-left: 20px;
}
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--accent); font-weight: 500; }

.post-end {
  margin-top: 58px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.post-end .label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 6px;
}
.tagpill {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 4px 10px;
  border-radius: 100px;
}

.postnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 56px;
  border-radius: var(--radius);
  overflow: hidden;
}
.postnav a {
  background: var(--surface);
  padding: 26px 28px;
  transition: background 0.25s;
}
.postnav a:hover { background: var(--bg-alt); }
.postnav .dir {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 8px;
}
.postnav h4 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}
.postnav .next { text-align: right; }
.postnav a.disabled { pointer-events: none; opacity: 0.4; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 34px;
  transition: color 0.2s;
}
.back:hover { color: var(--accent); }
.back svg { width: 13px; height: 13px; }

/* about */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 70px;
  padding: 46px 0 0;
}
.facts { border-top: 1px solid var(--line-strong); padding-top: 6px; }
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.facts span { color: var(--ink-3); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 3px; }

/* ---------- reveal ---------- */
/* content is visible by default; only hidden once JS has confirmed it can animate */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .post-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .subscribe { grid-template-columns: 1fr; gap: 24px; padding: 34px 26px; }
  .featured { grid-template-columns: 1fr; }
  .art { min-height: 220px; border-left: 0; border-top: 1px solid var(--line); }
  .featured .body { padding: 32px 28px; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  body { font-size: 16px; }
  .site-header .wrap { height: 60px; gap: 14px; }
  .nav { gap: 16px; font-size: 13px; }
  .nav a:first-child { display: none; }
  .brand .en { display: none; }
  .hero { padding: 52px 0 40px; }
  .hero .stats { gap: 20px 22px; }
  .hero .stats div { min-width: 0; flex: 1 1 38%; }
  .hero .stats b { font-size: 22px; }
  .row { grid-template-columns: 1fr; gap: 10px; padding: 22px 0; }
  .row .date { padding-top: 0; }
  .row .date b { display: inline; margin-right: 8px; }
  .row .readmore { display: none; }
  .search { margin-left: 0; width: 100%; }
  .subscribe { padding: 28px 20px; }
  .subform { flex-direction: column; }
  .postnav { grid-template-columns: 1fr; }
  .postnav .next { text-align: left; }
  .prose p { font-size: 16.5px; }
  .foot-cols { gap: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
