
/* ═══════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════ */
:root {
  --yellow: #f8d03a;
  --red:    #e83b3b;
  --blue:   #4965ff;
  --green:  #2a9d2a;
  --font-pixel:  'Tiny5', 'Courier New', monospace;
  --font-accent: 'Courier New', monospace;
  --font-body:   'Courier New', monospace;
  --t: 0.2s;
}

/* DARK (default) */
:root, [data-theme="dark"] {
  --bg:       #111111;
  --bg-alt:   #181818;
  --bg-card:  #1c1c1c;
  --fg:       #f0f0f0;
  --fg-muted: #888888;
  --border:   #2e2e2e;
  --border-hi:#555555;
  --accent-text: var(--yellow);
}

/* LIGHT */
[data-theme="light"] {
  --bg:       #f8f8f0;
  --bg-alt:   #ffffff;
  --bg-card:  #ffffff;
  --fg:       #111111;
  --fg-muted: #666666;
  --border:   #111111;
  --border-hi:#111111;
  --accent-text: var(--fg);
}

/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 75px;
}

/* Offset for fixed nav on all anchor targets */
#who, #work, #noc, #chronicle, #feria, #mural, #proposal {
  scroll-margin-top: 70px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: background var(--t), color var(--t);
}

a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }

/* ═══════════════════════════════════════
   NAV
═══════════════════════════════════════ */
nav {
  position: fixed;
  top: calc(100vh - 60px);
  left: 0;
  right: 0;
  z-index: 100;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  height: 60px;
  border-top: 3px solid var(--yellow);
  border-bottom: 3px solid transparent;
  gap: 1rem;
  transition: top 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              border-top-color 0.35s ease,
              border-bottom-color 0.35s ease;
}

body.past-hero nav {
  top: 0;
  border-top-color: transparent;
  border-bottom-color: var(--yellow);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--yellow);
  flex-shrink: 0;
  position: absolute;
  left: 1.5rem;
}

.nav-logo img {
  width: 42px;
  height: 42px;
  image-rendering: pixelated;
}

.nav-logo-text {
  display: none;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
}

nav ul a {
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font-accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 0.75rem;
  transition: color var(--t);
  white-space: nowrap;
}

nav ul a:hover { color: var(--yellow); }

/* ── Floating controls (theme + lang) ── */
.float-controls {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.float-btn {
  height: 36px;
  min-width: 36px;
  border-radius: 999px;
  border: 1.5px solid rgba(248, 208, 58, 0.4);
  background: rgba(17, 17, 17, 0.82);
  color: var(--yellow);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.55rem;
  font-family: var(--font-accent);
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--t), background var(--t);
  white-space: nowrap;
}

.float-btn:hover {
  border-color: var(--yellow);
  background: rgba(248, 208, 58, 0.1);
}

/* Nav always has dark background — keep text light in light mode */
[data-theme="light"] nav ul a { color: #f0f0f0; }
[data-theme="light"] nav ul a:hover { color: var(--yellow); }

[data-theme="light"] .float-btn {
  background: rgba(248, 248, 240, 0.88);
  color: #111;
  border-color: rgba(17, 17, 17, 0.3);
}

[data-theme="light"] .float-btn:hover {
  border-color: #111;
  background: rgba(17, 17, 17, 0.08);
}

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
#hero {
  min-height: 100vh;
  background: #0a0a0a;
  color: #f0f0f0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem 1.5rem;
  text-align: center;
  gap: 0;
}

.hero-bynounish {
  font-family: var(--font-accent);
  font-size: 0.9rem;
  color: var(--fg-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.hero-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
}

.hero-logo-float {
  animation: heroFloat 3.5s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-logo-img {
  width: clamp(180px, 40vw, 360px);
  height: auto;
  image-rendering: pixelated;
  display: block;
}

.hero-logo-reflection {
  animation: heroReflect 3.5s ease-in-out infinite;
}

@keyframes heroReflect {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(12px); }
}

.hero-logo-reflection .hero-logo-img {
  transform: scaleY(-1);
  opacity: 0.3;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 65%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 65%);
  margin-top: 2px;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-pixel);
  font-size: clamp(1.2rem, 3.5vw, 2.2rem);
  line-height: 0.95;
  margin-bottom: 1.75rem;
  color: #fff;
}

