:root {
  --ink:        #1a1208;
  --parchment:  #f0e8d0;
  --aged:       #e0d4b0;
  --blueprint:  #1a3a5c;
  --blueprint-light: #2a5a8c;
  --blueprint-pale:  #d0dce8;
  --rust:       #8b3a1a;
  --gold:       #b8860b;
  --faded:      #6b5e40;
  --grid-line:  rgba(26,58,92,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--parchment);
  color: var(--ink);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ─── Blueprint grid overlay ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ─── Language toggle ─── */
.lang-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  padding: 10px 28px;
  background: rgba(240,232,208,0.92);
  border-bottom: 1px solid var(--gold);
  backdrop-filter: blur(4px);
}
.lang-btn {
  background: none;
  border: 1.5px solid var(--blueprint);
  color: var(--blueprint);
  font-family: 'Crimson Text', serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 6px;
}
.lang-btn.active, .lang-btn:hover {
  background: var(--blueprint);
  color: var(--parchment);
}

/* ─── Hero ─── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(184,134,11,0.07) 0%, transparent 70%);
}

/* Optional hero background photo: hidden until it loads successfully */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-bg.loaded {
  opacity: 0.16;
}

/* Compass rose SVG decoration */
.compass {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  opacity: 0.08;
  pointer-events: none;
}

.hero-eyebrow {
  font-family: 'Crimson Text', serif;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blueprint);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
}

h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  line-height: 1.0;
  color: var(--blueprint);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
h1 em {
  font-style: italic;
  color: var(--rust);
}

.hero-sub {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  color: var(--faded);
  margin-top: 16px;
  margin-bottom: 40px;
  max-width: 560px;
}

.hero-dates {
  font-family: 'Crimson Text', serif;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 52px;
}

.scroll-hint {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faded);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  animation: bob 2.2s ease-in-out infinite;
}
.scroll-hint svg { width: 20px; height: 20px; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ─── Intro block ─── */
.intro {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 32px;
  text-align: center;
}
.intro p {
  font-size: 1.22rem;
  color: var(--faded);
  font-style: italic;
}
.intro strong { color: var(--blueprint); font-style: normal; }

/* Decorative rule */
.rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px auto;
  max-width: 400px;
  justify-content: center;
}
.rule::before, .rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}
.rule-diamond {
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.6;
}
.rule-spaced {
  margin-top: 40px;
}

/* ─── Vision chain ─── */
.vision {
  text-align: center;
}
.vision-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 4px;
  margin: 8px 0 36px;
}
.vision-node {
  font-family: 'Crimson Text', serif;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--blueprint);
  background: rgba(224,212,176,0.55);
  border: 1px solid rgba(184,134,11,0.35);
  border-radius: 999px;
  padding: 8px 18px;
  white-space: nowrap;
}
.vision-node-final {
  color: var(--parchment);
  background: var(--blueprint);
  border-color: var(--blueprint);
  font-weight: 600;
}
.vision-arrow {
  color: var(--gold);
  font-size: 1rem;
  opacity: 0.7;
}
.vision-outcome {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 32px;
  border: 1px solid var(--gold);
  border-left: 4px solid var(--blueprint);
  background: rgba(26,58,92,0.05);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--blueprint);
  line-height: 1.4;
}
@media (max-width: 640px) {
  .vision-chain { gap: 8px 4px; }
  .vision-node { font-size: 0.82rem; padding: 6px 12px; }
}

/* ─── Section header ─── */
.section {
  position: relative;
  z-index: 1;
  padding: 64px 24px;
  max-width: 1180px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--blueprint);
  line-height: 1.15;
}
.section-desc {
  font-style: italic;
  color: var(--faded);
  margin-top: 12px;
  font-size: 1.05rem;
}

