/* ============================================================
   出海SEO情报站 — outbound SEO intelligence
   ============================================================ */

:root {
  --bg: #06070a;
  --bg-soft: #0a0d13;
  --panel: #0d1118;
  --panel-2: #11161f;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.26);
  --text: #e8eef7;
  --muted: #9aa7ba;
  --dim: #64748b;
  --accent: #22d3ee;
  --accent-2: #818cf8;
  --accent-3: #e879f9;
  --grad: linear-gradient(115deg, #22d3ee 0%, #818cf8 52%, #e879f9 100%);
  --radius: 18px;
  --radius-sm: 10px;
  --container: 1160px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 10% -10%, rgba(34, 211, 238, 0.09), transparent 62%),
    radial-gradient(820px 560px at 94% -6%, rgba(129, 140, 248, 0.09), transparent 60%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

::selection { background: rgba(34, 211, 238, 0.28); color: #eafcff; }

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

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

button { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.02em; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; }

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #080a0f; }
::-webkit-scrollbar-thumb { background: #202838; border-radius: 8px; border: 2px solid #080a0f; }
::-webkit-scrollbar-thumb:hover { background: #2c3749; }

/* ---------- utilities ---------- */

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.mono { font-family: var(--font-mono); }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
  display: inline-block;
  flex: 0 0 3px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #052028;
  background: linear-gradient(115deg, #7ce7f5, #a5b4fc 60%, #f0abfc);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 38px rgba(34, 211, 238, 0.26);
}

.btn-ghost {
  color: var(--muted);
  border-color: var(--line-strong);
  background: rgba(148, 163, 184, 0.04);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.45);
  transform: translateY(-2px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
}

.text-link span { transition: transform 0.2s ease; }
.text-link:hover span { transform: translateX(4px); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.05);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #a9b7ca;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tag:hover {
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.07);
}

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- demo banner ---------- */

.demo-banner {
  position: relative;
  z-index: 60;
  border-bottom: 1px solid rgba(34, 211, 238, 0.16);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.08), rgba(129, 140, 248, 0.07));
}

.demo-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 12.5px;
  color: #b8c6d8;
}

.demo-inner p { flex: 1; }
.demo-inner strong { color: var(--text); font-weight: 600; }

.demo-inner code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: #a5f3fc;
}

.demo-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  flex: 0 0 6px;
}

.demo-close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  font-size: 16px;
}

.demo-close:hover { color: var(--text); border-color: var(--line-strong); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 7, 10, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
  min-height: 68px;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(6, 7, 10, 0.88);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
  position: relative;
}

.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.18), rgba(129, 140, 248, 0.16));
  border: 1px solid rgba(34, 211, 238, 0.35);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #c8f7ff;
  box-shadow: inset 0 0 18px rgba(34, 211, 238, 0.1);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: -0.01em; }
.brand-text span { font-size: 10.5px; color: var(--dim); letter-spacing: 0.02em; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 6px;
}

.nav-link {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover { color: var(--text); background: rgba(148, 163, 184, 0.06); }

.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1px;
  background: var(--grad);
}

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

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.04);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.search-trigger:hover { color: var(--text); border-color: rgba(34, 211, 238, 0.35); }

.search-trigger kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--dim);
  background: rgba(0, 0, 0, 0.25);
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  place-items: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 15px;
  height: 1.5px;
  background: var(--muted);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.2px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.2px) rotate(-45deg); }

/* mobile menu overlay */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  flex-direction: column;
  padding: 0 20px 26px;
  background:
    radial-gradient(600px 420px at 92% -4%, rgba(129, 140, 248, 0.13), transparent 62%),
    radial-gradient(520px 420px at 0% 104%, rgba(34, 211, 238, 0.08), transparent 62%),
    #06070a;
  overflow-y: auto;
  animation: fade-in 0.18s ease;
}

.mobile-menu.open { display: flex; }

.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  height: 64px;
  border-bottom: 1px solid var(--line);
}

.mobile-menu-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.mobile-menu-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.mobile-menu-close:hover { color: var(--text); border-color: var(--line-strong); }

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  padding-top: 10px;
}

.mobile-menu-nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--muted);
  transition: color 0.2s ease;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a.active { color: var(--text); }

.mobile-menu-nav a.active .num { color: var(--accent); }

.mobile-menu-nav .num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.mobile-menu-nav .arrow { margin-left: auto; font-size: 1rem; color: var(--dim); }

.mobile-menu-actions { flex: 0 0 auto; margin-top: 24px; }

