/* ===========================================================
   Jonas Schnidrig — Personal Site
   Apple-style Dark Mode · Red Accents · SF Pro-inspired
   =========================================================== */

:root {
  /* Palette */
  --bg: #000000;
  --bg-elev-1: #0a0a0a;
  --bg-elev-2: #111111;
  --bg-card: #0d0d0e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --text-muted: #a1a1a6;
  --text-dim: #6e6e73;
  --accent: #ff3b30;        /* Apple system red */
  --accent-hover: #ff5147;
  --accent-glow: rgba(255, 59, 48, 0.18);

  /* Type */
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;

  /* Sizes — fluid clamp scale */
  --text-hero:   clamp(2.75rem, 7vw, 5.75rem);   /* 44 → 92 */
  --text-title:  clamp(2rem, 4.5vw, 3.5rem);     /* 32 → 56 */
  --text-h2:     clamp(1.5rem, 2.5vw, 2.25rem);  /* 24 → 36 */
  --text-h3:     1.25rem;                        /* 20 */
  --text-lg:     1.125rem;                       /* 18 */
  --text-base:   1rem;                           /* 16 */
  --text-sm:     0.9375rem;                      /* 15 */
  --text-xs:     0.8125rem;                      /* 13 */

  --tracking-tight: -0.022em;
  --tracking-tighter: -0.032em;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.6s;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; }

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

/* ----- Container ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ----- Navigation ----- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1rem 0;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, padding 0.35s ease;
}
.nav.scrolled {
  background: rgba(0, 0, 0, 0.78);
  border-bottom-color: var(--border);
  padding: 0.75rem 0;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav__brand {
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-tight);
  display: flex; align-items: center; gap: 0.5rem;
}
.nav__brand-mark {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__menu a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 400;
  position: relative;
}
.nav__menu a:hover { color: var(--text); }
.nav__right {
  display: flex; align-items: center; gap: 1.25rem;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  transition: all 0.25s var(--ease-out);
}
.lang-switch button.active {
  background: var(--text);
  color: #000;
  font-weight: 600;
}

/* Mobile nav */
.nav__toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--text);
  width: 36px; height: 36px;
}
@media (max-width: 820px) {
  .nav__menu { display: none; }
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav__menu.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    position: absolute;
    top: 100%; left: 0; right: 0;
    padding: 1.5rem var(--gutter) 2rem;
    background: rgba(0,0,0,0.95);
    border-bottom: 1px solid var(--border);
  }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
  padding-top: 6rem;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.55;
  filter: contrast(1.05) brightness(0.85);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 50% 40%, transparent 0%, rgba(0,0,0,0.55) 70%, #000 100%),
    linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 980px;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.hero__eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.hero__title {
  font-size: var(--text-hero);
  line-height: 1.02;
  letter-spacing: var(--tracking-tighter);
  font-weight: 600;
  margin: 0 0 1.5rem;
  max-width: 18ch;
}
.hero__title .accent { color: var(--accent); }
.hero__subtitle {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 0 2.5rem;
  line-height: 1.55;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: white;
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: white;
  box-shadow: 0 8px 30px var(--accent-glow);
  transform: translateY(-1px);
}
.btn--ghost {
  background: rgba(255,255,255,0.06);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.10);
  color: var(--text);
}
.btn__arrow {
  transition: transform 0.3s var(--ease-out);
}
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ----- Sections ----- */
section {
  position: relative;
  padding: clamp(5rem, 10vw, 9rem) 0;
  scroll-margin-top: 80px;
}
.section__kicker {
  display: inline-block;
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.section__title {
  font-size: var(--text-title);
  line-height: 1.05;
  letter-spacing: var(--tracking-tighter);
  font-weight: 600;
  margin: 0 0 3rem;
  max-width: 22ch;
}

/* ----- About ----- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 6rem;
    align-items: start;
  }
}
.about__prose p {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}
.about__prose p:first-child {
  color: var(--text);
  font-size: clamp(1.125rem, 1.5vw, 1.35rem);
  line-height: 1.5;
}
.about__stats {
  display: grid;
  gap: 1px;
  background: var(--border);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.about__stat {
  background: var(--bg-card);
  padding: 1.75rem 2rem;
}
.about__stat-value {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  margin-bottom: 0.25rem;
}
.about__stat-value .accent { color: var(--text); }
.about__stat:first-child .about__stat-value .accent { color: var(--accent); }
.about__stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ----- Research grid ----- */
.research__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.research__card {
  background: var(--bg-card);
  padding: 2.25rem 2rem;
  transition: background 0.3s ease;
  position: relative;
}
.research__card:hover {
  background: #131315;
}
.research__card-icon {
  width: 32px; height: 32px;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.research__card h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 0.75rem;
}
.research__card p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ----- Projects ----- */
.projects__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.project {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s var(--ease-out);
}
@media (min-width: 720px) {
  .project {
    grid-template-columns: 180px 1fr;
    gap: 3rem;
    padding: 2.5rem 0;
    align-items: baseline;
  }
}
.project:hover {
  padding-left: 0.5rem;
}
.project__tag {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.project__body { display: flex; flex-direction: column; gap: 0.6rem; }
.project__title {
  font-size: var(--text-h2);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: 1.15;
  margin: 0;
}
.project__title .arrow {
  display: inline-block;
  color: var(--accent);
  margin-left: 0.4rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.4s var(--ease-out);
}
.project:hover .project__title .arrow {
  opacity: 1;
  transform: translateX(0);
}
.project__desc {
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.6;
  margin: 0;
  max-width: 70ch;
}

/* ----- Teaching ----- */
.teaching__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.teaching__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.35s var(--ease-out);
}
.teaching__card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.teaching__card h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  margin: 0 0 0.75rem;
  letter-spacing: var(--tracking-tight);
}
.teaching__card p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin: 0;
}