/* ─── Cards grid ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

.card {
  background: rgba(224,212,176,0.55);
  border: 1px solid rgba(184,134,11,0.28);
  border-radius: 2px;
  padding: 32px 28px 28px;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--blueprint);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.card:hover::before { transform: scaleX(1); }
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(26,58,92,0.12);
  background: rgba(240,232,208,0.9);
}
.card:focus-visible {
  outline: 2px solid var(--blueprint);
  outline-offset: 3px;
}

/* Optional real photo: hidden until it loads successfully, falls back to emoji */
.card-icon-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 14px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(184,134,11,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card-img.loaded {
  opacity: 1;
}
.card-img.loaded + .card-icon {
  display: none;
}

.card-icon {
  font-size: 2rem;
  display: block;
}
.card-year {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 6px;
}

/* Distinguish research/intellectual-history cards from achieved
   infrastructure projects (e.g. Mu Continent research) */
.card-research {
  border-style: dashed;
  border-color: rgba(139,58,26,0.4);
}
.card-research::before {
  background: var(--rust);
}
.card-tag {
  display: inline-block;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
  border: 1px dashed rgba(139,58,26,0.5);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 10px;
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--blueprint);
  margin-bottom: 12px;
  line-height: 1.25;
}
.card-summary {
  font-size: 0.96rem;
  color: var(--faded);
  line-height: 1.6;
}
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blueprint);
  opacity: 0.75;
  transition: opacity 0.2s;
}
.card:hover .card-cta { opacity: 1; }

/* ─── Stats strip ─── */
.stats-strip {
  position: relative;
  z-index: 1;
  background: var(--blueprint);
  padding: 52px 24px;
  margin: 20px 0;
}
.stats-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 32px;
  text-align: center;
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  white-space: nowrap;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240,232,208,0.65);
  line-height: 1.4;
}

/* ─── Quote ─── */
.quote-block {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 32px;
  text-align: center;
}
.quote-mark {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.3;
  line-height: 0.5;
  display: block;
  margin-bottom: 20px;
}
blockquote {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--blueprint);
  line-height: 1.4;
  margin-bottom: 20px;
}
cite {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
}

/* ─── Map ─── */
.map-wrap {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
.map-svg {
  display: block;
  width: 100%;
  height: auto;
}
.map-outline {
  fill: rgba(224,212,176,0.55);
  stroke: var(--blueprint);
  stroke-width: 0.3;
}
/* The button's own box is a small fixed square around the dot only
   (never grows with label content), so its position:absolute anchor
   via translate(-50%,-50%) always matches the intended coordinate
   exactly and never overlaps a neighboring marker's hit area just
   because it has a longer label. The label is a separately
   positioned child that visually floats off to one side. */
.map-marker {
  position: absolute;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 5px;
  margin: -5px;
  cursor: pointer;
  font-family: 'Crimson Text', serif;
}
.map-marker-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rust);
  border: 2px solid var(--parchment);
  box-shadow: 0 0 0 1px rgba(139,58,26,0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}
