/* =========================================================
   Venusleeyous — a quiet little blog
   ========================================================= */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, "Courier New", monospace;

  --bg: #f6f3ee;
  --bg-rgb: 246, 243, 238;
  --bg-alt: #eee8df;
  --surface: #fffdf9;
  --surface-2: #faf6ef;
  --text: #1d1a16;
  --text-soft: #3d3830;
  --muted: #71695e;
  --faint: #9a9184;
  --line: #e3dbcf;
  --line-strong: #cfc5b6;
  --accent: #bf5129;
  --accent-hover: #9f3f1c;
  --accent-soft: #f7e4d9;
  --accent-soft-2: rgba(191, 81, 41, .12);
  --ink: #14171c;
  --ink-soft: #1c2027;
  --cream: #f5efe6;
  --shadow: 0 24px 60px -28px rgba(48, 38, 26, .3);
  --shadow-sm: 0 10px 30px -18px rgba(48, 38, 26, .25);
  --radius: 18px;
  --radius-lg: 24px;
  --header-h: 72px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="dark"] {
  --bg: #0f1115;
  --bg-rgb: 15, 17, 21;
  --bg-alt: #14171c;
  --surface: #171a20;
  --surface-2: #1b1f26;
  --text: #ede8e0;
  --text-soft: #d4cdc2;
  --muted: #a49b8e;
  --faint: #7d756a;
  --line: #282c34;
  --line-strong: #3a3f49;
  --accent: #e58457;
  --accent-hover: #f09a70;
  --accent-soft: rgba(229, 132, 87, .13);
  --accent-soft-2: rgba(229, 132, 87, .18);
  --ink: #0a0c0f;
  --ink-soft: #12151a;
  --cream: #f5efe6;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .65);
  --shadow-sm: 0 10px 30px -18px rgba(0, 0, 0, .5);
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}