.mobile-menu-search {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.04);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.mobile-menu-search kbd {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--dim);
}

.mobile-menu-foot {
  margin-top: auto;
  padding-top: 40px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--dim);
}

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

.hero {
  position: relative;
  padding: 84px 0 78px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(72% 70% at 46% 30%, #000 10%, transparent 78%);
  mask-image: radial-gradient(72% 70% at 46% 30%, #000 10%, transparent 78%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -80px;
  top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.16), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: 64px;
}

.hero-copy { max-width: 620px; }

.hero .eyebrow {
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.04);
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 11.5px;
  color: var(--muted);
}

.hero .eyebrow::before { display: none; }

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.hero h1 {
  font-size: clamp(2.35rem, 4.5vw, 3.75rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
}

.hero .lead {
  margin-top: 24px;
  max-width: 52ch;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-stats {
  display: flex;
  gap: 38px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats dt { order: 2; font-size: 11.5px; color: var(--dim); letter-spacing: 0.04em; }
.hero-stats dd {
  order: 1;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 21px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero-stats dd em { font-style: normal; font-size: 12px; color: var(--dim); margin-left: 3px; }

/* code window */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.code-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 470px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(17, 22, 31, 0.96), rgba(9, 12, 18, 0.98));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(34, 211, 238, 0.04) inset;
  overflow: hidden;
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.5s ease;
}

.code-card:hover { transform: perspective(1200px) rotateY(-1deg) rotateX(0deg); }

.code-window-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.04);
}

.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #2a3242; }
.window-dots i:nth-child(1) { background: #f87171; opacity: 0.7; }
.window-dots i:nth-child(2) { background: #fbbf24; opacity: 0.7; }
.window-dots i:nth-child(3) { background: #34d399; opacity: 0.7; }

.window-title {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: 0.03em;
}

.window-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #67e8f9;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
}

.hero-code {
  margin: 0;
  padding: 20px 20px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  color: #aebdd0;
}

.hero-code code { font-family: inherit; white-space: pre; }
.c-prompt { color: #67e8f9; }
.c-accent { color: #c4b5fd; }
.c-dim { color: #526173; }
.c-cursor {
  color: #67e8f9;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.code-card-foot {
  display: flex;
  gap: 16px;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: 0.04em;
}

.code-card-foot span:last-child { margin-left: auto; color: var(--accent); }

/* ---------- sections ---------- */

.section { margin-top: 96px; }

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

.section-head .eyebrow { margin-bottom: 10px; }
.section-head h2 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); letter-spacing: -0.025em; }

/* featured */

.featured-card {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  min-height: 342px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(16, 20, 29, 0.85), rgba(9, 12, 18, 0.92));
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.featured-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(34, 211, 238, 0.06);
  transform: translateY(-3px);
}

.featured-cover {
  position: relative;
  display: block;
  min-height: 100%;
  overflow: hidden;
  background-color: #0a0f17;
}

.featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 44px;
}

.featured-title {
  margin: 18px 0 14px;
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.featured-title a { transition: color 0.2s ease; }
.featured-title a:hover { color: var(--accent); }

.featured-body .card-meta { margin-bottom: 22px; }
.featured-body .text-link { align-self: flex-start; margin-top: 6px; }

.card-excerpt {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-body .card-excerpt { margin-bottom: 20px; }

/* post grid */

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 19, 27, 0.8), rgba(9, 12, 18, 0.9));
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
  border-color: rgba(34, 211, 238, 0.28);
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.32);
}

.post-cover {
  position: relative;
  display: block;
  height: 158px;
  overflow: hidden;
  background-color: #0a0f17;
}

.post-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 24px 22px;
}

.post-title {
  margin: 12px 0 10px;
  font-size: 1.22rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.post-title a { transition: color 0.2s ease; }
.post-title a:hover { color: var(--accent); }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 20px;
}

.card-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.post-card:hover .card-arrow {
  color: #061218;
  background: var(--accent);
  border-color: var(--accent);
}

/* covers */

.cover-1 { --c1: rgba(34, 211, 238, 0.42); --c2: rgba(99, 102, 241, 0.38); }
.cover-2 { --c1: rgba(168, 85, 247, 0.38); --c2: rgba(34, 211, 238, 0.28); }
.cover-3 { --c1: rgba(52, 211, 153, 0.32); --c2: rgba(59, 130, 246, 0.36); }
.cover-4 { --c1: rgba(232, 121, 249, 0.32); --c2: rgba(129, 140, 248, 0.4); }

