/* ============================================================
   PRATYUSH MAINI — 2026 PERSONAL SITE
   Clean, bright editorial — Baskerville + Inter, royal blue accent
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #fafafa;
  --bg-alt:     #f2f3f5;
  --surface:    #ffffff;
  --border:     #d0d5dd;
  --border-light:#e4e7ec;
  --text:       #1a1a2e;
  --text-heading:#111128;
  --text-muted: #6b7280;
  --accent:     #3654d6;
  --accent-soft: rgba(54,84,214,.08);
  --accent-hover:#2a43b0;
  --tag-bg:     #eef0f8;
  --tag-text:   #3654d6;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06);
  --shadow-md:  0 4px 20px rgba(0,0,0,.07);
  --shadow-glow:0 8px 32px rgba(54,84,214,.08), 0 0 40px rgba(255,255,255,.6);
  --radius:     10px;
  --radius-sm:  6px;
  --radius-pill:999px;
  --max-w:      820px;
  --font-serif: "Libre Baskerville", "Georgia", serif;
  --font-mono:  "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --font-sans:  "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition), color var(--transition);
}
a:hover {
  text-decoration-color: var(--accent);
  color: var(--accent);
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
}

h1 { color: var(--accent); }
h2, h3, h4 { color: var(--text-heading); }

h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

p { margin-bottom: 1rem; }

/* --- Layout --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-content {
  padding-top: 8rem;
  padding-bottom: 6rem;
  min-height: 100vh;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250,250,250,.88);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border-light);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  text-decoration: none;
}
.nav__logo:hover {
  color: var(--accent-hover);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.nav__links a {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav__links a:hover {
  color: var(--text-heading);
}
.nav__links a.active {
  color: var(--text-heading);
}

/* Mobile nav */
.nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text);
}
.nav__hamburger svg { width: 20px; height: 20px; }

