/* ─────────────────────────────────────────────────────────────
   evan.log — minimal tech blog
   Tokens
   ───────────────────────────────────────────────────────────── */
:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f5f6f9;
  --text: #101216;
  --muted: #646b78;
  --faint: #9aa1ad;
  --line: #e7e9ee;
  --line-strong: #d4d8e0;
  --accent: #2b5cff;
  --accent-hover: #1a49e0;
  --accent-soft: rgba(43, 92, 255, .075);
  --green: #12b981;
  --shadow-sm: 0 1px 2px rgba(16, 18, 22, .04);
  --shadow-md: 0 12px 40px rgba(16, 18, 22, .07);
  --shadow-lg: 0 28px 80px rgba(16, 18, 22, .14);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1140px;
  --radius: 10px;
}

[data-theme="dark"] {
  --bg: #0a0b0e;
  --surface: #111318;
  --surface-2: #16181e;
  --text: #f0f2f5;
  --muted: #9aa2ae;
  --faint: #6e7683;
  --line: #22262e;
  --line-strong: #333944;
  --accent: #7d9bff;
  --accent-hover: #a0b5ff;
  --accent-soft: rgba(125, 155, 255, .12);
  --green: #34d399;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, .35);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, .55);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { display: block; }
::selection { background: var(--accent); color: #fff; }

.container { width: min(100% - 64px, var(--maxw)); margin-inline: auto; }
.mono { font-family: var(--mono); }
.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;
}

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 20px; height: 20px; display: grid;
  grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3px;
  transform: rotate(0deg); transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.brand:hover .brand-mark { transform: rotate(90deg); }
.brand-mark span { background: var(--text); border-radius: 1.5px; }
.brand-mark span:nth-child(2) { background: var(--accent); }
.brand-mark span:nth-child(3) { background: var(--accent); opacity: .45; }
.brand-name { font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: -.04em; }
.brand-dot { color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 30px; }
.nav-link {
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  position: relative; padding: 6px 0; transition: color .2s ease;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--accent); transition: width .25s ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; min-width: 34px; padding: 0 8px;
  color: var(--muted); background: transparent;
  border: 1px solid transparent; border-radius: 7px;
  transition: color .2s, background .2s, border-color .2s;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.search-trigger { border-color: var(--line); padding: 0 9px; }
.kbd-hint {
  font-family: var(--mono); font-size: 10px; letter-spacing: .02em;
  color: var(--faint); padding-left: 2px;
}
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.menu-toggle { display: none; }

.mobile-menu {
  display: none; flex-direction: column; gap: 2px;
  padding: 10px 32px 18px; border-top: 1px solid var(--line); background: var(--surface);
}
.mobile-menu a { padding: 9px 0; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu a:hover { color: var(--accent); }

/* ─── Hero ───────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding-top: 88px; border-bottom: 1px solid var(--line); }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 70% 32%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 60% at 70% 32%, #000 0%, transparent 78%);
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 64px; align-items: center; padding-bottom: 76px;
}
.hero-copy { max-width: 620px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 9px;
  height: 30px; padding: 0 13px 0 11px; margin-bottom: 30px;
  border: 1px solid var(--line-strong); border-radius: 100px;
  background: var(--surface); box-shadow: var(--shadow-sm);
  font-family: var(--mono); font-size: 11px; letter-spacing: -.01em; color: var(--muted);
}
.status-dot, .live-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent);
  flex-shrink: 0;
}
.status-dot { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

h1 {
  font-size: clamp(2.7rem, 5.2vw, 4.35rem); line-height: 1.06;
  letter-spacing: -.055em; font-weight: 700; margin: 0 0 24px;
}
.hero-muted { color: var(--faint); }
.hero-lead { font-size: 16px; line-height: 1.8; color: var(--muted); max-width: 520px; margin: 0 0 34px; }

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; letter-spacing: -.01em;
  border: 1px solid transparent; transition: transform .2s ease, background .2s, border-color .2s, box-shadow .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 24%, transparent); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 32%, transparent); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 44px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.hero-meta strong { color: var(--text); font-weight: 600; }
.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

/* Terminal */
.hero-visual { position: relative; display: flex; justify-content: flex-end; }
.terminal {
  position: relative; z-index: 2; width: 100%; max-width: 460px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: var(--shadow-md); overflow: hidden;
  transform: perspective(1200px) rotateY(-5deg) rotateX(2deg);
  transition: transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .4s;
}
.hero-visual:hover .terminal { transform: perspective(1200px) rotateY(0) rotateX(0); box-shadow: var(--shadow-lg); }
.terminal-bar {
  display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.dots { display: flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.dots i:first-child { background: #ff6058; opacity: .75; }
.dots i:nth-child(2) { background: #ffbd2e; opacity: .75; }
.dots i:nth-child(3) { background: #28c840; opacity: .75; }
.terminal-path { font-family: var(--mono); font-size: 10.5px; color: var(--muted); flex: 1; text-align: center; }
.terminal-date { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.terminal-body { padding: 22px 22px 18px; font-family: var(--mono); font-size: 11.5px; line-height: 2.05; }
.t-line { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.t-prompt { color: var(--accent); font-weight: 600; margin-right: 8px; }
.t-arrow { color: var(--accent); margin-right: 9px; }
.t-dim { color: var(--faint); }
.t-gap { margin-top: 10px; }
.caret { display: inline-block; width: 7px; height: 13px; background: var(--accent); vertical-align: -2px; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.terminal-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; color: var(--faint);
}
.terminal-foot span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.terminal-foot .live-dot { width: 5px; height: 5px; }
.orbit { position: absolute; z-index: 1; right: -60px; top: -70px; width: 220px; height: 220px; border: 1px solid var(--line-strong); border-radius: 50%; }
.orbit span { position: absolute; inset: 26px; border: 1px solid var(--line); border-radius: 50%; }
.orbit span:last-child { inset: 56px; border-style: dashed; }
.orbit::after { content: ""; position: absolute; right: 22px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.hero-rule { position: relative; display: flex; align-items: center; gap: 14px; padding-bottom: 22px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.hero-rule span:first-child, .hero-rule span:last-child { flex: 1; height: 1px; background: var(--line); }
.hero-rule span:last-child { max-width: 44px; }

/* ─── Sections ───────────────────────────────────────────────── */
.section { padding: 104px 0; border-bottom: 1px solid var(--line); }
.section-tinted { background: var(--surface-2); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--accent); margin: 0 0 14px; }
.eyebrow-light { color: rgba(255,255,255,.62); }
.section-head h2, .subscribe h2 { font-size: clamp(1.75rem, 3vw, 2.45rem); line-height: 1.18; letter-spacing: -.045em; font-weight: 700; margin: 0; }
.section-note { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); padding-bottom: 5px; border-bottom: 1px solid var(--line-strong); transition: color .2s, border-color .2s; }
.text-link:hover { color: var(--accent); border-color: var(--accent); }

/* Post list */
.post-list { border-top: 1px solid var(--line-strong); }
.post-row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 92px; gap: 24px; align-items: start;
  padding: 28px 12px 28px 0; border-bottom: 1px solid var(--line);
  position: relative; transition: background .25s ease, padding .25s ease;
}
.post-row::before {
  content: ""; position: absolute; left: -12px; top: 0; bottom: -1px; width: 2px;
  background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .3s ease;
}
.post-row:hover { background: var(--accent-soft); padding-left: 12px; }
.post-row:hover::before { transform: scaleY(1); }
.post-date { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--faint); padding-top: 5px; letter-spacing: -.02em; white-space: nowrap; }
.post-main h3 { font-size: 19px; font-weight: 600; letter-spacing: -.03em; line-height: 1.35; margin: 0 0 8px; transition: color .2s; }
.post-row:hover .post-main h3 { color: var(--accent); }
.post-main p { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; max-width: 660px; line-height: 1.65; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-tags span {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface);
}
.post-aside { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding-top: 4px; }
.read-time { font-family: var(--mono); font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.row-arrow { font-size: 17px; color: var(--faint); transition: transform .25s ease, color .25s; }
.post-row:hover .row-arrow { transform: translate(3px, -3px); color: var(--accent); }

/* Topics */
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.topic-card {
  display: flex; flex-direction: column; min-height: 208px; padding: 24px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: translate .25s ease, border-color .25s, box-shadow .25s;
}
.topic-card:hover { translate: 0 -4px; border-color: var(--accent); box-shadow: var(--shadow-md); }
.topic-idx { font-family: var(--mono); font-size: 10.5px; color: var(--accent); margin-bottom: 24px; }
.topic-card h3 { font-size: 15px; font-weight: 600; letter-spacing: -.025em; margin: 0 0 10px; }
.topic-card p { font-size: 12.5px; line-height: 1.65; color: var(--muted); margin: 0 0 22px; flex: 1; }
.topic-count { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--faint); }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card {
  padding: 26px 24px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); transition: translate .25s, border-color .25s, box-shadow .25s;
}
.project-card:hover { translate: 0 -4px; border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.project-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.project-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; color: var(--accent); font-size: 17px; background: var(--accent-soft); }
.project-badge { font-family: var(--mono); font-size: 10px; color: var(--faint); border: 1px solid var(--line); border-radius: 100px; padding: 3px 9px; }
.project-card h3 { font-family: var(--mono); font-size: 20px; font-weight: 600; letter-spacing: -.05em; margin: 0 0 10px; }
.accent-text { color: var(--accent); }
.project-card p { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 0 0 28px; min-height: 66px; }
.project-foot { display: flex; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; color: var(--faint); }

/* Subscribe */
.section:has(.subscribe) { border-bottom: 0; padding-bottom: 110px; }
.subscribe {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center; padding: 56px 58px;
  background: #101319; color: #fff; border-radius: 14px;
}
.subscribe-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: linear-gradient(to right, #4b5570 1px, transparent 1px), linear-gradient(to bottom, #4b5570 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 70%);
  mask-image: linear-gradient(to left, #000, transparent 70%);
}
.subscribe-copy, .subscribe-form { position: relative; z-index: 1; }
.subscribe h2 { margin: 0 0 18px; color: #fff; }
.subscribe-copy > p:last-child { font-size: 13.5px; line-height: 1.75; color: #a4adbd; margin: 0; max-width: 420px; }
.input-row { display: flex; gap: 8px; }
.input-row input {
  flex: 1; min-width: 0; height: 46px; padding: 0 15px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-radius: 8px;
  color: #fff; font-size: 13.5px; outline: none; transition: border-color .2s, background .2s;
}
.input-row input::placeholder { color: #788295; }
.input-row input:focus { border-color: #7d9bff; background: rgba(255,255,255,.1); }
.input-row button {
  height: 46px; padding: 0 18px; border: 0; border-radius: 8px; background: #fff; color: #101319;
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .2s, transform .2s;
}
.input-row button:hover { background: #dce5ff; transform: translateY(-1px); }
.form-hint { font-family: var(--mono); font-size: 10.5px; color: #788295; margin: 12px 0 0; min-height: 16px; }
.form-hint.is-error { color: #ff9a8f; }
.form-hint.is-success { color: #6ee7b7; }

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1.2fr; gap: 40px; padding: 64px 0 54px; }
.footer-brand p { font-size: 12.5px; line-height: 1.75; color: var(--muted); max-width: 290px; margin: 18px 0 0; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-col h4 { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 500; margin: 0 0 8px; }
.footer-col a, .footer-static { font-size: 12.5px; color: var(--muted); transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-static { display: inline-flex; align-items: center; gap: 8px; }
.footer-static .mono { color: var(--text); font-size: 11.5px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 20px 0 26px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--faint);
}
.footer-bottom-right { display: inline-flex; align-items: center; gap: 20px; }
.footer-bottom-right .mono { font-size: 10.5px; }
.footer-bottom a:hover { color: var(--accent); }

/* ─── Search dialog ──────────────────────────────────────────── */
.search-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start;
  padding: 12vh 20px 20px; background: rgba(10, 12, 16, .5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .18s ease both;
}
.search-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.search-dialog {
  width: min(100%, 580px); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: dialogIn .22s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes dialogIn { from { opacity: 0; transform: translateY(-10px) scale(.985); } to { opacity: 1; transform: none; } }
.search-input-row { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 58px; border-bottom: 1px solid var(--line); }
.search-input-row svg { width: 18px; height: 18px; color: var(--faint); flex-shrink: 0; }
.search-input-row input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14.5px; }
.search-input-row input::placeholder { color: var(--faint); }
.search-input-row input::-webkit-search-cancel-button { display: none; }
.esc-key { font-family: var(--mono); font-size: 10px; color: var(--faint); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 4px 7px; }
.esc-key:hover { color: var(--text); }
.search-results { max-height: 340px; overflow-y: auto; padding: 8px; }
.search-item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 11px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text); }
.search-item:hover, .search-item.is-selected { background: var(--accent-soft); }
.search-item .s-date { font-family: var(--mono); font-size: 10.5px; color: var(--faint); width: 52px; flex-shrink: 0; }
.search-item .s-title { font-size: 13.5px; font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item .s-tag { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.search-empty { padding: 32px 16px; text-align: center; font-size: 13px; color: var(--muted); }
.search-foot { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface-2); font-family: var(--mono); font-size: 10px; color: var(--faint); }
.search-foot span:last-child { margin-left: auto; }
kbd { font-family: var(--mono); font-size: 9.5px; border: 1px solid var(--line-strong); border-radius: 3px; padding: 1px 4px; margin-right: 2px; }

/* ─── Toast ──────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 8px; background: var(--text); color: var(--bg);
  font-size: 12.5px; box-shadow: var(--shadow-lg); transition: opacity .25s, transform .25s;
  max-width: calc(100vw - 40px); text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ─── Reveal ─────────────────────────────────────────────────── */
/* Uses an animation (not a transition) so it never steals the
   `transition` property from cards that need their own hover motion. */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in { animation: revealUp .65s cubic-bezier(.2,.8,.2,1) both; }
@keyframes revealUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.post-row.is-flash { background: var(--accent-soft); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero-inner { gap: 40px; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .terminal-body { font-size: 10.5px; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-menu:not([hidden]) { display: flex; }
  .hero { padding-top: 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 56px; padding-bottom: 60px; }
  .hero-copy { max-width: none; }
  .hero-visual { justify-content: flex-start; }
  .terminal { max-width: 520px; transform: none; }
  .orbit { right: auto; left: 340px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .subscribe { grid-template-columns: 1fr; gap: 34px; padding: 44px 36px; }
  .footer-top { grid-template-columns: 1.6fr 1fr 1fr; }
  .footer-col:last-child { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 18px; }
  .footer-col:last-child h4 { margin: 0; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 36px, var(--maxw)); }
  .header-inner { height: 60px; }
  .kbd-hint { display: none; }
  .search-trigger { padding: 0 8px; }
  h1 { font-size: clamp(2.3rem, 10vw, 3rem); }
  .hero-lead { font-size: 14.5px; }
  .hero-meta { gap: 10px; font-size: 10px; }
  .hero-rule { padding-bottom: 16px; }
  .section { padding: 72px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 32px; }
  .post-row { grid-template-columns: 1fr auto; gap: 10px 16px; padding: 22px 6px 22px 0; }
  .post-date { grid-column: 1 / -1; padding-top: 0; font-size: 10.5px; }
  .post-main h3 { font-size: 17px; }
  .post-main p { font-size: 13px; }
  .post-aside { flex-direction: column; align-items: flex-end; gap: 8px; }
  .read-time { display: none; }
  .topic-grid, .project-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 0; }
  .project-card p { min-height: 0; }
  .subscribe { padding: 34px 24px; border-radius: 12px; }
  .input-row { flex-direction: column; }
  .input-row button { width: 100%; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding: 48px 0 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .footer-bottom-right { gap: 12px; }
  .footer-bottom-right .mono { display: none; }
  .search-overlay { padding-top: 8vh; }
  .search-foot span:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