.post-cover,
.featured-cover {
  background-image:
    radial-gradient(115% 125% at 8% 0%, var(--c1), transparent 55%),
    radial-gradient(100% 110% at 100% 100%, var(--c2), transparent 58%);
}

.post-cover::before,
.featured-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(160deg, #000 10%, transparent 85%);
  mask-image: linear-gradient(160deg, #000 10%, transparent 85%);
}

.post-cover::after,
.featured-cover::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -90px;
  top: -110px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.028), 0 0 0 62px rgba(255, 255, 255, 0.018);
}

.cover-label {
  position: absolute;
  left: 20px;
  top: 18px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.58);
}

.cover-index {
  position: absolute;
  right: 20px;
  bottom: 8px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: clamp(2.6rem, 4.2vw, 3.6rem);
  line-height: 1;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: -0.04em;
}

.cover-badge {
  position: absolute;
  right: 18px;
  top: 16px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9fbff;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(5, 20, 27, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 3px 9px;
  border-radius: 999px;
}

/* tags cloud */

.tags-section .section-head { margin-bottom: 22px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.035);
  font-size: 13px;
  color: #b3c0d2;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.tag-chip em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--dim);
  padding-left: 9px;
  border-left: 1px solid var(--line);
  transition: color 0.2s ease;
}

.tag-chip:hover {
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(34, 211, 238, 0.06);
  transform: translateY(-2px);
}

.tag-chip:hover em { color: var(--accent-2); }

/* CTA */

.cta-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 96px;
  padding: 44px 46px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(34, 211, 238, 0.1), transparent 55%),
    radial-gradient(100% 140% at 100% 100%, rgba(129, 140, 248, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(14, 18, 26, 0.9), rgba(9, 12, 18, 0.92));
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 70%);
  mask-image: linear-gradient(90deg, #000, transparent 70%);
  pointer-events: none;
}

.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 10px; }
.cta-band p { color: var(--muted); font-size: 14.5px; max-width: 46ch; }
.cta-band .eyebrow { margin-bottom: 12px; }

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

.site-footer {
  margin-top: 110px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(8, 10, 15, 0.7));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px 40px;
  padding: 52px 0 44px;
}

.footer-brand .brand { margin-bottom: 14px; }
.footer-intro { font-size: 13px; line-height: 1.8; color: var(--dim); max-width: 42ch; }

.footer-nav {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
}

.footer-nav a { transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--accent); }

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: #4b586a;
}

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

.page-hero {
  padding: 66px 0 40px;
  border-bottom: 1px solid var(--line);
}

.page-hero .eyebrow { margin-bottom: 14px; }

.page-hero h1 {
  font-size: clamp(2.05rem, 3.8vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.page-lead {
  margin-top: 16px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.85;
}

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

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 80;
  pointer-events: none;
}

.read-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.article-page { padding-bottom: 100px; }

.article-root { max-width: 100%; }

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 40px;
  font-size: 13px;
  color: var(--dim);
  transition: color 0.2s ease;
}

.backlink:hover { color: var(--accent); }

.article-head {
  padding: 26px 0 34px;
  border-bottom: 1px solid var(--line);
}

.article-head .card-tags { margin-bottom: 20px; }

.article-title {
  max-width: 22ch;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.article-excerpt {
  max-width: 62ch;
  margin-top: 18px;
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--muted);
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--dim);
}

.meta-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.meta-btn:hover { color: var(--accent); }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 224px;
  gap: 64px;
  align-items: start;
  padding-top: 44px;
}

.prose {
  max-width: 74ch;
  min-width: 0;
  font-size: 16.5px;
  line-height: 1.95;
  color: #c9d4e3;
}

.prose > *:first-child { margin-top: 0; }

.prose h2 {
  position: relative;
  margin: 58px 0 20px;
  padding-left: 16px;
  font-size: 1.5rem;
  line-height: 1.45;
  color: var(--text);
  scroll-margin-top: 100px;
}

.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.34em;
  bottom: 0.34em;
  width: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.prose h3 {
  margin: 40px 0 14px;
  font-size: 1.18rem;
  line-height: 1.5;
  color: var(--text);
  scroll-margin-top: 100px;
}

.prose p { margin: 0 0 22px; }

