/* adamkalamchi.com — unified stylesheet, zero inline styles */

:root {
  --navy: #1a3461;
  --navy-light: #1c559c;
  --white: #ffffff;
  --off-white: #ecf0f3;
  --text-dark: #000000;
  --text-light: #ffffff;
  --text-muted: #666;
  --border: #e5e5e0;
  --max-width: 1200px;
  --content-width: 720px;
}

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

body {
  font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.4;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* ===== SHARED HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0.9rem 3rem;
  background: var(--navy);
  font-family: 'Poppins', sans-serif;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.site-logo {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-light);
  text-decoration: none;
}
.nav-links {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.nav-links > .ak-dropdown > a,
.nav-links > a {
  color: var(--text-light);
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
}
.nav-links > .ak-dropdown > a:hover,
.nav-links > a:hover {
  color: rgba(255,255,255,0.7);
}
.header-spacer { height: 52px; }

/* Nav social icons */
.nav-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
}
.nav-social a {
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.nav-social a:hover { color: var(--text-light); }

/* Dropdown nav */
.ak-dropdown { position: relative; padding-bottom: 0.5rem; }
.ak-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0;
  min-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 10000;
}
.ak-dropdown:hover .ak-dropdown-content { display: block; }
.ak-dropdown-right .ak-dropdown-content { left: auto; right: 0; }
.ak-dropdown-content a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--navy);
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: all 0.1s;
}
.ak-dropdown-content a:hover {
  color: var(--text-light);
  background: var(--navy);
}

/* ===== SHARED FOOTER ===== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 3rem 2.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  text-align: center;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}
.footer-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.footer-social a {
  display: block;
  line-height: 0;
  transition: opacity 0.15s;
}
.footer-social a:hover {
  opacity: 0.8;
}
.footer-info {
  display: flex;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
}
.footer-info a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}
.footer-info a:hover { color: var(--text-light); }

/* ===== HERO SECTION (homepage) ===== */
.hero-section {
  background: var(--white);
  color: var(--text-dark);
  text-align: center;
  padding: 6rem 2rem 3.5rem;
  position: relative;
}
.hero-inner {
  max-width: 700px;
  margin: 0 auto;
}
.hero-section h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 4.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.hero-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 0;
}
.hero-social {
  position: absolute;
  top: 50%;
  right: 3rem;
  transform: translateY(-50%);
  display: flex;
  gap: 0.5rem;
}
.hero-social a {
  display: block;
  line-height: 0;
  transition: opacity 0.15s;
}
.hero-social a:hover { opacity: 0.7; }
.social-svg {
  width: 36px;
  height: 36px;
}
.footer-svg {
  width: 32px;
  height: 32px;
}

/* ===== INTRO SECTION (homepage) ===== */
.intro-section {
  background: var(--navy);
  padding: 5rem 2rem;
}
.intro-inner {
  max-width: 1500px;
  margin: 0 auto;
}
.intro-layout {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 550px;
  gap: 3rem;
  align-items: start;
}
.intro-photo {
  width: 100%;
  overflow: hidden;
}
.intro-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
.intro-text {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-light);
}
.intro-text p {
  margin-bottom: 1.2rem;
  color: var(--text-light);
}
.intro-text strong {
  color: var(--text-light);
  font-weight: 700;
}
.intro-text a {
  color: var(--text-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== CREDENTIALS (homepage) ===== */
.credentials-section {
  background: var(--white);
  padding: 8rem 2rem;
}
.credentials-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 5rem;
  text-align: center;
}
.credential-col {
  flex: 1;
}
.credential-col h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 3.5rem;
  color: var(--text-dark);
  white-space: nowrap;
}
.logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3.5rem;
  margin-bottom: 3rem;
}
.logo-row:last-child { margin-bottom: 0; }
.logo-row a { display: flex; align-items: center; justify-content: center; }
.logo-row img {
  height: 72px;
  max-width: 240px;
  width: auto;
  object-fit: contain;
  opacity: 1;
}
.credential-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  height: calc(2.4rem * 1.2);
}
.credential-plus span {
  font-family: 'Poppins', sans-serif;
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--navy);
  line-height: 1;
}

/* ===== SERVICES (homepage) ===== */
.services-section {
  background: var(--off-white);
  padding: 6rem 2rem;
}
.services-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4rem;
}
.service-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  white-space: nowrap;
}
.service-tagline {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}
.service-card p:last-child {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-dark);
}

