/* Saurav Shrestha: soft minimal portfolio
   Light-first, hand-crafted. No gradients-on-dark, no particles. */

:root {
  --bg: #FBFBF9;
  --surface: #FFFFFF;
  --surface-2: #F4F4F1;
  --ink: #17171A;
  --muted: #6F6F76;
  --hairline: rgba(23, 23, 26, .09);
  --accent: #4F46E5;
  --accent-soft: rgba(79, 70, 229, .08);
  --green: #16A34A;
  --nav-bg: rgba(255, 255, 255, .72);
  --shadow-sm: 0 1px 2px rgba(23, 23, 26, .05);
  --shadow-md: 0 8px 30px rgba(23, 23, 26, .08);
  --shadow-pill: 0 10px 40px rgba(23, 23, 26, .12), 0 2px 8px rgba(23, 23, 26, .06);
  --radius: 20px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0C0C0E;
  --surface: #151518;
  --surface-2: #1B1B1F;
  --ink: #F4F4F1;
  --muted: #A3A3AB;
  --hairline: rgba(255, 255, 255, .1);
  --accent: #818CF8;
  --accent-soft: rgba(129, 140, 248, .12);
  --nav-bg: rgba(21, 21, 24, .72);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, .35);
  --shadow-pill: 0 10px 40px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color .45s ease, color .45s ease;
  padding-bottom: 64px;
}

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

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

/* ---------- serif accent ---------- */
.serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

/* ---------- layout ---------- */
.wrap { width: min(1080px, 92%); margin: 0 auto; }

.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- THE PILL NAV ---------- */
.pill-nav {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 60px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-pill);
  transition: transform .38s cubic-bezier(.32, .72, .35, 1), opacity .3s ease,
              background-color .45s ease, border-color .45s ease;
}

.pill-nav.nav-hidden {
  transform: translateX(-50%) translateY(-140%);
  opacity: 0;
  pointer-events: none;
}

.nav-group { display: flex; align-items: center; gap: 4px; }

.nav-divider {
  width: 1px;
  height: 26px;
  background: var(--hairline);
  margin: 0 8px;
  flex-shrink: 0;
}

.nav-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .22s ease, color .22s ease, transform .18s ease;
}

.nav-btn svg { width: 21px; height: 21px; }

.nav-btn:hover {
  background: var(--accent-soft);
  color: var(--ink);
  transform: translateY(-1px);
}

.nav-btn:active { transform: translateY(0) scale(.94); }

.nav-btn.active {
  background: var(--ink);
  color: var(--bg);
}

.nav-btn.active:hover { background: var(--ink); color: var(--bg); }

/* tooltip */
.nav-btn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.nav-btn:hover::after,
.nav-btn:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* theme icon morph */
.theme-icon { position: relative; width: 21px; height: 21px; }
.theme-icon svg {
  position: absolute;
  inset: 0;
  width: 21px;
  height: 21px;
  transition: opacity .3s ease, transform .45s cubic-bezier(.34, 1.4, .44, 1);
}
.theme-icon .icon-moon,
.theme-icon .icon-anime,
.theme-icon .icon-shrine { opacity: 0; transform: rotate(-90deg) scale(.6); }
html[data-theme="dark"] .theme-icon .icon-sun,
html[data-theme="dark"] .theme-icon .icon-anime,
html[data-theme="dark"] .theme-icon .icon-shrine { opacity: 0; transform: rotate(90deg) scale(.6); }
html[data-theme="dark"] .theme-icon .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="anime"] .theme-icon .icon-sun,
html[data-theme="anime"] .theme-icon .icon-moon,
html[data-theme="anime"] .theme-icon .icon-shrine { opacity: 0; transform: rotate(90deg) scale(.6); }
html[data-theme="anime"] .theme-icon .icon-anime { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="anime"][data-anime="jjk"] .theme-icon .icon-anime { opacity: 0; transform: rotate(90deg) scale(.6); }
html[data-theme="anime"][data-anime="jjk"] .theme-icon .icon-shrine { opacity: 1; transform: rotate(0) scale(1); }