body.is-locked { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

h1, h2, h3, h4, h5, p, dl, dd, blockquote, figure { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

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

.container {
  width: min(1200px, calc(100% - 80px));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: 10px; left: 50%;
  transform: translate(-50%, -160%);
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 14px;
  transition: transform .25s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

.icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  vertical-align: -0.14em;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section { padding: 96px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 700;
}

.section-head-sm { margin-bottom: 28px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }
.text-link .icon { transition: transform .2s var(--ease); }
.text-link:hover .icon { transform: translateX(4px); }

/* ---------- buttons & chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn .icon { transition: transform .2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(191, 81, 41, .8);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost-light {
  border-color: rgba(255, 255, 255, .38);
  color: #fff;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(6px);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .6); }

.btn-sm { padding: 9px 16px; font-size: 13px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: .02em;
  line-height: 1.5;
  transition: color .2s, border-color .2s, background-color .2s;
}
a.chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.chip-solid {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
  font-weight: 600;
}

.chip-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 13px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  transition: all .2s var(--ease);
}
.chip-btn span { font-size: 11px; color: var(--faint); }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.chip-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}
.chip-btn.is-active span { color: rgba(245, 239, 230, .6); }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(16, 19, 24, .92);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
}
.site-header--solid {
  background: rgba(16, 19, 24, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header--overlay {
  background: transparent;
  border-bottom-color: transparent;
}
.site-header--overlay.is-scrolled {
  background: rgba(16, 19, 24, .86);
  border-bottom-color: rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand-mark {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 0 0 4px rgba(229, 132, 87, .14);
}
.brand-mark .icon { width: 16px; height: 16px; }
.brand-accent { color: #e8936b; font-style: italic; }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  color: rgba(245, 239, 230, .68);
  border-radius: 999px;
  transition: color .2s, background-color .2s;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-link.is-active { color: #fff; }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(245, 239, 230, .78);
  transition: background-color .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.search-open {
  width: auto;
  padding: 0 12px;
  border-color: rgba(255, 255, 255, .14);
}
.search-btn-label { font-size: 13px; }
.search-open kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .1);
  color: rgba(245, 239, 230, .6);
  letter-spacing: .04em;
}

.theme-toggle .icon-sun, .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.menu-toggle { display: none; }

/* ---------- drawer ---------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  visibility: hidden;
  pointer-events: none;
}
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 13, .55);
  opacity: 0;
  transition: opacity .3s;
  backdrop-filter: blur(3px);
}
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(340px, 88vw);
  background: var(--ink);
  color: var(--cream);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform .35s var(--ease);
  overflow-y: auto;
}
.drawer.is-open .drawer-panel { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.drawer-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, .5);
}
.drawer-nav { display: grid; padding: 18px 0; }
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-radius: 10px;
  font-size: 15px;
  color: rgba(245, 239, 230, .78);
  transition: background-color .2s, color .2s;
}
.drawer-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.drawer-nav a.is-active { color: #e8936b; background: rgba(232, 147, 107, .1); }
.drawer-nav a .icon:last-child {
  margin-left: auto;
  width: 14px; height: 14px;
  opacity: .35;
}
.drawer-nav a .icon:first-child { opacity: .8; }
.drawer-foot {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.drawer-foot .btn { flex: 1; border-color: rgba(255, 255, 255, .2); color: var(--cream); }
.drawer-foot .btn:hover { border-color: var(--accent); color: #e8936b; }

/* ---------- search ---------- */

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10vh 20px 40px;
}
.search-modal[hidden] { display: none; }
.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 13, .62);
  backdrop-filter: blur(6px);
  animation: fadeIn .2s ease both;
}
.search-panel {
  position: relative;
  width: min(680px, 100%);
  max-height: 74vh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: searchIn .28s var(--ease) both;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 17px;
  color: var(--text);
}
.search-bar input::placeholder { color: var(--faint); }
.search-esc {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 6px;
  padding: 3px 7px;
  font-family: var(--font-mono);
  font-size: 10px;
}
.search-results { overflow-y: auto; padding: 10px; }
.search-hint {
  padding: 26px 12px;
  text-align: center;
  color: var(--faint);
  font-size: 14px;
}
.search-result {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  transition: background-color .16s;
}
.search-result:hover, .search-result.is-selected { background: var(--surface-2); }
.search-result img {
  width: 62px; height: 46px;
  object-fit: cover;
  border-radius: 8px;
}
.search-result-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result-meta {
  font-size: 11.5px;
  color: var(--faint);
  margin-top: 4px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.search-result-meta span { color: var(--accent); }
.search-empty { padding: 34px 12px; text-align: center; color: var(--faint); font-size: 14px; }
.search-footnote {
  padding: 9px 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--faint);
  display: flex;
  gap: 16px;
}
.search-footnote kbd {
  font-family: var(--font-mono);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  margin-right: 4px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: clamp(680px, 94svh, 940px);
  display: flex;
  align-items: center;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: -2%;
  background-size: cover;
  background-position: center 62%;
  transform: scale(1.03);
  animation: heroZoom 18s ease-out both;
  z-index: -3;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, .58) 0%, rgba(8, 10, 14, .18) 34%, rgba(8, 10, 14, .82) 100%),
    linear-gradient(92deg, rgba(8, 10, 14, .72) 0%, rgba(8, 10, 14, .25) 55%, rgba(8, 10, 14, .1) 100%);
  z-index: -2;
}
.hero-grain {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: radial-gradient(rgba(255, 255, 255, .55) .6px, transparent .6px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
  z-index: -1;
  pointer-events: none;
}
.hero-inner {
  padding-top: calc(var(--header-h) + 44px);
  padding-bottom: 120px;
  max-width: 1200px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, .7);
  margin-bottom: 30px;
}
.hero-eyebrow span {
  width: 44px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 11.5vw, 9.4rem);
  line-height: .88;
  font-weight: 400;
  letter-spacing: -.045em;
  margin-left: -.04em;
}
.hero-title span {
  font-style: italic;
  color: #f0ac86;
}
.hero-quote {
  margin-top: 34px;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: #f3d9c8;
  letter-spacing: .04em;
}
.hero-intro {
  margin-top: 16px;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(245, 239, 230, .74);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero-stats {
  display: flex;
  gap: clamp(28px, 5vw, 56px);
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid rgba(245, 239, 230, .18);
  max-width: 560px;
}
.hero-stats dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, .5);
  margin-bottom: 4px;
}
.hero-stats dd {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1;
}
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, .5);
  transition: color .2s;
}
.hero-scroll:hover { color: #fff; }
.scroll-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(rgba(245, 239, 230, .7), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  top: -42px; left: 0;
  width: 1px; height: 42px;
  background: var(--accent);
  animation: scrollDown 2.4s ease-in-out infinite;
}

/* ---------- recent / cards ---------- */

.section-recent { padding-top: 110px; }

.featured-card {
  display: grid;
  grid-template-columns: 1.18fr .82fr;
  min-height: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.featured-media {
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.featured-media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.featured-card:hover .featured-media img { transform: scale(1.045); }
.featured-badge {
  position: absolute;
  top: 22px; left: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .1em;
  color: #fff;
  background: rgba(14, 18, 24, .55);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px);
}
.featured-body {
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-body .card-meta { margin-bottom: 20px; }
.featured-body h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.35;
  letter-spacing: -.015em;
  margin-bottom: 16px;
  transition: color .2s;
}
.featured-card:hover .featured-body h3 { color: var(--accent); }
.featured-body > p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--faint);
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
}
.read-more .icon { transition: transform .25s var(--ease); }
.featured-card:hover .read-more .icon { transform: translateX(5px); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.home-grid { margin-top: 28px; }

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.post-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
}
.post-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.post-card:hover .post-card-media img { transform: scale(1.05); }
.post-card-cover-tag {
  position: absolute;
  left: 14px; bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: .06em;
  color: #fff;
  background: rgba(14, 18, 24, .5);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(6px);
}
.post-card-body {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--faint);
}
.card-meta time { font-family: var(--font-mono); letter-spacing: .02em; }
.post-card-title {
  font-size: 19px;
  line-height: 1.5;
  font-weight: 650;
  letter-spacing: -.01em;
  margin: 13px 0 10px;
}
.post-card-title a { transition: color .2s; }
.post-card-title a:hover { color: var(--accent); }
.post-card-excerpt {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--faint);
}
.card-foot > span { display: inline-flex; align-items: center; gap: 5px; }
.card-arrow {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  justify-content: center;
  color: var(--muted);
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.post-card:hover .card-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateX(2px);
}
.section-more { display: flex; justify-content: center; margin-top: 44px; }