/* ----- Contact ----- */
.contact {
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.contact__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.contact__body {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin: 0 0 3rem;
  line-height: 1.55;
}
.contact__details {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 3rem;
  text-align: left;
}
.contact__detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}
.contact__detail-label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.contact__detail-value {
  font-size: var(--text-base);
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.01em;
  word-break: break-word;
}
.contact__detail-value a:hover { color: var(--accent); }

.socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}
.social-link {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.3s var(--ease-out);
}
.social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-2px);
}
.social-link svg { width: 18px; height: 18px; }

/* ----- Footer ----- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: #000;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-dim);
}
.footer__tagline { letter-spacing: -0.01em; }

/* ----- Reveal animations ----- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Safety: ensure content is visible even if JS or IO fails */
.no-js .reveal { opacity: 1; transform: none; }

/* Mobile tweaks */
@media (max-width: 720px) {
  .hero { padding-top: 5rem; }
  .hero__title { max-width: none; }
  .section__title { margin-bottom: 2rem; }
  .about__grid { gap: 3rem; }
}


/* ============================================================
   PIVOT (Approach) section
   ============================================================ */
.pivot {
  background: var(--bg-elev-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(5rem, 10vw, 9rem) 0;
  scroll-margin-top: 80px;
  position: relative;
}

.pivot__intro {
  max-width: 880px;
  margin: 0 auto 4rem;
  text-align: left;
}

.pivot__headline {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.pivot__mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.pivot__headline .section__title {
  margin: 0;
}

.pivot__lead {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.45;
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  font-weight: 400;
  max-width: 760px;
}

.pivot__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.pivot__card {
  background: var(--bg-card);
  padding: 2.25rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: background 0.3s ease;
  position: relative;
}

.pivot__card:hover {
  background: var(--bg-elev-2);
}

.pivot__card-mark {
  display: inline-flex;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.pivot__card-mark svg {
  width: 36px;
  height: 36px;
}

.pivot__card-tag {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.pivot__card-title {
  font-size: var(--text-h3);
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  color: var(--text);
}

.pivot__card-body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .pivot__headline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .pivot__mark svg { width: 44px; height: 44px; }
  .pivot__intro { margin-bottom: 2.5rem; }
}

/* ============================================================
   PROJECT card as link + SUBPAGE styles
   ============================================================ */
a.project--link {
  text-decoration: none;
  color: inherit;
  display: block;
}
a.project--link:hover .project__title,
a.project--link:focus-visible .project__title {
  color: var(--accent);
}
a.project--link:hover .arrow,
a.project--link:focus-visible .arrow {
  transform: translateX(4px);
  color: var(--accent);
}
.arrow { display: inline-block; transition: transform 0.2s ease, color 0.2s ease; margin-left: 0.4em; }

/* Subpage layout */
.subpage {
  padding: clamp(5rem, 9vw, 8rem) 0 clamp(4rem, 7vw, 6rem);
  background: var(--bg);
  scroll-margin-top: 80px;
  min-height: 60vh;
}
.subpage__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.subpage__back:hover { color: var(--accent); }
.subpage__back-arrow { display: inline-block; transition: transform 0.2s ease; }
.subpage__back:hover .subpage__back-arrow { transform: translateX(-3px); }

.subpage__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.subpage__title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
  margin: 0 0 1.5rem;
  max-width: 880px;
}
.subpage__lead {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 0 4rem;
  font-weight: 400;
}
.subpage__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) {
  .subpage__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
.subpage__body p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 1.25rem;
  max-width: 65ch;
}
.subpage__body h3 {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin: 2.5rem 0 1rem;
}

.subpage__aside {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.subpage__meta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  font-size: 14px;
}
.subpage__meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.subpage__meta-row:last-child { border-bottom: none; }
.subpage__meta-row:first-child { padding-top: 0; }
.subpage__meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.subpage__meta-value { color: var(--text); }
.subpage__meta-value .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; vertical-align: 1px;
}