@media (max-width: 720px) {
  .nav__hamburger { display: block; }
  .nav__links {
    display: none;
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    background: rgba(250,250,250,.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    padding: 0.5rem 1.5rem 1rem;
    gap: 0;
  }
  .nav__links.open { display: flex; }
  .nav__links a {
    padding: 0.55rem 0;
    width: 100%;
    font-size: 0.85rem;
  }
}

/* --- Identity block (photo + name + socials) --- */
.identity {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin-bottom: 0;
}

.identity__photo-wrap {
  width: 120px;
  height: 150px;
  border-radius: 60px 60px 6px 6px;
  overflow: hidden;
  border: 2px solid var(--border-light);
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(54,84,214,.08);
}

.identity__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.identity__name {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
}

.identity__location {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}
.identity__location svg { opacity: 0.5; }

.identity__socials {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.identity__socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.identity__socials a:hover {
  color: var(--text-heading);
  border-color: var(--border);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.identity__socials svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.5;
}

@media (max-width: 640px) {
  .identity { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .identity__photo-wrap { width: 100px; height: 120px; border-radius: 50px 50px 6px 6px; }
}

/* --- Hero content (quote + bio below identity) --- */
.hero__quote {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--text-muted);
  border-left: 2px solid var(--accent);
  padding-left: 1.2rem;
  margin-bottom: 1.8rem;
  line-height: 1.7;
  font-style: italic;
}

.hero__bio {
  font-size: 1rem;
  line-height: 1.75;
}

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 2rem 0;
}

/* --- Collab card --- */
.collab-card {
  background: var(--accent-soft);
  border: 1px solid rgba(54,84,214,.12);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  font-size: 0.92rem;
  margin-top: 2rem;
  color: var(--text);
  line-height: 1.6;
}

/* --- Research Highlights / Arches --- */
.highlights {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

.highlights__title {
  font-size: 1.1rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.arches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Each card: arch visual on top, text below */
.arch-card {
  cursor: pointer;
  transition: transform 0.3s ease;
}
.arch-card:hover { transform: translateY(-4px); }
.arch-card:hover .arch {
  box-shadow: 0 12px 40px rgba(0,0,0,.1), 0 0 30px rgba(255,255,255,.3);
}
.arch-card.active .arch {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* The arch visual element */
.arch {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 50% 50% 8px 8px / 40% 40% 4px 4px;
  overflow: hidden;
  margin-bottom: 1rem;
  transition: box-shadow 0.35s ease, filter 0.35s ease;
  position: relative;
  background: var(--bg-alt);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.arch__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.arch-card:hover .arch__img {
  transform: scale(1.03);
  filter: brightness(1.05) saturate(1.1);
}

/* Text below the arch */
.arch-card__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.arch-card__tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.arch-card__cta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.arch-card__cta:hover { color: var(--text-heading); }

/* Expanded panels */
.arch-panels {
  position: relative;
}

.arch-panel {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.8rem;
  margin-bottom: 1rem;
  animation: panelSlideIn 0.35s ease;
  position: relative;
}

.arch-panel[hidden] { display: none; }

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.arch-panel__close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.arch-panel__close:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.arch-panel h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-right: 2rem;
  letter-spacing: -0.02em;
}

.arch-panel h4 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

.arch-panel p {
  font-size: 0.92rem;
  line-height: 1.7;
}

.adoption-list,
.paper-list {
  padding-left: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.7;
}

.adoption-list li,
.paper-list li {
  margin-bottom: 0.5rem;
}

.paper-list a {
  text-decoration-color: var(--accent);
  color: var(--text);
}
.paper-list a:hover {
  color: var(--accent);
}

.panel-note {
  margin-top: 1.2rem;
  padding: 0.8rem 1rem;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

/* Responsive arches */
@media (max-width: 720px) {
  .arches {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .arch-panel {
    padding: 1.5rem 1.3rem;
  }
}
@media (max-width: 480px) {
  .arches { grid-template-columns: 1fr; }
}

/* --- Section headers --- */
.section-header {
  margin-bottom: 2.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
}


/* --- Publication tabs --- */
.pub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.pub-tab {
  font-family: var(--font-mono);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.pub-tab:hover {
  border-color: var(--border);
  color: var(--text-heading);
}
.pub-tab.active {
  background: var(--text-heading);
  color: var(--bg);
  border-color: var(--text-heading);
}

/* --- Publication cards --- */
.pub-list { display: flex; flex-direction: column; gap: 0.75rem; }

.pub-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  transition: all 0.3s ease;
  background: transparent;
}
.pub-card:hover {
  border-color: rgba(54,84,214,.2);
  box-shadow: 0 4px 20px rgba(54,84,214,.06);
  transform: translateY(-1px);
}

.pub-card__venue {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.5rem;
}

.pub-card__award {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: #9a6e08;
  background: #fef6e0;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  margin-left: 0.3rem;
}

.pub-card__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 0.35rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.pub-card__authors {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.pub-card__tldr {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.5rem;
  padding-left: 0.8rem;
  border-left: 2px solid var(--border-light);
}

.pub-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pub-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.pub-link:hover {
  border-color: var(--text-heading);
  color: var(--text-heading);
  transform: translateY(-1px);
}

/* --- Timeline (talks) --- */
.timeline-year-group { margin-bottom: 3rem; }

.timeline-year-label {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  color: var(--text-heading);
  letter-spacing: -0.03em;
}

.timeline {
  position: relative;
  padding-left: 1.6rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.3rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  padding-bottom: 1.3rem;
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
  content: '';
  position: absolute;
  left: -1.3rem;
  top: 0.5rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.timeline__desc {
  font-size: 0.92rem;
  line-height: 1.55;
}

/* --- Teaching cards --- */
.teaching-section { margin-bottom: 3rem; }

.teaching-list { display: flex; flex-direction: column; gap: 0.75rem; }

.teach-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  transition: all 0.3s ease;
}
.teach-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.teach-card__name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.teach-card__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}

.teach-card__body {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text);
}

.teach-card__body ul {
  padding-left: 1.2rem;
  margin-top: 0.3rem;
}

.teach-card__body li {
  margin-bottom: 0.2rem;
}

.teach-card__link {
  display: inline-block;
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* --- Mentee grid --- */
.mentorship-intro {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 560px;
  line-height: 1.7;
}

.mentee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.mentee-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}
.mentee-card:hover {
  border-color: rgba(54,84,214,.2);
  box-shadow: 0 4px 16px rgba(54,84,214,.06);
  transform: translateY(-2px);
}

.mentee-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-light);
}
.mentee-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mentee-initials {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  display: none;
}

.mentee-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
  color: var(--text-heading);
}
.mentee-track {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}
.mentee-dest {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 500;
}

/* --- Blog --- */
.blog-list { display: flex; flex-direction: column; gap: 1rem; }

.blog-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  transition: all 0.3s ease;
  display: block;
  color: var(--text);
  text-decoration: none;
}
.blog-card:hover {
  border-color: rgba(54,84,214,.2);
  box-shadow: 0 4px 20px rgba(54,84,214,.06);
  transform: translateY(-2px);
  color: var(--text);
}

.blog-card__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.blog-card__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
}

.blog-card__excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.blog-card__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: var(--radius-pill);
  margin-top: 0.7rem;
}

/* --- Blog post --- */
.post-header { margin-bottom: 3rem; }

.post-header__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.post-header__title {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.8rem;
}

.post-header__desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.8rem;
  font-style: italic;
}

.post-header__authors {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.post-body {
  font-size: 0.98rem;
  line-height: 1.8;
}

.post-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.post-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
}
.post-body h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.post-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.7rem 1.1rem;
  margin: 1.5rem 0;
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-body pre {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-alt);
  padding: 0.12rem 0.35rem;
  border-radius: 3px;
}
.post-body pre code { background: none; padding: 0; }

.post-body img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin: 1.5rem 0;
}

.post-body .caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  font-style: italic;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.88rem;
}
.post-body th, .post-body td {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border-light);
  text-align: left;
}
.post-body th {
  background: var(--bg-alt);
  font-weight: 600;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.post-body ul, .post-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}
.post-body li { margin-bottom: 0.35rem; }

.post-body strong { font-weight: 600; }

.post-body hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 2rem 0;
}

.math-block {
  overflow-x: auto;
  margin: 1.5rem 0;
  text-align: center;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 2rem 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

/* --- Scroll animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Utilities --- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.hidden { display: none !important; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  text-decoration: none;
}
.back-link:hover { color: var(--text-heading); }

/* --- Print --- */
@media print {
  .nav, .footer { display: none; }
  .page-content { padding-top: 1rem; }
}
