:root {
  --paper: #F4EFE6;
  --surface: #FBF8F2;
  --surface2: #EAE2D4;
  --ink: #171512;
  --muted: #5B5349;
  --line: #D7CEBE;
  --rule: #241F1A;
  --accent: #A8241C;
  --on-accent: #FAF8F4;
  --brass: #9C6F2E;
  --glow: rgba(168, 36, 28, 0.08);
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Newsreader', Georgia, serif;
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --reader-scale: 1;
}

:root[data-theme="sepia"] {
  --paper: #E9DEC9;
  --surface: #F2E9D8;
  --surface2: #DDD0B6;
  --ink: #2C1E14;
  --muted: #6B533E;
  --line: #C7B598;
  --rule: #4A3423;
  --accent: #8C3B1E;
  --on-accent: #F8F1E4;
  --brass: #9C6A2B;
  --glow: rgba(140, 59, 30, 0.10);
}

:root[data-theme="trix"] {
  --paper: #0D0D0F;
  --surface: #151518;
  --surface2: #1E1E22;
  --ink: #F1EEE7;
  --muted: #A5A096;
  --line: #2B2B31;
  --rule: #E6E1D8;
  --accent: #E54D42;
  --on-accent: #FAF8F4;
  --brass: #D8AB6A;
  --glow: rgba(216, 171, 106, 0.09);
}

:root[data-theme="cyanotype"] {
  --paper: #0A1B30;
  --surface: #102540;
  --surface2: #173255;
  --ink: #EDF4FC;
  --muted: #9BB7D6;
  --line: #26466D;
  --rule: #C8DDF5;
  --accent: #E5B567;
  --on-accent: #0A1B30;
  --brass: #7DC2F0;
  --glow: rgba(125, 194, 240, 0.11);
}