/* ===== CONTENT CARDS (homepage) ===== */
.content-section {
  background: var(--white);
  padding: 5rem 2rem;
}
.content-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.content-card {
  background: var(--navy);
  color: var(--text-light);
  padding: 3rem 2.5rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 250px;
  transition: opacity 0.15s;
}
.content-card:hover { opacity: 0.9; }
.content-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: var(--text-light);
  line-height: 1.3;
  max-width: 280px;
}
.card-link {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  border-bottom: 1px solid rgba(255,255,255,0.4);
  padding-bottom: 2px;
}

/* ===== PAGE HEADERS (inner pages) ===== */
.prose-header {
  background: var(--navy);
  color: var(--text-light);
  padding: 6rem 2rem 3rem;
  text-align: center;
}
.prose-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

/* ===== PROSE LISTING ===== */
.prose-listing {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 3rem;
}
.prose-sidenav {
  position: sticky;
  top: 70px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.5rem;
}
.prose-sidenav a {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  line-height: 1.3;
}
.prose-sidenav a:hover { color: var(--navy-light); }
.prose-articles { min-width: 0; }
.category { margin-bottom: 3rem; }
.category h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.article-grid { display: flex; flex-direction: column; gap: 0.15rem; }
.article-card {
  display: block;
  padding: 0.6rem 0;
  text-decoration: none;
  color: var(--text-dark);
}
.article-card:hover { opacity: 0.6; }
.article-card h3 { font-size: 1.05rem; font-weight: 500; margin-bottom: 0.1rem; }
.article-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; }

/* ===== ARTICLE PAGE ===== */
.article-header {
  background: var(--navy);
  color: var(--text-light);
  padding: 6rem 2rem 3rem;
}
.article-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}
.article-header .category-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.75rem;
  display: block;
}
.article-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
article {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}
article p { margin-bottom: 1.3rem; line-height: 1.6; }
article strong { font-weight: 700; }
article h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
article h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
article ul, article ol { margin-bottom: 1.3rem; padding-left: 1.5rem; }
article li { margin-bottom: 0.4rem; line-height: 1.5; }
article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0 2rem;
}
article blockquote {
  border-left: 3px solid var(--navy-light);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
}
.back-link-top {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
}
.back-link-top a {
  font-size: 0.8rem;
  color: var(--navy-light);
  text-decoration: none;
}
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  max-width: var(--content-width);
  margin: 0 auto;
}
.article-nav a {
  text-decoration: none;
  color: var(--navy);
  max-width: 45%;
}
.article-nav a:hover { color: var(--navy-light); }
.article-nav-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}
.article-nav-title { font-size: 0.9rem; font-weight: 500; }
.article-nav-next { text-align: right; margin-left: auto; }

/* ===== CODE / PAPERS PAGE ===== */
.repo-list {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: grid;
  gap: 1.25rem;
}
.repo-card {
  padding: 1.5rem;
  border: 1px solid #ddd;
  text-decoration: none;
  color: var(--text-dark);
  display: block;
  transition: border-color 0.15s;
}
.repo-card:hover { border-color: var(--navy-light); }
.repo-card h3 { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 600; margin-bottom: 0.3rem; }
.repo-card p { font-size: 0.9rem; color: #333; margin-bottom: 0.5rem; line-height: 1.5; }
.repo-meta { font-size: 0.75rem; color: var(--text-muted); }

/* ===== POSTS PAGE ===== */
.posts-listing {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.posts-section { margin-bottom: 2.5rem; }
.posts-section h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.handle-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  text-decoration: none;
  color: var(--text-dark);
  border-bottom: 1px solid #eee;
}
.handle-link:last-child { border-bottom: none; }
.handle-link .platform { font-weight: 500; font-size: 0.95rem; }
.handle-link .handle { color: var(--text-muted); font-size: 0.85rem; }

/* ===== STATS PAGE ===== */
.stats-intro {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
}
.stats-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.stats-section { margin-bottom: 2.5rem; }
.stats-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0ee;
}
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 0.9rem; color: #333; }
.stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  text-align: right;
  white-space: nowrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-header { padding: 0.9rem 1.5rem; }
  .site-header nav { display: flex; justify-content: space-between; }
  .nav-links { gap: 1rem; font-size: 0.95rem; }
  .nav-social { display: none; }
  .hero-section h1 { font-size: 2.5rem; }
  .hero-section { padding: 5rem 1.5rem 2rem; }
  .hero-social {
    position: static;
    transform: none;
    justify-content: center;
    margin-top: 1rem;
  }
  .content-card { aspect-ratio: auto; min-height: 200px; }
  .intro-layout { grid-template-columns: 1fr; }
  .intro-photo { max-width: 400px; margin: 0 auto; }
  .intro-text { font-size: 1rem; }
  .credentials-inner { flex-direction: column; gap: 2rem; }
  .credential-col h2 { font-size: 2rem; white-space: normal; }
  .credential-plus { display: none; }
  .logo-row { gap: 2rem; margin-bottom: 1.5rem; }
  .logo-row img { height: 48px; max-width: 160px; }
  .services-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .service-card h3 { font-size: 1.5rem; white-space: normal; }
  .content-grid { grid-template-columns: 1fr; }
  .prose-header h1 { font-size: 1.8rem; }
  .prose-listing { grid-template-columns: 1fr; }
  .prose-sidenav { display: none; }
  article { padding: 2rem 1rem; font-size: 16px; }
  .article-header h1 { font-size: 1.5rem; }
  .article-header { padding: 5rem 1.5rem 2rem; }
  article table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .footer-info { flex-direction: column; gap: 0.5rem; text-align: center; }
  .footer-social { flex-wrap: wrap; }
  .article-nav { flex-direction: column; gap: 1rem; }
  .article-nav a { max-width: 100%; }
  .article-nav-next { text-align: left; margin-left: 0; }
  .back-link-top { padding: 0.75rem 1rem 0; }
  .stat-row { flex-direction: column; gap: 0.25rem; }
  .stat-value { text-align: left; }
  .repo-list { padding: 2rem 1rem; }
  .about-intro { grid-template-columns: 1fr; }
  .about-photo { max-width: 200px; }
  .timeline-entry { grid-template-columns: 1fr; gap: 0.25rem; }
  .paper-content { max-width: 100%; overflow-x: auto; }
  .paper-content table { font-size: 0.8rem; }
  .stats-grid { max-width: 100%; overflow-x: hidden; }
  .about-content { max-width: 100%; overflow-x: hidden; }
}