.map-marker-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: rgba(240,232,208,0.85);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  transition: color 0.2s ease;
  pointer-events: none;
}
.map-marker:hover .map-marker-dot,
.map-marker:focus-visible .map-marker-dot {
  transform: scale(1.4);
  background: var(--blueprint);
}
.map-marker:hover .map-marker-label,
.map-marker:focus-visible .map-marker-label {
  color: var(--blueprint);
  font-weight: 600;
}
.map-marker:focus-visible {
  outline: 2px solid var(--blueprint);
  outline-offset: 2px;
  border-radius: 4px;
}
.map-marker-ankara          { left: 37.50%; top: 34.55%; }
.map-marker-ankara-telecom  { left: 37.00%; top: 25.50%; }
.map-marker-ankara-alphabet { left: 47.50%; top: 37.50%; }
.map-marker-ankara-etibank  { left: 27.50%; top: 39.00%; }
.map-marker-ankara-aoc      { left: 33.50%; top: 41.50%; }
.map-marker-ankara-hukuk    { left: 42.50%; top: 41.00%; }
.map-marker-ankara-eiei     { left: 38.00%; top: 44.00%; }
.map-marker-istanbul        { left: 16.72%; top: 17.14%; }
.map-marker-istanbul-egt    { left: 12.70%; top: 14.10%; }
.map-marker-istanbul-hav    { left: 20.70%; top: 15.10%; }
.map-marker-istanbul-pasabahce { left: 17.80%; top: 15.93%; }
.map-marker-istanbul-denizbank { left: 19.75%; top: 19.50%; }
.map-marker-kayseri         { left: 51.29%; top: 53.71%; }
.map-marker-kayseri-sumerbank { left: 59.00%; top: 50.00%; }
.map-marker-eskisehir       { left: 25.33%; top: 36.94%; }
.map-marker-karabuk         { left: 36.35%; top: 14.27%; }
.map-marker-divrigi         { left: 65.02%; top: 43.49%; }
.map-marker-golcuk          { left: 21.68%; top: 22.09%; }
.map-marker-sivas           { left: 59.28%; top: 37.42%; }
.map-marker-sivas-cimento   { left: 61.50%; top: 40.00%; }
.map-marker-malatya         { left: 66.02%; top: 59.78%; }
.map-marker-diyarbakir      { left: 76.10%; top: 66.81%; }
.map-marker-erzurum         { left: 81.48%; top: 35.03%; }
.map-marker-guleman         { left: 72.99%; top: 58.28%; }
.map-marker-zonguldak       { left: 31.97%; top: 10.27%; }
.map-marker-nazilli         { left: 13.84%; top: 66.81%; }
.map-marker-konya           { left: 35.57%; top: 67.44%; }
.map-marker-izmir           { left: 7.68%;  top: 58.66%; }
.map-marker-izmir-klor      { left: 10.50%; top: 56.50%; }
.map-marker-bursa           { left: 17.71%; top: 30.55%; }
.map-marker-yalova          { left: 18.86%; top: 23.05%; }
.map-marker-silifke         { left: 43.19%; top: 91.24%; }
.map-marker-kirikkale       { left: 40.91%; top: 36.01%; }
.map-marker-alpullu         { left: 8.58%;  top: 10.99%; }
.map-marker-usak            { left: 19.43%; top: 54.57%; }
.map-marker-turhal          { left: 54.34%; top: 27.46%; }
.map-marker-ankara-halkevi  { left: 30.00%; top: 50.50%; }
.map-marker-ankara-health   { left: 40.00%; top: 48.50%; }

/* Marker pairs/clusters that sit close together: point the label to
   one side or above/below (away from the cluster center) instead of
   everything defaulting straight below, so text doesn't collide.
   Each rule repositions only .map-marker-label - the button's own
   hit box (set above) never changes, so neighboring markers can't
   block each other's clicks no matter which way a label points. */
.map-marker-istanbul .map-marker-label,
.map-marker-sivas .map-marker-label,
.map-marker-ankara-etibank .map-marker-label,
.map-marker-ankara-eiei .map-marker-label,
.map-marker-izmir .map-marker-label,
.map-marker-alpullu .map-marker-label,
.map-marker-malatya .map-marker-label {
  top: 50%;
  left: auto;
  right: 100%;
  transform: translateY(-50%);
  margin-top: 0;
  margin-right: 6px;
}
.map-marker-golcuk .map-marker-label,
.map-marker-divrigi .map-marker-label,
.map-marker-karabuk .map-marker-label,
.map-marker-kayseri-sumerbank .map-marker-label,
.map-marker-ankara-hukuk .map-marker-label,
.map-marker-istanbul-hav .map-marker-label {
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  margin-top: 0;
  margin-left: 6px;
}
.map-marker-zonguldak .map-marker-label,
.map-marker-ankara-telecom .map-marker-label,
.map-marker-istanbul-egt .map-marker-label,
.map-marker-istanbul-denizbank .map-marker-label,
.map-marker-erzurum .map-marker-label,
.map-marker-sivas-cimento .map-marker-label,
.map-marker-turhal .map-marker-label {
  top: auto;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0;
  margin-bottom: 6px;
}

.map-note {
  max-width: 640px;
  margin: 20px auto 0;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--faded);
  text-align: center;
  opacity: 0.85;
}
/* Phones: the map keeps its desktop proportions and scrolls sideways (see .map-scroll). */

/* ─── Timeline ─── */
.timeline-list {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.timeline-list::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(184,134,11,0.35);
}
.timeline-item {
  position: relative;
  padding: 0 0 32px 32px;
  cursor: pointer;
}
.timeline-item:not([data-modal-id]) {
  cursor: default;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -5px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--parchment);
  z-index: 1;
}
.timeline-year {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--blueprint);
  margin-bottom: 4px;
}
.timeline-text {
  color: var(--faded);
  font-size: 0.98rem;
  line-height: 1.5;
  transition: color 0.2s;
}
.timeline-item[data-modal-id]:hover .timeline-text,
.timeline-item[data-modal-id]:focus-visible .timeline-text {
  color: var(--ink);
}
.timeline-item:focus-visible {
  outline: 2px solid var(--blueprint);
  outline-offset: 4px;
}