/* ---------- about band ---------- */

.about-band {
  margin-top: 20px;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.about-band::before {
  content: "";
  position: absolute;
  right: -10%; top: -60%;
  width: 560px; height: 560px;
  background: radial-gradient(circle, var(--accent-soft-2), transparent 68%);
  pointer-events: none;
}
.about-band-inner {
  position: relative;
  display: grid;
  grid-template-columns: 148px 1fr auto;
  gap: 44px;
  align-items: center;
  padding: 74px 0;
}
.about-band-avatar img {
  width: 148px; height: 148px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 9px var(--surface);
}
.about-band-text h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.about-band-text > p {
  color: var(--muted);
  max-width: 560px;
  font-size: 14.5px;
  line-height: 1.9;
}
.about-band-quote {
  font-family: var(--font-serif) !important;
  color: var(--text) !important;
  font-size: 15px !important;
  margin-top: 14px;
  letter-spacing: .04em;
}
.about-band-links { display: flex; gap: 24px; margin-top: 20px; }
.about-band-stats {
  display: grid;
  gap: 18px;
  padding-left: 44px;
  border-left: 1px solid var(--line-strong);
}
.about-band-stats dt {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--faint);
}
.about-band-stats dd {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.1;
  margin-top: 2px;
}

/* ---------- topics ---------- */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.topic-card {
  position: relative;
  padding: 26px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 200px;
  overflow: hidden;
  transition: transform .3s var(--ease), background-color .3s, border-color .3s, color .3s;
}
.topic-card:hover {
  transform: translateY(-4px);
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}
.topic-index {
  position: absolute;
  top: 20px; right: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  letter-spacing: .1em;
}
.topic-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: auto;
}
.topic-card h3 {
  font-size: 20px;
  font-weight: 650;
  margin-top: 26px;
  letter-spacing: -.01em;
}
.topic-card p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.topic-card:hover p { color: rgba(245, 239, 230, .55); }
.topic-arrow {
  position: absolute;
  bottom: 20px; right: 20px;
  color: var(--faint);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity .25s, transform .25s;
}
.topic-card:hover .topic-arrow { opacity: 1; transform: translate(0, 0); color: #e8936b; }

/* ---------- quote band ---------- */

.quote-band {
  background: linear-gradient(135deg, #7f3419 0%, #a8461f 55%, #bf5b2e 100%);
  color: #fbeee5;
  padding: 84px 0;
}
[data-theme="dark"] .quote-band { background: linear-gradient(135deg, #54200f 0%, #7d3015 55%, #943a1b 100%); }
.quote-band-inner {
  position: relative;
  text-align: center;
  max-width: 820px;
}
.quote-mark {
  font-family: var(--font-serif);
  font-size: 110px;
  line-height: .6;
  color: rgba(255, 255, 255, .22);
  margin-bottom: 8px;
}
.quote-band blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  line-height: 1.55;
  letter-spacing: .05em;
}
.quote-cite {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}

/* ---------- page hero ---------- */

.page-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 90px) 0 70px;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
  transform: scale(1.02);
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 12, 16, .72) 0%, rgba(10, 12, 16, .46) 45%, rgba(10, 12, 16, .9) 100%),
    linear-gradient(90deg, rgba(10, 12, 16, .7), rgba(10, 12, 16, .15));
  z-index: -1;
}
.page-hero-inner { width: min(1200px, calc(100% - 80px)); }
.page-hero .eyebrow { color: #f0ac86; }
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -.03em;
}
.page-hero-desc {
  margin-top: 18px;
  font-size: 15px;
  color: rgba(245, 239, 230, .72);
  max-width: 560px;
  line-height: 1.8;
}

