/* ═══════════════════════════════════════
   ABHIJITH GANDRAKOTA — ACADEMIC WEBSITE
   Minimal · Elegant · Maintainable
═══════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  --bg: #fafaf9;
  --bg-alt: #f4f3f0;
  --surface: #ffffff;
  --border: #e5e3de;
  --text: #1a1917;
  --text-2: #5c5a56;
  --text-3: #78756f;
  --accent: #2d5be3;
  /* Fermilab-inspired blue */
  --accent-soft: #eef1fc;
  --accent-dark: #1a3ab5;
  --ink: #1a1917;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .05);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .04);
  --transition: 200ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 19.5px;
  line-height: 1.65;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
}

ul {
  list-style: none;
}

em {
  font-family: var(--font-serif);
  font-style: italic;
}

/* ─── Layout ─── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
  scroll-margin-top: 72px;
}

.alt-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ─── Navigation ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -.01em;
  color: var(--text) !important;
  text-decoration: none !important;
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--accent) !important;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  align-items: center;
  list-style: none;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: .01em;
  transition: color var(--transition);
  padding: 4px 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 2px;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ─── Hero / About ─── */
.hero-section {
  padding: 96px 0 80px;
}

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

.hero-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.5vw, 60px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 16px;
}

.hero-institution {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 24px;
  line-height: 1.5;
}

.hero-institution .muted {
  color: var(--text-3);
  font-size: 13px;
}

.hero-bio {
  max-width: 520px;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 32px;
}

/* Markdown-loaded bio */
.hero-bio p {
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 12px;
}

.hero-bio p:last-child {
  margin-bottom: 0;
}

.hero-bio h1,
.hero-bio h2,
.hero-bio h3 {
  display: none;
}

.hero-bio strong {
  font-weight: 600;
  color: var(--ink);
}

.hero-bio a {
  color: var(--accent);
}

.hero-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none !important;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1.5px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* Hero badge */
.hero-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.badge-ring {
  width: 320px;
  height: 320px;
  border-radius: 28px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.badge-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.badge-meta span {
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ─── Section Titles ─── */
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16.5px;
  color: var(--text-2);
  max-width: 560px;
  margin-bottom: 48px;
  line-height: 1.7;
}

.sub-section-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
  padding-top: 8px;
}

/* ─── Research Cards ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.card-icon {
  font-size: 24px;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.card p {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.7;
}

/* Awards */
.awards-block {
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

.award-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.award-list li {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.award-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.award-year {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 36px;
}

.award-desc {
  font-size: 16.5px;
  color: var(--text-2);
  line-height: 1.65;
}

/* ─── Publications ─── */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.pub-year-group {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
}

.pub-year-label {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: -.03em;
  padding-top: 4px;
}

.pub-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pub-item {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  transition: box-shadow var(--transition);
}

.pub-item:hover {
  box-shadow: var(--shadow);
}

.pub-item.featured {
  border-left: 3px solid var(--accent);
}

.pub-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 7px;
}

/* ── Submitted / Under Review badge variant ── */
.pub-badge.submitted {
  color: #6b6762;
  background: #edecea;
}

.pub-title {
  font-size: 16.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 5px;
}

.pub-meta {
  font-size: 15px;
  color: var(--text-3);
}

.pub-meta a {
  color: var(--text-3);
}

.pub-meta a:hover {
  color: var(--accent);
}

/* ─── News / Media ─── */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-3);
  min-width: 56px;
}

.news-body {
  flex: 1;
  min-width: 0;
}

.news-title {
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
}

a.news-title:hover {
  color: var(--accent);
}

.news-source {
  font-size: 13.5px;
  color: var(--text-3);
  margin-top: 3px;
}

/* ─── Collaborators ─── */
.collab-layout {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.collab-group-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}

.collab-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.collab-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow var(--transition), transform var(--transition);
}

.collab-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.collab-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: .02em;
}

.collab-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.collab-inst {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.3;
}

/* Affiliation chips */
.affil-block {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.affil-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: all var(--transition);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ─── Contact ─── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-text {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 420px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-list li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: 14px;
}

.contact-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  min-width: 56px;
  flex-shrink: 0;
}