:root[data-theme="darkroom"] {
  --paper: #100304;
  --surface: #1A0607;
  --surface2: #270A0C;
  --ink: #F3BFBA;
  --muted: #B87873;
  --line: #461417;
  --rule: #C7514A;
  --accent: #FF6154;
  --on-accent: #FAF8F4;
  --brass: #E09963;
  --glow: rgba(255, 97, 84, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  background-image: radial-gradient(circle at 78% 12%, var(--glow) 0%, transparent 48%);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: clip;
  transition: background-color 0.28s ease, color 0.28s ease;
  -webkit-font-smoothing: antialiased;
}
body.drawer-open { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Tactile Archival Grain & Optical Cursor */
.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}
.cursor-reticle {
  position: fixed;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 85;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0) scale(0.75);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.cursor-reticle::before,
.cursor-reticle::after {
  content: "";
  position: absolute;
  background: var(--accent);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.cursor-reticle::before { width: 10px; height: 1px; }
.cursor-reticle::after { width: 1px; height: 10px; }
.cursor-reticle.is-active { opacity: 0.72; }
@media (hover: none), (pointer: coarse) { .cursor-reticle { display: none; } }

.shell { max-width: 1360px; margin: 0 auto; padding: 0 44px; }

/* Top Utility Bar */
.topline {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.topline-inner {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.topline b { color: var(--accent); padding: 0 6px; }
.topline-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.search-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 7px 13px;
  border-radius: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1;
  color: var(--ink);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.search-open:hover { border-color: var(--rule); color: var(--accent); background: var(--paper); }
.search-glyph { color: var(--accent); font-size: 14px; line-height: 1; }
.search-open kbd {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 2px;
}
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.theme-switch button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 11px;
  border-radius: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
  transition: all 0.2s ease;
}
.theme-switch button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.theme-switch button[data-theme-choice="sepia"]::before { background: #C8A97E; border: 1px solid #6E4B2A; }
.theme-switch button[data-theme-choice="trix"]::before { background: #18181B; border: 1px solid #6E6B64; }
.theme-switch button[data-theme-choice="cyanotype"]::before { background: #143A66; border: 1px solid #7DC2F0; }
.theme-switch button[data-theme-choice="darkroom"]::before { background: #6E1116; border: 1px solid #FF6154; }
.theme-switch button:hover { color: var(--ink); background: var(--paper); }
.theme-switch button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* Two-Tier Editorial Gallery Masthead */
.site-header {
  border-bottom: 1.5px solid var(--rule);
  background: var(--paper);
  position: relative;
}
.masthead-top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding-top: 24px;
  padding-bottom: 20px;
}
.brand { display: flex; align-items: center; gap: 15px; flex-shrink: 0; }
.brand-mark { width: 48px; height: 48px; color: var(--accent); flex-shrink: 0; }
.brand-mark .brand-iris { transform-origin: 24px 24px; transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.brand:hover .brand-mark .brand-iris { transform: rotate(30deg) scale(1.06); }
.brand span { display: flex; flex-direction: column; gap: 4px; }
.brand strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.brand sup {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-left: 5px;
  color: var(--accent);
}
.brand small {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.masthead-nav-bar {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.primary-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}
.nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.nav-btn::before,
.nav-btn::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.nav-btn::before { left: 3px; top: 3px; border-width: 1.5px 0 0 1.5px; }
.nav-btn::after { right: 3px; bottom: 3px; border-width: 0 1.5px 1.5px 0; }
.nav-idx {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brass);
  transition: color 0.2s ease;
}
.nav-btn:hover {
  transform: translateY(-2px);
  border-color: var(--rule);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 10px 22px -16px rgba(23, 21, 18, 0.35);
}
.nav-btn:hover .nav-idx { color: var(--accent); }
.nav-btn:hover::before,
.nav-btn:hover::after { opacity: 1; }
.nav-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.nav-btn.is-active .nav-idx { color: var(--accent); }
.nav-btn.is-active::before,
.nav-btn.is-active::after { opacity: 1; border-color: var(--accent); }

/* Mobile Menu Button & Drawer */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 10px 16px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.nav-toggle i {
  position: relative;
  display: block;
  width: 18px;
  height: 10px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--paper);
  padding: 28px 28px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}
.mobile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.drawer-close {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 9px 14px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.mobile-nav { display: grid; gap: 6px; border-top: 1px solid var(--line); }
.mobile-nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
}
.mobile-nav a span { font-family: var(--mono); font-weight: 500; font-size: 12px; line-height: 1; color: var(--accent); }
.mobile-drawer-tools { display: grid; gap: 16px; padding-top: 24px; }
.mobile-search-btn { justify-content: center; padding: 12px 18px; font-size: 14px; }

/* Shared Typographic Helpers */
.eyebrow, .mono { font-family: var(--mono); font-weight: 500; font-size: 12px; line-height: 1.35; letter-spacing: 0.09em; color: var(--muted); }
.muted { color: var(--muted); }
main { min-height: 60vh; }
.arrow-link {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.25;
  letter-spacing: 0.07em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.arrow-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.solid-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  padding: 14px 24px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: 0.07em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.solid-button:hover { color: var(--on-accent); transform: translateY(-1px); opacity: 0.92; }
.ghost-button {
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  padding: 14px 22px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: 0.07em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ghost-button:hover { border-color: var(--accent); color: var(--accent); }

/* Safe Opt-In Scroll Reveal */
html.js-reveal [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
html.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

/* Hero Exhibition Stage */
.hero-exhibition {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  gap: 54px;
  align-items: center;
  padding: 52px 0 60px;
  border-bottom: 1px solid var(--line);
}
.hero-copy, .hero-artwork { min-width: 0; }
.hero-kicker { color: var(--accent); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-dot { display: inline-block; animation: svg-bokeh-pulse 2.8s ease-in-out infinite; color: var(--accent); }
.hero-copy h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 3.6vw, 54px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 18px 0 18px;
}
.hero-copy .deck {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 580px;
  margin: 0;
}
.mental-preview {
  border-left: 2px solid var(--brass);
  background: var(--surface);
  padding: 16px 20px;
  margin-top: 26px;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}
.mental-preview strong {
  display: block;
  color: var(--brass);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Gallery Passe-Partout Artwork Frame */
.artwork-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px;
  box-shadow: 0 22px 54px -28px rgba(23, 21, 18, 0.25);
}
.artwork-frame-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.plate-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 7px 12px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.plate-btn:hover, .plate-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.artwork-stage {
  display: block;
  position: relative;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.artwork-placard {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.crop {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--accent);
  border-style: solid;
  z-index: 3;
  pointer-events: none;
}
.crop.tl { left: 4px; top: 4px; border-width: 1.5px 0 0 1.5px; }
.crop.tr { right: 4px; top: 4px; border-width: 1.5px 1.5px 0 0; }
.crop.bl { left: 4px; bottom: 4px; border-width: 0 0 1.5px 1.5px; }
.crop.br { right: 4px; bottom: 4px; border-width: 0 1.5px 1.5px 0; }

/* Section Headers */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  border-bottom: 1.5px solid var(--rule);
  padding-bottom: 16px;
  margin-bottom: 32px;
}
.section-heading h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.14;
  margin: 6px 0 0;
  letter-spacing: -0.015em;
}
.gallery-section { padding: 52px 0 32px; }

/* Exhibition Plate Cards */
.art-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}
.art-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.art-card:hover {
  transform: translateY(-4px);
  border-color: var(--rule);
  box-shadow: 0 20px 44px -28px rgba(23, 21, 18, 0.28);
}
.art-card-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11.5px;
  line-height: 1.2;
  letter-spacing: 0.06em;
}
.plate-code { color: var(--ink); font-weight: 600; }
.art-card-cat { color: var(--accent); }
.art-card-time { color: var(--muted); }
.art-card-stage {
  position: relative;
  display: block;
  padding: 16px 16px 0;
}
.passe-partout {
  position: relative;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
}
.art-svg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; }
.art-card-body {
  min-width: 0;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.art-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.art-card-excerpt {
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 14px;
}
.art-card-mental {
  margin: auto 0 18px;
  padding: 10px 14px;
  border-left: 2px solid var(--brass);
  background: var(--paper);
  font-family: var(--body);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}
.art-card-mental span {
  display: block;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 10.5px;
  line-height: 1.2;
  font-style: normal;
  letter-spacing: 0.09em;
  color: var(--brass);
  margin-bottom: 4px;
}
.art-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.art-card-footer .arrow-link { margin-top: 0; }
.tech-badge { font-family: var(--mono); font-weight: 500; font-size: 11px; line-height: 1.25; letter-spacing: 0.06em; color: var(--muted); }

/* Archive List View Mode */
.art-gallery.is-list { grid-template-columns: 1fr; gap: 22px; }
.art-gallery.is-list .art-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: stretch;
}
.art-gallery.is-list .art-card-bar { grid-column: 1 / -1; }
.art-gallery.is-list .art-card-stage { padding: 16px; display: flex; align-items: center; }
.art-gallery.is-list .passe-partout { width: 100%; }

/* Viewfinder Notes Band */
.notes-band { padding: 48px 0 28px; }
.notes-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.note-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.note-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.note-card-top small { font-family: var(--mono); font-weight: 600; font-size: 11px; line-height: 1.3; letter-spacing: 0.07em; color: var(--accent); }
.quote-mark { font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1; color: var(--brass); opacity: 0.6; }
.note-card p { font-family: var(--body); font-size: 17px; line-height: 1.58; margin: 0; }
.copy-quote {
  align-self: flex-start;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 4px 0;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* Interactive Ratio & Composition Lab */
.ratio-lab {
  margin: 56px 0;
  padding: 40px;
  background: var(--surface2);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  border: 1px solid var(--line);
}
.ratio-lab > * { min-width: 0; }
.ratio-lab h2, .page-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 12px 0;
}
.ratio-lab p:not(.eyebrow) { font-family: var(--body); font-size: 18px; line-height: 1.6; color: var(--muted); }
.ratio-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 8px; }
.ratio-buttons button {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 14px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  color: var(--ink);
  transition: all 0.18s ease;
}
.ratio-buttons button:hover { border-color: var(--accent); }
.ratio-buttons button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.guide-buttons { margin-top: 8px; }
.guide-desc { margin: 14px 0 6px; color: var(--ink); }
.ratio-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ratio-demo {
  position: relative;
  width: 100%;
  max-width: 440px;
  border: 1.5px solid var(--rule);
  background: var(--surface);
  overflow: hidden;
  transition: aspect-ratio 0.3s ease, max-width 0.3s ease;
  box-shadow: 0 18px 36px -24px rgba(0, 0, 0, 0.3);
}
.ratio-demo[data-ratio-value="1:1"] { max-width: 280px; }
.ratio-demo[data-ratio-value="4:5"] { max-width: 235px; }
.ratio-demo[data-ratio-value="4:3"] { max-width: 340px; }
.ratio-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.ratio-svg .guide-layer { opacity: 0; transition: opacity 0.3s ease; }
.ratio-demo[data-active-guide="thirds"] .guide-thirds,
.ratio-demo[data-active-guide="merkez-simetri"] .guide-merkez-simetri,
.ratio-demo[data-active-guide="altin-spiral"] .guide-altin-spiral,
.ratio-demo[data-active-guide="diyagonal-dinamik"] .guide-diyagonal-dinamik,
.ratio-demo[data-active-guide="bos-vizor"] .guide-bos-vizor { opacity: 1; }
.ratio-stage small { font-family: var(--mono); font-weight: 600; font-size: 11.5px; line-height: 1.25; letter-spacing: 0.08em; color: var(--accent); }

/* Lab Notebook — 20 A/B experiments */
.lab-notebook { margin: 24px 0 72px; }
.lab-notebook .section-heading { align-items: end; gap: 20px; flex-wrap: wrap; }
.lab-intro { font-family: var(--body); font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 720px; margin: 8px 0 28px; }
.lab-filters .filter-pill { cursor: pointer; }
.lab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.lab-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.lab-card[hidden] { display: none; }
.lab-card-bar { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-weight: 600; font-size: 11px; letter-spacing: 0.08em; color: var(--accent); }
.lab-card-bar .plate-code { color: var(--ink); }
.lab-figure { padding: 14px 14px 0; }
.lab-svg { display: block; width: 100%; height: auto; aspect-ratio: 480 / 300; }
.lab-svg .lab-state { transition: opacity 0.35s ease; }
.lab-card[data-state="a"] .lab-state-b,
.lab-card[data-state="b"] .lab-state-a { opacity: 0; }
.lab-card-body { padding: 14px 20px 22px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.lab-card-body h3 { font-family: var(--display); font-weight: 500; font-size: 24px; line-height: 1.2; margin: 4px 0 2px; }
.lab-toggle { margin: 10px 0 4px; }
.lab-toggle button { cursor: pointer; }
.lab-note { font-family: var(--body); font-size: 16.5px; line-height: 1.55; color: var(--ink); margin: 8px 0 12px; min-height: 3.1em; }
.lab-exercise { margin-top: auto; border-left: 2px solid var(--brass); background: var(--surface2); padding: 12px 14px; }
.lab-exercise small { font-family: var(--mono); font-weight: 600; font-size: 10.5px; letter-spacing: 0.1em; color: var(--brass); }
.lab-exercise p { font-family: var(--body); font-size: 15px; line-height: 1.5; margin: 6px 0 0; color: var(--muted); }
@media (max-width: 860px) { .lab-grid { grid-template-columns: 1fr; } }

/* Glossary Section with Term Diagrams */
.glossary-section { padding: 20px 0 48px; }
.glossary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.term-card {
  min-width: 0;
  background: var(--surface);
  padding: 20px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}
.term-card:hover { transform: translateY(-3px); border-color: var(--rule); }
.term-svg-wrap {
  display: block;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 6px;
  margin-bottom: 4px;
}
.term-svg { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; }
.term-card small { font-family: var(--mono); font-weight: 500; font-size: 11px; line-height: 1.25; letter-spacing: 0.07em; color: var(--accent); }
.term-card h3 { font-family: var(--display); font-weight: 500; font-size: 25px; line-height: 1.18; margin: 2px 0; }
.term-card p { font-family: var(--body); font-size: 15.5px; line-height: 1.55; color: var(--muted); margin: 0; }

/* Newsletter / Manifesto Banner */
.newsletter {
  margin: 28px 0 76px;
  padding: 36px 40px;
  background: var(--surface);
  border: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: center;
}
.newsletter h2 { font-family: var(--display); font-weight: 500; font-size: 34px; line-height: 1.15; margin: 8px 0 10px; }
.newsletter p:not(.eyebrow) { font-family: var(--body); font-size: 16.5px; line-height: 1.58; color: var(--muted); margin: 0; max-width: 620px; }
.newsletter-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

/* Architectural 3-Column Gallery Footer */
.site-footer {
  border-top: 2px solid var(--rule);
  box-shadow: inset 0 5px 0 var(--paper), inset 0 6px 0 var(--line);
  background: var(--surface);
  padding: 62px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.05fr) minmax(0, 0.9fr);
  gap: 48px;
  padding-bottom: 42px;
}
.footer-col { min-width: 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.footer-brand .brand-mark { width: 38px; height: 38px; }
.footer-brand strong {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.footer-brand sup { font-family: var(--mono); font-size: 10px; color: var(--accent); margin-left: 4px; }
.footer-brand small {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10.5px;
  line-height: 1.25;
  color: var(--muted);
  letter-spacing: 0.09em;
}
.footer-manifesto {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.62;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 440px;
}
.footer-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-stats span {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 5px 10px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.footer-heading {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 20px;
}
.footer-links--single { grid-template-columns: 1fr; }
.footer-links a {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--ink);
  transition: color 0.18s ease, transform 0.18s ease;
}
.footer-links a:hover { color: var(--accent); transform: translateX(3px); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.footer-bottom-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-top-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 7px 12px;
  color: var(--ink);
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.footer-top-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Search Modal */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(13, 13, 15, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 20px;
}
.search-dialog {
  width: min(680px, 100%);
  background: var(--paper);
  border: 1.5px solid var(--rule);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}
.search-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.search-entry span { font-size: 18px; color: var(--accent); }
.search-entry input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.35;
  outline: none;
}
.search-close {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 11px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
}
.search-results { max-height: 52vh; overflow: auto; padding: 10px; }
.search-results a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.45;
}
.search-results a.is-selected,
.search-results a:hover { background: var(--surface2); color: var(--accent); }
.search-results small {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-right: 12px;
  flex-shrink: 0;
}
.search-hint { padding: 10px 14px; font-family: var(--mono); font-weight: 500; font-size: 11px; line-height: 1.35; color: var(--muted); letter-spacing: 0.07em; }

/* =========================================================
   2D SVG Keyframe Animations (Gallery-Paced & Theme-Adaptive)
   ========================================================= */
@keyframes svg-drift-a { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(9px); } }
@keyframes svg-drift-b { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-11px); } }
@keyframes svg-bokeh-pulse { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes svg-rain-fall {
  0% { transform: translate(0, -18px); opacity: 0; }
  20% { opacity: 0.75; }
  85% { opacity: 0.75; }
  100% { transform: translate(-26px, 260px); opacity: 0; }
}
@keyframes svg-focus-breathe { 0%, 100% { transform: scale(0.95); opacity: 0.45; } 50% { transform: scale(1.06); opacity: 0.92; } }

@keyframes svg-cone-wide { 0%, 100% { opacity: 0.95; } 50% { opacity: 0.35; } }
@keyframes svg-cone-tele { 0%, 100% { opacity: 0.38; } 50% { opacity: 1; } }
@keyframes svg-plane-shift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-22px); } }
@keyframes svg-steam-rise {
  0% { transform: translateY(4px); opacity: 0; }
  45% { opacity: 0.85; }
  100% { transform: translateY(-16px); opacity: 0; }
}