/* ===== ABOUT PAGE ===== */
.about-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.about-intro {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  align-items: start;
}
.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-text p {
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 1rem;
  color: #333;
}
.about-timeline h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.timeline-entry {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0ee;
}
.timeline-entry:last-child { border-bottom: none; }
.timeline-period {
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  padding-top: 0.15rem;
}
.timeline-detail h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}
.timeline-detail p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #333;
}

/* Screen-reader / crawler only — visually hidden, still in DOM */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Anchor scroll offset for fixed nav */
.category[id] { scroll-margin-top: 80px; }

/* ===== PAPER PAGES ===== */
.paper-header {
  background: var(--navy);
  color: var(--text-light);
  padding: 7rem 2rem 3rem;
  text-align: center;
}
.paper-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}
.paper-header .category-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.75rem;
  display: block;
}
.paper-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}
.paper-header .paper-meta {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  margin-top: 0.5rem;
}
/* Paper layout: sidebar nav + centered content */
.paper-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.chapter-nav {
  position: sticky;
  top: 70px;
  align-self: start;
  padding-top: 1rem;
}
.chapter-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chapter-nav a {
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  line-height: 1.3;
}
.chapter-nav a:hover { color: var(--navy-light); }

.paper-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-top: 1rem;
}
.paper-content p { margin-bottom: 1.3rem; line-height: 1.6; }
.paper-content h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.paper-content h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.paper-content ul, .paper-content ol { margin-bottom: 1.3rem; padding-left: 1.5rem; }
.paper-content li { margin-bottom: 0.4rem; line-height: 1.5; }

/* Chapter number badges */
.paper-content h2 .num {
  display: none;
}

/* Abstract block */
.paper-content .abstract {
  padding: 0;
  margin-bottom: 2rem;
  background: none;
}
.paper-content .abstract-label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

/* Tables in papers */
.paper-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.paper-content table caption {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}
.paper-content th, .paper-content td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.paper-content th {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.paper-content .right { text-align: right; }

/* Footnotes */
.paper-content .footnotes {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.paper-content .footnotes p { margin-bottom: 0.5rem; }
.paper-content .footnotes a { color: var(--navy-light); text-decoration: none; }
.paper-content .footnotes a:hover { text-decoration: underline; }

/* Paper back-link needs to align with the paper grid */
.paper-header + .back-link-top {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
  /* Offset to align with content column (180px nav + 2rem gap) */
  padding-left: calc(180px + 2rem + 1.5rem);
}

@media (max-width: 768px) {
  .paper-header h1 { font-size: 1.6rem; }
  .paper-header { padding: 5rem 1.5rem 2rem; }
  .paper-layout { grid-template-columns: 1fr; }
  .chapter-nav { display: none; }
  .paper-header + .back-link-top { padding-left: 1.5rem; }
  .paper-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