/* ---------- article list ---------- */

.section-list { padding-top: 64px; }

.list-toolbar {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.list-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--faint);
  min-width: 220px;
}
.list-search input {
  border: 0; background: transparent; outline: none;
  font-size: 13px; width: 100%; color: var(--text);
}
.list-search input::placeholder { color: var(--faint); }
.list-status {
  margin-top: 16px;
  min-height: 18px;
  font-size: 12.5px;
  color: var(--faint);
}
.list-status strong { color: var(--accent); font-weight: 600; }
.list-status button {
  border: 0; background: none; padding: 0; margin-left: 6px;
  color: var(--muted); text-decoration: underline;
}
.empty-state {
  padding: 60px 0;
  text-align: center;
  color: var(--faint);
  font-size: 14px;
}

/* ---------- archives ---------- */

.archive-wrap { max-width: 880px; margin-inline: auto; }
.archive-year { margin-bottom: 58px; }
.archive-year-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 8px;
}
.archive-year-head h2 {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
}
.archive-year-head span { font-size: 12px; color: var(--faint); }
.archive-month { margin-top: 26px; }
.archive-month h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
}
.archive-item {
  display: grid;
  grid-template-columns: 66px 1fr auto 20px;
  align-items: center;
  gap: 16px;
  padding: 15px 8px;
  border-bottom: 1px solid var(--line);
  transition: background-color .2s, padding-left .2s;
}
.archive-item:hover { background: var(--surface); padding-left: 14px; }
.archive-item time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--faint);
}
.archive-item time span { color: var(--line-strong); }
.archive-title { font-size: 15px; font-weight: 550; transition: color .2s; }
.archive-item:hover .archive-title { color: var(--accent); }
.archive-cat {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 2px 9px;
  border-radius: 999px;
}
.archive-arrow { color: var(--faint); opacity: 0; transition: opacity .2s, transform .2s; }
.archive-item:hover .archive-arrow { opacity: 1; transform: translateX(3px); }

/* ---------- categories page ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.category-card {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: border-color .25s, transform .3s var(--ease), box-shadow .3s;
}
.category-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.category-num { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.category-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.category-card h2 { font-size: 25px; letter-spacing: -.01em; }
.category-card h2 a:hover { color: var(--accent); }
.category-desc { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.category-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  margin-top: 14px;
}
.category-posts {
  margin: 18px 0 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.category-posts li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 8px;
}
.category-posts li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}
.category-posts a { font-size: 13.5px; color: var(--text-soft); }
.category-posts a:hover { color: var(--accent); }
.category-card .text-link { margin-top: auto; align-self: flex-start; }

/* ---------- tags page ---------- */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 48px;
  max-width: 900px;
  margin-inline: auto;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-soft);
  background: var(--surface-2);
  transition: all .2s;
}
.tag-pill span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tag-pill.size-2 { font-size: 14px; }
.tag-pill.size-3 { font-size: 16px; font-weight: 600; }

.tag-groups { display: grid; gap: 34px; max-width: 900px; margin-inline: auto; }
.tag-group {
  padding: 28px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tag-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.tag-group-head h2 { font-size: 21px; color: var(--accent); }
.tag-group-head span { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.tag-post-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  transition: color .2s;
}
.tag-post-list li:last-child a { border-bottom: 0; }
.tag-post-list time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  flex: none;
}
.tag-post-list a span { flex: 1; }
.tag-post-list a .icon { width: 14px; height: 14px; color: var(--faint); transition: transform .2s; }
.tag-post-list a:hover { color: var(--accent); }
.tag-post-list a:hover .icon { transform: translateX(3px); }

/* ---------- about page ---------- */

