/* CreativeSilva.com portfolio stylesheet
   Build framework adapted from the Light Writerz site (docking nav, feature
   bands, glass depth, exhibition gallery, full-screen photo viewer, mobile
   first), recolored to the Creative Silva palette: black, white, gray, red.
   The signature fixed blurred-cityscape backdrop is kept. */

:root {
  --red: #cc0000;            /* primary accent: nav bar, buttons, red bands */
  --red-dark: #990000;
  --red-deep: #7a0000;
  --red-bright: #ff2e2e;     /* pop accent: eyebrows, numbers, links, accent bars */
  --red-wash: rgba(204,0,0,0.12);

  --black: #0a0a0a;
  --ink: #ededed;
  --gray: #9a9a9a;
  --line: rgba(255,255,255,0.08);
  --paper: #141414;          /* solid fallback under the cityscape backdrop */

  --surface: linear-gradient(160deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.015) 100%);
  --surface-border: rgba(255,255,255,0.08);
  --glow: 0 18px 50px rgba(0,0,0,0.45);

  --max: 1200px;
  --header-h: 104px;
  --font-head: "Oswald", "Bebas Neue", "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  /* Legacy aliases so page-level inline styles carried over from the old
     stylesheet (student-work cards, etc.) keep resolving. */
  --bg: #141414;
  --bg-2: #1c1c1c;
  --text: #ffffff;
  --text-dim: #cfcfcf;
  --text-faint: #9a9a9a;
  --accent: #cc0000;
  --max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--black);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* Signature backdrop: fixed, blurred cityscape under a dark veil. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../images/City_Background_Blur.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--black);
  background-attachment: fixed;
  filter: blur(2px);
  z-index: -2;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: -1;
}
/* Phones (portrait): lock the backdrop to the largest viewport height so it
   doesn't jump as the iOS URL bar shows/hides. */
@media (max-width: 640px) and (orientation: portrait) {
  body::before {
    inset: auto; top: 0; left: 0;
    width: 100vw; height: 100lvh;
    background-size: auto 100%;
    background-position: center center;
    background-attachment: scroll;
  }
}
@media (max-width: 900px) and (orientation: landscape) {
  body::before {
    inset: auto; top: 0; left: 0;
    width: 100vw; height: 100lvh;
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
  }
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-bright); text-decoration: none; }
a:hover { color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--red); color: #fff; padding: 8px 14px; z-index: 200; }
.skip:focus { left: 8px; }