/* anime mode tab: manga bookmark pinned to the right edge of the screen */
.mode-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 11px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-right: none;
  border-radius: 14px 0 0 14px;
  box-shadow: -6px 0 20px rgba(0, 0, 0, .22);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .28em;
  text-transform: uppercase;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: tab-beacon 3.2s ease-in-out infinite;
}
.mode-tab svg { width: 20px; height: 20px; }
.mode-tab .mt-shrine { display: none; }
html[data-theme="anime"][data-anime="jjk"] .mode-tab .mt-hat { display: none; }
html[data-theme="anime"][data-anime="jjk"] .mode-tab .mt-shrine { display: block; }
.mode-tab:hover { color: var(--ink); border-color: var(--ink); }
.mode-tab .mt-to-normal { display: none; }
.mode-tab.active {
  background: #FF2E4C;
  border-color: #0A0A0A;
  color: #fff;
  box-shadow: -6px 0 28px rgba(255, 46, 76, .6), -6px 6px 0 rgba(0, 0, 0, .45);
  animation: none;
}
.mode-tab.active:hover { color: #fff; border-color: #0A0A0A; }
.mode-tab.active .mt-to-anime { display: none; }
.mode-tab.active .mt-to-normal { display: block; }
.mode-tab.active svg path:last-child { stroke: #fff; }
@keyframes tab-beacon {
  0%, 100% { box-shadow: -6px 0 20px rgba(0, 0, 0, .22); }
  50% { box-shadow: -6px 0 20px rgba(255, 46, 76, .45); }
}

/* anime sub-mode switcher: One Piece / Jujutsu Kaisen mini tabs under the main tab */
.anime-sub {
  position: fixed;
  right: 0;
  top: calc(50% + 124px);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.anime-sub[hidden] { display: none; }
.sub-tab {
  writing-mode: vertical-rl;
  padding: 10px 8px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-right: none;
  border-radius: 10px 0 0 10px;
  box-shadow: -4px 0 14px rgba(0, 0, 0, .2);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.sub-tab:hover { color: var(--ink); }
.sub-tab.is-active {
  background: #FF2E4C;
  color: #fff;
  border-color: #0A0A0A;
  box-shadow: -4px 0 18px rgba(255, 46, 76, .55);
}

/* mode cluster: bookmark tab + sub tabs ride as one centered unit so they
   never spill off short viewports */
.mode-cluster {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.mode-cluster .mode-tab {
  position: static;
  transform: none;
}
.mode-cluster .anime-sub {
  position: static;
}
.mode-cluster .anime-sub[hidden] { display: none; }

/* short screens: shrink the whole cluster further */
@media (max-height: 640px) {
  .mode-cluster { gap: 6px; }
  .mode-cluster .mode-tab {
    font-size: 10px;
    padding: 14px 9px;
  }
  .mode-cluster .sub-tab {
    font-size: 8px;
    letter-spacing: .14em;
    padding: 8px 6px;
  }
  .mode-cluster .anime-sub { gap: 6px; }
}

/* narrow screens: compact the cluster and keep page text clear of it */
@media (max-width: 640px) {
  .mode-cluster { gap: 6px; }
  .mode-cluster .mode-tab {
    font-size: 10px;
    letter-spacing: .22em;
    padding: 14px 8px;
  }
  .mode-cluster .sub-tab {
    font-size: 8px;
    letter-spacing: .14em;
    padding: 8px 6px;
  }
  .mode-cluster .anime-sub { gap: 6px; }
  html[data-theme="anime"] .wrap {
    width: auto;
    margin-left: 4%;
    margin-right: 56px;
  }
}

/* ---------- hero ---------- */
.hero {
  padding: 150px 0 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 15px 7px 12px;
  box-shadow: var(--shadow-sm);
}

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
  flex-shrink: 0;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: .5;
  animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}

@keyframes ping {
  0% { transform: scale(.5); opacity: .7; }
  80%, 100% { transform: scale(1.4); opacity: 0; }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.35fr .9fr; gap: 56px; }
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 22px 0 18px;
}

.hero h1 .serif { letter-spacing: -0.01em; }

.hero-sub {
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 46ch;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .22s ease, background-color .22s ease;
}

.btn:active { transform: scale(.96); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--hairline);
}

.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn svg { width: 17px; height: 17px; }

.portrait-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  padding: 12px;
  box-shadow: var(--shadow-md);
  transform: rotate(2deg);
  transition: transform .35s ease, box-shadow .3s ease;
  max-width: 340px;
  justify-self: center;
}

.portrait-card:hover { transform: rotate(0deg) translateY(-4px); }

.portrait-card img {
  border-radius: 18px;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  width: 100%;
}

.portrait-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px 4px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- sections ---------- */
section.block { padding: 56px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}

.section-head h2 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.text-link:hover { text-decoration: underline; }

/* ---------- cards & grids ---------- */
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, background-color .45s ease, border-color .45s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

a.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon svg { width: 22px; height: 22px; }

.card h3 { font-size: 1.12rem; font-weight: 650; letter-spacing: -0.015em; }

.card p { font-size: .94rem; color: var(--muted); flex: 1; }

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

.tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  padding: 4px 11px;
  border-radius: 999px;
  transition: background-color .45s ease;
}

.card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.card-link svg { width: 15px; height: 15px; transition: transform .2s ease; }
a.card:hover .card-link svg { transform: translate(2px, -2px); }

/* ---------- experience rows ---------- */
.exp-list { display: flex; flex-direction: column; }

.exp-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--hairline);
}

.exp-row:first-child { border-top: 1px solid var(--hairline); }

@media (min-width: 720px) {
  .exp-row { grid-template-columns: 1fr 200px; gap: 24px; align-items: start; }
  .exp-date { text-align: right; }
}

