:root {
  --ink: #183a35;
  --ink-dark: #0d2521;
  --ink-light: #24524c;
  --muted: #5e7069;
  --muted-light: #8a9c95;
  --paper: #f5f7f2;
  --paper-2: #e7eee8;
  --paper-3: #dbe4dc;
  --accent: #c84f35;
  --accent-dark: #963923;
  --accent-light: #f8ece8;
  --gold: #e2b34e;
  --gold-dark: #b88a29;
  --gold-light: #fff8e8;
  --line: rgba(24, 58, 53, 0.16);
  --line-strong: rgba(24, 58, 53, 0.3);
  --line-light: rgba(255, 255, 255, 0.16);
  --white: #fffefa;
  --shadow: 0 18px 48px rgba(24, 58, 53, 0.12);
  --shadow-lg: 0 28px 70px rgba(15, 39, 35, 0.22);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --transition: 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Academic Header Banner
   ========================================================================== */
.academic-badge-bar {
  background: linear-gradient(90deg, #112a26, #1c453f);
  color: var(--paper);
  border-bottom: 1px solid rgba(226, 179, 78, 0.3);
  padding: 8px 5vw;
  font-size: 12px;
}

.badge-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.badge-pill {
  background: var(--gold);
  color: var(--ink-dark);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.badge-text {
  color: #d1ded8;
}

.badge-text strong {
  color: #fff;
}

.badge-link {
  background: transparent;
  border: 1px solid rgba(226, 179, 78, 0.6);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.badge-link:hover {
  background: var(--gold);
  color: var(--ink-dark);
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  background: rgba(245, 247, 242, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background var(--transition);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--white);
  font-family: "Playfair Display", serif;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(200, 79, 53, 0.28);
  transition: transform var(--transition);
}

.brand:hover .brand-mark {
  transform: rotate(-6deg) scale(1.05);
}

.brand-text strong {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.brand-text small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-tour-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
}

.nav-tour-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.nav-tour-btn.playing {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.tour-icon {
  font-size: 11px;
}

.nav-cta, .primary-btn {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(24, 58, 53, 0.15);
}

.nav-cta:hover, .primary-btn:hover {
  transform: translateY(-2px);
  background: var(--accent);
  box-shadow: 0 6px 20px rgba(200, 79, 53, 0.28);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: 590px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  padding: 80px 7vw 88px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(226, 179, 78, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 rgba(200, 79, 53, 0.7);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(200, 79, 53, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(200, 79, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 79, 53, 0); }
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(52px, 6.2vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 22px 0 20px;
}

.hero h1 em {
  color: var(--gold);
  font-style: normal;
  font-family: inherit;
}

.hero-copy > p {
  max-width: 580px;
  font-size: 17px;
  color: #c5d2cc;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.primary-btn {
  background: var(--accent);
  color: var(--white);
  padding: 13px 22px;
}

.primary-btn:hover {
  background: var(--gold);
  color: var(--ink-dark);
}

.ghost-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--paper);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.ghost-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
  background: rgba(226, 179, 78, 0.08);
}

.tertiary-btn {
  color: #c5d2cc;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  transition: color var(--transition);
}

.tertiary-btn:hover {
  color: var(--gold);
}

/* Artistic Hero Illustration — Jharokha Pavilion & Celestial Sun */
.hero-art {
  height: 420px;
  position: relative;
  overflow: hidden;
  border-radius: 200px 200px 6px 6px;
  background: linear-gradient(165deg, #c84f35 0%, #b23f27 45%, #7e2413 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 75% 25%, rgba(226, 179, 78, 0.25) 0%, transparent 60%),
    repeating-linear-gradient(120deg, transparent 0 28px, rgba(255, 255, 255, 0.07) 29px 30px);
  pointer-events: none;
}

.celestial-glow {
  position: absolute;
  top: 30px;
  right: 14%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(226, 179, 78, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(8px);
}

.celestial-disc {
  position: absolute;
  width: 155px;
  height: 155px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd978 0%, #e2b34e 60%, #c48f22 100%);
  top: 48px;
  right: 18%;
  box-shadow: 0 0 45px rgba(226, 179, 78, 0.5);
}

.mandala-ring {
  position: absolute;
  width: 215px;
  height: 215px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  top: 18px;
  right: 11%;
  animation: rotateSlow 45s linear infinite;
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.jharokha-frame {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 270px;
  height: 310px;
  pointer-events: none;
}

.jharokha-arch {
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 230px;
  height: 280px;
  border: 18px solid rgba(245, 247, 242, 0.94);
  border-bottom: 0;
  border-radius: 120px 120px 0 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.inner-dome {
  position: absolute;
  bottom: 0;
  left: 58px;
  width: 154px;
  height: 195px;
  border: 12px solid rgba(245, 247, 242, 0.7);
  border-bottom: 0;
  border-radius: 80px 80px 0 0;
}

.stepped-plinth {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.plinth-step.p1 {
  background: rgba(245, 247, 242, 0.9);
  height: 6px;
  width: 190px;
  border-radius: 3px 3px 0 0;
}

.plinth-step.p2 {
  background: rgba(245, 247, 242, 0.75);
  height: 7px;
  width: 260px;
  margin-top: 1px;
}

.plinth-step.p3 {
  width: 100%;
  height: 14px;
  background: rgba(24, 58, 53, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-label {
  position: absolute;
  left: 28px;
  bottom: 24px;
  color: #fff7e9;
  font-size: 11px;
  letter-spacing: 0.24em;
  font-weight: 700;
  z-index: 10;
}

/* ==========================================================================
   Stats Strip
   ========================================================================== */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 7vw;
  background: var(--paper-2);
}

.stat-col {
  padding: 0 24px;
  border-right: 1px solid var(--line);
}

.stat-col:first-child {
  padding-left: 0;
}

.stat-col:last-child {
  border-right: 0;
}

.stat-col strong {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 32px;
  line-height: 1;
  color: var(--ink);
}

.stat-col span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

/* ==========================================================================
   Section Common Styles
   ========================================================================== */
.explore, .influence-section, .timeline-section, .about {
  padding: 90px 7vw;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: flex-end;
  margin-bottom: 36px;
}

.section-heading h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(38px, 4.4vw, 56px);
  margin: 8px 0 0;
  line-height: 1.05;
}

.section-heading p {
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ==========================================================================
   Toolbar & Filter Controls
   ========================================================================== */
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.search-wrap {
  width: min(380px, 100%);
  position: relative;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 11px;
  font-size: 20px;
  color: var(--muted);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--white);
  border-radius: var(--radius-full);
  padding: 12px 40px 12px 44px;
  outline: 0;
  font-size: 13px;
  transition: var(--transition);
}

.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 79, 53, 0.12);
}

.clear-search {
  position: absolute;
  right: 14px;
  top: 10px;
  background: none;
  border: 0;
  font-size: 18px;
  color: var(--muted);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.clear-search.hidden {
  display: none;
}

.filter-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.filters, .region-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}

.filter {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  transition: var(--transition);
}

.filter.active, .filter:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.region-chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  transition: var(--transition);
}

.region-chip.active, .region-chip:hover {
  background: var(--paper-3);
  color: var(--ink);
  border-color: var(--line-strong);
}

/* ==========================================================================
   Atlas Grid: Map + Detail Card
   ========================================================================== */
.atlas-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 22px;
  align-items: stretch;
}

/* Map Card */
.map-card {
  position: relative;
  min-height: 600px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #dbe4dc;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

#map {
  width: 100%;
  height: 600px;
}

.map-floating-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 500;
  display: flex;
  gap: 8px;
}

.map-btn {
  background: rgba(255, 254, 250, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.map-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.map-btn-highlight {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.map-btn-highlight:hover {
  background: var(--accent-dark);
}

.map-note {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 500;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(6px);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  display: flex;
  gap: 14px;
  align-items: center;
}

.map-hint {
  color: var(--accent);
  font-weight: 600;
}

/* Custom Marker Styling */
.custom-marker-wrap {
  background: transparent;
  border: 0;
}

.custom-marker {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 3px 10px rgba(15, 39, 35, 0.4);
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.custom-marker.active {
  background: var(--accent);
  transform: scale(1.22);
  box-shadow: 0 0 0 5px rgba(200, 79, 53, 0.35), 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 999 !important;
}

.custom-marker-wrap:hover .custom-marker {
  background: var(--accent-dark);
  transform: scale(1.18);
}

/* Detail Card (Inspector) */
.detail-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 600px;
  box-shadow: var(--shadow);
}

.detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.number-badge {
  font-family: "Playfair Display", serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.detail-badge-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.region-pill {
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 7px;
  background: var(--paper-2);
  color: var(--muted);
  border-radius: 3px;
}

.movement-pill {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
}

.detail-image {
  position: relative;
  margin: 16px 20px 0;
  height: 195px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e2b34e, #c84f35);
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.detail-image:hover img {
  transform: scale(1.04);
}

.detail-image span {
  color: #fff4df;
  font-size: 64px;
  font-family: "Playfair Display", serif;
}

.detail-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 8px;
  background: linear-gradient(0deg, rgba(15, 39, 35, 0.7) 0%, transparent 60%);
}

.expand-img-btn {
  background: rgba(24, 58, 53, 0.85);
  border: 0;
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 3px;
  transition: background var(--transition);
}

.expand-img-btn:hover {
  background: var(--accent);
}

.image-credit {
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 8px;
  background: rgba(24, 58, 53, 0.85);
  color: var(--white);
  font-size: 10px;
  border-radius: 3px;
  transition: background var(--transition);
}

.image-credit:hover {
  background: var(--accent);
}

.detail-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.place-meta {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.detail-body h3 {
  font-family: "Playfair Display", serif;
  font-size: 34px;
  line-height: 1.05;
  margin: 6px 0 4px;
  color: var(--ink);
}

.style-badge {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}

/* Card Tabs */
.card-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.card-tab {
  background: transparent;
  border: 0;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  position: relative;
  transition: color var(--transition);
}

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

.card-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.tab-pane {
  display: none;
  min-height: 90px;
}

.tab-pane.active {
  display: block;
}

.tab-pane p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tab-highlight {
  font-size: 12.5px;
  color: var(--ink);
  background: var(--paper);
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.5;
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--ink);
}

.detail-list li {
  position: relative;
  padding-left: 14px;
  line-height: 1.4;
}

.detail-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tags span {
  background: var(--paper-2);
  border-radius: var(--radius-full);
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-light);
}

.detail-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-site-btns {
  display: flex;
  gap: 12px;
}

.text-btn {
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  padding: 4px 0;
  transition: transform var(--transition), color var(--transition);
}

.text-btn:hover {
  color: var(--accent-dark);
  transform: translateX(2px);
}

#prevSite:hover {
  transform: translateX(-2px);
}

.deep-dive-btn {
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.deep-dive-btn:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* ==========================================================================
   Site Index Grid
   ========================================================================== */
.index-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 60px 0 20px;
}

.index-head h2 {
  font-family: "Playfair Display", serif;
  margin: 4px 0 0;
  font-size: 34px;
}

.result-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.site-card {
  border: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.85);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.site-card:hover {
  background: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(24, 58, 53, 0.1);
  border-color: var(--accent);
}

.site-card.active-card {
  background: var(--white);
  border: 1.5px solid var(--accent);
  box-shadow: 0 8px 24px rgba(200, 79, 53, 0.15);
}

.site-num {
  font-family: "Playfair Display", serif;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
  min-width: 24px;
}

.site-card-body h4 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.2;
}

.site-card-body p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.site-movement-tag {
  display: inline-block;
  font-size: 9px;
  text-transform: uppercase;
  color: var(--muted-light);
  letter-spacing: 0.05em;
  margin-top: 3px;
}

.site-arrow {
  color: var(--muted-light);
  font-size: 16px;
  transition: transform var(--transition), color var(--transition);
}

.site-card:hover .site-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ==========================================================================
   Geographic Spread & Influence Routes Section (CO1)
   ========================================================================== */
.influence-section {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.routes-container {
  max-width: 1200px;
  margin: 0 auto;
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.route-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  gap: 18px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

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

.route-card.active-route {
  border: 2px solid var(--gold);
  background: #fffdf7;
}

.route-marker {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.route-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.route-movement {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--accent);
}

.route-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  margin: 4px 0 8px;
  color: var(--ink);
}

.route-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

.route-path {
  background: var(--paper);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 14px;
}

.route-path span {
  color: var(--accent);
}

.route-action-btn {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.route-action-btn:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* ==========================================================================
   Timeline Section ("A living continuum")
   ========================================================================== */
.timeline-section {
  background: var(--ink);
  color: var(--paper);
}

.timeline-section .eyebrow {
  color: var(--gold);
}

.timeline-section .section-heading p {
  color: #c5d2cc;
}

.timeline {
  max-width: 950px;
  margin: auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  padding: 32px 0;
  border-top: 1px solid var(--line-light);
  cursor: pointer;
  transition: background var(--transition);
}

.timeline-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.timeline-num {
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: 26px;
  font-weight: 700;
}

.timeline-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.timeline-item b {
  font-family: "Playfair Display", serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--paper);
}

.timeline-era {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-item p {
  color: #b1c0ba;
  margin: 8px 0 10px;
  max-width: 680px;
  font-size: 14px;
}

.timeline-links {
  font-size: 11px;
  color: #8da49c;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-links span {
  color: #d1ded8;
  font-weight: 500;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 70px;
  align-items: center;
}

.about h2 {
  font-family: "Playfair Display", serif;
  font-size: 58px;
  line-height: 0.98;
  margin: 15px 0 22px;
}

.about p {
  max-width: 670px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.course-credit-box {
  background: var(--paper-2);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 18px;
  display: inline-block;
}

.course-credit-box small {
  font-weight: 700;
  color: var(--ink);
  font-size: 12px;
}

.about-stamp {
  width: 210px;
  height: 210px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 64px;
  line-height: 0.8;
  transform: rotate(-8deg);
  transition: transform 0.4s ease;
  background: var(--paper-2);
}

.about-stamp:hover {
  transform: rotate(0deg) scale(1.04);
}

.about-stamp small {
  font: 700 11px "DM Sans", sans-serif;
  letter-spacing: 0.22em;
  color: var(--accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  padding: 34px 7vw;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  background: var(--paper);
}

.footer-left strong {
  color: var(--ink);
  margin-right: 14px;
  font-family: "Playfair Display", serif;
  font-size: 15px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.footer-author {
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
  background: var(--paper-2);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
}

.footer-course {
  color: var(--muted);
  font-weight: 500;
}

/* ==========================================================================
   Modal Dialogs (Deep Dive & Assignment Rubric)
   ========================================================================== */
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 39, 35, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-box {
  position: relative;
  width: min(840px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--white);
  padding: 38px 42px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  animation: modalPop 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 22px;
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.close:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.modal-header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.modal-number {
  font-family: "Playfair Display", serif;
  font-size: 58px;
  color: var(--accent);
  line-height: 1;
  font-weight: 700;
}

.modal-meta-col h2 {
  font-family: "Playfair Display", serif;
  font-size: 38px;
  line-height: 1.05;
  margin: 4px 0;
  color: var(--ink);
}

.modal-subtitle {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 30px;
  margin-bottom: 28px;
}

.modal-main-text h3 {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  color: var(--ink);
  margin: 18px 0 8px;
}

.modal-main-text h3:first-child {
  margin-top: 0;
}

.modal-main-text p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.modal-artworks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.modal-artworks-list li {
  font-size: 13px;
  color: var(--ink);
  padding-left: 18px;
  position: relative;
  line-height: 1.45;
}

.modal-artworks-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 10px;
}

.modal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-img-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.modal-img-wrap img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.modal-img-wrap a {
  display: block;
  font-size: 11px;
  color: var(--muted);
  padding: 6px 10px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  text-align: right;
  font-weight: 600;
}

.modal-img-wrap a:hover {
  color: var(--accent);
}

.modal-tech-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.modal-tech-box h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 6px;
}

.modal-tech-box p {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.5;
}

.modal-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-facts span {
  background: var(--paper-2);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-light);
}

.modal-nav-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.ghost-btn-dark {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.ghost-btn-dark:hover {
  background: var(--paper-2);
  border-color: var(--ink);
}

.primary-btn-sm {
  background: var(--accent);
  color: var(--white);
  border: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.primary-btn-sm:hover {
  background: var(--accent-dark);
}

/* Assignment Modal Box */
.assignment-box {
  max-width: 680px;
}

.assignment-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: var(--paper);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin: 18px 0;
  font-size: 13px;
}

.assignment-section {
  margin-bottom: 16px;
}

.assignment-section h3 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 6px;
}

.assignment-section p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

.rubric-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.rubric-list li {
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
  color: var(--ink);
}

.rubric-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .atlas-grid {
    grid-template-columns: 1fr;
  }
  .site-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .routes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 45px;
    padding-top: 60px;
    padding-bottom: 70px;
  }
  .hero-art {
    height: 330px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-stamp {
    margin: 0 auto;
  }
  .modal-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 16px;
    height: 68px;
  }
  .nav-tour-btn .tour-label {
    display: none;
  }
  .hero, .explore, .influence-section, .timeline-section, .about {
    padding-left: 18px;
    padding-right: 18px;
    padding-top: 50px;
    padding-bottom: 55px;
  }
  .stats-strip {
    grid-template-columns: 1fr 1fr;
    padding: 20px 18px;
    gap: 18px;
  }
  .stat-col {
    padding: 0;
    border: 0;
  }
  .filters, .region-filters {
    justify-content: flex-start;
  }
  .site-grid {
    grid-template-columns: 1fr;
  }
  .timeline-item {
    grid-template-columns: 50px 1fr;
  }
  .timeline-item b {
    font-size: 20px;
  }
  .modal-box {
    padding: 26px 18px;
  }
  .modal-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .modal-number {
    font-size: 42px;
  }
  .modal-meta-col h2 {
    font-size: 28px;
  }
  footer {
    padding: 24px 18px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