.prose a {
  color: var(--accent);
  border-bottom: 1px solid rgba(34, 211, 238, 0.32);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.prose a:hover { color: #a5f3fc; border-bottom-color: #a5f3fc; }

.prose strong { color: #eef4fb; font-weight: 650; }

.prose ul,
.prose ol { margin: 0 0 24px; padding-left: 1.4em; }

.prose li { margin: 9px 0; padding-left: 4px; }
.prose li::marker { color: var(--accent); }

.prose blockquote {
  margin: 30px 0;
  padding: 20px 24px;
  border-left: 2px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.07), rgba(34, 211, 238, 0.01));
  color: #dbe6f3;
}

.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: 12px; }

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

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.16em 0.42em;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.1);
  color: #a5f3fc;
}

.prose figure { margin: 30px 0; }
.prose figure img { border: 1px solid var(--line); border-radius: 14px; }
.prose figcaption {
  margin-top: 10px;
  font-size: 12px;
  color: var(--dim);
  text-align: center;
}

/* code blocks */

.code-block {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #080b11;
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.045);
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.code-copy {
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 10.5px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.code-copy:hover { color: var(--accent); border-color: rgba(34, 211, 238, 0.3); }

.code-block pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.8;
}

.code-block pre code {
  padding: 0;
  border: 0;
  background: none;
  color: #c2d0e2;
  font-size: inherit;
}

/* toc */

.article-aside {
  position: sticky;
  top: 96px;
  padding-top: 4px;
}

.toc-label {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.toc-list { list-style: none; border-left: 1px solid var(--line); }

.toc-list li { margin: 0; }

.toc-list a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 12.5px;
  line-height: 1.6;
  color: #74839a;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.toc-list a:hover { color: var(--text); }

.toc-list a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

.toc-list .lvl-3 a { padding-left: 26px; font-size: 12px; }

.toc-top {
  margin-top: 24px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.2s ease;
}

.toc-top:hover { color: var(--accent); }

.toc-mobile { display: none; }

/* post nav */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 84px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.025);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.post-nav-item span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.post-nav-item strong { font-size: 14px; font-weight: 600; line-height: 1.55; }

a.post-nav-item:hover {
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.04);
  transform: translateY(-2px);
}

.post-nav-item.next { text-align: right; align-items: flex-end; }
.post-nav-item.is-empty { visibility: hidden; }
.post-nav.single { grid-template-columns: 1fr; }
.post-nav.single .post-nav-item { text-align: left; align-items: flex-start; }

/* not found */

.not-found {
  padding: 100px 0 80px;
  max-width: 520px;
}

.not-found h1 { margin: 10px 0 14px; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.not-found p { color: var(--muted); margin-bottom: 28px; }

/* ---------- archive ---------- */

.archive-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter-chip em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
}

.filter-chip:hover { color: var(--text); border-color: var(--line-strong); }

.filter-chip.active {
  color: #062026;
  border-color: transparent;
  background: linear-gradient(115deg, #7ce7f5, #a5b4fc);
  font-weight: 600;
}

.filter-chip.active em { color: rgba(5, 30, 38, 0.65); }

.archive-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--dim);
}

.archive-list { padding-top: 16px; }

.archive-year { padding-top: 34px; }

.archive-year-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #b9c6d8;
}

.archive-year-title span {
  font-size: 10.5px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
}

.archive-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 220px;
  gap: 26px;
  align-items: start;
  padding: 22px 14px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  transition: background 0.2s ease;
}

.archive-row:hover { background: rgba(148, 163, 184, 0.035); }

.archive-row time {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--dim);
  padding-top: 4px;
}

.archive-main h3 {
  font-size: 1.05rem;
  line-height: 1.55;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.archive-main h3 a { transition: color 0.2s ease; }
.archive-main h3 a:hover { color: var(--accent); }

.archive-main p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.archive-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; padding-top: 2px; }

.empty-state {
  padding: 80px 0;
  text-align: center;
  color: var(--muted);
}

.empty-state p { margin-bottom: 16px; }

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

.about-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding-top: 52px;
}

.profile-card {
  position: sticky;
  top: 96px;
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(34, 211, 238, 0.09), transparent 55%),
    linear-gradient(180deg, rgba(15, 19, 27, 0.9), rgba(9, 12, 18, 0.92));
}

.avatar-orb {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--grad);
  color: #041b22;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 0 46px rgba(34, 211, 238, 0.22), inset 0 0 18px rgba(255, 255, 255, 0.25);
}

.profile-card h2 { font-size: 1.36rem; letter-spacing: -0.02em; }
.profile-handle {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
}

.profile-meta {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--dim);
}