.about-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: start;
}
.profile-card {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 34px 28px 28px;
  text-align: center;
  overflow: hidden;
}
.profile-card::before {
  content: "";
  position: absolute;
  top: -80px; right: -80px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 132, 87, .3), transparent 70%);
}
.profile-avatar { position: relative; display: inline-block; margin-bottom: 18px; }
.profile-avatar img {
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(245, 239, 230, .25);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .05);
}
.profile-card h2 { font-size: 24px; font-family: var(--font-serif); font-weight: 400; }
.profile-role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #e8936b;
  margin-top: 7px;
}
.profile-bio { font-size: 13.5px; color: rgba(245, 239, 230, .62); margin-top: 12px; }
.profile-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: 12px;
  color: rgba(245, 239, 230, .82);
  transition: all .2s;
}
.profile-links a:hover { border-color: var(--accent); color: #f0ac86; }
.profile-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.profile-stats dt {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, .45);
}
.profile-stats dd {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-top: 2px;
}

.about-main { min-width: 0; }
.about-prose { max-width: 720px; }
.about-prose h5 {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.prose.about-prose h5 code { background: none; border: 0; color: inherit; padding: 0; }
.about-prose h2 { margin-top: 2.4em; }
.about-prose > p:first-of-type { font-size: 18px; }

.about-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 42px;
  padding: 28px 30px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--line);
}
.about-cta h3 { font-size: 19px; }
.about-cta p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* ---------- links page ---------- */

.link-group { margin-bottom: 64px; }
.link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.link-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.link-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.link-avatar {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 16px;
  overflow: hidden;
  flex: none;
  background: linear-gradient(135deg, var(--accent), #e0a06a);
  display: grid;
  place-items: center;
}
.link-avatar img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--surface);
}
.link-initial {
  font-family: var(--font-serif);
  font-size: 22px;
  color: #fff;
}
.link-info { display: flex; flex-direction: column; min-width: 0; }
.link-name {
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.link-name .icon { width: 12px; height: 12px; color: var(--faint); }
.link-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.link-url {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--faint);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-apply {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 38px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.link-apply h2 { font-size: 26px; margin-bottom: 10px; }
.link-apply p { font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.link-apply .btn { justify-self: start; grid-column: 1; margin-top: -8px; }
.apply-code { margin: 0; grid-row: span 2; }
.apply-code pre { font-size: 12.5px; line-height: 1.9; }

/* ---------- message page ---------- */

.message-wrap { max-width: 680px; }
.message-card {
  text-align: center;
  padding: 54px 40px 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.message-icon {
  width: 58px; height: 58px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 22px;
}
.message-icon .icon { width: 24px; height: 24px; }
.message-card h2 { font-size: 28px; letter-spacing: -.01em; }
.message-card > p {
  color: var(--muted);
  max-width: 420px;
  margin: 12px auto 0;
  font-size: 14px;
  line-height: 1.9;
}
.message-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.message-mail {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  color: var(--faint) !important;
  margin-top: 22px !important;
}
.message-note {
  margin-top: 22px;
  text-align: center;
}
.message-note p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--faint);
}

/* ---------- post page ---------- */

.post-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 100px) 0 64px;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}
.post-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
  transform: scale(1.02);
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 11, 15, .7) 0%, rgba(9, 11, 15, .42) 40%, rgba(9, 11, 15, .94) 100%),
    linear-gradient(90deg, rgba(9, 11, 15, .65), rgba(9, 11, 15, .08));
  z-index: -1;
}
.post-hero-inner { width: min(1120px, calc(100% - 80px)); }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: rgba(245, 239, 230, .55);
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: #fff; }
.breadcrumb .icon { width: 12px; height: 12px; opacity: .5; }
.breadcrumb span { color: rgba(245, 239, 230, .4); }
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: rgba(245, 239, 230, .6);
  margin-bottom: 20px;
}
.post-hero-meta time { font-family: var(--font-mono); }
.post-hero-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.post-title {
  font-size: clamp(2rem, 4.6vw, 3.7rem);
  line-height: 1.28;
  letter-spacing: -.02em;
  font-weight: 700;
  max-width: 960px;
  text-wrap: balance;
}
.post-hero-excerpt {
  margin-top: 20px;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(245, 239, 230, .68);
}

.reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 100;
  background: transparent;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e8936b, var(--accent));
  box-shadow: 0 0 12px rgba(232, 147, 107, .5);
  transition: width .1s linear;
}

.post-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 64px;
  padding-top: 68px;
  padding-bottom: 90px;
  align-items: start;
}
.post-main { min-width: 0; max-width: 780px; }

.toc-mobile { display: none; }
.toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  margin-bottom: 30px;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile[open] summary { border-radius: 12px 12px 0 0; border-bottom-color: transparent; }
.toc-mobile .toc-nav { padding: 12px 18px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; background: var(--surface); margin-bottom: 30px; }