/* Education */
.education-block {
  margin-top: 8px;
}

.edu-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.edu-item:last-child {
  border-bottom: none;
}

.edu-degree {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}

.edu-inst {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 2px;
}

.edu-year {
  font-size: 12.5px;
  color: var(--text-3);
}

/* ─── Footer ─── */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-inner p {
  font-size: 13px;
  color: var(--text-3);
}

.footer-note {
  font-style: italic;
}

/* ───────────────────────────────────
   RESPONSIVE — 720px (tablet/mobile)
─────────────────────────────────── */
@media (max-width: 720px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  /* Badge sits inline under the name on mobile */
  .hero-badge {
    flex-direction: row;
    align-items: center;
    align-self: flex-start;
    gap: 16px;
  }

  .badge-ring {
    width: 100px;
    height: 100px;
    border-radius: 14px;
  }

  .badge-initials {
    font-size: 26px;
  }

  .badge-meta {
    align-items: flex-start;
    text-align: left;
  }

  .badge-meta span {
    font-size: 11px;
  }

  /* Publications: hide year label, stack nicely */
  .pub-year-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pub-year-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-3);
  }

  .pub-item {
    padding: 14px 16px;
  }

  .pub-title {
    font-size: 15px;
  }

  .pub-meta {
    font-size: 13.5px;
  }

  /* Cards: 2-col on tablet, 1-col on phone handled below */
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .card {
    padding: 20px 18px;
  }

  .card p {
    font-size: 14.5px;
  }

  /* Award list: narrower */
  .award-list li {
    gap: 14px;
  }

  .award-year {
    min-width: 30px;
    font-size: 12.5px;
  }

  .award-desc {
    font-size: 14.5px;
  }

  /* News: stack date above body on tablet */
  .news-item {
    flex-direction: column;
    gap: 4px;
  }

  /* Collab cards: 2-col on tablet */
  .collab-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Nav mobile */
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
    box-shadow: var(--shadow);
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 16px;
    padding: 6px 0;
  }

  .nav-toggle {
    display: flex;
  }

  /* Chip wrap better on mobile */
  .affil-chips {
    gap: 8px;
  }

  .chip {
    font-size: 13px;
    padding: 6px 12px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Section padding */
  .section {
    padding: 56px 0;
  }

  /* Hero section tighter */
  .hero-section {
    padding: 64px 0 56px;
  }

  /* Contact */
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Sub-section title */
  .sub-section-title {
    font-size: 13px;
  }
}

/* ───────────────────────────────────
   RESPONSIVE — 480px (phone)
─────────────────────────────────── */
@media (max-width: 480px) {
  body {
    font-size: 17.5px;
  }

  .hero-name {
    font-size: 36px;
  }

  .hero-bio,
  .hero-bio p {
    font-size: 16px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .collab-cards {
    grid-template-columns: 1fr;
  }

  .news-title {
    font-size: 15.5px;
  }

  /* Hero badge goes above name on very small screens */
  .hero-layout {
    gap: 24px;
  }

  .badge-ring {
    width: 84px;
    height: 84px;
    border-radius: 12px;
  }

  .badge-initials {
    font-size: 22px;
  }

  /* Buttons bigger touch target */
  .btn {
    padding: 11px 20px;
    font-size: 15px;
  }

  .hero-links {
    gap: 10px;
  }

  /* Collab card: full row */
  .collab-card {
    padding: 12px 14px;
  }

  /* Awards */
  .award-list li {
    flex-direction: column;
    gap: 4px;
  }

  .award-year {
    font-size: 12px;
  }

  /* Container tighter */
  .container {
    padding: 0 16px;
  }
}

/* ─── Scroll Reveal Animation ─── */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ════════════════════════════════════
   MARKDOWN PROSE STYLES
   Applied to all [data-md] containers
══════════════════════════════════════ */
.md-prose {
  line-height: 1.72;
  color: var(--text-2);
  font-size: 15px;
}

/* H1 — becomes the section title */
.md-prose h1 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 0 12px;
}