.hero-title span:first-child { color: var(--yellow); }

.hero-sub {
  font-family: var(--font-accent);
  font-size: 0.88rem;
  color: var(--fg-muted);
  max-width: 500px;
  margin: 0.5rem auto 1.75rem;
  line-height: 1.7;
  text-align: center;
}

.hero-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-btn {
  background: none;
  border: 2px solid var(--yellow);
  color: var(--yellow);
  font-family: var(--font-accent);
  font-size: 0.82rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.6rem 1.1rem;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}

.hero-btn:hover { background: var(--yellow); color: #111; text-decoration: none; }

/* ═══════════════════════════════════════
   DIVIDER
═══════════════════════════════════════ */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
}

.divider span {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--fg-muted);
  font-weight: bold;
  white-space: nowrap;
}

/* ═══════════════════════════════════════
   SECTION WRAPPER
═══════════════════════════════════════ */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-label {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: bold;
  margin-bottom: 0.75rem;
}

h2 {
  font-family: var(--font-pixel);
  font-size: clamp(1rem, 2.5vw, 1.8rem);
  font-weight: normal;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--fg);
}

h3 {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  font-weight: normal;
  margin-bottom: 0.4rem;
}

/* ═══════════════════════════════════════
   CARD SYSTEM — shared
═══════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 3px solid var(--border);
  overflow: hidden;
}

.card-label {
  background: var(--bg-card);
  color: var(--yellow);
  font-family: var(--font-accent);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
  border-bottom: 2px solid var(--border);
}

.card-body { padding: 1.25rem; }

/* ═══════════════════════════════════════
   STATS
═══════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 3px solid var(--border);
  margin-top: 2rem;
}

.stat-cell {
  background: var(--bg-card);
  padding: 1.75rem 1rem;
  text-align: center;
}

.stat-num {
  font-family: var(--font-pixel);
  font-size: 1.5rem;
  color: var(--accent-text);
  line-height: 1;
  display: block;
}

.stat-lbl {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
  display: block;
  line-height: 1.8;
}


/* ═══════════════════════════════════════
   WHO — HEADER BAR
═══════════════════════════════════════ */
#who-header {
  background: var(--yellow);
  border-top: 6px solid #111;
  border-bottom: 6px solid #111;
  padding: 2.5rem 2rem;
}

.who-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.who-header-inner > img {
  width: 100px;
  height: 100px;
  image-rendering: pixelated;
  flex-shrink: 0;
  border: 3px solid #111;
}

.who-header-text .section-label { color: rgba(0,0,0,0.4); }

.who-header-text h2 {
  color: #111;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.2rem;
}

.who-header-text p {
  font-size: 0.9rem;
  color: #444;
  font-family: var(--font-body);
}

/* ═══════════════════════════════════════
   WHO — BODY GRID
═══════════════════════════════════════ */
.who-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

.who-intro {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.8;
  max-width: 780px;
  margin-bottom: 2rem;
}

.who-residency-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.who-residency-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0 0.25rem;
}

.who-residency-divider::before,
.who-residency-divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
}

.who-residency-divider span {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--fg-muted);
  font-weight: bold;
  white-space: nowrap;
}

.who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ── Bio card ── */
.who-bio {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 200px 1fr;
  background: var(--bg-card);
  border: 3px solid var(--border);
  overflow: hidden;
}

.who-portrait {
  background: var(--bg-alt);
  border-right: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  overflow: hidden;
}

.portrait-widget {
  width: 100%;
  transition: transform 0.1s ease-out;
  transform-origin: center 90%;
  will-change: transform;
}

.portrait-widget img {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.who-bio-right {
  display: flex;
  flex-direction: column;
}

.bio-text {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.bio-text strong { color: var(--fg); }
.bio-text a { font-weight: bold; }

.bio-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--border);
}

.bio-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }

.bio-stat-n {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--accent-text);
  line-height: 1;
}

.bio-stat-l {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  line-height: 1.8;
}