.post-side {
  position: sticky;
  top: calc(var(--header-h) + 30px);
  display: grid;
  gap: 20px;
}
.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.side-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.toc-nav { display: grid; gap: 2px; }
.toc-nav a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  transition: color .2s, border-color .2s, padding-left .2s;
}
.toc-nav a:hover { color: var(--accent); }
.toc-nav a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  padding-left: 16px;
  font-weight: 600;
}
.toc-nav a.level-3 { padding-left: 24px; font-size: 12px; }
.toc-nav a.level-3.is-active { padding-left: 28px; }

.side-author { text-align: center; }
.side-author img {
  width: 62px; height: 62px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
}
.side-author-name { font-family: var(--font-serif); font-size: 18px; }
.side-author-bio { font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.side-author-stats {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 14px 0 16px;
  font-size: 10.5px;
  color: var(--muted);
}
.side-author .btn { width: 100%; }

/* ---------- prose ---------- */

.prose {
  font-size: 17px;
  line-height: 1.95;
  color: var(--text-soft);
  overflow-wrap: break-word;
}
.prose > * + * { margin-top: 1.15em; }
.prose p { margin-bottom: 1.15em; }
.prose > p:first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4, .prose h5 {
  color: var(--text);
  line-height: 1.35;
  font-weight: 700;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h2 {
  font-size: 1.65rem;
  letter-spacing: -.015em;
  margin: 2.6em 0 .8em;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
}
.prose h3 {
  font-size: 1.24rem;
  margin: 2em 0 .65em;
}
.prose h4 { font-size: 1.08rem; margin: 1.7em 0 .5em; }
.prose h5 { font-size: 1rem; margin: 1.5em 0 .4em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0; }
.prose > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-soft-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}
.prose a:hover { text-decoration-color: var(--accent); }

.prose strong { color: var(--text); font-weight: 650; }

.prose ul, .prose ol {
  padding-left: 1.4em;
  margin-bottom: 1.15em;
}
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: .45em 0; }
.prose li::marker { color: var(--accent); }

.prose blockquote {
  padding: 18px 24px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 12px 12px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
  margin: 1.6em 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote code { background: transparent; border: 0; padding: 0; color: var(--text-soft); }

.prose :not(pre) > code {
  font-family: var(--font-mono);
  font-size: .86em;
  padding: .16em .42em;
  border-radius: 5px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  color: var(--accent);
  white-space: break-spaces;
}

.prose hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 3em 0;
}

.prose img { border-radius: 12px; margin: 1.5em auto; }

.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--surface-2); }

/* code blocks */