.subpage__partners {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.subpage__partner {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text);
  background: var(--bg-elev-1);
}
.subpage__themes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.subpage__theme {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.08em;
}
.subpage__theme:not(:last-child)::after { content: "·"; color: var(--text-muted); margin-left: 6px; }

.subpage__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.subpage__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
}
.subpage__link:last-child { border-bottom: none; }
.subpage__link:hover { color: var(--accent); }
.subpage__link-arrow { margin-left: auto; opacity: 0.6; transition: transform 0.2s ease; }
.subpage__link:hover .subpage__link-arrow { transform: translate(2px, -2px); opacity: 1; }

/* Sibling navigation */
.subpage__siblings {
  margin-top: clamp(4rem, 7vw, 6rem);
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) { .subpage__siblings { grid-template-columns: 1fr; } }
.subpage__sibling {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.subpage__sibling:hover { border-color: var(--accent); background: var(--bg-elev-2); }
.subpage__sibling--next { text-align: right; align-items: flex-end; }
.subpage__sibling-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.subpage__sibling-title { font-size: 1rem; font-weight: 500; color: var(--text); }

/* ============================================================
   PUBLICATIONS page
   ============================================================ */
.pubs__hero { padding: clamp(4rem, 7vw, 6rem) 0 2rem; }
.pubs__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin: 2rem 0 3rem;
}
.pubs__stat {
  background: var(--bg-card);
  padding: 1.5rem 1.75rem;
}
.pubs__stat-value {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.pubs__stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pubs__chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 4rem;
}
.pubs__chart-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
  color: var(--text);
}
.pubs__chart svg { width: 100%; height: auto; max-height: 320px; }

.pubs__list { display: flex; flex-direction: column; }
.pubs__item {
  display: grid;
  grid-template-columns: 60px 1fr 80px;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}
.pubs__item:hover { background: var(--bg-elev-1); }
@media (max-width: 700px) {
  .pubs__item { grid-template-columns: 50px 1fr; }
  .pubs__item-cites { grid-column: 2; margin-top: 4px; }
}
.pubs__item-year {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.pubs__item-title {
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
  font-weight: 500;
}
.pubs__item-authors {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.pubs__item-venue {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 2px;
}
.pubs__item-cites {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  text-align: right;
  white-space: nowrap;
}
.pubs__source {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2rem;
  text-align: center;
  font-style: italic;
}
.pubs__source a { color: var(--accent); text-decoration: none; }
.pubs__source a:hover { text-decoration: underline; }

/* ============================================================
   Subpage — small additions for sections & sibling layout
   ============================================================ */
.subpage__section { margin-top: 1.75rem; }
.subpage__section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.subpage__meta-value .dot.dot--active { background: var(--accent); }
.subpage__meta-value .dot.dot--past { background: var(--text-muted); }

/* Sibling layout: arrow next to text */
.subpage__sibling { flex-direction: row; align-items: center; gap: 1rem; }
.subpage__sibling > span:not(.subpage__sibling-arrow) { display: flex; flex-direction: column; gap: 4px; }
.subpage__sibling--next > span:not(.subpage__sibling-arrow) { align-items: flex-end; }
.subpage__sibling-arrow {
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}
.subpage__sibling:hover .subpage__sibling-arrow { color: var(--accent); }
.subpage__sibling--prev:hover .subpage__sibling-arrow { transform: translateX(-3px); }
.subpage__sibling--next:hover .subpage__sibling-arrow { transform: translateX(3px); }
