:root {
  --paper-top: #fbf6ee;
  --paper: #f4ede2;
  --paper-deep: #eee4d4;
  --surface: rgba(255, 251, 245, 0.82);
  --surface-strong: #fffdf8;
  --surface-soft: rgba(248, 241, 232, 0.92);
  --ink: #171411;
  --ink-soft: #40372f;
  --muted: #74695d;
  --line: #d8ccbc;
  --line-strong: #b79f87;
  --accent: #284761;
  --accent-strong: #18354b;
  --accent-soft: #e6edf3;
  --tag-bg: #efe1ce;
  --tag-ink: #7a583c;
  --card-shadow: 0 12px 30px rgba(73, 48, 15, 0.05);
  --lift-shadow: 0 18px 38px rgba(73, 48, 15, 0.08);
}

body.editorial-theme,
body.editorial-home {
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background:
    radial-gradient(circle 960px at top right, rgba(191, 167, 132, 0.14) 0%, transparent 38%),
    radial-gradient(circle 620px at 12% 0%, rgba(255, 255, 255, 0.72) 0%, transparent 28%),
    var(--paper);
  text-rendering: optimizeLegibility;
}

body.editorial-theme a,
body.editorial-home a {
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

body.editorial-theme .site-nav,
body.editorial-home .site-nav {
  background: rgba(248, 241, 231, 0.88) !important;
  border-bottom: 1px solid rgba(170, 146, 117, 0.24) !important;
  box-shadow: 0 10px 18px rgba(80, 56, 25, 0.03);
  backdrop-filter: blur(14px);
}

body.editorial-theme .site-nav a,
body.editorial-home .site-nav a {
  color: var(--ink-soft) !important;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
}

body.editorial-theme .site-nav a:hover,
body.editorial-home .site-nav a:hover {
  color: var(--accent) !important;
}

body.editorial-theme .page-shell,
body.editorial-home .page-shell {
  position: relative;
  z-index: 1;
}

body.editorial-theme .site-footer,
body.editorial-home .site-footer {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(170, 146, 117, 0.22);
  color: var(--muted) !important;
  border-top-color: rgba(170, 146, 117, 0.22) !important;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  letter-spacing: 0.01em;
}

body.editorial-home .page {
  align-items: flex-start;
  padding: 1.45rem 1.5rem 3rem;
}

body.editorial-home .container {
  max-width: 620px;
  padding: clamp(1.35rem, 2.5vw, 2rem);
  border: 1px solid rgba(184, 160, 133, 0.42);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.82) 0%, rgba(249, 242, 232, 0.76) 100%);
  box-shadow: var(--card-shadow);
}

body.editorial-home .photo-wrap {
  margin-bottom: 2rem;
}

body.editorial-home .photo {
  width: 150px;
  height: 150px;
  border: 1px solid rgba(183, 159, 135, 0.58);
  box-shadow: 0 0 0 8px rgba(255, 252, 246, 0.72), 0 20px 36px rgba(66, 43, 17, 0.1);
}

body.editorial-home .header {
  margin-bottom: 1.8rem;
}

body.editorial-home .header h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(2.55rem, 6.6vw, 3.85rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

body.editorial-home .header .subtitle,
body.editorial-home .header .affiliation,
body.editorial-home .nav-card,
body.editorial-home .socials a {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
}

body.editorial-home .header .subtitle {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.7rem;
}

body.editorial-home .header .affiliation {
  margin-top: 0.55rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

body.editorial-home .header .affiliation a {
  color: var(--accent);
  text-decoration-color: rgba(40, 71, 97, 0.24);
}

body.editorial-home .bio {
  max-width: 31ch;
  margin: 0 auto 2.2rem;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.26rem;
  line-height: 1.84;
  color: var(--ink-soft);
}

body.editorial-home .bio a {
  color: var(--ink);
  text-decoration-color: rgba(40, 71, 97, 0.24);
}

body.editorial-home .nav-cards {
  margin-bottom: 2.1rem;
}

body.editorial-home .nav-card {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.7);
  box-shadow: var(--card-shadow);
  color: var(--ink);
}

body.editorial-home .nav-card:hover {
  border-color: var(--line-strong);
  background: rgba(255, 253, 249, 0.92);
  transform: translateY(-2px);
}

body.editorial-home .nav-card .icon {
  color: var(--accent);
}

body.editorial-home .nav-card .chevron {
  color: rgba(80, 67, 55, 0.42);
}

body.editorial-home .socials {
  gap: 0.9rem;
}

body.editorial-home .socials a {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(184, 160, 133, 0.42);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.78);
  color: var(--ink-soft);
  box-shadow: 0 8px 20px rgba(73, 48, 15, 0.04);
}

body.editorial-home .socials a:hover {
  color: var(--accent);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

body.editorial-home .oxford-wrap {
  margin-top: 2.4rem;
}

body.editorial-home .oxford-wrap img {
  width: 200px;
  opacity: 0.22;
  filter: saturate(0.8);
}

body.editorial-home .oxford-wrap img:hover {
  opacity: 0.34;
}

body.research-page .page-shell,
body.teaching-page .page-shell {
  max-width: 52rem !important;
  padding-top: 3.15rem !important;
  padding-bottom: 3rem !important;
}

body.research-page h1,
body.teaching-page h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(2.7rem, 5vw, 3.85rem) !important;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

body.research-page h2,
body.teaching-page h2 {
  color: var(--muted) !important;
}

body.research-page .paper {
  border: 1px solid var(--line) !important;
  border-radius: 22px !important;
  background: rgba(255, 251, 245, 0.74);
  box-shadow: var(--card-shadow);
}

body.research-page .paper:hover {
  border-color: var(--line-strong) !important;
  background: rgba(255, 253, 249, 0.92) !important;
  box-shadow: var(--lift-shadow);
  transform: translateY(-2px);
}

body.research-page .paper h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(1.32rem, 2vw, 1.7rem) !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08 !important;
}

