/* ==========================================================================
   LLM Confidence Score -- Main Stylesheet
   Author: Joerg Osterrieder, 2026
   Professional academic design for GitHub Pages
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */
:root {
  --primary: #1a365d;
  --secondary: #2b6cb0;
  --accent: #ed8936;
  --bg: #ffffff;
  --surface: #f7fafc;
  --text: #1a202c;
  --text-muted: #4a5568;
  --border: #e2e8f0;
  --success: #38a169;
  --warning: #d69e2e;
  --danger: #e53e3e;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;

  --nav-height: 64px;
  --max-width: 1200px;
  --section-padding: 5rem 1.5rem;
  --card-radius: 8px;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1),
    0 4px 10px rgba(0, 0, 0, 0.06);
  --transition-base: 0.25s ease;
}

/* --------------------------------------------------------------------------
   2. RESET AND BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

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

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

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

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

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.375rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.125rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text);
}

.text-muted {
  color: var(--text-muted);
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 760px;
}

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

.section {
  padding: var(--section-padding);
}

.section--alt {
  background: var(--surface);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.75rem;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   5. FIXED NAVIGATION
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(26, 54, 93, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.nav-brand span {
  color: var(--accent);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 0.625rem;
  border-radius: 4px;
  transition: background var(--transition-base), color var(--transition-base);
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */
.hero {
  padding-top: calc(var(--nav-height) + 5rem);
  padding-bottom: 5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero h1 {
  color: #fff;
  font-size: 3.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 680px;
  margin: 0 auto 0.5rem;
  font-weight: 400;
}

.hero .author {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
}

.hero .brief {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1.4;
}

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

.btn--primary:hover {
  background: #dd6b20;
  border-color: #dd6b20;
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.btn--small {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   8. CARDS
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-base),
    box-shadow var(--transition-base);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.card-icon--blue { background: var(--secondary); }
.card-icon--green { background: var(--success); }
.card-icon--orange { background: var(--accent); }
.card-icon--purple { background: #805ad5; }
.card-icon--red { background: var(--danger); }
.card-icon--teal { background: #319795; }

.card h3 {
  font-size: 1.125rem;
}

.card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Feature cards (overview) */
.feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.feature-card .card-icon {
  margin: 0 auto 1rem;
}

/* Gap cards */
.gap-card {
  border-left: 4px solid var(--accent);
}

.gap-card .gap-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.gap-card .gap-state {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.gap-card .gap-opportunity {
  font-size: 0.875rem;
  color: var(--success);
  font-weight: 600;
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   9. TAXONOMY SECTION
   -------------------------------------------------------------------------- */
.taxonomy-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

#taxonomy-tree {
  width: 100%;
  min-height: 400px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--bg);
}

#taxonomy-tree svg {
  width: 100%;
  display: block;
}

#taxonomy-legend {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dimension-cards {
  margin-top: 2.5rem;
}

/* D3 tree styling */
.node circle {
  cursor: pointer;
  stroke-width: 2px;
  transition: r 0.2s ease;
}

.node circle:hover {
  r: 7;
}

.node text {
  font-family: var(--font-sans);
  font-size: 12px;
  fill: var(--text);
}

.link {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5px;
}

.tooltip {
  position: absolute;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  line-height: 1.4;
  max-width: 260px;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.tooltip.visible {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   10. METHODS TABLE
   -------------------------------------------------------------------------- */
.methods-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.methods-controls select,
.methods-controls input {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition-base);
}

.methods-controls select:focus,
.methods-controls input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

.methods-controls input {
  flex: 1;
  min-width: 200px;
}

#method-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: auto;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
}

.methods-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.methods-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.methods-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.methods-table th:hover {
  background: #1e4070;
}

.methods-table th .sort-arrow {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  opacity: 0.4;
}

.methods-table th.sorted .sort-arrow {
  opacity: 1;
}

.methods-table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.methods-table tbody tr:hover {
  background: rgba(43, 108, 176, 0.04);
}

.methods-table tbody tr:last-child td {
  border-bottom: none;
}

/* Access level badges in table */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.01em;
}

.badge--white-box  { background: #ebf8ff; color: #2b6cb0; }
.badge--gray-box   { background: #fefcbf; color: #975a16; }
.badge--black-box  { background: #fed7d7; color: #c53030; }
.badge--any        { background: #e9d8fd; color: #6b46c1; }
.badge--varies     { background: #e2e8f0; color: #4a5568; }

/* Calibration quality badges */
.badge--good       { background: #c6f6d5; color: #276749; }
.badge--moderate   { background: #fefcbf; color: #975a16; }
.badge--poor       { background: #fed7d7; color: #c53030; }
.badge--best       { background: #b2f5ea; color: #234e52; }
.badge--guaranteed { background: #c6f6d5; color: #22543d; border: 1px solid #38a169; }

/* --------------------------------------------------------------------------
   11. ARCHITECTURE
   -------------------------------------------------------------------------- */
.architecture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.module-tree {
  background: #1a202c;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--card-radius);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.8;
  overflow-x: auto;
}

.module-tree .dir {
  color: var(--accent);
  font-weight: 600;
}

.module-tree .comment {
  color: #718096;
}

.code-block {
  background: #1a202c;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--card-radius);
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.7;
}

.code-block code {
  font-family: var(--font-mono);
}

.code-block .keyword  { color: #f687b3; }
.code-block .string   { color: #68d391; }
.code-block .comment  { color: #718096; }
.code-block .function { color: #63b3ed; }
.code-block .number   { color: #f6ad55; }

.design-notes {
  margin-top: 1.5rem;
}

.design-notes li {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  padding-left: 0.5rem;
}

.design-notes li::marker {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   12. EVALUATION (METRICS + BENCHMARKS)
   -------------------------------------------------------------------------- */
.metric-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
}

.metric-card h4 {
  color: var(--secondary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.metric-card .formula {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--surface);
  padding: 0.375rem 0.625rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  color: var(--primary);
  display: block;
  overflow-x: auto;
}

.metric-card .interpretation {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.benchmark-table th {
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
}

.benchmark-table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
}

.benchmark-table tbody tr:hover {
  background: rgba(43, 108, 176, 0.04);
}

/* --------------------------------------------------------------------------
   13. ROADMAP TIMELINE
   -------------------------------------------------------------------------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
}

.timeline-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  padding-top: 2.5rem;
  position: relative;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.timeline-dot {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border);
}

.timeline-card.active .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-card.active {
  border-color: var(--accent);
}

.timeline-phase {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.125rem;
}

.timeline-weeks {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timeline-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.timeline-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   14. PAPERS / LITERATURE
   -------------------------------------------------------------------------- */
.papers-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.category-tab {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
}

.category-tab:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.category-tab.active {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

#paper-search {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 100%;
  max-width: 400px;
  background: var(--bg);
  color: var(--text);
}

#paper-search:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

#papers-list {
  display: grid;
  gap: 0.75rem;
}

.paper-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  gap: 1rem;
  align-items: start;
  transition: box-shadow var(--transition-base);
}

.paper-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.paper-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--secondary);
  background: #ebf8ff;
  padding: 0.25rem 0.375rem;
  border-radius: 4px;
  text-align: center;
  white-space: nowrap;
}

.paper-body {
  min-width: 0;
}

.paper-title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.paper-authors {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.paper-venue {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.paper-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.375rem;
  white-space: nowrap;
}

.paper-year {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--primary);
}

.paper-category-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  background: var(--surface);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.paper-citations {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.paper-doi {
  font-size: 0.75rem;
}

/* --------------------------------------------------------------------------
   15. STRATEGY
   -------------------------------------------------------------------------- */
.strategy-box {
  background: linear-gradient(135deg, #ebf8ff 0%, #e9d8fd 100%);
  border: 2px solid var(--secondary);
  border-radius: var(--card-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.strategy-box .label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.strategy-box h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.strategy-box .proposed-title {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.contributions-list {
  list-style: none;
  counter-reset: contribution;
}

.contributions-list li {
  counter-increment: contribution;
  padding: 1rem 1.25rem;
  padding-left: 3.25rem;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  margin-bottom: 0.75rem;
  background: var(--bg);
  font-size: 0.9375rem;
  transition: box-shadow var(--transition-base);
}

.contributions-list li:hover {
  box-shadow: var(--card-shadow-hover);
}

.contributions-list li::before {
  content: counter(contribution);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   16. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.875rem;
}

.footer strong {
  color: #fff;
}

/* --------------------------------------------------------------------------
   17. BACK TO TOP
   -------------------------------------------------------------------------- */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base),
    background var(--transition-base);
  z-index: 900;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background: var(--secondary);
}

/* --------------------------------------------------------------------------
   18. FADE-IN ANIMATION
   -------------------------------------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   19. NOTE CALLOUT
   -------------------------------------------------------------------------- */
.note {
  background: #fffff0;
  border-left: 4px solid var(--warning);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

.note strong {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   20. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */

/* Tablet (< 1024px) */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .metric-cards { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { display: none; }
  .architecture-grid { grid-template-columns: 1fr; }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  :root {
    --section-padding: 3rem 1rem;
    --nav-height: 56px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .hero h1 { font-size: 2.25rem; }
  .hero .subtitle { font-size: 1.0625rem; }

  .hamburger { display: flex; }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(26, 54, 93, 0.98);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu a {
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .metric-cards {
    grid-template-columns: 1fr;
  }

  .timeline {
    grid-template-columns: 1fr;
    padding-left: 1.5rem;
  }

  .timeline-dot {
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .timeline::before {
    display: block;
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 3px;
    height: 100%;
  }

  .paper-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .paper-meta {
    flex-direction: row;
    align-items: center;
  }

  .methods-controls {
    flex-direction: column;
    align-items: stretch;
  }

  #method-count {
    margin-left: 0;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .strategy-box {
    padding: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   21. PRINT STYLES
   -------------------------------------------------------------------------- */
@media print {
  .nav,
  #back-to-top,
  .hamburger,
  .taxonomy-controls,
  .methods-controls,
  .papers-controls,
  .hero-buttons {
    display: none !important;
  }

  .hero {
    padding-top: 2rem;
    background: none !important;
    color: var(--text) !important;
  }

  .hero h1,
  .hero .subtitle,
  .hero .author,
  .hero .brief {
    color: var(--text) !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
  }

  .section {
    padding: 1.5rem 0;
    page-break-inside: avoid;
  }

  .card, .timeline-card, .paper-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

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

  .nav-menu a.active {
    background: none;
  }
}