.code-block {
  margin: 1.8em 0;
  border-radius: 14px;
  overflow: hidden;
  background: #14181f;
  border: 1px solid #252b35;
  box-shadow: 0 14px 34px -24px rgba(0, 0, 0, .7);
}
.code-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  background: #191e26;
  border-bottom: 1px solid #262c36;
}
.code-lang {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #7f8b9c;
}
.code-copy {
  border: 1px solid #2e3541;
  background: transparent;
  color: #8b97a8;
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 5px;
  transition: all .2s;
  font-family: var(--font-sans);
}
.code-copy:hover { color: #e9e4da; border-color: #4a5363; }
.code-copy.is-copied { color: #9ccf8b; border-color: #3d5537; }
.code-block pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.72;
  color: #d6d1c7;
  tab-size: 4;
}
.code-block code { font-family: inherit; }
.code-block .line { display: inline; }
.code-block pre::-webkit-scrollbar { height: 8px; }
.code-block pre::-webkit-scrollbar-thumb { background: #333b47; border-radius: 4px; }

.hljs-comment, .hljs-quote { color: #7f8b9c; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal { color: #f08d68; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute { color: #a8c98a; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #e0c07a; }
.hljs-built_in, .hljs-type, .hljs-class .hljs-title { color: #8fb8d8; }
.hljs-title, .hljs-section, .hljs-function .hljs-title { color: #e6c07b; }
.hljs-params, .hljs-subst { color: #d6d1c7; }
.hljs-variable, .hljs-template-variable { color: #c3a6ff; }
.hljs-meta { color: #9aacbb; }
.hljs-operator { color: #c9c3b8; }
.hljs-tag, .hljs-name { color: #f08d68; }
.hljs-attr { color: #e0c07a; }
.hljs-deletion { color: #e07a7a; }

/* tabs */

.tabs {
  margin: 1.8em 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}
.nav-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 10px 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.nav-tabs .tab { list-style: none; }
.nav-tabs .tab button {
  border: 0;
  background: transparent;
  padding: 8px 14px 10px;
  font-size: 13px;
  color: var(--muted);
  border-radius: 8px 8px 0 0;
  position: relative;
  transition: color .2s;
}
.nav-tabs .tab button:hover { color: var(--text); }
.nav-tabs .tab.active button { color: var(--accent); background: var(--surface); font-weight: 600; }
.nav-tabs .tab.active button::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.tab-contents { padding: 4px 20px; }
.tab-item-content { display: none; }
.tab-item-content.active { display: block; animation: fadeIn .25s ease both; }
.tab-contents > .tab-item-content > :first-child { margin-top: 16px; }
.tab-contents > .tab-item-content > :last-child { margin-bottom: 16px; }
.tab-to-top { display: none; }

/* post footer pieces */

.post-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.post-tags-inner { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-link {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 999px;
  transition: all .2s;
}
.tag-link:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.post-copyright {
  margin-top: 30px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--muted);
}
.copyright-row {
  display: flex;
  gap: 16px;
  padding: 4px 0;
  font-size: 12.5px;
}
.copyright-row span { color: var(--faint); min-width: 64px; }
.copyright-row strong { color: var(--text-soft); font-weight: 600; }
.post-copyright p { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); line-height: 1.8; }
.post-copyright a { color: var(--accent); }

.post-author {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 32px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.post-author img {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
}
.post-author h2 { font-family: var(--font-serif); font-size: 24px; font-weight: 400; margin-bottom: 6px; }
.post-author p { font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.post-author-links { display: flex; gap: 22px; margin-top: 14px; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 34px;
}
.post-nav-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .2s, transform .25s var(--ease), box-shadow .25s;
}
.post-nav-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.post-nav-card.next { text-align: right; }
.post-nav-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.post-nav-card.next .post-nav-label { justify-content: flex-end; }
.post-nav-title { font-size: 14.5px; font-weight: 600; line-height: 1.55; }
.post-nav-card:hover .post-nav-title { color: var(--accent); }
.post-nav-date { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }

.section-related {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 80px 0 96px;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 68px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer-brand .brand { font-size: 24px; }
.footer-quote {
  font-family: var(--font-serif);
  font-size: 16px;
  color: #e8936b;
  margin-top: 20px;
  letter-spacing: .03em;
}
.footer-desc { font-size: 13px; color: rgba(245, 239, 230, .5); margin-top: 8px; max-width: 300px; }
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 12px 28px;
  align-content: start;
}
.footer-nav a {
  font-size: 13px;
  color: rgba(245, 239, 230, .62);
  transition: color .2s;
}
.footer-nav a:hover { color: #fff; }
.footer-contact { display: grid; gap: 12px; align-content: start; }
.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: rgba(245, 239, 230, .62);
  transition: color .2s;
}
.footer-contact a:hover { color: #e8936b; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 11.5px;
  color: rgba(245, 239, 230, .36);
}
.footer-beian { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-beian a { color: rgba(245, 239, 230, .5); }
.footer-beian a:hover { color: #e8936b; }

.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top .icon-btn {
  width: 44px; height: 44px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--shadow-sm);
}
.to-top .icon-btn:hover { background: var(--accent); color: #fff; }

/* ---------- 404 ---------- */

.notfound {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
  padding: calc(var(--header-h) + 40px) 20px 80px;
}
.notfound-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}
.notfound-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 14, .62), rgba(8, 10, 14, .9));
  z-index: -1;
}
.notfound-inner { max-width: 560px; }
.notfound .notfound-code {
  font-family: var(--font-serif);
  font-size: clamp(6rem, 18vw, 12rem);
  line-height: .8;
  color: rgba(245, 239, 230, .16);
  letter-spacing: -.05em;
}
.notfound h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-top: 18px; }
.notfound p { color: rgba(245, 239, 230, .65); margin-top: 12px; font-size: 14.5px; }
.notfound .hero-actions { justify-content: center; }

/* ---------- animations ---------- */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes searchIn { from { opacity: 0; transform: translateY(-12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes heroZoom { from { transform: scale(1.1); } to { transform: scale(1.03); } }
@keyframes scrollDown {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(84px); opacity: 0; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.is-revealed { animation: rise .6s var(--ease) both; }

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  .nav-desktop { gap: 0; }
  .nav-link { padding: 8px 11px; }
  .post-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .post-side { display: none; }
  .toc-mobile { display: block; }
  .post-main { width: 100%; max-width: 820px; margin-inline: auto; }
  .topic-grid { grid-template-columns: repeat(3, 1fr); }
  .about-band-inner { grid-template-columns: 128px 1fr; gap: 32px; }
  .about-band-avatar img { width: 128px; height: 128px; }
  .about-band-stats { display: none; }
}

@media (max-width: 940px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .search-btn-label, .search-open kbd { display: none; }
  .search-open { width: 38px; padding: 0; justify-content: center; }
  .container { width: calc(100% - 48px); }
  .page-hero-inner, .post-hero-inner { width: calc(100% - 48px); }
  .featured-card { grid-template-columns: 1fr; }
  .featured-media { min-height: 260px; aspect-ratio: 16 / 9; }
  .post-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .about-layout { grid-template-columns: 1fr; gap: 36px; }
  .profile-card { position: static; max-width: 420px; }
  .link-grid { grid-template-columns: 1fr; }
  .link-apply { grid-template-columns: 1fr; }
  .apply-code { grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-contact { grid-column: 1 / -1; }
  .section { padding: 76px 0; }
  .section-recent { padding-top: 84px; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 36px); }
  .page-hero-inner, .post-hero-inner { width: calc(100% - 36px); }
  .header-inner { gap: 12px; }
  .brand { font-size: 20px; }
  .brand-mark { width: 29px; height: 29px; }
  .hero { min-height: 92svh; }
  .hero-inner { padding-bottom: 92px; }
  .hero-title { font-size: clamp(3.4rem, 17vw, 5.4rem); }
  .hero-quote { margin-top: 26px; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 32px; margin-top: 40px; }
  .hero-scroll { display: none; }
  .section { padding: 62px 0; }
  .section-recent { padding-top: 68px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 30px; }
  .post-grid { grid-template-columns: 1fr; }
  .featured-media { min-height: 220px; }
  .featured-body { padding: 24px; }
  .about-band-inner { grid-template-columns: 1fr; text-align: center; padding: 54px 0; gap: 22px; }
  .about-band-avatar img { margin: 0 auto; width: 110px; height: 110px; }
  .about-band-text > p { margin-inline: auto; }
  .about-band-links { justify-content: center; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-card { min-height: 176px; padding: 22px 18px; }
  .topic-card h3 { font-size: 18px; }
  .quote-band { padding: 60px 0; }
  .quote-mark { font-size: 84px; }
  .page-hero { min-height: 340px; padding-top: calc(var(--header-h) + 64px); padding-bottom: 46px; }
  .page-hero h1 { font-size: clamp(2.4rem, 12vw, 3.4rem); }
  .filter-row { flex-direction: column; align-items: stretch; gap: 14px; }
  .filter-chips { gap: 7px; }
  .chip-btn { padding: 7px 12px; font-size: 12px; }
  .list-search { min-width: 0; }
  .archive-item { grid-template-columns: 52px 1fr 16px; gap: 10px; }
  .archive-cat { display: none; }
  .archive-title { font-size: 13.5px; }
  .archive-year-head h2 { font-size: 34px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { padding: 24px; }
  .tag-group { padding: 22px; }
  .tag-post-list time { display: none; }
  .post-hero { min-height: 460px; padding-top: calc(var(--header-h) + 80px); padding-bottom: 44px; }
  .post-title { font-size: clamp(1.65rem, 7.6vw, 2.3rem); }
  .post-hero-excerpt { font-size: 13.5px; }
  .breadcrumb { margin-bottom: 18px; }
  .post-shell { padding-top: 42px; padding-bottom: 64px; }
  .prose { font-size: 16px; line-height: 1.9; }
  .prose h2 { font-size: 1.4rem; }
  .prose h3 { font-size: 1.14rem; }
  .code-block pre { font-size: 12px; padding: 14px 16px; }
  .tab-contents { padding: 4px 14px; }
  .post-author { grid-template-columns: 1fr; gap: 16px; padding: 24px; }
  .post-author img { width: 64px; height: 64px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-card.next { text-align: left; }
  .post-nav-card.next .post-nav-label { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-contact { grid-column: auto; }
  .footer-nav { grid-template-columns: repeat(4, auto); gap: 10px 20px; }
  .footer-bottom { flex-direction: column; }
  .search-modal { padding-top: 6vh; }
  .search-panel { max-height: 80vh; }
  .search-result { grid-template-columns: 52px 1fr; }
  .search-result img { width: 52px; height: 40px; }
  .message-card { padding: 40px 24px 34px; }
  .link-apply { padding: 26px; }
  .to-top { right: 18px; bottom: 18px; }
}

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