/* VektorError — bare shell (desktop first, black / white) */

:root {
  --bg: #000000;
  --fg: #ffffff;
  --fg-muted: #8a8a8a;
  --surface: #111111;
  --line: #ffffff;
  --stripe-width: 152px;
  --section-pad: 2rem;
  --gap: 1rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas,
    monospace;
  /* Wordmark + big titles (Google Fonts) */
  --font-display: "Oxanium", var(--font);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  /* Lock to one viewport so detail images can't blow open the page */
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.brand-stripe {
  flex: 0 0 var(--stripe-width);
  width: var(--stripe-width);
  /* no side border — vertical line lives on .hero-stage so it matches .page-main */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  background: var(--bg);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 10;
  overflow: visible;
}

/* Slot above nav — brand auto-scales to fit this box */
.brand-fit {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5rem 0;
  box-sizing: border-box;
}

/*
 * Brand as a horizontal line, then rotate -90° (left).
 * Scale is set by js/brand-fit.js so nothing clips.
 */
.brand-block {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 1.25rem;
  padding: 0;
  margin: 0;
  width: max-content;
  transform: rotate(-90deg) scale(var(--brand-scale, 1));
  transform-origin: center center;
  will-change: transform;
}

.brand-mark {
  writing-mode: horizontal-tb;
  transform: none;
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

.brand-mark:hover {
  text-decoration: none;
  opacity: 0.7;
}

.brand-tagline {
  margin: 0;
  padding: 0;
  writing-mode: horizontal-tb;
  transform: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
  line-height: 1;
  user-select: none;
  flex: 0 0 auto;
}

/* Bottom nav panel in the stripe */
.stripe-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  writing-mode: horizontal-tb;
  transform: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 0.75rem;
  border-top: 1px solid var(--line);
  width: 100%;
  box-sizing: border-box;
  align-self: stretch;
}

.stripe-nav a {
  text-decoration: none;
  color: var(--fg-muted);
  text-align: left;
  width: 100%;
}

.stripe-nav a:hover {
  color: var(--fg);
  text-decoration: none;
}

.hero-stage {
  flex: 1;
  min-width: 0;
  position: relative;
  background: var(--surface);
  overflow: hidden;
  /* Shared vertical rules with .page-main (same left/right inset) */
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.hero-webgl {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-webgl[hidden] {
  display: none !important;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

/* Pause / Play — top right of WebGL stage */
.hero-pause-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  appearance: none;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.72);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.hero-pause-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.hero-pause-btn.is-paused {
  background: var(--fg);
  color: var(--bg);
}

.hero-pause-btn[hidden] {
  display: none !important;
}

/* ---------- Hero detail mode (tool / writeup mockup) ---------- */

.hero-detail {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
}

.hero-detail[hidden] {
  display: none !important;
}

.hero-detail-inner {
  min-height: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 0;
  align-items: stretch;
}

.hero-detail-main {
  padding: 1.5rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  gap: 0;
  background: #0c0c0c;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}

/* Industrial frame — almost full stage height for multi-paragraph copy */
.hero-detail-panel {
  position: relative;
  border: 1px solid var(--line);
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1 1 auto;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  background:
    linear-gradient(160deg, #16161c 0%, #0a0a0a 55%, #101018 100%);
}

/*
 * Corner L: two arms (horizontal + vertical).
 * JS sets --tl-w/--tl-h and --br-w/--br-h — one arm per corner
 * randomly 25/50/75% of panel width or height on hover.
 */
.hero-detail-panel {
  --tl-w: 56px;
  --tl-h: 56px;
  --br-w: 56px;
  --br-h: 56px;
}

.hero-detail-panel::before,
.hero-detail-panel::after {
  content: "";
  position: absolute;
  border-color: var(--fg);
  border-style: solid;
  pointer-events: none;
  opacity: 1;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-sizing: border-box;
}

.hero-detail-panel::before {
  top: -1px;
  left: -1px;
  width: var(--tl-w);
  height: var(--tl-h);
  border-width: 3px 0 0 3px;
}

.hero-detail-panel::after {
  bottom: -1px;
  right: -1px;
  width: var(--br-w);
  height: var(--br-h);
  border-width: 0 3px 3px 0;
}

.hero-detail-panel-rule {
  height: 1px;
  width: 100%;
  background: var(--line);
  opacity: 0.55;
  margin: 0.15rem 0 0.1rem;
  border: 0;
}

.hero-detail-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.hero-detail-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 2.8vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--fg);
}

.hero-detail-body {
  margin: 0;
  max-width: none;
  width: 100%;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.55;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.hero-detail-body p {
  margin: 0 0 0.85em;
}

.hero-detail-body p:last-child {
  margin-bottom: 0;
}

.hero-detail-body a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.hero-detail-body a:hover {
  opacity: 0.8;
}

/* Text pages (blog) — bottom right of left panel */
.hero-detail-text-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
  flex-shrink: 0;
}

.hero-detail-text-pager[hidden] {
  display: none !important;
}

.hero-detail-page-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.hero-detail-page-btns {
  display: flex;
  gap: 0.5rem;
}

.hero-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.hero-detail-actions[hidden] {
  display: none !important;
}

.hero-detail-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.hero-detail-btn[hidden] {
  display: none !important;
}

.hero-detail-btn:hover {
  text-decoration: none;
  opacity: 0.88;
}

.hero-detail-btn--ghost {
  background: transparent;
  color: var(--fg);
}

.hero-detail-btn--ghost:hover {
  background: #1a1a1a;
}

.hero-detail-hint {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--fg-muted);
  max-width: 36ch;
  line-height: 1.45;
}

.hero-detail-hint[hidden] {
  display: none !important;
}

/* ---------- Contact form (hero stage) ---------- */

.hero-contact {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: auto;
  background: var(--bg);
  color: var(--fg);
}

.hero-contact[hidden] {
  display: none !important;
}

.hero-contact-inner {
  min-height: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  box-sizing: border-box;
  padding: 1.5rem;
  background: #0c0c0c;
}

.hero-contact-panel {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  align-self: center;
}

.hero-contact-lead {
  margin: 0 0 1.25rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.contact-email-link {
  color: inherit;
  text-decoration: none;
  word-break: break-all;
}

.contact-email-link:hover {
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.contact-field input,
.contact-field textarea {
  appearance: none;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  background: #000;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.4;
  border-radius: 0;
  outline: none;
  box-sizing: border-box;
  resize: vertical;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--fg);
  background: #0a0a0a;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.contact-actions .hero-detail-btn {
  cursor: pointer;
  border: 1px solid var(--line);
}

.contact-actions .hero-detail-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.contact-status {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.contact-status--ok {
  color: #9fdf9f;
}

.contact-status--err {
  color: #f0a0a0;
}

.contact-status--pending {
  color: var(--fg-muted);
}

.hero-detail-hint strong {
  color: var(--fg);
  font-weight: 600;
}

.hero-detail-media {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  min-height: 0;
  box-sizing: border-box;
}

/* Detail artwork gallery (← → under image) — fixed 16:9 like before */
.detail-gallery {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-gallery[hidden] {
  display: none !important;
}

.detail-gallery-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #111;
  overflow: hidden;
  /* Keep frame height from aspect-ratio only — never grow with image pixels */
  flex: 0 0 auto;
}

.detail-gallery-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
}

.detail-gallery-image[hidden] {
  display: none !important;
}

.detail-gallery-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.detail-gallery-empty[hidden] {
  display: none !important;
}

.detail-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.detail-gallery-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.detail-gallery-btns {
  display: flex;
  gap: 0.5rem;
}

/* Empty right rail — same width as left brand stripe */
.side-stripe {
  flex: 0 0 var(--stripe-width);
  width: var(--stripe-width);
  background: var(--bg);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  align-self: flex-start;
}

/* Content under hero: same inset as rails, same 1px rules as .hero-stage edges */
.page-main {
  margin-left: var(--stripe-width);
  margin-right: var(--stripe-width);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.hero-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background:
    linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
  border: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.hero-placeholder.is-hidden {
  opacity: 0;
  visibility: hidden;
}

/* subtle grid so the empty stage still feels intentional */
.hero-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-placeholder-label,
.hero-placeholder-sub {
  position: relative;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.hero-placeholder-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-placeholder-sub {
  font-size: 0.7rem;
  color: var(--fg-muted);
}

/* ---------- Content sections ---------- */

main.page-main {
  display: block;
}

.content-section {
  border-bottom: 1px solid var(--line);
  padding: var(--section-pad);
}

/* One wide panel: art full bleed, copy bottom-left */
.section-banner {
  position: relative;
  display: block;
  min-height: clamp(240px, 32vw, 380px);
  border: 1px solid var(--line);
  margin-bottom: var(--gap);
  overflow: hidden;
}

.section-banner-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, #2a2a2a 0%, #121212 45%, #0a0a0a 100%);
}

.section-banner-art::after {
  content: "ART";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.2);
}

/* Soft scrim so white text stays readable over art */
.section-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.25) 45%,
    transparent 70%
  );
  pointer-events: none;
}