/* H2 — subsection heading */
.md-prose h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 40px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* H3 */
.md-prose h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 8px;
}

/* Paragraphs */
.md-prose p {
  margin-bottom: 14px;
  max-width: 720px;
}

.md-prose p:last-child {
  margin-bottom: 0;
}

/* Bold / Italic */
.md-prose strong {
  font-weight: 600;
  color: var(--ink);
}

.md-prose em {
  font-style: italic;
  font-family: var(--font-serif);
}

/* Lists */
.md-prose ul,
.md-prose ol {
  margin: 10px 0 16px 0;
  padding-left: 20px;
}

.md-prose ul {
  list-style: disc;
}

.md-prose ol {
  list-style: decimal;
}

.md-prose li {
  margin-bottom: 7px;
  font-size: 14.5px;
  color: var(--text-2);
}

.md-prose li::marker {
  color: var(--accent);
}

/* Links */
.md-prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.md-prose a:hover {
  border-bottom-color: var(--accent);
  text-decoration: none;
  color: var(--accent-dark);
}

/* Horizontal rules → soft section dividers */
.md-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* Inline code */
.md-prose code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 13px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text);
}

/* Code blocks */
.md-prose pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13px;
  color: var(--text);
}

.md-prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* Blockquotes */
.md-prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 16px 0;
  padding: 10px 20px;
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-2);
  font-style: italic;
}

/* Tables (for Talks section etc.) */
.md-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0 24px;
}

.md-prose th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.md-prose td {
  padding: 10px 12px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.md-prose tr:last-child td {
  border-bottom: none;
}

.md-prose tr:hover td {
  background: var(--bg-alt);
}

/* ─── Section-specific overrides ─── */

/* About bio: no section title (h1 hidden), smaller text */
.hero-bio.md-loaded h1 {
  display: none;
}

.hero-bio.md-loaded p {
  font-size: 15.5px;
  color: var(--text-2);
  max-width: 520px;
}

/* Research: h2 headings become card-like blocks */
.md-research h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 8px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
}

.md-research h2+p,
.md-research h2+ul {
  padding: 12px 20px 16px;
  margin: 0 0 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 14px;
}

.md-research h2+ul {
  list-style: none;
  padding-left: 20px;
}

.md-research h2+ul li::marker {
  content: '';
}

.md-research h1 {
  margin-bottom: 4px;
}

.md-research h1+p {
  margin-bottom: 32px;
}

.md-research>h2:first-of-type {
  margin-top: 0;
}

/* Publications: list items get card treatment */
.md-publications ul {
  list-style: none;
  padding: 0;
}

.md-publications li {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-2);
  transition: box-shadow var(--transition);
}

.md-publications li:hover {
  box-shadow: var(--shadow);
}

.md-publications li strong {
  color: var(--accent);
}

.md-publications h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--border);
  letter-spacing: -.02em;
  border: none;
  padding: 0;
  margin: 40px 0 16px;
}

/* Remove italic on first h2 */
.md-publications h2:first-of-type {
  margin-top: 0;
}

/* Collaborators: list items as simple rows */
.md-collaborators ul {
  list-style: none;
  padding: 0;
}

.md-collaborators li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}

.md-collaborators li:last-child {
  border-bottom: none;
}

.md-collaborators li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.md-collaborators li>* {
  list-style: none;
}

/* Contact */
.md-contact ul {
  list-style: none;
  padding: 0;
}

.md-contact li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}

.md-contact li:last-child {
  border-bottom: none;
}

/* ─── Loading / Error States ─── */
.md-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 14px;
  padding: 12px 0;
}

.md-loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.md-error {
  font-size: 13.5px;
  color: var(--text-3);
  padding: 20px;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  line-height: 1.8;
}

.md-error code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}

/* ─── Print Styles ─── */
@media print {
  .site-header,
  .nav-toggle,
  .hero-links,
  .footer-note,
  .md-loading {
    display: none !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .section {
    padding: 32px 0;
  }

  .card,
  .pub-item,
  .collab-card {
    box-shadow: none !important;
    transform: none !important;
    break-inside: avoid;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-badge {
    display: none;
  }
}