/* ─── Sources ─── */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px 32px;
  text-align: left;
  max-width: 980px;
  margin: 0 auto;
}
.sources-group h3 {
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--blueprint);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(184,134,11,0.3);
}
.sources-group ul {
  list-style: none;
  padding: 0;
}
.sources-group li {
  margin-bottom: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.sources-group a {
  color: var(--faded);
  text-decoration: none;
  border-bottom: 1px dotted rgba(107,94,64,0.5);
  transition: color 0.2s, border-color 0.2s;
}
.sources-group a:hover, .sources-group a:focus-visible {
  color: var(--rust);
  border-color: var(--rust);
}
.sources-note {
  max-width: 640px;
  margin: 32px auto 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--faded);
  text-align: center;
}

/* ─── Footer ─── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(184,134,11,0.3);
  padding: 40px 24px;
  text-align: center;
  color: var(--faded);
  font-size: 0.85rem;
}
.footer-copyright {
  margin-top: 8px;
  opacity: 0.5;
}

/* ─── MODAL ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(26,18,8,0.72);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--parchment);
  border: 1px solid var(--gold);
  border-radius: 2px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 48px 44px 40px;
  animation: modal-in 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blueprint), var(--gold));
}

.modal-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--faded);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--rust); }

.modal-label {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 8px;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--blueprint);
  line-height: 1.15;
  margin-bottom: 6px;
}
.modal-title-en {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--faded);
  margin-bottom: 24px;
  display: block;
}
.modal-divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 24px;
}
.modal-img {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(184,134,11,0.3);
  margin-bottom: 24px;
}
.modal-img.loaded {
  display: block;
}
.modal-body { color: var(--ink); }
.modal-body p { margin-bottom: 16px; font-size: 1.05rem; }
.modal-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--blueprint);
  margin: 24px 0 8px;
  font-weight: 700;
}
.modal-body ul {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
}
.modal-body ul li {
  padding: 5px 0 5px 20px;
  position: relative;
  font-size: 1rem;
  color: var(--faded);
  border-bottom: 1px dotted rgba(184,134,11,0.2);
}
.modal-body ul li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.5rem;
  top: 10px;
}
.modal-stat-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 24px 0;
  padding: 20px;
  background: rgba(26,58,92,0.05);
  border-left: 3px solid var(--blueprint);
}
.modal-stat { text-align: center; flex: 1; min-width: 80px; }
.modal-stat-num {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--blueprint);
  line-height: 1;
  display: block;
}
.modal-stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faded);
}
.modal-source {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(184,134,11,0.25);
  font-size: 0.8rem;
  color: var(--faded);
  font-style: italic;
}
.modal-quote {
  margin: 20px 0;
  padding: 16px 20px;
  background: rgba(184,134,11,0.07);
  border-left: 3px solid var(--gold);
}
.modal-quote p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1rem;
  color: var(--blueprint);
  margin-bottom: 6px;
}
.modal-quote cite {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  font-style: normal;
}
.modal-related {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(184,134,11,0.25);
}
.modal-related h3 {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--blueprint);
  margin: 0 0 12px;
  font-weight: 700;
}
.modal-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.modal-related-link {
  font-family: 'Crimson Text', serif;
  font-size: 0.85rem;
  color: var(--blueprint);
  background: rgba(26,58,92,0.06);
  border: 1px solid rgba(26,58,92,0.28);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.modal-related-link:hover,
.modal-related-link:focus-visible {
  background: var(--blueprint);
  color: var(--parchment);
  outline: none;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .modal { padding: 60px 22px 28px; }
  .cards-grid { grid-template-columns: 1fr; }
  .compass { display: none; }

  /* Larger touch targets on mobile (WCAG 2.5.8 / platform guidance) */
  .lang-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .modal-close {
    top: 0;
    right: 0;
    padding: 12px 14px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ─── Site nav ─── */
:root { --lang-bar-h: 49px; }

.site-nav {
  position: fixed;
  top: var(--lang-bar-h);
  left: 0; right: 0;
  z-index: 198;
  background: rgba(240,232,208,0.96);
  border-bottom: 1px solid var(--gold);
  backdrop-filter: blur(4px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 44px;
}

.nav-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--blueprint);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-flag {
  width: 30px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.nav-item {
  position: relative;
}

.nav-group-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Crimson Text', serif;
  font-size: 14px;
  color: var(--blueprint);
  letter-spacing: 0.06em;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  border-radius: 2px;
}
.nav-group-btn:hover,
.nav-item.open .nav-group-btn {
  background: var(--blueprint);
  color: var(--parchment);
}

.nav-chevron {
  width: 10px;
  height: 7px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.nav-item.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(240,232,208,0.98);
  border: 1px solid var(--gold);
  border-top: 2px solid var(--blueprint);
  list-style: none;
  min-width: 220px;
  box-shadow: 0 6px 24px rgba(26,58,92,0.13);
  z-index: 300;
}
.nav-item.open .nav-dropdown {
  display: block;
}

.nav-modal-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Crimson Text', serif;
  font-size: 15px;
  color: var(--ink);
  text-align: left;
  width: 100%;
  padding: 10px 18px;
  display: block;
  transition: background 0.12s;
}
.nav-modal-link:hover,
.nav-modal-link:focus {
  background: var(--blueprint-pale);
  color: var(--blueprint);
  outline: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--blueprint);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: calc(var(--lang-bar-h) + 44px);
    left: 0; right: 0;
    background: rgba(240,232,208,0.99);
    border-bottom: 2px solid var(--gold);
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(26,58,92,0.12);
    z-index: 299;
  }
  .nav-menu.open { display: flex; }
  .nav-item { width: 100%; position: static; }
  .nav-group-btn { width: 100%; justify-content: space-between; padding: 12px 24px; border-radius: 0; }
  .nav-dropdown {
    position: static;
    border: none;
    border-left: 3px solid var(--blueprint-pale);
    border-top: none;
    box-shadow: none;
    margin-left: 16px;
    background: transparent;
  }
  .nav-modal-link { padding: 10px 20px; }
}