.section-banner-copy {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  max-width: min(42rem, 90%);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0.45rem;
  background: transparent;
}

.section-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.section-title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--fg);
}

.section-lead {
  margin: 0;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

/* ---------- Carousel (Tools) ---------- */

.carousel {
  --carousel-visible: 6;
  position: relative;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
  /* Own compositor layer — stops slide repaints from shimmering page borders */
  transform: translateZ(0);
  isolation: isolate;
  contain: paint;
}

.carousel-track {
  display: flex;
  gap: var(--gap);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* JS sets whole-pixel flex/width on each card to avoid subpixel borders */
}

.carousel-track .card {
  flex: 0 0 auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.carousel-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
  min-height: 2.5rem;
}

.carousel-controls[hidden] {
  display: none !important;
}

.carousel-btn {
  appearance: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn[hidden] {
  display: none !important;
}

.carousel-btn:hover:not(:disabled) {
  background: var(--fg);
  color: var(--bg);
}

.carousel-btn:disabled {
  opacity: 0.28;
  cursor: default;
}

.carousel-btn:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 2px;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  outline: none;
}

.card:hover,
.card:focus-visible {
  text-decoration: none;
}

.card-media {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-bottom: none;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease;
  /* Arm lengths: JS sets one arm to 25/50/75% of box on hover */
  --tl-w: 0px;
  --tl-h: 0px;
  --br-w: 0px;
  --br-h: 0px;
}

/*
 * Corner L: horizontal + vertical arm.
 * One arm randomly becomes 25/50/75% of available space (see corner-hover.js).
 */
.card-media::before,
.card-media::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-color: var(--fg);
  border-style: solid;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  box-sizing: border-box;
  transition:
    width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
}