body.research-page .paper h3 a {
  color: inherit;
  text-decoration: none;
}

body.research-page .paper h3 a:hover {
  color: var(--accent);
}

body.research-page .paper > p {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.86rem !important;
  color: var(--muted) !important;
  line-height: 1.5;
}

body.research-page .paper-meta,
body.research-page .paper-status,
body.research-page .paper-date,
body.research-page .btn,
body.research-page footer {
  font-family: 'IBM Plex Sans', system-ui, sans-serif !important;
}

body.research-page .paper-date {
  color: var(--accent);
  border-bottom-color: rgba(40, 71, 97, 0.28);
}

body.research-page .paper-status {
  background: var(--tag-bg);
  color: var(--tag-ink);
  border-color: rgba(122, 88, 60, 0.18);
}

body.research-page .abstract-content {
  border: 1px solid rgba(184, 160, 133, 0.34);
  border-radius: 18px !important;
  background: rgba(244, 237, 226, 0.62) !important;
}

body.research-page .bibtex-content {
  border: 1px solid rgba(35, 41, 47, 0.25);
  border-radius: 18px !important;
  background: #23282f !important;
  color: #f3ede4 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.research-page .copy-bibtex {
  color: #e2d4c4 !important;
}

body.research-page .btn {
  color: var(--ink-soft);
}

body.research-page .btn:hover {
  color: var(--accent);
  border-bottom-color: rgba(40, 71, 97, 0.34);
}

body.teaching-page .page-shell > h1 {
  margin-bottom: 2rem !important;
}

body.teaching-page .page-shell > h2 {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.74rem !important;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 2.4rem !important;
  margin-bottom: 0.95rem !important;
}

body.teaching-page .teaching-card {
  border: 1px solid var(--line) !important;
  border-radius: 20px !important;
  background: rgba(255, 251, 245, 0.78);
  box-shadow: var(--card-shadow);
  padding: 1rem 1.1rem !important;
}

body.teaching-page a.teaching-card:hover {
  border-color: var(--line-strong) !important;
  background: rgba(255, 253, 249, 0.94);
  transform: translateY(-2px);
}

body.teaching-page .teaching-card--static {
  background: rgba(244, 236, 223, 0.74);
}

body.teaching-page .teaching-card-icon {
  width: 2.7rem !important;
  height: 2.7rem !important;
  border-radius: 16px !important;
  border: 1px solid rgba(40, 71, 97, 0.12);
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}

body.teaching-page .teaching-card-title {
  margin: 0;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.42rem !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink) !important;
}

body.teaching-page .teaching-card-meta {
  margin-top: 0.22rem;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.79rem !important;
  color: var(--muted) !important;
  letter-spacing: 0.01em;
}

body.teaching-page .teaching-card .fa-chevron-right,
body.teaching-page .teaching-card .fa-up-right-from-square {
  color: rgba(80, 67, 55, 0.42) !important;
}

body.teaching-page .teaching-card:hover .fa-chevron-right,
body.teaching-page .teaching-card:hover .fa-up-right-from-square {
  color: var(--accent) !important;
}

body.teaching-page .site-footer {
  padding-top: 2.2rem !important;
}

@media (max-width: 640px) {
  body.editorial-home .container {
    display: flex;
    flex-direction: column;
    padding: 1rem 0.95rem 1.15rem;
    border-radius: 22px;
  }

  body.editorial-home .header h1 {
    font-size: clamp(2rem, 9.2vw, 2.65rem);
  }

  body.editorial-home .bio {
    max-width: none;
    margin: 0 0 0.95rem;
    font-size: 1rem;
    line-height: 1.58;
  }

  body.editorial-home .page {
    padding: 0.35rem 0.8rem 1.4rem;
  }

  body.editorial-home .photo-wrap {
    margin-bottom: 0.95rem;
  }

  body.editorial-home .photo {
    width: 112px;
    height: 112px;
    box-shadow: 0 0 0 6px rgba(255, 252, 246, 0.72), 0 14px 28px rgba(66, 43, 17, 0.08);
  }

  body.editorial-home .header {
    margin-bottom: 0.9rem;
  }

  body.editorial-home .header .subtitle {
    font-size: 0.72rem;
    margin-top: 0.45rem;
  }

  body.editorial-home .header .affiliation {
    margin-top: 0.3rem;
    font-size: 0.92rem;
  }

  body.editorial-home .nav-cards {
    margin-bottom: 0.95rem;
  }

  body.editorial-home .nav-card {
    padding: 0.86rem 0.95rem;
    border-radius: 16px;
    margin-bottom: 0.55rem;
    font-size: 0.9rem;
  }

  body.editorial-home .nav-card .left {
    gap: 0.6rem;
  }

  body.editorial-home .socials {
    margin-top: 0.1rem;
  }

  body.editorial-home .oxford-wrap {
    margin-top: 0.9rem;
  }

  body.research-page .page-shell,
  body.teaching-page .page-shell {
    padding-top: 2.3rem !important;
  }
}