/* ─── Nav search button ─── */
#nav-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blueprint);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
#nav-search-btn:hover,
#nav-search-btn:focus-visible {
  background: var(--blueprint-pale);
  color: var(--gold);
  outline: none;
}
@media (max-width: 768px) {
  .nav-toggle { order: 2; }
  #nav-search-btn { order: 1; margin-left: auto; }
}

/* ─── Language switching ─── */
[data-lang-en] { display: none; }
body.en [data-lang-tr] { display: none; }
body.en [data-lang-en] { display: revert; }

/* ─── Scroll-to-top button ─── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blueprint);
  color: var(--parchment);
  border: 2px solid var(--gold);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.28);
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
#back-to-top:hover {
  background: var(--gold);
  color: var(--blueprint);
}

/* ─── Card search ─── */
.cards-search-wrap {
  max-width: 400px;
  margin: 0 auto 2rem;
}
#cards-search {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--blueprint);
  border-radius: 6px;
  background: var(--parchment);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
#cards-search::placeholder { color: var(--faded); }
#cards-search:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--gold);
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-hint { animation: none; }
}


/* ─── Print ─── */
@media print {
  .lang-bar,
  .site-nav,
  .map-section,
  .timeline,
  .sources,
  footer,
  #back-to-top,
  .modal-overlay,
  .cards-search-wrap {
    display: none !important;
  }
  body { background: white; color: black; font-size: 11pt; }
  .hero {
    min-height: auto;
    padding: 40px 24px;
    page-break-after: always;
  }
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    margin-bottom: 12pt;
  }
  .cards-grid { display: block; }
  a::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #555;
  }
  .modal-overlay a::after { display: none; }
}