.card-media::before {
  top: 6px;
  left: 6px;
  border-width: 2px 0 0 2px;
}

.card-media::after {
  bottom: 6px;
  right: 6px;
  border-width: 0 2px 2px 0;
}

.card:hover .card-media::before,
.card:focus-visible .card-media::before {
  width: var(--tl-w);
  height: var(--tl-h);
  opacity: 1;
}

.card:hover .card-media::after,
.card:focus-visible .card-media::after {
  width: var(--br-w);
  height: var(--br-h);
  opacity: 1;
}

/* Grid thumbnail — put file at content/.../card.png */
.card-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  background: var(--surface);
}

/* Hide broken img (no card.png yet) so IMG/WIP label shows */
.card-thumb:not([src]),
.card-thumb[src=""] {
  display: none;
}

.card-media-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  transition: color 0.15s ease;
  z-index: 0;
}

.card--wip {
  cursor: default;
  opacity: 0.72;
  pointer-events: none;
}

.card--wip .card-title {
  color: var(--fg-muted);
}

/* Title bar under square — medium height for 6-wide */
.card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  background: #1c1c1c;
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  min-height: 3.75rem;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

/* Whole card highlight (image or title) */
.card:hover .card-media,
.card:focus-visible .card-media {
  background: #2a2a2a;
  border-color: var(--fg);
}

.card:hover .card-media-label,
.card:focus-visible .card-media-label {
  color: var(--fg);
}

.card:hover .card-title,
.card:focus-visible .card-title {
  color: var(--fg);
  background: #2a2a2a;
  border-color: var(--fg);
  text-decoration: none;
}

/* About bio lives in the section banner under the title */
.section-about-text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 42ch;
  margin-top: 0.15rem;
}

.section-about-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
  line-height: 1.55;
}

.section-banner--about .section-banner-copy {
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  border-bottom: 1px solid var(--line);
}

.footer-cell {
  padding: 1.5rem 1.25rem;
  border-right: 1px solid var(--line);
  min-height: 160px;
}

.footer-cell:last-child {
  border-right: none;
}

.footer-wordmark {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: inherit;
}

.footer-wordmark:hover {
  text-decoration: none;
  opacity: 0.75;
}

.footer-tagline,
.footer-note p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.85rem;
  max-width: 32ch;
}

.footer-heading {
  margin: 0 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.footer-cell ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-cell li a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.footer-cell li a:hover {
  text-decoration: underline;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .carousel {
    --carousel-visible: 3;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-cell {
    border-bottom: 1px solid var(--line);
  }

  .footer-cell:nth-child(2n) {
    border-right: none;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  :root {
    --stripe-width: 100%;
    --section-pad: 1rem;
  }

  .hero {
    flex-direction: column;
    height: auto;
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .brand-stripe {
    position: relative;
    width: 100%;
    height: auto;
    flex: none;
    flex-direction: column;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 0;
    gap: 0;
  }

  .brand-fit {
    flex: none;
    overflow: visible;
    padding: 0;
    width: auto;
    justify-content: flex-start;
  }

  .brand-block {
    transform: none;
    width: auto;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1rem 0.35rem;
  }

  .brand-mark {
    font-size: 1.75rem;
    letter-spacing: 0.14em;
  }

  .brand-tagline {
    letter-spacing: 0.22em;
    font-size: 0.65rem;
  }

  .stripe-nav {
    writing-mode: horizontal-tb;
    transform: none;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.75rem 1rem;
    margin-left: 0;
    border-top: 1px solid var(--line);
    padding: 0.75rem 1rem;
  }

  .stripe-nav a {
    width: auto;
  }

  .hero-stage {
    min-height: 55vh;
  }

  .hero-detail-inner {
    grid-template-columns: 1fr;
  }

  .hero-detail-inner {
    height: auto;
    min-height: 100%;
  }

  .hero-detail-main {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 1rem;
    height: auto;
  }

  .hero-detail-panel {
    min-height: 50vh;
    height: auto;
    padding: 1.15rem 1rem 1.1rem;
  }

  .hero-detail-media {
    padding: 1rem;
  }

  .side-stripe {
    display: none;
  }

  .page-main {
    margin-left: 0;
    margin-right: 0;
    border-left: none;
    border-right: none;
  }

  .section-banner {
    min-height: 220px;
  }

  .section-banner-copy {
    padding: 1rem 1.1rem;
    max-width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .carousel {
    --carousel-visible: 1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-cell {
    border-right: none;
    min-height: 0;
  }

  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}