.profile-links {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.profile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.profile-link span { color: var(--dim); transition: transform 0.2s ease, color 0.2s ease; }
.profile-link:hover { color: var(--accent); }
.profile-link:hover span { color: var(--accent); transform: translate(2px, -2px); }

.about-body { min-width: 0; }

.about-body section { margin-bottom: 54px; }

.about-body section:last-child { margin-bottom: 0; }

.about-body h2 {
  position: relative;
  margin-bottom: 20px;
  padding-left: 16px;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.about-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.about-body p {
  margin-bottom: 18px;
  font-size: 15.5px;
  line-height: 1.95;
  color: #c2cedd;
  max-width: 66ch;
}

.about-body p strong { color: var(--text); }

.check-list {
  list-style: none;
  margin-top: 8px;
  max-width: 66ch;
}

.check-list li {
  position: relative;
  padding-left: 22px;
  margin: 10px 0;
  font-size: 14.5px;
  color: var(--muted);
}

.check-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
}

.stack-chips { display: flex; flex-wrap: wrap; gap: 9px; }

.stack-chips span {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.04);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #a9b7ca;
}

.now-list { list-style: none; max-width: 66ch; }

.now-list li {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--muted);
}

.now-list li:first-child { border-top: 1px solid var(--line); }

.now-list span {
  flex: 0 0 92px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--dim);
  padding-top: 3px;
}

.about-cta { max-width: 56ch; }
.about-cta .btn { margin-top: 6px; }

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

.search-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.search-root.open { display: block; }

.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 8, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fade-in 0.18s ease;
}

.search-panel {
  position: relative;
  width: min(620px, calc(100% - 32px));
  margin: 12vh auto 0;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #0b0f16;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(34, 211, 238, 0.04) inset;
  overflow: hidden;
  animation: panel-in 0.22s ease;
}

@keyframes fade-in { from { opacity: 0; } }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.99); }
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
}

.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-sans);
}

.search-input::placeholder { color: #58677a; }
.search-input::-webkit-search-cancel-button { display: none; }

.search-close {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
  cursor: pointer;
}

.search-close:hover { color: var(--text); border-color: var(--line-strong); }

.search-results {
  max-height: 52vh;
  overflow-y: auto;
  padding: 8px;
}

.search-group-label {
  padding: 8px 12px 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.search-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.search-item:hover { background: rgba(148, 163, 184, 0.06); }

.search-item.active {
  background: rgba(34, 211, 238, 0.07);
  border-color: rgba(34, 211, 238, 0.2);
}

.search-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }

.search-item-title { font-size: 14px; font-weight: 600; color: var(--text); }
.search-item-title mark { background: rgba(34, 211, 238, 0.22); color: #b8f7ff; border-radius: 3px; padding: 0 1px; }

.search-item time {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
}

.search-item-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.search-empty {
  padding: 44px 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--dim);
}

.search-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.03em;
}

.search-keys { display: inline-flex; align-items: center; gap: 4px; }

.search-keys kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted);
}

/* ---------- toast / reveal ---------- */

#toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 120;
  transform: translate(-50%, 12px);
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(13, 17, 24, 0.95);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  font-size: 12.5px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#toast.show { opacity: 1; transform: translate(-50%, 0); }

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.65, 0.3, 1) var(--reveal-delay, 0ms),
    transform 0.7s cubic-bezier(0.2, 0.65, 0.3, 1) var(--reveal-delay, 0ms);
}

.js .reveal.visible { opacity: 1; transform: none; }

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

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

@media (max-width: 1080px) {
  .hero-grid { gap: 44px; }
  .article-layout { gap: 44px; grid-template-columns: minmax(0, 1fr) 204px; }
  .about-grid { gap: 44px; }
  .archive-row { grid-template-columns: 100px minmax(0, 1fr) 190px; gap: 20px; }
}

@media (max-width: 980px) {
  .hero { padding: 64px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 52px; }
  .hero-copy { max-width: 640px; }
  .hero-visual { justify-content: flex-start; }
  .code-card { max-width: 560px; }
  .article-layout { grid-template-columns: 1fr; gap: 0; padding-top: 32px; }
  .article-aside { display: none; }
  .toc-mobile {
    display: block;
    margin-top: 26px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.03);
    overflow: hidden;
  }
  .toc-mobile summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.05em;
    color: var(--muted);
    cursor: pointer;
    list-style: none;
  }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary span { color: var(--dim); font-size: 10px; }
  .toc-mobile ul { list-style: none; padding: 4px 16px 14px; border-top: 1px solid var(--line); }
  .toc-mobile li { margin: 2px 0; }
  .toc-mobile a {
    display: block;
    padding: 6px 0;
    font-size: 13px;
    color: var(--muted);
  }
  .toc-mobile .lvl-3 a { padding-left: 16px; font-size: 12.5px; color: var(--dim); }
  .archive-row { grid-template-columns: 100px minmax(0, 1fr); }
  .archive-tags { grid-column: 2; justify-content: flex-start; padding-top: 0; }
}