.exp-role { font-weight: 650; font-size: 1.05rem; letter-spacing: -0.01em; }
.exp-org { color: var(--accent); font-weight: 600; font-size: .92rem; }
.exp-date { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.exp-desc { color: var(--muted); font-size: .94rem; margin-top: 8px; max-width: 62ch; }
.exp-desc ul { margin: 6px 0 0 18px; }
.exp-desc li { margin-bottom: 4px; }

/* ---------- skills ticker ---------- */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 15px 0;
  margin: 20px 0 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: inline-flex;
  gap: 44px;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  padding-right: 44px;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 44px;
}

.ticker-item::after {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------- skill groups ---------- */
.skill-group h3 {
  font-size: .95rem;
  font-weight: 650;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-group h3 .card-icon { width: 36px; height: 36px; border-radius: 11px; }
.skill-group h3 .card-icon svg { width: 18px; height: 18px; }

/* ---------- page header ---------- */
.page-head { padding: 150px 0 30px; }

.page-head h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  letter-spacing: -0.035em;
  line-height: 1.06;
  font-weight: 700;
  margin: 16px 0 14px;
}

.page-head p.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 58ch;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: start;
}

@media (min-width: 860px) {
  .about-grid { grid-template-columns: .85fr 1.35fr; gap: 56px; }
}

.bio p { margin-bottom: 18px; color: var(--muted); font-size: 1.03rem; }
.bio p strong { color: var(--ink); font-weight: 600; }

/* ---------- contact ---------- */
.contact-methods { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 30px 0; }
@media (min-width: 720px) { .contact-methods { grid-template-columns: repeat(3, 1fr); } }

.method {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}

a.method:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.method .card-icon { margin-bottom: 12px; }
.method h3 { font-size: .95rem; font-weight: 650; }
.method p { color: var(--muted); font-size: .92rem; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-top: 8px;
}

.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .form-row.two { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }

.field label { font-size: 13.5px; font-weight: 600; }

.field input,
.field textarea {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 13px 16px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .45s ease;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.socials-row {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.social-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, color .2s ease, border-color .2s ease;
}

.social-btn:hover { transform: translateY(-3px); color: var(--ink); border-color: var(--ink); }
.social-btn svg { width: 20px; height: 20px; }

/* ---------- footer ---------- */
footer {
  margin-top: 70px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

@media (min-width: 640px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1);
}

.reveal.in { opacity: 1; transform: none; }

.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
  .pulse-dot::after { animation: none; }
  .mode-tab { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- blog ---------- */
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--muted);
  margin: 14px 0 0;
}
.post-meta .dot { opacity: .5; }
.card .post-meta { margin: 0 0 10px; }
.card h3 { margin-bottom: 8px; }

.article { max-width: 740px; margin: 0 auto; }
.article-head { padding: 150px 0 26px; }
.article-head h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 14px 0 0;
}
.article-body { padding: 6px 0 10px; }
.article-body p { margin: 0 0 1.15em; line-height: 1.8; color: var(--ink); }
.article-body p.lead { font-size: 1.12rem; color: var(--muted); }
.article-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2em 0 .7em;
}
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 650;
  margin: 1.6em 0 .6em;
}
.article-body ul, .article-body ol { margin: 0 0 1.15em 1.3em; line-height: 1.8; }
.article-body li { margin-bottom: .45em; }
.article-body strong { font-weight: 650; }
.key-takeaways { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 14px; padding: 22px 24px; margin: 0 0 1.6em; }
.key-takeaways h2 { font-size: 1.05rem; margin: 0 0 .7em; letter-spacing: .02em; }
.key-takeaways ul { margin: 0 0 0 1.3em; }
.key-takeaways li { margin-bottom: .55em; line-height: 1.75; }
.key-takeaways li:last-child { margin-bottom: 0; }
.article-body pre {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 1.4em;
  font-size: .85rem;
  line-height: 1.65;
}
.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86em;
}
.article-body p code, .article-body li code {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: .1em .4em;
}
.article-body pre code { background: none; border: none; padding: 0; }
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  margin-top: 30px;
  padding-top: 26px;
}

/* ---- Blog index: classic article list ---- */
.post-list { border-top: 1px solid var(--hairline); }
.post-row { display: block; padding: 30px 4px; border-bottom: 1px solid var(--hairline); }
.post-row-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.post-row-top .post-meta { margin: 0; }
.post-row h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; margin: 0 0 10px; transition: color .2s ease; }
.post-row p { color: var(--muted); margin: 0; max-width: 64ch; }
.post-row-arrow { flex: none; width: 46px; height: 46px; border: 1px solid var(--hairline); border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.post-row-arrow svg { width: 18px; height: 18px; }
.post-row:hover .post-row-arrow { background: var(--ink); border-color: var(--ink); color: var(--bg); transform: translate(3px, -3px); }
@media (max-width: 560px) { .post-row { padding: 24px 2px; } }
.aka-note { font-size: .85em; color: var(--muted); }

/* Native ad rows: blend with the feed so they read as part of the list */
.post-row-ad { padding: 26px 4px; border-bottom: 1px solid var(--hairline); }
.post-row-ad:empty { display: none; }
.article-body .post-row-ad { padding: 30px 0; border-bottom: none; }