@keyframes svg-pendulum { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes svg-walker-glide {
  0% { transform: translateX(-38px); opacity: 0.3; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateX(220px); opacity: 0.2; }
}
@keyframes svg-moon-drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-12px, -8px); } }
@keyframes svg-bracket-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

@keyframes svg-iris-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes svg-eye-pupil {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(8px, -3px); }
  65% { transform: translate(-6px, 2px); }
}
@keyframes svg-light-sweep { 0%, 100% { opacity: 0.55; transform: translateX(0); } 50% { opacity: 1; transform: translateX(-18px); } }

@keyframes svg-zone-wave { 0%, 100% { opacity: 0.88; } 50% { opacity: 1; } }
@keyframes svg-shadow-arc { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-5deg); } }
@keyframes svg-edge-glint { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

@keyframes svg-corridor-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.022); } }
@keyframes svg-track-flow { from { stroke-dashoffset: 208; } to { stroke-dashoffset: 0; } }
@keyframes svg-pulse-wave { 0%, 100% { opacity: 0.65; transform: scaleY(0.85); } 50% { opacity: 1; transform: scaleY(1.18); } }

@keyframes svg-orbit-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes svg-float-gentle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes svg-dash-flow { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-10px); } }
@keyframes svg-blink { 0%, 88%, 100% { transform: scaleY(0); } 92% { transform: scaleY(1); } 96% { transform: scaleY(0.05); } }