@media (max-width: 860px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-cover { min-height: 240px; }
  .featured-body { padding: 30px 28px 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .profile-card { position: static; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 34px 30px; }
  .post-grid { gap: 18px; }
}

@media (max-width: 820px) {
  .container { width: calc(100% - 40px); }
  .site-header {
    background: #06070a;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .header-inner { height: 62px; gap: 12px; }
  .brand-text span { display: none; }
  .menu-toggle { display: grid; }
  .header-actions { margin-left: auto; }
  .site-nav { display: none; }
  .search-trigger { border-color: transparent; background: transparent; padding: 0 6px; }
  .search-trigger kbd { display: none; }
  .search-trigger span { display: none; }
  .search-trigger svg { width: 17px; height: 17px; }
  .hero { padding-top: 52px; }
  .section { margin-top: 72px; }
  .section-head { margin-bottom: 22px; }
  .footer-inner { grid-template-columns: 1fr; padding: 40px 0 34px; }
  .footer-nav { justify-content: flex-start; }
  .footer-copy { padding-top: 20px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-item.next { text-align: left; align-items: flex-start; }
  .post-nav-item.is-empty { display: none; }
  .demo-inner { font-size: 11.5px; align-items: flex-start; }
  .demo-inner p { line-height: 1.6; }
}

@media (max-width: 720px) {
  .hero h1 { font-size: clamp(2rem, 8.6vw, 2.7rem); }
  .hero .lead { font-size: 15.5px; margin-top: 20px; }
  .hero-stats { gap: 28px; margin-top: 34px; padding-top: 22px; }
  .code-card { transform: none; }
  .post-grid { grid-template-columns: 1fr; }
  .post-cover { height: 148px; }
  .article-head { padding-top: 22px; }
  .article-title { max-width: none; }
  .article-excerpt { font-size: 15.5px; }
  .prose { font-size: 16px; line-height: 1.92; }
  .prose h2 { margin-top: 46px; font-size: 1.34rem; }
  .prose h3 { margin-top: 34px; font-size: 1.12rem; }
  .page-hero { padding: 48px 0 30px; }
  .page-lead { font-size: 14.5px; }
  .archive-tools { padding: 20px 0; }
  .archive-row { grid-template-columns: 1fr; gap: 10px; padding: 18px 6px; }
  .archive-row time { order: 0; padding-top: 0; font-size: 10.5px; }
  .archive-main h3 { margin-bottom: 4px; }
  .archive-tags { grid-column: 1; }
  .archive-main p { -webkit-line-clamp: 2; }
  .archive-year { padding-top: 26px; }
  .post-nav { margin-top: 60px; }
  .footer-intro { font-size: 12.5px; }
  .cta-band { margin-top: 72px; padding: 30px 24px; }
  .featured-cover { min-height: 190px; }
  .featured-body { padding: 24px 22px 26px; }
  .about-grid { padding-top: 34px; }
  .about-body section { margin-bottom: 40px; }
  .about-body p { font-size: 15px; }
  .profile-card { padding: 24px; }
  .avatar-orb { width: 68px; height: 68px; font-size: 1.6rem; margin-bottom: 18px; }
  .search-panel { margin-top: 8vh; }
  .search-foot { font-size: 9.5px; }
  .search-keys { display: none; }
  .demo-inner code { display: none; }
}

@media (max-width: 520px) {
  .container { width: calc(100% - 32px); }
  .brand-text strong { font-size: 14px; }
  .hero .eyebrow { font-size: 10.5px; }
  .hero-actions .btn { flex: 1; }
  .hero-stats { gap: 22px; }
  .hero-stats dd { font-size: 18px; }
  .card-excerpt { -webkit-line-clamp: 2; }
  .hero-code { font-size: 11.5px; padding: 16px; }
  .window-title { font-size: 9.5px; }
  .article-meta { gap: 9px; }
  .search-input-row { padding: 14px 15px; }
  .search-input { font-size: 14px; }
  .search-results { max-height: 56vh; }
  #toast { bottom: 20px; }
  .demo-inner { gap: 9px; padding: 8px 0; }
  .demo-inner p { font-size: 11px; }
}