/* ── WHO generic card ── */
.who-card {
  background: var(--bg-card);
  border: 3px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Props card ── */
.who-props { grid-column: 1 / -1; }

.traits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.trait {
  border: 3px solid var(--border);
  background: var(--bg-alt);
  text-align: center;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s, border-color 0.2s, opacity 0.2s;
}

.trait:hover {
  transform: scale(1.1);
  box-shadow: 4px 4px 0 var(--border);
  filter: none !important;
  opacity: 1 !important;
}

.trait--canceled { filter: grayscale(100%); opacity: 0.6; border-color: var(--border-hi); }
.trait--defeated { border-color: var(--red); }
.trait--executed { border-color: var(--green); }

.trait-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #222;
  overflow: hidden;
}

[data-theme="light"] .trait-img { background: #e0e0e0; }

.trait-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.trait-info {
  padding: 0.35rem 0.4rem;
  font-size: 0.6rem;
  border-top: 2px solid var(--border);
  background: var(--bg-card);
}

.trait--defeated .trait-info { border-top-color: var(--red); }
.trait--executed .trait-info { border-top-color: var(--green); }

.trait-name { font-weight: bold; color: var(--fg); display: block; line-height: 1.3; }
.trait-prop { color: var(--fg-muted); display: block; }
.trait-status { display: block; }
.trait--defeated .trait-status { color: var(--red); }
.trait--canceled .trait-status { color: var(--fg-muted); }
.trait--executed .trait-status { color: var(--green); font-weight: bold; }

/* ── Noundry big num ── */
.noundry-num {
  font-family: var(--font-pixel);
  font-size: 4rem;
  color: var(--accent-text);
  line-height: 1;
}

/* ── WHO cards: consistent two-column split (visual left, text right) ── */
.card-split {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.card-split-img {
  width: 160px;
  height: 160px;
  overflow: hidden;
  background: var(--bg-alt);
  flex-shrink: 0;
}

.card-split-img img,
.card-split-img svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ═══════════════════════════════════════
   WORK / PORTFOLIO
═══════════════════════════════════════ */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.artwork-card {
  background: var(--bg-card);
  border: 3px solid var(--border);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

.artwork-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--border);
}

.artwork-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.artwork-img img,
.artwork-img video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
}

.ph-icon {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: var(--border-hi);
}

.artwork-caption {
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  border-top: 2px solid var(--border);
  color: var(--fg-muted);
}

/* ═══════════════════════════════════════
   NOC VIEWER
═══════════════════════════════════════ */
/* ── NOC viewer ─────────────────────────────────────────── */
.noc-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 0.5rem;
}
.noc-section-header h3 {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--yellow);
  margin: 0;
  letter-spacing: 0.04em;
}
.noc-section-header .noc-count-badge {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--bg);
  background: var(--yellow);
  padding: 1px 6px 2px;
  line-height: 1.4;
}
.noc-section-desc {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin: 0 0 1.25rem;
}

.noc-viewer {
  display: flex;
  gap: 2rem;
  align-items: start;
  max-height: 650px;
}

.noc-thumb-col {
  flex-shrink: 0;
}

.noc-scroll-shell {
  position: relative;
}

.noc-thumb-scroll {
  max-height: 620px;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
}
.noc-thumb-scroll::-webkit-scrollbar { display: none; }

.noc-scroll-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--yellow);
  font-size: 0.55rem;
  line-height: 1;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s;
}
.noc-scroll-arrow.visible { opacity: 1; }
.noc-scroll-arrow-up  { top: 2px; }
.noc-scroll-arrow-down { bottom: 2px; }

.noc-thumb-hint {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--fg-muted);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.noc-thumb-grid {
  display: grid;
  grid-template-columns: repeat(8, 64px);
  gap: 3px;
}

.noc-thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  display: block;
  position: relative;
  transition: transform 0.12s;
  outline: none;
}

.noc-thumb:hover {
  transform: scale(1.18);
  z-index: 2;
  outline: 1px solid var(--yellow);
  outline-offset: 1px;
}

.noc-thumb.active {
  transform: scale(1.18);
  z-index: 3;
  outline: 2px solid var(--yellow);
  outline-offset: 1px;
}