.svg-drift-a { animation: svg-drift-a 11s ease-in-out infinite; }
.svg-drift-b { animation: svg-drift-b 13s ease-in-out infinite; }
.svg-bokeh-1 { transform-box: fill-box; transform-origin: center; animation: svg-bokeh-pulse 6s ease-in-out infinite; }
.svg-bokeh-2 { transform-box: fill-box; transform-origin: center; animation: svg-bokeh-pulse 7.5s ease-in-out infinite 1.2s; }
.svg-bokeh-3 { transform-box: fill-box; transform-origin: center; animation: svg-bokeh-pulse 5.5s ease-in-out infinite 2.4s; }
.svg-rain-1 { animation: svg-rain-fall 6.5s linear infinite; }
.svg-rain-2 { animation: svg-rain-fall 8s linear infinite 2s; }
.svg-rain-3 { animation: svg-rain-fall 7s linear infinite 4s; }
.svg-focus-breathe { transform-box: fill-box; transform-origin: center; animation: svg-focus-breathe 8s ease-in-out infinite; }

.svg-cone-wide { animation: svg-cone-wide 9s ease-in-out infinite; }
.svg-cone-tele { animation: svg-cone-tele 9s ease-in-out infinite; }
.svg-plane-shift { animation: svg-plane-shift 9s ease-in-out infinite; }
.svg-steam { animation: svg-steam-rise 4.5s ease-in-out infinite; }