/* ─── 404 page ─── */
.notfound {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.notfound-code {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(4rem, 14vw, 8rem);
  color: var(--gold);
  line-height: 1;
}
.notfound-title {
  font-family: 'Playfair Display', serif;
  color: var(--blueprint);
  margin: 12px 0 16px;
}
.notfound-title em { font-family: 'IM Fell English', serif; font-weight: 400; color: var(--faded); }
.notfound-text { color: var(--faded); max-width: 520px; line-height: 1.6; }
.notfound-links { margin-top: 20px; }
.notfound-links a { color: var(--blueprint); }

/* ─── About section, footer links, nav link ─── */
section[id] { scroll-margin-top: 110px; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 28px 40px;
  max-width: 1040px;
  margin: 0 auto;
  text-align: left;
}
.about-item {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 18px;
}
.about-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--blueprint);
  margin-bottom: 8px;
}
.about-item p {
  color: var(--ink);
  line-height: 1.65;
  font-size: 0.98rem;
}
.about-item a { color: var(--blueprint); }
.footer-links { margin-top: 12px; }
.footer-links a { color: var(--faded); }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--rust); }
.nav-link {
  font-family: 'Crimson Text', serif;
  font-size: 14px;
  color: var(--blueprint);
  letter-spacing: 0.06em;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover, .nav-link:focus-visible { background: var(--blueprint-pale); color: var(--gold); outline: none; }
@media (max-width: 768px) {
  .nav-link { width: 100%; padding: 12px 24px; border-radius: 0; }
}

/* Mobile language bar is taller (44px touch targets); keep the fixed nav flush below it */
@media (max-width: 640px) {
  :root { --lang-bar-h: 65px; }
}

/* ─── Records & Firsts ─── */
.facts-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 28px;
}
.facts-chip {
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--blueprint);
  background: none;
  border: 1.5px solid var(--blueprint);
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.facts-chip:hover, .facts-chip:focus-visible { background: var(--blueprint-pale); }
.facts-chip.active { background: var(--blueprint); color: var(--parchment); }
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}
.fact {
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(184,134,11,0.35);
  border-top: 3px solid var(--gold);
  border-radius: 2px;
  padding: 18px 18px 16px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.fact[hidden] { display: none; }
.fact:hover, .fact:focus-visible {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.6);
  box-shadow: 0 6px 18px rgba(26,58,92,0.12);
  outline: none;
}
.fact-big {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--blueprint);
  margin-bottom: 6px;
}
.fact-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--rust);
  margin-bottom: 6px;
}
.fact-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--faded);
}

/* Nav: keep plain links, dropdown buttons and the search icon on one centre line */
.nav-link { line-height: normal; }
@media (min-width: 769px) {
  .nav-menu { align-items: center; }
}

/* ─── Feedback form, footer counter, banner ─── */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.feedback { max-width: 720px; margin: 48px auto 0; text-align: left; }
.feedback h3 { font-family: 'Playfair Display', serif; color: var(--blueprint); font-size: 1.1rem; margin-bottom: 6px; }
.feedback > p { color: var(--faded); margin-bottom: 14px; }
.feedback textarea, .feedback input[type=text], .feedback input[type=email] {
  width: 100%; padding: 0.6rem 0.8rem; border: 1.5px solid var(--blueprint); border-radius: 6px;
  background: var(--parchment); color: var(--ink); font-family: inherit; font-size: 0.98rem;
}
.feedback textarea { resize: vertical; min-height: 110px; }
.feedback-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
@media (max-width: 560px) { .feedback-row { grid-template-columns: 1fr; } }
.feedback textarea:focus, .feedback input:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.feedback-btn { font-family: inherit; font-size: 0.98rem; letter-spacing: 0.06em; background: var(--blueprint); color: var(--parchment); border: 2px solid var(--gold); border-radius: 6px; padding: 8px 22px; cursor: pointer; }
.feedback-btn:hover, .feedback-btn:focus-visible { background: var(--gold); color: var(--blueprint); outline: none; }
.feedback-status { margin-top: 10px; min-height: 1.4em; color: var(--faded); font-style: italic; }
.footer-counter { margin-top: 10px; opacity: 0.75; }
.footer-privacy { margin: 8px auto 0; max-width: 640px; font-size: 0.78rem; opacity: 0.6; }
.site-banner { position: fixed; left: 16px; bottom: 16px; z-index: 310; max-width: min(420px, calc(100vw - 100px)); display: flex; gap: 10px; align-items: flex-start; background: var(--blueprint); color: var(--parchment); border: 2px solid var(--gold); border-radius: 6px; padding: 10px 14px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); font-size: 0.92rem; line-height: 1.45; }
.site-banner[hidden] { display: none; }
.site-banner button { background: none; border: none; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 4px; }
@media print { .site-banner, .feedback { display: none !important; } }