.noc-thumb.noc-clicked {
  animation: nocPop 0.18s ease forwards;
}

.noc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  image-rendering: pixelated;
}

.noc-preview-panel {
  position: sticky;
  top: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* fixed 500×540 frame — nothing shifts */
.noc-preview-frame {
  width: 500px;
  height: 540px;
  position: relative;
  outline: none;
  background: transparent;
  overflow: hidden;
}

/* idle: RGB logo centered, fades out when GIF loads */
.noc-preview-idle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s;
  pointer-events: none;
}

.noc-preview-idle.hidden {
  opacity: 0;
}

.noc-preview-gif-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  opacity: 0;
  transition: opacity 0.25s;
  display: block;
}

.noc-preview-gif-img.visible {
  opacity: 1;
}

.noc-preview-label {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--yellow);
  margin: 0;
  background: var(--bg);
  padding: 2px 6px;
  border-left: 3px solid var(--yellow);
  letter-spacing: 0.06em;
  min-height: 1.4em;
}

@keyframes nocPop {
  0%   { transform: scale(1.3); }
  40%  { transform: scale(1.05); }
  100% { transform: scale(1.18); }
}

@media (max-width: 1100px) {
  .noc-viewer { gap: 1rem; }
  .noc-thumb-grid { grid-template-columns: repeat(2, 56px); }
  .noc-thumb { width: 56px; height: 56px; }
  .noc-thumb-scroll { max-height: 590px; }
  .noc-preview-panel { position: static; flex: 1; min-width: 0; }
  .noc-preview-frame { width: 100%; height: 420px; }
}

@media (max-width: 480px) {
  .noc-thumb-grid { grid-template-columns: repeat(2, 44px); }
  .noc-thumb { width: 44px; height: 44px; }
  .noc-thumb-scroll { max-height: 500px; }
  .noc-preview-frame { height: 320px; }
}

/* ═══════════════════════════════════════
   CONTRIBUTIONS
═══════════════════════════════════════ */
.contrib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.contrib-card {
  background: var(--bg-card);
  border: 3px solid var(--border);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

.contrib-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--border);
}

.contrib-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--border);
  overflow: hidden;
}

.contrib-img img { width: 100%; height: 100%; object-fit: cover; }

.contrib-body { padding: 0.75rem; }

.contrib-name {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--fg);
  display: block;
  margin-bottom: 0.25rem;
}

.contrib-desc { font-size: 0.78rem; color: var(--fg-muted); }

/* ═══════════════════════════════════════
   FERIA
═══════════════════════════════════════ */
#feria {
  padding: 4rem 2rem;
}

#feria .inner { max-width: 1100px; margin: 0 auto; }

.feria-tabs {
  display: flex;
  border: 3px solid var(--border-hi);
  width: fit-content;
  margin: 1.5rem 0 1rem;
}

.feria-tab {
  padding: 0.5rem 1.25rem;
  font-family: var(--font-accent);
  font-size: 0.78rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--fg-muted);
  border-right: 2px solid var(--border-hi);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}