.svg-pendulum { animation: svg-pendulum 7.5s ease-in-out infinite; }
.svg-walker { animation: svg-walker-glide 15s linear infinite; }
.svg-moon-drift { animation: svg-moon-drift 12s ease-in-out infinite; }
.svg-bracket-pulse { animation: svg-bracket-pulse 6s ease-in-out infinite; }

.svg-iris-spin { transform-box: fill-box; transform-origin: center; animation: svg-iris-spin 22s linear infinite; }
.svg-eye-pupil { animation: svg-eye-pupil 8s ease-in-out infinite; }
.svg-light-sweep { animation: svg-light-sweep 9s ease-in-out infinite; }

.svg-zone-wave { animation: svg-zone-wave 7s ease-in-out infinite; }
.svg-shadow-arc { animation: svg-shadow-arc 10s ease-in-out infinite; }
.svg-edge-glint { animation: svg-edge-glint 4.8s ease-in-out infinite; }

.svg-corridor-1 { transform-box: fill-box; transform-origin: center; animation: svg-corridor-pulse 6s ease-in-out infinite; }
.svg-corridor-2 { transform-box: fill-box; transform-origin: center; animation: svg-corridor-pulse 6s ease-in-out infinite 0.6s; }
.svg-corridor-3 { transform-box: fill-box; transform-origin: center; animation: svg-corridor-pulse 6s ease-in-out infinite 1.2s; }
.svg-track-flow { animation: svg-track-flow 4.2s linear infinite; }
.svg-pulse-wave { transform-box: fill-box; transform-origin: center; animation: svg-pulse-wave 3.4s ease-in-out infinite; }