/* ---------- Masthead (brand lockup + live counter + donate) ---------- */
.masthead { background: linear-gradient(180deg, rgba(12,12,12,0.92) 0%, rgba(18,18,18,0.92) 100%); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 20px; }
.brand { display: flex; align-items: center; gap: 15px; text-decoration: none; color: #fff; }
.brand-mark { height: 54px; width: auto; flex-shrink: 0; }
.brand-lockup { display: flex; flex-direction: column; gap: 6px; }
.brand-name { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; font-size: 30px; line-height: 0.9; letter-spacing: 0.02em; color: #fff; }
.brand-name b { color: var(--red); font-weight: 700; }
.brand-tenure { display: flex; gap: 7px 16px; flex-wrap: wrap; }
.brand-tenure > span { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; font-size: 10.5px; color: var(--gray); white-space: nowrap; }
.brand-tenure b { color: var(--red-bright); font-weight: 600; }

.mast-right { display: flex; flex-direction: row-reverse; align-items: center; gap: 16px; } /* counter pinned to the right edge, donate to its left */
.pics-counter { display: flex; flex-direction: column; align-items: flex-end; text-align: right; text-decoration: none; padding: 9px 15px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.03); transition: border-color .2s, background .2s; }
.pics-counter:hover { border-color: rgba(204,0,0,0.5); background: var(--red-wash); }
.pc-eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.14em; font-size: 9.5px; color: var(--gray); }
.pc-num { font-family: var(--font-head); font-weight: 600; font-size: 20px; line-height: 1.08; color: #fff; font-variant-numeric: tabular-nums; }
.pc-gb { font-size: 10px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.pc-gb b { color: #fff; font-variant-numeric: tabular-nums; }
.pc-q { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; font-size: 10.5px; color: var(--red-bright); margin-top: 3px; }
.btn-donate { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; font-size: 13px; font-weight: 600; color: #fff; background: var(--red); border: 2px solid var(--red); padding: 12px 18px; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s; }
.btn-donate:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
/* Center wordmark: hidden by default; only the mobile scrolled header shows it. */
.mast-wordmark { display: none; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1; color: #fff; white-space: nowrap; }
.mast-wordmark b { color: var(--red); font-weight: 700; }
@media (max-width: 1180px) { .brand-tenure { display: none; } }
@media (max-width: 1000px) { .pics-counter { display: none; } }

/* ---------- Main nav (sticky red bar that docks) ---------- */
.mainnav { background: linear-gradient(180deg, #cc0000 0%, #990000 100%); position: sticky; top: 0; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,0.45); }
.mainnav .wrap { display: flex; align-items: center; justify-content: center; position: relative; }
.mainnav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; }
.mainnav a {
  display: block; padding: 15px 20px; color: #fff; text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase;
  border-bottom: 3px solid transparent;
}
.mainnav a:hover { background: var(--red-dark); color: #fff; }
.mainnav a[aria-current="page"] { border-bottom-color: #fff; }
.navtoggle { display: none; }

/* Docking logo (slides in once the masthead scrolls away). */
.dock-logo { position: absolute; left: 24px; top: 50%; display: block; width: 40px; height: 40px; opacity: 0; pointer-events: none;
  transform: translate(-10px, -50%) scale(0.8); transition: opacity 0.25s ease, transform 0.25s ease; }
.dock-logo img { width: 40px; height: 40px; }
.mainnav a.dock-logo, .mainnav a.dock-logo:hover { padding: 0; border: 0; background: none; }
.mainnav.docked .dock-logo { opacity: 1; pointer-events: auto; transform: translate(0, -50%) scale(1); }
[id] { scroll-margin-top: 76px; }
@media (max-width: 760px) { [id] { scroll-margin-top: 86px; } }

/* Desktop: when the red bar docks it fades to a dark gradient with a thin red underline. */
@media (min-width: 761px) {
  .mainnav::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.35s ease;
    background: linear-gradient(180deg, #1c1c1c 0%, #0b0b0b 100%); box-shadow: inset 0 -2px 0 var(--red); }
  .mainnav.docked::before { opacity: 1; }
  .mainnav > .wrap { position: relative; z-index: 1; }
  .mainnav.docked a:hover { background: rgba(204,0,0,0.35); }
  .mainnav.docked a[aria-current="page"] { border-bottom-color: var(--red-bright); }
}
/* Seven items: tighten on mid widths so the menu stays one line. */
@media (min-width: 761px) and (max-width: 1199px) { .mainnav a { padding: 15px 12px; font-size: 15px; } }
@media (min-width: 761px) and (max-width: 939px) { .mainnav a { padding: 15px 8px; font-size: 13.5px; letter-spacing: 0.06em; } .mainnav a.dock-logo { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 15px; padding: 13px 26px; border: 2px solid var(--red); background: var(--red); color: #fff; text-decoration: none; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: #fff; border-color: #fff; }
.btn.ghost:hover { background: #fff; color: var(--black); }
.btn.dark { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.28); color: #fff; }
.btn.dark:hover { background: var(--red); border-color: var(--red); color: #fff; }
.red .btn.dark:hover { background: #fff; border-color: #fff; color: var(--red-dark); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--black) center / cover no-repeat; min-height: 620px; display: flex; align-items: flex-end; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.40) 45%, rgba(10,10,10,1) 100%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-bottom: 120px; }
.hero h1 { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; line-height: 0.98; font-size: clamp(44px, 8vw, 104px); letter-spacing: 0.01em; }
.hero h1 .accent { color: var(--red-bright); }
.hero p { font-size: clamp(17px, 2vw, 21px); max-width: 640px; margin-top: 18px; color: #eaeaea; }
.hero .actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero h1, .hero .eyebrow, .hero p { text-shadow: 0 2px 18px rgba(0,0,0,0.55); }

.hero.page { min-height: 420px; }
.hero.page .wrap { padding-bottom: 56px; }
.hero.page h1 { font-size: clamp(40px, 6vw, 76px); }
.eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.2em; font-size: 14px; color: var(--red-bright); margin-bottom: 10px; }
.hero-credit { margin-top: 14px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; color: var(--red-bright); }

/* Home hero: slow crossfade of full-bleed black-and-white frames. */
.hero-home .hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--black); }
.hero-home::before { z-index: 1; background:
  linear-gradient(90deg, rgba(6,6,6,0.72) 0%, rgba(6,6,6,0.32) 45%, rgba(6,6,6,0) 75%),
  linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.25) 45%, rgba(10,10,10,1) 100%); }
.hero-home .wrap { z-index: 2; }
.hero-slide { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transform: scale(1.06);
  transition: opacity 1.8s ease, transform 9s linear; will-change: opacity, transform; }
.hero-slide.is-active { opacity: 1; transform: scale(1); }
.hero-slide.pending { background-image: none !important; }
.hero-dots { position: absolute; z-index: 3; right: max(24px, calc((100vw - var(--max)) / 2 + 24px)); bottom: 92px; display: flex; gap: 8px; }
.hero-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; cursor: pointer; background: rgba(255,255,255,0.35); transition: width 0.3s ease, background 0.3s ease; }
.hero-dots button[aria-selected="true"] { width: 28px; background: var(--red-bright); }

/* ---------- Quick tiles (overlap the home hero) ---------- */
.tiles { position: relative; z-index: 3; margin-top: -90px; }
.tiles ul { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; box-shadow: 0 24px 60px rgba(0,0,0,0.55); }
.tiles a {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 180px; padding: 26px 24px;
  background: linear-gradient(160deg, #1d1d1d 0%, #0e0e0e 100%); color: #fff; text-decoration: none; border-right: 1px solid rgba(255,255,255,0.06); transition: background 0.2s;
  position: relative; overflow: hidden;
}
.tiles li:nth-child(4) a { background: linear-gradient(160deg, #cc0000 0%, #850000 100%); }
.tiles a:hover { background: linear-gradient(160deg, #cc0000 0%, #7a0000 100%); }
.tiles .num { font-family: var(--font-head); font-size: 14px; letter-spacing: 0.16em; color: var(--red-bright); }
.tiles li:nth-child(4) .num { color: #ffd7d7; }
.tiles h2 { font-family: var(--font-head); text-transform: uppercase; font-size: 24px; letter-spacing: 0.04em; line-height: 1.1; }
.tiles span.more { font-size: 14px; color: #cfcfcf; }
.tiles span.more::after { content: "\00a0\2192"; }

/* ---------- Bands ---------- */
section.band { padding: 96px 0; position: relative; }
section.band.tight { padding: 64px 0; }
section.band.gray { background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
section.band.dark { background: radial-gradient(900px 500px at 20% 0%, rgba(204,0,0,0.16), transparent 65%), #0b0b0b; color: #eee; }
section.band.red { background: radial-gradient(800px 300px at 50% 0%, rgba(255,70,70,0.3), transparent 70%), linear-gradient(180deg, #c20000 0%, #7a0000 100%); color: #fff; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,0.14); padding-bottom: 14px; position: relative; }
.section-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 84px; height: 3px; background: var(--red-bright); }
.red .section-head { border-bottom-color: #fff; }
.red .section-head::after { background: #fff; }
.section-head h2, h2.title { font-family: var(--font-head); text-transform: uppercase; font-size: clamp(30px, 4vw, 44px); letter-spacing: 0.03em; line-height: 1.05; }
.section-head .sub { color: var(--gray); font-size: 15px; }
.red .section-head .sub { color: #ffd7d7; }
h3 { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; font-size: 24px; line-height: 1.15; margin-bottom: 10px; }
.lead { font-size: 20px; line-height: 1.6; }
.band p + p { margin-top: 1em; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split img { width: 100%; height: 100%; max-height: 560px; object-fit: cover; box-shadow: 0 30px 70px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06); }

/* Pull quote */
blockquote.pull {
  font-family: var(--font-head); text-transform: uppercase; font-size: clamp(30px, 4.6vw, 56px); line-height: 1.08; letter-spacing: 0.01em;
  border-left: 8px solid var(--red); padding-left: 28px;
}
blockquote.pull cite { display: block; font-family: var(--font-body); text-transform: none; font-style: normal; font-size: 16px; letter-spacing: 0; margin-top: 16px; color: var(--gray); }

/* Stats row */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; gap: 24px; }
.stats .n { font-family: var(--font-head); font-size: clamp(48px, 6vw, 76px); line-height: 1; color: var(--red-bright); }
.stats .l { text-transform: uppercase; letter-spacing: 0.12em; font-size: 14px; margin-top: 10px; color: var(--gray); }
.red .stats .n { color: #fff; }
.red .stats .l { color: #ffd7d7; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.cards.pair { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .cards.pair { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--surface-border); border-top: 4px solid var(--red); padding: 28px; box-shadow: var(--glow); }
.card .date { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; color: var(--red-bright); margin-bottom: 8px; }
.card h3 { font-size: 22px; }
.card p { color: #cfcfcf; font-size: 16px; }
.card.is-link { position: relative; transition: transform 0.2s ease, border-color 0.2s ease; }
.card.is-link .card-link::after { content: ""; position: absolute; inset: 0; }
.card.is-link:hover { transform: translateY(-3px); }

/* Checklist */
.checklist { list-style: none; columns: 2; column-gap: 32px; margin-top: 16px; }
.checklist li { padding: 8px 0 8px 30px; position: relative; break-inside: avoid; }
.checklist li::before { content: "\2713"; position: absolute; left: 0; color: var(--red-bright); font-weight: 700; }
.red .checklist li::before { color: #fff; }

/* ---------- Exhibition gallery ---------- */
.gal-intro { padding: 48px 0 10px; }
.gal-kicker { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.24em; font-size: 13px; color: var(--red-bright); }
.gal-statement { font-family: var(--font-head); font-weight: 400; font-size: clamp(22px, 3vw, 34px); line-height: 1.25; max-width: 820px; margin: 16px 0 0; color: #f2f2f2; letter-spacing: 0.01em; }
.gal-meta { margin-top: 16px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray); }
.gal-index { display: flex; justify-content: flex-start; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.gal-index a { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; font-size: 13px; color: #fff; text-decoration: none;
  padding: 10px 18px; border: 2px solid rgba(255,255,255,0.28); background: rgba(255,255,255,0.05); transition: border-color 0.2s, background 0.2s; }
.gal-index a:hover, .gal-index a[aria-current="page"] { border-color: var(--red); background: var(--red); color: #fff; }

/* Collection index cards (Selected Works, home teaser) */
.gallery-index { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.gallery-card { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #000; box-shadow: var(--glow); display: block; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease, opacity .4s ease; opacity: 0.85; }
.gallery-card:hover img { transform: scale(1.05); opacity: 1; }
.gallery-card .label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; font-size: clamp(1.2rem, 2.4vw, 2rem);
  color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.75); background: linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.55) 100%); transition: background .3s ease; }
.gallery-card:hover .label { background: linear-gradient(180deg, rgba(204,0,0,0.12) 0%, rgba(0,0,0,0.45) 100%); }
@media (max-width: 720px) { .gallery-index { grid-template-columns: 1fr; } }

/* Justified flush rows (ratio-driven by main.js), with the exhibition item treatment. */
.gallery-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.gallery-item { position: relative; overflow: hidden; flex: 1 1 300px; min-width: 160px; box-shadow: 0 20px 50px rgba(0,0,0,0.45); cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in;
  opacity: 0; transform: scale(1.015); transition: opacity 0.7s ease, transform 1.2s cubic-bezier(.2,.7,.2,1), filter 0.4s ease; background: #000; }
.gallery-item.is-loaded img { opacity: 1; transform: scale(1); }
.gallery-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, rgba(0,0,0,0.6)); opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 34px 16px 14px;
  color: #fff; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.74rem;
  opacity: 0; transform: translateY(6px); transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none;
}
@media (hover: hover) {
  .gallery-item:hover img { transform: scale(1.04); filter: brightness(1.05); }
  .gallery-item:hover::after, .gallery-item:hover figcaption { opacity: 1; transform: none; }
}
/* Feature: a single frame standing alone, centered, shown whole. */
.gallery-item--feature { flex: 0 0 100% !important; height: auto !important; margin: 0 auto !important; cursor: zoom-in; box-shadow: var(--glow); }
.gallery-item--feature img { width: 100%; height: auto; display: block; }
.gallery-item--feature::after { display: none; }

/* ---------- Full-screen photo viewer (js/lightbox.js) ---------- */
img.lb-zoom { cursor: zoom-in; }
.viewer { position: fixed; inset: 0; z-index: 320; display: grid; grid-template-rows: auto 1fr auto; background: rgba(4,4,4,0.97);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: viewerFade 0.25s ease; }
.viewer[hidden] { display: none; }
@keyframes viewerFade { from { opacity: 0; } }
.viewer-top { display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 20px 8px; }
.viewer-count { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.2em; font-size: 12px; color: #b9b9b9; white-space: pre; }
.viewer-close { width: 48px; height: 48px; border: 0; background: none; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; text-shadow: 0 2px 12px rgba(0,0,0,0.7); transition: color .2s; }
.viewer-close:hover { color: var(--red-bright); background: none; }
.viewer-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 76px; }
.viewer-fig { margin: 0; height: 100%; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; pointer-events: none; }
.viewer-fig img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 30px 90px rgba(0,0,0,0.7); transition: opacity 0.3s ease; pointer-events: auto; }
.viewer.is-changing .viewer-fig img { opacity: 0.25; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border: 0;
  background: none; color: #fff; font-size: 52px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; text-shadow: 0 2px 12px rgba(0,0,0,0.7); transition: color .2s; }
.viewer-nav:hover { background: none; color: var(--red-bright); }
.viewer-nav.prev { left: 14px; }
.viewer-nav.next { right: 14px; }
.viewer-cap { text-align: center; padding: 14px 20px max(18px, env(safe-area-inset-bottom)); }
.viewer-title { color: #ededed; font-size: 15px; max-width: 700px; margin: 0 auto; }
.viewer-credit { margin-top: 4px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.16em; font-size: 11px; color: var(--red-bright); }

/* ---------- Text pages (Statement / Biography) ---------- */
.statement-layout { max-width: 920px; margin: 0 auto; }
.statement-layout::after { content: ""; display: block; clear: both; }
.statement-layout .headshot { float: left; width: clamp(220px, 36%, 340px); margin: 6px 36px 18px 0; shape-outside: inset(0); }
.statement-layout .headshot img { width: 100%; height: auto; display: block; border: 1px solid rgba(255,255,255,0.1); }
.statement-layout .headshot figcaption,
.prose-figure figcaption { margin-top: 10px; font-family: var(--font-head); text-align: center; font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gray); }
.prose p { margin-bottom: 1.25em; font-size: 1.04rem; line-height: 1.78; color: #e8e8e8; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--red-bright); border-bottom: 1px solid rgba(255,46,46,0.4); }
.prose a:hover { color: #fff; border-bottom-color: #fff; }
.prose-figure { float: right; width: clamp(220px, 40%, 360px); margin: 8px 0 22px 36px; clear: right; shape-outside: inset(0); }
.prose-figure img { width: 100%; height: auto; display: block; border: 1px solid rgba(255,255,255,0.1); }

/* ---------- Student Work: magazine grid ---------- */
.magazine-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 40px 32px; }
.magazine-item { display: flex; flex-direction: column; grid-column: span 2; }
.magazine-item:nth-child(4) { grid-column: 2 / span 2; }
.magazine-item:nth-child(5) { grid-column: 4 / span 2; }
.magazine-cover { aspect-ratio: 17 / 22; overflow: hidden; background: #000; box-shadow: var(--glow); }
.magazine-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.6s ease, opacity 0.3s ease; opacity: 0.94; cursor: zoom-in; }
.magazine-item:hover .magazine-cover img { transform: scale(1.03); opacity: 1; }
.magazine-credit { padding: 14px 0 0; text-align: center; }
.student-name { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.9rem; margin-bottom: 2px; }
.publication { font-size: 0.76rem; color: var(--gray); letter-spacing: 0.08em; text-transform: uppercase; }
.showcase-intro { max-width: 760px; margin: 0 auto 48px; }
.showcase-tag { font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--red-bright); text-align: center; margin-bottom: 4px; }
.showcase-project { font-family: var(--font-head); font-size: 0.88rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray); text-align: center; margin-bottom: 40px; }
.showcase-signature-block { display: block; }
.showcase-quote { font-style: italic; color: #e0e0e0; font-size: 1.05rem; line-height: 1.85; border-left: 3px solid var(--red); padding-left: 28px; margin: 0 0 28px; }
.showcase-signature { text-align: center; color: var(--gray); font-size: 0.85rem; letter-spacing: 0.04em; line-height: 1.8; margin: 56px auto 0; max-width: 760px; }
.showcase-signature-rule { width: 180px; height: 1px; background: rgba(255,255,255,0.22); border: 0; margin: 18px auto; }

/* ---------- Teachers / mentors grid (Biography) ---------- */
.teachers { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; margin-top: 4px; }
.teacher { flex: 1 1 190px; max-width: 250px; }
.teacher-photo { aspect-ratio: 1 / 1; overflow: hidden; background: #000; box-shadow: var(--glow); }
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.teacher:hover .teacher-photo img { transform: scale(1.03); }
.teacher-role { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.14em; font-size: 11.5px; color: var(--red-bright); margin-top: 16px; }
.teacher h3 { font-size: 20px; margin: 4px 0 8px; }
.teacher p { color: #c9c9c9; font-size: 14px; line-height: 1.6; }
@media (max-width: 920px) { .teachers { gap: 22px; } }
@media (max-width: 560px) { .teachers { gap: 16px; } .teacher { flex-basis: 100%; max-width: 380px; } }

/* ---------- Forms (Contact) ---------- */
.form { display: grid; gap: 18px; max-width: 560px; }
.form.center { margin: 0 auto; }
.form label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; font-size: 14px; display: block; margin-bottom: 6px; color: var(--gray); }
.form input, .form select, .form textarea { width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); color: #fff; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--red-bright); background: rgba(204,0,0,0.08); }
.form textarea { min-height: 160px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form button.btn { width: 100%; }
.note { font-size: 14px; color: var(--gray); }
.note.ok { color: var(--red-bright); }
.note.err { color: #ff9a9a; }

.contact-list { list-style: none; max-width: 560px; margin: 0 auto; }
.contact-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list .k { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; color: var(--red-bright); }
.contact-list .v { font-size: 20px; }
.contact-list a { color: var(--ink); text-decoration: none; }
.contact-list a:hover { color: var(--red-bright); }

/* ---------- "Also View" cross-links (slider) ---------- */
.also-like { margin-top: 24px; }
.also-like h2 { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.12em; text-align: center; font-size: 1rem; color: var(--gray); margin-bottom: 28px; font-weight: 600; }
.also-like-slider-wrap { display: flex; align-items: center; gap: 12px; }
.also-like-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none; flex: 1; min-width: 0; }
.also-like-track::-webkit-scrollbar { display: none; }
.also-like-track > a { flex: 0 0 calc(33.333% - 11px); position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; scroll-snap-align: start; }
.also-like-track > a img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; transition: opacity .3s, transform .6s; }
.also-like-track > a:hover img { opacity: 1; transform: scale(1.04); }
.also-like-track .label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.85rem; background: rgba(0,0,0,0.4); }
.slider-btn { flex-shrink: 0; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.18); color: #fff; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s, opacity .2s; line-height: 1; }
.slider-btn:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); }
.slider-btn[aria-hidden="true"] { visibility: hidden; pointer-events: none; }

/* ---------- Footer ---------- */
footer.site { background: radial-gradient(900px 400px at 80% 0%, rgba(204,0,0,0.14), transparent 70%), #060606; border-top: 1px solid var(--line); color: #bdbdbd; padding: 70px 0 30px; font-size: 15px; margin-top: 96px; }
footer.site .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
footer.site .foot-logo img { width: 150px; margin-bottom: 16px; }
footer.site .foot-about { max-width: 320px; color: #a7a7a7; font-size: 14px; }
footer.site h4 { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.12em; color: #fff; font-size: 15px; margin-bottom: 14px; font-weight: 500; }
footer.site ul { list-style: none; }
footer.site li { padding: 4px 0; }
footer.site a { color: #bdbdbd; text-decoration: none; }
footer.site a:hover { color: var(--red-bright); }
footer.site .legal { border-top: 1px solid #222; margin-top: 50px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #8a8a8a; }
.back-to-top { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; color: #bdbdbd; }
.back-to-top::before { content: "\2191\00a0"; }
/* Admin Login: a set-apart action at the end of the nav (header menu). */
.mainnav .nav-admin { display: flex; align-items: center; }
.mainnav .nav-admin a { border: 1px solid rgba(255,255,255,0.55); padding: 8px 16px; margin-left: 12px; font-size: 13px; letter-spacing: 0.12em; }
.mainnav .nav-admin a:hover { background: #fff; color: var(--red-dark); border-color: #fff; }
.mainnav.docked .nav-admin a:hover { color: var(--red-dark); }
.mainnav .nav-donate { display: none; } /* donate lives in the masthead on desktop; shown in the mobile menu */

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .tiles ul { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  footer.site .cols > div:first-child { grid-column: 1 / -1; }
}

/* ---------- Phones ---------- */
a, button { -webkit-tap-highlight-color: rgba(255,46,46,0.15); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  h1, h2, h3 { overflow-wrap: anywhere; }

  /* Phone header: compact stacked brand (left), live counter (center), hamburger (right);
     the red bar drops to a thin line below. */
  .masthead { position: sticky; top: 0; z-index: 60; padding-top: env(safe-area-inset-top); border-bottom: 0; }
  .masthead .wrap { position: relative; display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 8px; }
  .brand { flex-direction: column; align-items: center; gap: 3px; flex-shrink: 0; }
  .brand-mark { height: 30px; }
  .brand-name { font-size: 11px; letter-spacing: 0.03em; line-height: 1; }
  .brand-tenure { display: none; }
  .mast-right { display: flex; flex: 1; min-width: 0; justify-content: center; }
  .btn-donate { display: none; }
  .pics-counter { display: flex; flex-direction: column; align-items: center; text-align: center; border: 0; background: none; padding: 0; }
  .pics-counter:hover { background: none; border: 0; }
  .pc-eyebrow { font-size: 8px; letter-spacing: 0.08em; }
  .pc-num { font-size: 15px; line-height: 1.1; }
  .pc-q { font-size: 8px; letter-spacing: 0.03em; margin-top: 1px; }

  /* Scrolled: the counter gives way to a centered CREATIVE SILVA wordmark,
     and the left brand collapses to just the CS monogram. */
  .mast-wordmark { font-size: 18px; }
  html.is-scrolled .masthead .brand-lockup { display: none; }
  html.is-scrolled .masthead .pics-counter { display: none; }
  html.is-scrolled .masthead .mast-wordmark { display: inline-block; }

  .mainnav { position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 59; box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    background: linear-gradient(90deg, #990000 0%, #e00000 50%, #990000 100%); }
  .mainnav .wrap { min-height: 10px; padding-top: 0; padding-bottom: 0; }
  .dock-logo { display: none; }

  .navtoggle { display: inline-flex; align-items: center; justify-content: center;
    position: static; transform: none;
    width: 44px; height: 44px; padding: 0; cursor: pointer; background: none; border: 0; color: #fff; flex-shrink: 0; }
  .navtoggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .navtoggle .bars, .navtoggle .bars::before, .navtoggle .bars::after { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; position: relative; transition: transform 0.2s ease, background 0.2s ease; }
  .navtoggle .bars::before, .navtoggle .bars::after { content: ""; position: absolute; left: 0; }
  .navtoggle .bars::before { top: -7px; }
  .navtoggle .bars::after { top: 7px; }
  .navtoggle[aria-expanded="true"] .bars { background: transparent; }
  .navtoggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
  .navtoggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

  .mainnav ul { display: none; }
  .mainnav.open ul {
    display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start;
    position: fixed; left: 0; right: 0; bottom: 0; top: var(--menu-top, 56px); z-index: 55; overflow-y: auto; overscroll-behavior: contain;
    padding: 8px max(16px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: radial-gradient(600px 400px at 100% 0%, rgba(204,0,0,0.3), transparent 70%), #080808;
  }
  .mainnav a { font-size: 25px; letter-spacing: 0.05em; padding: 17px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .mainnav a:hover { background: none; }
  .mainnav a[aria-current="page"] { border-bottom-color: rgba(255,255,255,0.08); color: var(--red-bright); }
  .mainnav .nav-donate { display: block; margin-top: 20px; }
  .mainnav .nav-donate a { text-align: center; background: var(--red); border: 1px solid var(--red); color: #fff; margin-left: 0; font-size: 19px; letter-spacing: 0.1em; padding: 16px; }
  .mainnav .nav-donate a:hover { background: var(--red-dark); }
  .mainnav .nav-admin { display: block; margin-top: 10px; }
  .mainnav .nav-admin a { text-align: center; border: 1px solid rgba(255,255,255,0.5); margin-left: 0; font-size: 19px; letter-spacing: 0.1em; padding: 16px; }
  html.menu-open { overflow: hidden; }

  .hero { min-height: 520px; }
  .hero h1 { font-size: clamp(36px, 11.2vw, 56px); }
  .hero.page h1 { font-size: clamp(32px, 10vw, 48px); }
  .hero .wrap { padding-bottom: 92px; }
  .hero.page { min-height: 300px; }
  .hero.page .wrap { padding-bottom: 30px; }
  .hero.page::before { background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 55%, rgba(10,10,10,1) 100%); }
  .hero .eyebrow { font-size: 12px; letter-spacing: 0.16em; }
  .hero .actions { flex-direction: column; }
  .hero .actions .btn { text-align: center; }
  .btn { min-height: 44px; }
  .hero-dots { right: 10px; bottom: 74px; }

  .tiles { margin-top: -64px; }
  .tiles ul { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
  .tiles li { display: flex; min-width: 0; }
  .tiles a { flex: 1; min-width: 0; min-height: 148px; padding: 18px 14px 16px; justify-content: flex-start; gap: 6px; border-right: 0; }
  .tiles li:nth-child(odd) a { border-right: 1px solid rgba(255,255,255,0.06); }
  .tiles li:nth-child(-n+2) a { border-bottom: 1px solid rgba(255,255,255,0.06); }
  .tiles h2 { font-size: clamp(16px, 5.1vw, 22px); letter-spacing: 0.02em; line-height: 1.08; }
  .tiles span.more { margin-top: auto; font-size: 13px; }

  section.band { padding: 56px 0; }
  section.band.tight { padding: 44px 0; }
  .section-head { margin-bottom: 26px; }
  .section-head h2, h2.title { font-size: clamp(26px, 8vw, 34px); }
  .split, .form .row { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse > :first-child { order: 0; }
  .split img { max-height: 420px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 36px 16px; }
  .cards { grid-template-columns: 1fr; }
  .checklist { columns: 1; }
  blockquote.pull { font-size: clamp(26px, 8.2vw, 36px); padding-left: 18px; border-left-width: 6px; }
  .band .btn { display: block; width: 100%; text-align: center; }

  .gal-intro { padding: 30px 0 6px; }
  .gal-statement { font-size: clamp(20px, 6vw, 26px); }
  .gal-index { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .gal-index::-webkit-scrollbar { display: none; }
  .gal-index a { flex-shrink: 0; }
  .gallery-item figcaption { opacity: 1; transform: none; }

  .viewer-stage { padding: 0 8px; }
  .viewer-nav { display: none; }

  .statement-layout .headshot, .prose-figure { float: none; width: 100%; max-width: 520px; margin: 0 auto 24px; clear: both; }

  .magazine-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .magazine-item, .magazine-item:nth-child(4), .magazine-item:nth-child(5) { grid-column: span 1; }

  .also-like-track > a { flex: 0 0 calc(50% - 8px); }
  .also-like-track > a img { opacity: 1; }
  .slider-btn { width: 32px; height: 32px; font-size: 0.9rem; }

  footer.site { padding: 52px 0 calc(24px + env(safe-area-inset-bottom)); margin-top: 60px; }
  footer.site .cols { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  footer.site .cols > div:first-child { grid-column: 1 / -1; }
  footer.site .foot-logo img { width: 120px; }
  footer.site .legal { margin-top: 34px; flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
  .magazine-grid { grid-template-columns: 1fr; }
  .also-like-track > a { flex: 0 0 80%; }
  .gallery-item--feature img { max-height: none; }
}

/* Gallery detail on phones: single uniform column. */
@media (max-width: 640px) {
  .gallery-grid { flex-direction: column; align-items: center; gap: 12px; }
  .gallery-item { flex: 0 0 auto !important; width: 100%; max-width: 560px; height: auto !important; min-width: 0 !important; aspect-ratio: 4 / 3; }
  .gallery-item--feature { max-width: 560px !important; aspect-ratio: auto; }
}