.feria-tab:last-child { border-right: none; }
.feria-tab.active { background: var(--yellow); color: #111; }

.feria-panel { display: none; }
.feria-panel.active { display: block; }

.feria-ig-btn {
  display: inline-block;
  background: var(--yellow);
  color: #111;
  border: 2px solid var(--yellow);
  font-family: var(--font-accent);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.55rem 1.1rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 1.25rem;
}

.feria-ig-btn:hover { background: #dab82e; text-decoration: none; }

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.sticker-card {
  background: #fff;
  border: 3px solid #111;
  overflow: hidden;
  text-align: center;
  transition: transform var(--t), box-shadow var(--t);
}

.sticker-card:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 #111; }

.sticker-img {
  width: 100%;
  aspect-ratio: 1;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sticker-img img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.sticker-ph { font-family: var(--font-pixel); font-size: 1rem; color: #ccc; }

.sticker-artist {
  padding: 0.4rem 0.5rem;
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 1px;
  border-top: 2px solid #111;
  color: #111;
}

.artist-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.artist-tag {
  font-family: var(--font-accent);
  font-size: 0.7rem;
  letter-spacing: 1px;
  padding: 0.3rem 0.65rem;
  background: var(--bg-card);
  border: 2px solid var(--border-hi);
  color: var(--fg);
}

/* ═══════════════════════════════════════
   MURAL
═══════════════════════════════════════ */
.mural-intro {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 2rem;
  margin-top: 1.5rem;
  align-items: start;
}

.mural-meta-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 3px solid var(--border);
}

.mural-stat {
  background: var(--bg-card);
  padding: 1rem;
  text-align: center;
}

.mural-stat-n {
  display: block;
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.mural-stat-l {
  display: block;
  font-family: var(--font-accent);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fg-muted);
}

.mural-collab {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--yellow);
  background: var(--bg-alt);
}

/* ═══════════════════════════════════════
   LANGUAGE TOGGLE
═══════════════════════════════════════ */
.t-es { display: none; }
[data-lang="es"] .t-en { display: none; }
[data-lang="es"] .t-es { display: revert; }

/* ═══════════════════════════════════════
   CHRONICLE / TIMELINE
═══════════════════════════════════════ */
.chronicle {
  position: relative;
  margin-top: 2.5rem;
  padding-left: 3rem;
}

/* Vertical yellow line */
.chronicle::before {
  content: '';
  position: absolute;
  left: 0.85rem;
  top: 0.5rem;
  bottom: 0;
  width: 4px;
  background: var(--yellow);
}

.ch-entry {
  position: relative;
  margin-bottom: 2.5rem;
}

/* Yellow square bullet */
.ch-entry::before {
  content: '';
  position: absolute;
  left: -2.25rem;
  top: 0.45rem;
  width: 14px;
  height: 14px;
  background: var(--yellow);
  border: 3px solid var(--bg);
  outline: 2px solid var(--yellow);
}

.ch-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.ch-date {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  color: var(--fg-muted);
  letter-spacing: 1px;
  font-weight: bold;
}

.ch-tag {
  font-family: var(--font-accent);
  font-size: 0.62rem;
  padding: 3px 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ch-tag--milestone { background: var(--yellow); color: #111; }
.ch-tag--event     { background: var(--blue);   color: #fff; }
.ch-tag--artwork   { background: var(--green);  color: #fff; }

.ch-card {
  background: var(--bg-card);
  border: 3px solid var(--border);
  overflow: hidden;
  transition: border-color var(--t);
}

.ch-card-head {
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ch-card-head h3 { margin: 0; flex: 1; font-family: var(--font-accent); font-size: 0.9rem; font-weight: bold; }

.ch-card-head::after {
  content: '⌐◨-◨';
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--fg-muted);
  opacity: 0.35;
  flex-shrink: 0;
  line-height: 1.2;
}

.ch-card-body { padding: 0.75rem 1rem; }

.ch-desc {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* Photo grid inside chronicle */
.ch-photos {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.ch-photo {
  width: 120px;
  height: 90px;
  border: 2px solid var(--border);
  background: var(--bg-alt);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t);
}

.ch-photo:hover { opacity: 0.85; }

.ch-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ch-photo-ph { font-size: 1.2rem; color: var(--border-hi); }

/* ═══════════════════════════════════════
   PROPOSAL
═══════════════════════════════════════ */
#proposal {
  background: #0a0a0a;
  color: #f0f0f0;
  text-align: center;
  padding: 5rem 2rem;
}

#proposal h2 {
  color: var(--yellow);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

#proposal > p {
  max-width: 560px;
  margin: 0 auto 2rem;
  color: #999;
  font-size: 0.95rem;
}

.prop-pills {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.prop-pill {
  border: 2px solid var(--yellow);
  color: var(--yellow);
  padding: 0.45rem 1rem;
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.btn {
  display: inline-block;
  background: var(--yellow);
  color: #111;
  font-family: var(--font-accent);
  font-size: 0.8rem;
  letter-spacing: 1px;
  padding: 0.8rem 2rem;
  text-decoration: none;
  border: 3px solid var(--yellow);
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t), color var(--t);
}

.btn:hover { background: transparent; color: var(--yellow); }


/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  background: #0a0a0a;
  color: #666;
  text-align: center;
  padding: 2rem;
  font-size: 0.75rem;
  border-top: 3px solid #1e1e1e;
}

footer span { color: var(--yellow); }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 700px) {
  nav ul a { font-size: 0.72rem; padding: 0.5rem; }
  .who-grid { grid-template-columns: 1fr; }
  .who-bio  { grid-column: 1; grid-template-columns: 1fr; }
  .who-portrait {
    border-right: none;
    border-bottom: 3px solid var(--border);
    min-height: 160px;
  }
  .traits-grid { grid-template-columns: repeat(2, 1fr); }
  .who-header-inner { flex-direction: column; gap: 1rem; }
  .chronicle { padding-left: 2rem; }
  .bio-stats { gap: 1rem; }
  .who-residency-body { grid-template-columns: 1fr; gap: 1rem; }
  .mural-intro { grid-template-columns: 1fr; }
  .mural-meta-box { grid-template-columns: repeat(3, 1fr); }
  .hero-bynounish { font-size: 0.75rem; letter-spacing: 2px; }
  .hero-ctas { flex-direction: column; align-items: center; }
  /* Card split: stack vertically on mobile */
  .card-split {
    grid-template-columns: 1fr;
  }
  .card-split-img {
    width: 120px;
    height: 120px;
    margin: 0 auto;
  }
  .who-body { padding: 1.5rem 1rem; }
}

@media (max-width: 480px) {
  nav { padding: 0 0.5rem; gap: 0; justify-content: center; }
  .nav-logo { display: none; }
  nav ul { flex-wrap: nowrap; gap: 0; justify-content: center; width: 100%; }
  nav ul a { font-size: 0.68rem; padding: 0.35rem 0.6rem; }
  nav ul li:has(a[href="#feria"]),
  nav ul li:has(a[href="#mural"]) { display: none; }
  .who-grid { grid-template-columns: 1fr; }
  .hero-logo-img { width: clamp(140px, 70vw, 240px); }
  .card-split-img { width: 100px; height: 100px; }
  .noundry-num { font-size: 2.5rem; }
}

/* ═══════════════════════════════════════
   DYNAMIC GALLERIES
═══════════════════════════════════════ */
.dyn-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  margin-top: 1rem;
}

.dyn-gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  cursor: default;
}

.dyn-gallery-item img,
.dyn-gallery-item video {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}

.dyn-gallery-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.78);
  color: var(--yellow);
  font-family: var(--font-accent);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 6px;
  opacity: 0;
  transition: opacity 0.18s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dyn-gallery-item:hover .dyn-gallery-label {
  opacity: 1;
}

@media (max-width: 600px) {
  .dyn-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .dyn-gallery-item img,
  .dyn-gallery-item video {
    height: 120px;
  }
}

/* ── Gallery context note ─────────────────────────────────── */
.gallery-context-note {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.gallery-context-note p {
  font-size: 0.83rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin: 0;
}

/* ── Masonry gallery ──────────────────────────────────────── */
.masonry-wrap {
  max-height: 600px;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
  margin-top: 1rem;
}
.masonry-wrap::-webkit-scrollbar { display: none; }

.masonry-gallery {
  columns: 5;
  column-gap: 4px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}

.masonry-item img,
.masonry-item video {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: auto;
  transition: opacity 0.15s;
}

.masonry-item:hover img,
.masonry-item:hover video {
  opacity: 0.85;
}

.masonry-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.75);
  color: var(--yellow);
  font-family: var(--font-accent);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 6px;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.masonry-item:hover .masonry-label { opacity: 1; }

@media (max-width: 900px) { .masonry-gallery { columns: 4; } }
@media (max-width: 600px) { .masonry-gallery { columns: 3; } .masonry-wrap { max-height: 500px; } }
@media (max-width: 400px) { .masonry-gallery { columns: 2; } }

/* ── Lightbox ─────────────────────────────────────────────── */
#lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#lb-overlay.active { display: flex; }

#lb-inner {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lb-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}
#lb-close:hover { opacity: 1; }

#lb-media img,
#lb-media video {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  display: block;
  image-rendering: auto;
}

