/* ==========================================================================
   iamrahuladlakha.github.io — one stylesheet, mobile-first, light + dark.
   Theme: tokens on :root (light). Dark applies with the system preference
   unless data-theme="light" is set, or always with data-theme="dark".
   ========================================================================== */

:root {
  --bg: #fbfaf7;
  --bg-elev: #ffffff;
  --surface: #f3f1ec;
  --surface-2: #ebe8e1;
  --text: #16171a;
  --text-soft: #3a3c42;
  --muted: #5f616a;
  --faint: #8b8d95;
  --border: #e4e1d9;
  --border-strong: #d3cfc5;
  --accent: #0b7268;
  --accent-hover: #085c54;
  --accent-ink: #ffffff;
  --accent-soft: #e0f1ee;
  --accent-soft-text: #0a5d55;
  --amber-soft: #fbeed6;
  --amber-text: #8a5100;
  --header-bg: rgba(251, 250, 247, 0.82);
  --shadow-sm: 0 1px 2px rgba(22, 23, 26, 0.05);
  --shadow-md: 0 1px 2px rgba(22, 23, 26, 0.04), 0 8px 24px -8px rgba(22, 23, 26, 0.12);
  --shadow-lg: 0 2px 4px rgba(22, 23, 26, 0.04), 0 24px 48px -16px rgba(22, 23, 26, 0.22);
  --code-bg: #f2f0ea;
  --selection: rgba(11, 114, 104, 0.18);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --shell: 72rem;
  --prose: 44rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f12;
    --bg-elev: #14171b;
    --surface: #181b20;
    --surface-2: #20242a;
    --text: #ecedef;
    --text-soft: #c9cbd0;
    --muted: #a0a3ab;
    --faint: #70737c;
    --border: #262a31;
    --border-strong: #343941;
    --accent: #40d3c0;
    --accent-hover: #74e3d5;
    --accent-ink: #062521;
    --accent-soft: rgba(64, 211, 192, 0.12);
    --accent-soft-text: #74e3d5;
    --amber-soft: rgba(251, 186, 84, 0.13);
    --amber-text: #fbc46e;
    --header-bg: rgba(13, 15, 18, 0.78);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -10px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 28px 56px -18px rgba(0, 0, 0, 0.75);
    --code-bg: #15181d;
    --selection: rgba(64, 211, 192, 0.25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d0f12;
  --bg-elev: #14171b;
  --surface: #181b20;
  --surface-2: #20242a;
  --text: #ecedef;
  --text-soft: #c9cbd0;
  --muted: #a0a3ab;
  --faint: #70737c;
  --border: #262a31;
  --border-strong: #343941;
  --accent: #40d3c0;
  --accent-hover: #74e3d5;
  --accent-ink: #062521;
  --accent-soft: rgba(64, 211, 192, 0.12);
  --accent-soft-text: #74e3d5;
  --amber-soft: rgba(251, 186, 84, 0.13);
  --amber-text: #fbc46e;
  --header-bg: rgba(13, 15, 18, 0.78);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -10px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 28px 56px -18px rgba(0, 0, 0, 0.75);
  --code-bg: #15181d;
  --selection: rgba(64, 211, 192, 0.25);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}
::selection { background: var(--selection); }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; color: var(--text); }
p { margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
main:focus { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  padding: 0.5rem 0.9rem; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0.75rem; color: var(--accent-ink); }

.shell {
  width: 100%;
  max-width: calc(var(--shell) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
html:not(.js) .js-only { display: none !important; }

.icon { width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.15em; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: var(--header-h);
  transition: height 0.3s var(--ease);
}
.site-header.is-scrolled .header-inner { height: 3.4rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.01em;
  min-width: 0;
}
.brand:hover { color: var(--text); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 2.1rem; height: 2.1rem; border-radius: 10px;
  background: var(--text); color: var(--bg);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.02em;
  transition: transform 0.3s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease), background-color 0.2s;
}
.brand:hover .brand-mark { transform: rotate(-6deg); background: var(--accent); color: var(--accent-ink); }
.site-header.is-scrolled .brand-mark { width: 1.85rem; height: 1.85rem; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav { display: flex; align-items: center; gap: 0.15rem; }
.site-nav > a {
  position: relative;
  padding: 0.45rem 0.6rem; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav > a:hover { color: var(--text); background: var(--surface); }
.site-nav > a[aria-current="page"] { color: var(--text); }
.site-nav > a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0.6rem; right: 0.6rem; bottom: 0.15rem;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.theme-toggle {
  display: none;
  place-items: center;
  width: 2.25rem; height: 2.25rem; margin-left: 0.3rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-elev); color: var(--muted); cursor: pointer;
  transition: color 0.15s, border-color 0.15s, transform 0.3s var(--ease);
}
.js .theme-toggle { display: inline-grid; }
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle:active { transform: scale(0.92); }
.theme-icon { display: none; line-height: 0; }
.theme-toggle .icon { width: 1.05rem; height: 1.05rem; }
.theme-toggle:not([data-mode]) .theme-icon[data-icon="system"],
.theme-toggle[data-mode="system"] .theme-icon[data-icon="system"],
.theme-toggle[data-mode="light"] .theme-icon[data-icon="light"],
.theme-toggle[data-mode="dark"] .theme-icon[data-icon="dark"] { display: block; }

@media (max-width: 420px) {
  .brand-name { display: none; }
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.9rem; padding: 0.7rem 1.2rem;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn .icon { transition: transform 0.25s var(--ease); }
.btn:hover .icon:last-child { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -8px var(--accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 10px 24px -10px var(--accent); }
.btn-ghost { background: var(--bg-elev); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--text); border-color: var(--text); transform: translateY(-1px); }
.btn-ghost .icon:first-child { color: var(--muted); }
.btn:active { transform: translateY(0) scale(0.98); }

.text-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-weight: 600; font-size: 0.92rem; text-decoration: none; color: var(--accent);
}
.text-link .icon { transition: transform 0.25s var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }
.text-button {
  background: none; border: 0; padding: 0.25rem 0.1rem; cursor: pointer;
  color: var(--accent); font-weight: 600; font-size: 0.9rem;
  text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px;
}
.text-button:hover { color: var(--accent-hover); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  align-items: center;
  padding-top: clamp(2rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.hero-portrait {
  order: -1;
  position: relative;
  width: min(9.5rem, 42vw);
  margin: 0;
}
.hero-portrait::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), transparent 70%);
  transform: translate(10px, 10px);
  opacity: 0.35;
}
.hero-portrait img {
  position: relative;
  display: block; width: 100%; height: auto;
  aspect-ratio: 562 / 800; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.hero-name {
  font-size: clamp(2.6rem, 8.5vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.0;
}
.hero-role {
  margin-top: 0.9rem;
  font-size: clamp(1.25rem, 3.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  min-height: 1.3em;
}
.hero-role-text.is-typing::after,
.hero-role-text.is-typed::after {
  content: "";
  display: inline-block;
  width: 0.08em; height: 1em;
  margin-left: 0.08em;
  vertical-align: -0.12em;
  background: currentColor;
  animation: caret 1s steps(1) infinite;
}
.hero-role-text.is-typed::after { animation: caret 1s steps(1) 2, fade-out 0.4s ease 2s forwards; }
@keyframes caret { 50% { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.hero-pitch {
  margin-top: 1.25rem;
  max-width: 36rem;
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  line-height: 1.65;
  color: var(--text-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }

/* Entrance animation (motion-safe only). */
@media (prefers-reduced-motion: no-preference) {
  .hero-text > *, .hero-portrait {
    animation: rise 0.8s var(--ease) both;
  }
  .hero-portrait { animation-name: rise-scale; animation-duration: 1s; }
  .hero-text > :nth-child(2) { animation-delay: 0.08s; }
  .hero-text > :nth-child(3) { animation-delay: 0.16s; }
  .hero-text > :nth-child(4) { animation-delay: 0.24s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise-scale { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }

@media (min-width: 720px) {
  .hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 4rem; }
  .hero-portrait { order: 0; width: 100%; max-width: 21rem; justify-self: end; }
  .hero-portrait::before { transform: translate(16px, 16px); }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section + .section { position: relative; }
.section + .section::before {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  height: 1px; background: var(--border);
}
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1rem 2rem; margin-bottom: 2rem;
}
.section-title { font-size: clamp(1.6rem, 3.6vw, 2.25rem); font-weight: 750; letter-spacing: -0.03em; }

/* ---------- Cards (home latest) ---------- */
.latest-grid { display: grid; gap: 1rem; }
@media (min-width: 860px) {
  .latest-grid--split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.25rem; }
}
.latest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; align-content: start; }
.card {
  position: relative;
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: 1.25rem 1.35rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover, .card:focus-within {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow-md);
}
.card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.8rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.card-title { font-size: 1.08rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.35; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-title a:focus-visible { outline: none; }
.card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.card:hover .card-title a { color: var(--accent); }
.card-desc {
  color: var(--muted); font-size: 0.98rem; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card--featured { padding: 1.6rem 1.6rem 1.5rem; gap: 0.8rem; }
.card--featured::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.card--featured .card-title { font-size: clamp(1.35rem, 3vw, 1.7rem); letter-spacing: -0.025em; line-height: 1.2; }
.card-cta {
  margin-top: auto; padding-top: 0.5rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-weight: 600; font-size: 0.9rem; color: var(--accent);
}
.card-cta .icon { transition: transform 0.25s var(--ease); }
.card:hover .card-cta .icon { transform: translateX(4px); }

/* ---------- Tags, badges, chips ---------- */
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  display: inline-flex; align-items: center;
  padding: 0.18rem 0.6rem; border-radius: 999px;
  background: var(--surface); color: var(--muted);
  font-size: 0.76rem; font-weight: 550; line-height: 1.5; text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.tag--link:hover { background: var(--accent-soft); color: var(--accent-soft-text); }
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.2rem 0.65rem; border-radius: 999px;
  font-size: 0.74rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.badge--customer-facing { background: var(--accent-soft); color: var(--accent-soft-text); }
.badge--team-leadership { background: var(--amber-soft); color: var(--amber-text); }
.badge--now { background: transparent; color: var(--muted); border: 1px solid var(--border-strong); }
.pulse {
  position: relative; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #22c55e;
}
@media (prefers-reduced-motion: no-preference) {
  .pulse::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  }
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 2.25rem; padding: 0.35rem 0.85rem;
  border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text-soft);
  font-size: 0.86rem; font-weight: 550; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.2s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip:active { transform: scale(0.96); }
.chip[aria-current="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip .count, .segmented .count {
  font-size: 0.72rem; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 0 0.4rem; border-radius: 999px; background: var(--surface); color: var(--muted);
}
.chip[aria-current="true"] .count { background: color-mix(in srgb, var(--bg) 20%, transparent); color: var(--bg); }

/* ---------- Experience timeline ---------- */
.exp-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 0.25rem;
  padding: 0.25rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
}
.segmented button {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 2.1rem; padding: 0.3rem 0.8rem;
  border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 0.85rem; font-weight: 600; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
@media (max-width: 480px) {
  .exp-controls { width: 100%; }
  .segmented { flex-wrap: nowrap; width: 100%; justify-content: space-between; }
  .segmented button { padding: 0.3rem 0.7rem; font-size: 0.82rem; white-space: nowrap; flex: 1 1 auto; justify-content: center; }
  .segmented .count { display: none; }
}
.segmented button[aria-pressed="true"] .count { background: var(--accent-soft); color: var(--accent-soft-text); }

.timeline {
  --rail-x: 0.5rem;
  position: relative;
  list-style: none; margin: 0; padding: 0;
}
.timeline::before {
  content: ""; position: absolute; top: 0.6rem; bottom: 0.6rem; left: calc(var(--rail-x) - 1px);
  width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border) 22%, var(--border) 85%, transparent);
}
.tl-item {
  position: relative;
  display: grid; grid-template-columns: 1fr; gap: 0.35rem;
  padding: 0 0 1.4rem 2.1rem;
}
.tl-item::before {
  content: ""; position: absolute; left: calc(var(--rail-x) - 0.45rem); top: 1.35rem;
  width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border-strong);
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.tl-item.is-current::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-item:hover::before { border-color: var(--accent); }
.tl-years {
  font-size: 0.8rem; font-weight: 600; color: var(--faint);
  font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
  padding-top: 1.2rem;
}
.tl-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.05rem;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s var(--ease);
}
.tl-item:hover .tl-card { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.tl-heading { font-size: 1.05rem; }
.tl-toggle {
  display: grid; grid-template-columns: 1fr auto; column-gap: 0.75rem; align-items: start;
  width: 100%; padding: 0; margin: 0; border: 0; background: none; text-align: left;
  font-weight: inherit; letter-spacing: inherit;
}
.timeline.is-interactive .tl-toggle { cursor: pointer; }
.tl-title { font-weight: 700; font-size: 1.06rem; letter-spacing: -0.015em; color: var(--text); grid-column: 1; }
.tl-org { grid-column: 1; font-weight: 550; font-size: 0.95rem; color: var(--muted); letter-spacing: -0.005em; margin-top: 0.1rem; }
.tl-chevron {
  display: none;
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  width: 2rem; height: 2rem; border-radius: 50%; place-items: center;
  color: var(--muted); background: var(--surface);
  transition: transform 0.3s var(--ease), background-color 0.2s, color 0.2s;
}
.timeline.is-interactive .tl-chevron { display: inline-grid; }
.tl-toggle:hover .tl-chevron { color: var(--text); background: var(--surface-2); }
.tl-toggle:hover .tl-title { color: var(--accent); }
.tl-toggle[aria-expanded="true"] .tl-chevron { transform: rotate(180deg); }
.tl-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.tl-panel {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows 0.35s var(--ease), opacity 0.3s ease;
}
.tl-panel-inner { overflow: hidden; min-height: 0; }
.tl-panel p { padding-top: 0.85rem; color: var(--text-soft); line-height: 1.7; font-size: 0.98rem; max-width: 46rem; }
.tl-item.is-collapsed .tl-panel { grid-template-rows: 0fr; opacity: 0; }
.tl-item.is-collapsed .tl-panel { visibility: hidden; transition: grid-template-rows 0.35s var(--ease), opacity 0.3s ease, visibility 0s 0.35s; }
.exp-empty { color: var(--muted); padding: 1rem 0 0 2.1rem; }

@media (min-width: 720px) {
  .timeline { --rail-x: 9.5rem; }
  .tl-item { grid-template-columns: 8rem minmax(0, 1fr); column-gap: 3rem; padding: 0 0 1.5rem 0; }
  .tl-years { text-align: right; padding-top: 1.25rem; }
  .tl-card { padding: 1.2rem 1.4rem 1.25rem; }
  .exp-empty { padding-left: 11rem; }
}

/* ---------- Scroll reveal (JS adds .reveal-ready; motion-safe only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] {
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
  .reveal-ready .latest-list li:nth-child(2) [data-reveal] { transition-delay: 0.06s; }
  .reveal-ready .latest-list li:nth-child(3) [data-reveal] { transition-delay: 0.12s; }
  .reveal-ready .latest-list li:nth-child(4) [data-reveal] { transition-delay: 0.18s; }
}

/* ---------- Empty state ---------- */
.empty {
  padding: 2.25rem 1.5rem; text-align: center;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 50%, transparent);
}
.empty-title { font-weight: 700; font-size: 1.1rem; }
.empty-text { margin-top: 0.4rem; color: var(--muted); max-width: 32rem; margin-inline: auto; }

/* ---------- Blog index ---------- */
.page-head { padding-top: clamp(2.25rem, 6vw, 4.5rem); padding-bottom: 1.5rem; }
.page-title { font-size: clamp(2.2rem, 6.5vw, 3.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.page-lead { margin-top: 0.9rem; font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--text-soft); max-width: 38rem; }
.search { position: relative; margin-top: 2rem; max-width: 38rem; }
.search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--faint); line-height: 0; pointer-events: none;
}
.search-input {
  width: 100%; min-height: 3.1rem;
  padding: 0.75rem 3rem 0.75rem 2.75rem;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--bg-elev); color: var(--text);
  font: inherit; font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.search-kbd {
  position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%);
  display: none; place-items: center;
  min-width: 1.6rem; height: 1.6rem; padding: 0 0.35rem;
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); background: var(--surface);
  pointer-events: none;
}
.js .search-kbd { display: inline-grid; }
.search-input:focus ~ .search-kbd, .search-input:not(:placeholder-shown) ~ .search-kbd { opacity: 0; }
@media (hover: none) { .js .search-kbd { display: none; } }
.result-count { margin-top: 1.25rem; font-size: 0.88rem; color: var(--faint); font-variant-numeric: tabular-nums; }

.blog-list { padding-bottom: clamp(3rem, 8vw, 5rem); }
.post-list { position: relative; z-index: 0; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.post-row {
  position: relative;
  display: grid; grid-template-columns: 1fr; gap: 0.5rem;
  padding: 1.5rem 0.25rem;
  border-bottom: 1px solid var(--border);
}
.post-row::before {
  content: ""; position: absolute; inset: 0 -0.9rem; border-radius: var(--radius);
  background: var(--surface); opacity: 0; transition: opacity 0.2s ease; z-index: -1;
}
.post-row:hover::before, .post-row:focus-within::before { opacity: 1; }
.post-row-date { display: flex; gap: 0.75rem; font-size: 0.82rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.post-row-title { font-size: clamp(1.2rem, 2.8vw, 1.45rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.3; }
.post-row-title a { color: var(--text); text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.35s var(--ease), color 0.2s; }
.post-row-title a:hover { color: var(--accent); background-size: 100% 2px; }
.post-row-desc { margin-top: 0.45rem; color: var(--muted); line-height: 1.6; max-width: 44rem; }
.post-row .tags { margin-top: 0.85rem; }
@media (min-width: 720px) {
  .post-row { grid-template-columns: 9rem minmax(0, 1fr); gap: 2rem; padding: 1.75rem 0.25rem; }
  .post-row-date { flex-direction: column; gap: 0.15rem; padding-top: 0.3rem; }
}
.blog-list .empty { margin-top: 1.5rem; }

/* ---------- Post page ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px;
  pointer-events: none;
}
.progress-bar {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7c9cff));
  transform: scaleX(0); transform-origin: 0 50%;
}
html:not(.js) .progress { display: none; }

.post-header { max-width: calc(var(--prose) + 2 * var(--gutter)); padding-top: clamp(1.75rem, 5vw, 3.5rem); }
.back-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.88rem; font-weight: 600; color: var(--muted); text-decoration: none;
}
.back-link .icon { transition: transform 0.25s var(--ease); }
.back-link:hover { color: var(--text); }
.back-link:hover .icon { transform: translateX(-3px); }
.post-tags { margin-top: 1.75rem; }
.post-title {
  margin-top: 1rem;
  font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08;
  text-wrap: balance;
}
.post-lead { margin-top: 1rem; font-size: clamp(1.1rem, 2.4vw, 1.3rem); line-height: 1.55; color: var(--text-soft); text-wrap: pretty; }
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem 0.9rem;
  margin-top: 1.75rem; padding-block: 1.1rem;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.post-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; object-position: 50% 22%; border: 1px solid var(--border); }
.post-meta-text { display: flex; flex-direction: column; line-height: 1.35; margin-right: auto; }
.post-author { font-weight: 650; font-size: 0.95rem; }
.post-meta-sub { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.84rem; color: var(--faint); }
.copy-link {
  display: none; align-items: center; gap: 0.45rem;
  min-height: 2.25rem; padding: 0.35rem 0.85rem;
  border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text-soft); cursor: pointer;
  font-size: 0.85rem; font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.js .copy-link { display: inline-flex; }
.copy-link:hover { border-color: var(--accent); color: var(--text); }
.copy-link.is-copied { background: var(--accent-soft); border-color: transparent; color: var(--accent-soft-text); }

.post-grid {
  display: grid; grid-template-columns: minmax(0, 1fr);
  max-width: calc(var(--prose) + 2 * var(--gutter));
  padding-top: 2rem;
}
.toc { margin-bottom: 1.5rem; }
.toc-details {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev);
  padding: 0.25rem 1rem;
}
.toc-details summary {
  cursor: pointer; padding: 0.6rem 0; list-style: none;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
}
.toc-details summary::-webkit-details-marker { display: none; }
.toc-details summary::after { content: "+"; font-size: 1.1rem; font-weight: 500; letter-spacing: 0; }
.toc-details[open] summary::after { content: "\2212"; }
.toc-list { list-style: none; margin: 0 0 0.6rem; padding: 0; border-left: 1px solid var(--border); }
.toc-item a {
  display: block; padding: 0.3rem 0 0.3rem 0.9rem; margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 0.87rem; line-height: 1.4; color: var(--muted); text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.toc-h3 a { padding-left: 1.75rem; font-size: 0.83rem; }
.toc-item a:hover { color: var(--text); }
.toc-item.is-active a { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

@media (min-width: 1100px) {
  .has-toc .post-header { max-width: calc(var(--prose) + 16rem + 4rem + 2 * var(--gutter)); padding-right: calc(16rem + 4rem + var(--gutter)); }
  .has-toc .post-grid {
    grid-template-columns: minmax(0, var(--prose)) 16rem; column-gap: 4rem;
    max-width: calc(var(--prose) + 16rem + 4rem + 2 * var(--gutter));
  }
  .has-toc .toc { grid-column: 2; grid-row: 1; margin: 0; }
  .has-toc .post-body { grid-column: 1; grid-row: 1; }
  .toc-details {
    position: sticky; top: calc(var(--header-h) + 1.5rem);
    max-height: calc(100vh - var(--header-h) - 3rem); overflow: auto;
    border: 0; background: none; padding: 0;
  }
  .toc-details summary { cursor: default; pointer-events: none; }
  .toc-details summary::after, .toc-details[open] summary::after { content: none; }
}

/* Post body typography — posts are HTML fragments. */
.post-body {
  font-size: 1.09rem; line-height: 1.78; color: var(--text-soft);
  overflow-wrap: break-word;
  min-width: 0;
}
.post-body > * + * { margin-top: 1.25em; }
.post-body p { margin-bottom: 0; }
.post-body h2, .post-body h3 { position: relative; color: var(--text); scroll-margin-top: calc(var(--header-h) + 1rem); }
.post-body h2 { font-size: 1.6rem; font-weight: 750; letter-spacing: -0.025em; margin-top: 2.4em; }
.post-body h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; margin-top: 1.9em; }
.post-body h2 + *, .post-body h3 + * { margin-top: 0.7em; }
.post-body h4 { font-size: 1.05rem; font-weight: 700; margin-top: 1.6em; }
.heading-anchor {
  margin-left: 0.4rem; padding: 0 0.2rem;
  color: var(--faint); text-decoration: none; font-weight: 500;
  opacity: 0; transition: opacity 0.15s, color 0.15s;
}
.post-body h2:hover .heading-anchor, .post-body h3:hover .heading-anchor, .heading-anchor:focus-visible { opacity: 1; }
.heading-anchor:hover { color: var(--accent); }
@media (hover: none) { .heading-anchor { opacity: 0.5; } }
.post-body strong { color: var(--text); font-weight: 650; }
.post-body a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.post-body a:hover { text-decoration-color: currentColor; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: 0.45em; }
.post-body li > ul, .post-body li > ol { margin-top: 0.45em; }
.post-body ul li::marker { color: var(--accent); }
.post-body ol li::marker { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.post-body blockquote {
  margin-left: 0; margin-right: 0; padding: 0.2em 0 0.2em 1.2em;
  border-left: 3px solid var(--accent); color: var(--text); font-style: italic;
}
.post-body hr { border: 0; height: 1px; background: var(--border); margin-block: 2.5em; }
.post-body img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.post-body code {
  font-family: var(--font-mono); font-size: 0.86em;
  padding: 0.12em 0.4em; border-radius: 6px;
  background: var(--code-bg); border: 1px solid var(--border); color: var(--text);
}
.post-body pre {
  margin-inline: 0;
  padding: 1.1rem 1.25rem; overflow-x: auto;
  background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.88rem; line-height: 1.65;
  -webkit-overflow-scrolling: touch; tab-size: 2;
}
.post-body pre code { padding: 0; border: 0; background: none; font-size: inherit; color: var(--text); }
.post-body table {
  display: block; width: max-content; max-width: 100%; overflow-x: auto;
  border-collapse: collapse; font-size: 0.93rem; line-height: 1.5;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}
.post-body th, .post-body td { padding: 0.6rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.post-body th { background: var(--surface); color: var(--text); font-weight: 650; font-size: 0.85rem; white-space: nowrap; }
.post-body tr:last-child td { border-bottom: 0; }
.post-body tbody tr:hover td { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.post-body figure { margin: 2em 0; }
.post-body figure > svg, .post-body figure > img { display: block; margin-inline: auto; }
.post-body figcaption { margin-top: 0.75em; text-align: center; font-size: 0.88rem; line-height: 1.5; color: var(--muted); }
.post-body svg { max-width: 100%; height: auto; color: currentColor; }
.post-body figure:has(> svg) {
  padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); color: var(--text);
}
.post-body .katex-display { overflow-x: auto; overflow-y: hidden; padding-block: 0.25em; }

.post-nav {
  display: grid; grid-template-columns: 1fr; gap: 0.85rem;
  max-width: calc(var(--prose) + 2 * var(--gutter));
  padding-top: 3.5rem; padding-bottom: clamp(3rem, 8vw, 5rem);
}
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.has-toc .post-nav { max-width: calc(var(--prose) + 2 * var(--gutter)); }
@media (min-width: 1100px) {
  .has-toc .post-nav { max-width: calc(var(--prose) + 16rem + 4rem + 2 * var(--gutter)); padding-right: calc(16rem + 4rem + var(--gutter)); }
}
.post-nav-link {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 1.1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); text-decoration: none;
  transition: border-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.post-nav-link:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.post-nav-next { text-align: right; align-items: flex-end; }
.post-nav-label { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.post-nav-title { font-weight: 650; color: var(--text); line-height: 1.35; }
.post-nav-link:hover .post-nav-title { color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 70;
  transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
  padding: 0.65rem 1.1rem; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 0.88rem; font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
}
.toast:empty { display: none; }
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Comments ---------- */
.comments { max-width: calc(var(--prose) + 2 * var(--gutter)); padding-top: 3.5rem; }
@media (min-width: 1100px) {
  .has-toc .comments { max-width: calc(var(--prose) + 16rem + 4rem + 2 * var(--gutter)); padding-right: calc(16rem + 4rem + var(--gutter)); }
}
.comments-title { font-size: 1.6rem; font-weight: 750; letter-spacing: -0.025em; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.comments-count { color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; }
.comments-status, .comments-note { margin-top: 1rem; color: var(--muted); font-size: 0.95rem; }
.comments-list, .comment-replies { list-style: none; margin: 0; padding: 0; }
.comments-list { margin-top: 1.25rem; display: grid; gap: 0.85rem; }
.comment {
  padding: 1rem 1.15rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); min-width: 0;
}
.comment-replies { margin-top: 0.9rem; display: grid; gap: 0.75rem; padding-left: 0.9rem; border-left: 2px solid var(--border); }
.comment-replies .comment { background: var(--surface); }
.comment--author { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; }
.comment-name { font-weight: 650; color: var(--text); overflow-wrap: anywhere; }
.comment-badge {
  padding: 0.1rem 0.5rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-soft-text);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.comment-date { font-size: 0.84rem; color: var(--faint); }
.comment-body { margin-top: 0.5rem; color: var(--text-soft); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }

.comment-form {
  margin-top: 1.75rem; padding: 1.25rem; display: grid; gap: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.comment-form-title { font-size: 1.1rem; font-weight: 700; }
.comment-fields { display: grid; gap: 1rem; }
@media (min-width: 640px) { .comment-fields { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.field-hint { font-weight: 500; color: var(--faint); }
.field input, .field textarea {
  width: 100%; padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-elev); color: var(--text); font: inherit; font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 7.5rem; line-height: 1.55; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field-count { justify-self: end; font-size: 0.8rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.comment-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.comment-turnstile { min-height: 65px; max-width: 100%; overflow: hidden; }
.comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.btn-primary:disabled { opacity: 0.6; cursor: progress; transform: none; }
.comment-msg { font-size: 0.92rem; color: var(--accent-soft-text); font-weight: 550; }
.comment-msg.is-error { color: var(--amber-text); }
.comments-privacy { font-size: 0.84rem; color: var(--muted); }

/* ---------- 404 ---------- */
.notfound { padding-bottom: clamp(4rem, 10vw, 7rem); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: grid; gap: 2rem;
  padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: 2rem;
}
.footer-title { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 750; letter-spacing: -0.03em; max-width: 30rem; }
.footer-email {
  display: inline-block; margin-top: 0.9rem;
  font-size: clamp(1rem, 2.4vw, 1.15rem); font-weight: 600; color: var(--accent);
  text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  word-break: break-all;
}
.footer-email:hover { border-bottom-color: currentColor; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; align-content: end; }
.footer-links a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.5rem; padding: 0.45rem 0.95rem;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--bg-elev); color: var(--text-soft); text-decoration: none;
  font-size: 0.9rem; font-weight: 550;
  transition: border-color 0.15s, color 0.15s, transform 0.2s var(--ease);
}
.footer-links a:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.footer-base { padding-bottom: 2rem; }
.footer-base p { padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: 0.84rem; color: var(--faint); }
@media (min-width: 800px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr; align-items: end; }
  .footer-links { justify-content: flex-end; }
}

/* ---------- Reduced motion: kill animations and transitions ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .progress, .toc, .post-nav, .copy-link, .toast, .comment-form { display: none !important; }
  body { background: #fff; color: #000; }
}

/* RSS subscribe page */
.rss-page { padding-bottom: 4rem; }
.rss-page > * { max-width: 44rem; }
.rss-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem 1.3rem; margin: 0 0 2.5rem; }
.rss-box p { margin: 0 0 .75rem; }
.rss-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: .9rem; }
.rss-url { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: .6rem .8rem; font-size: .9rem; }
.rss-hint { color: var(--muted); font-size: .9rem; margin: 0 !important; }
.rss-recent { font-size: 1.15rem; margin: 0 0 1rem; }
.rss-page .muted { color: var(--muted); margin: .25rem 0 0; }