.svg-orbit-slow { animation: svg-orbit-slow 24s linear infinite; }
.svg-float-gentle { animation: svg-float-gentle 5.5s ease-in-out infinite; }
.svg-dash-flow { animation: svg-dash-flow 8s ease-in-out infinite; }
.svg-blink { transform-box: fill-box; transform-origin: center; transform: scaleY(0); animation: svg-blink 5.5s ease-in-out infinite; }

/* Pause & Reduced Motion Controls */
[data-motion="paused"] * { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .art-svg *, .term-svg *, .ratio-svg *, .brand-mark *, .rec-dot {
    animation: none !important;
    transition: none !important;
  }
  html.js-reveal [data-reveal] { opacity: 1 !important; transform: none !important; }
  .cursor-reticle { display: none !important; }
}

/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .shell { padding-left: 26px; padding-right: 26px; }
  .hero-exhibition { grid-template-columns: 1fr; gap: 36px; padding: 38px 0 46px; }
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glossary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ratio-lab { grid-template-columns: 1fr; gap: 32px; padding: 28px; }
  .art-gallery.is-list .art-card { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 1020px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .masthead-top { justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
  .masthead-nav-bar { display: none; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 760px) {
  .shell { padding-left: 20px; padding-right: 20px; }
  .topline-inner { flex-direction: column; align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
  .topline-right { width: 100%; justify-content: space-between; }
  .brand strong { font-size: 27px; }
  .art-gallery, .notes-grid, .glossary-grid { grid-template-columns: 1fr; }
  .art-gallery.is-list .art-card { grid-template-columns: 1fr; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .newsletter { flex-direction: column; align-items: flex-start; padding: 26px; }
}

@media (max-width: 640px) {
  .site-footer { padding: 46px 0 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Menüdeki arama düğmesi: menü düğmeleriyle aynı yükseklikte */
.primary-nav .nav-search { padding: 10px 15px; font-size: 14px; line-height: 1.1; background: var(--paper); cursor: pointer; }