/* ─── Accessibility: contrast fixes, skip link, 404 ─── */
.section-label { color: #80600a; }
.map-note { color: #6f6347; opacity: 1; }
.footer-copyright, .footer-privacy, .footer-counter { color: #6f6347; opacity: 1; }
.notfound-code { color: var(--rust); }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 600; background: var(--blueprint); color: var(--parchment); padding: 8px 16px; border: 2px solid var(--gold); border-radius: 4px; text-decoration: none; transition: top 0.15s; }
.skip-link:focus { top: 12px; outline: none; }
main:focus { outline: none; }

/* ─── Map: fits the screen; phones get dots + a tappable list ─── */
.map-scroll { overflow: visible; }
.map-hint { display: none; text-align: center; font-size: 0.82rem; font-style: italic; color: #6f6347; margin-top: 8px; }
.map-hint[data-lang-en] { display: none; }
body.en .map-hint[data-lang-en] { display: none; }
.map-chips { display: none; }
@media (max-width: 900px) {
  .map-marker-label { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; transform: none !important; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important; }
  .map-marker-dot { width: 8px; height: 8px; }
  .map-hint { display: block; }
  body.en .map-hint[data-lang-tr] { display: none; }
  body.en .map-hint[data-lang-en] { display: block; }
  .map-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
  .map-chip { font-family: inherit; font-size: 0.9rem; color: var(--blueprint); background: rgba(240,232,208,0.9); border: 1px solid var(--gold); border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
  .map-chip:hover, .map-chip:focus-visible { background: var(--blueprint); color: var(--parchment); outline: none; }
}

.facts-more-wrap { text-align: center; margin-top: 22px; }
.facts-more-wrap [hidden] { display: none; }

/* ─── Topic pages (static, crawlable) ─── */
.topic-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: rgba(240,232,208,0.96); border-bottom: 1px solid var(--gold); position: sticky; top: 0; z-index: 100; }
.topic-brand { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--blueprint); text-decoration: none; letter-spacing: 0.04em; }
.topic-bar-links { display: flex; gap: 18px; }
.topic-bar-links a, .topic-crumbs a, .topic-back a { color: var(--blueprint); }
.topic-main { max-width: 760px; margin: 0 auto; padding: 28px 24px 56px; }
.topic-crumbs { font-size: 0.9rem; color: #6f6347; margin-bottom: 18px; }
.topic-article .modal-img { display: block; }
.topic-article h1.modal-title { margin-bottom: 6px; }
.topic-article .modal-related h2 { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--blueprint); margin-bottom: 10px; }
a.modal-related-link { display: inline-block; text-decoration: none; }
.topic-back { margin-top: 28px; }
.footer-topics { max-width: 980px; margin: 0 auto 18px; }
.footer-topics-title { font-family: 'Playfair Display', serif; color: var(--blueprint); margin-bottom: 8px; }
.footer-topics ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font-size: 0.9rem; }
.footer-topics a { color: #6f6347; }
.footer-topics a:hover, .footer-topics a:focus-visible { color: var(--rust); }
.modal-fullpage { margin-top: 18px; font-size: 0.95rem; }
.modal-fullpage a { color: var(--blueprint); }
@media print { .topic-bar, .footer-topics, .topic-back { display: none !important; } }

.topic-article .modal-body h2 { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--blueprint); margin: 24px 0 8px; font-weight: 700; }

/* ─── Mobile polish: touch targets and no iOS focus zoom ─── */
@media (max-width: 900px) {
  #cards-search, .feedback textarea, .feedback input[type=text], .feedback input[type=email] { font-size: 16px; }
  .map-marker { width: 26px; height: 26px; padding: 0; margin: 0; }
}
@media (max-width: 768px) {
  .nav-toggle { box-sizing: content-box; padding: 12px 8px; margin-right: -8px; }
  #nav-search-btn { width: 44px; height: 44px; }
}
.nowrap { white-space: nowrap; }
