/* ============================================================
   DIGITAL SHIRU — PORTFOLIO SHOWCASE SYSTEM
   Five category sections: Websites · Spline · Design ·
   Illustrations · Social. Expedition voice, no HUD/tactical.
   Reuses the site's colour tokens (--gold, --ember, --paper…).
============================================================ */

/* ---- Shared category header ---- */
.cat-head {
  max-width: 1240px;
  margin: 0 auto clamp(38px, 5vw, 64px);
  padding: 0 clamp(20px, 5vw, 52px);
  position: relative;
}
.cat-head-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.cat-index {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.42em;
  color: var(--ember);
  font-weight: 600;
  white-space: nowrap;
}
.cat-index .cat-index-num { color: var(--gold); }
.cat-head-rule {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(232,184,101,0.42), rgba(232,184,101,0.04));
}
.cat-head-count {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
  white-space: nowrap;
}
.cat-title {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin: 0 0 16px;
}
.cat-title .accent { color: var(--gold); font-style: italic; font-weight: 400; }
.cat-lede {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
  color: var(--paper-muted);
  max-width: 58ch;
  margin: 0;
}

/* ---- Section shell spacing ---- */
.pf-section { padding: clamp(88px, 11vw, 150px) 0; position: relative; }
.pf-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 52px); }

/* ============================================================
   1 · WEBSITES  (category intro; live embeds keep own styling)
============================================================ */
#websites .cat-head { margin-bottom: clamp(30px, 4vw, 48px); }

/* ============================================================
   2 · SPLINE ANIMATIONS — gallery of live 3D embeds
============================================================ */
.spline-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px,2.4vw,30px); }
.spline-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(232,184,101,0.16);
  background:
    radial-gradient(120% 90% at 50% 15%, rgba(232,184,101,0.07), transparent 60%),
    linear-gradient(160deg, #101a16, #080d0a 72%);
  box-shadow: 0 30px 70px -50px rgba(0,0,0,0.9), inset 0 1px 0 rgba(232,184,101,0.05);
  transition: border-color .4s, box-shadow .4s, transform .4s;
}
.spline-card:hover { border-color: rgba(232,184,101,0.4); box-shadow: 0 40px 80px -46px rgba(0,0,0,0.95); }
.spline-card--featured { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.spline-card-stage { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.spline-card-stage spline-viewer { width: 100%; height: 100%; display: block; border: 0; }
/* Renders the scene at its framed size, then scales it into the card (see
   applyDesignScale in portfolio.js) so the full composition stays visible. */
.spline-scale {
  position: absolute;
  left: 50%; top: 50%;
  transform-origin: center center;
  will-change: transform;
}

/* Animated placeholder — floating orbit until the scene loads */
.spline-ph { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; transition: opacity .8s ease; }
.spline-card.is-loaded .spline-ph { opacity: 0; pointer-events: none; }
.spline-ph-orbit { position: relative; width: min(38%, 210px); aspect-ratio: 1; animation: spline-float 7s ease-in-out infinite; }
.spline-ph-orbit::before, .spline-ph-orbit::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(232,184,101,0.28); }
.spline-ph-orbit::before { transform: rotateX(72deg); }
.spline-ph-orbit::after  { transform: rotateY(72deg); border-color: rgba(212,118,58,0.3); }
.spline-ph-core { position: absolute; inset: 34%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--ember) 60%, #6a3a10); box-shadow: 0 0 60px rgba(232,184,101,0.4); animation: spline-pulse 3.4s ease-in-out infinite; }
.spline-ph-ring { position: absolute; inset: 8%; border-radius: 50%; border: 1px dashed rgba(232,184,101,0.35); animation: spline-spin 18s linear infinite; }
@keyframes spline-float { 0%,100% { transform: translateY(-10px); } 50% { transform: translateY(10px); } }
@keyframes spline-pulse { 0%,100% { transform: scale(0.94); opacity:0.85; } 50% { transform: scale(1.06); opacity:1; } }
@keyframes spline-spin  { to { transform: rotate(360deg); } }
.spline-ph-label { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--stone); }

.spline-card-cap { position: absolute; left: 16px; bottom: 14px; z-index: 3; font-family: 'Cinzel', serif; font-size: 15px; letter-spacing: 1px; color: var(--paper); text-shadow: 0 2px 14px rgba(0,0,0,0.85); pointer-events: none; }
.spline-live-tag { position: absolute; top: 14px; right: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; font-family: 'Inter', sans-serif; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); background: rgba(8,13,10,0.6); backdrop-filter: blur(6px); border: 1px solid rgba(232,184,101,0.24); border-radius: 999px; padding: 5px 11px; }
.spline-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); animation: spline-pulse 2s infinite; }
@media (max-width: 760px) { .spline-gallery { grid-template-columns: 1fr; } .spline-card--featured { aspect-ratio: 4 / 3; } }

/* ============================================================
   3 · DESIGN  — gallery grid with hover reveal + lightbox
============================================================ */
.design-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  grid-auto-flow: dense;
}
.design-item {
  position: relative;
  border-radius: 7px; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(232,184,101,0.12);
  background: #0d1511;
  min-height: 220px;
  transition: transform .5s var(--ease, cubic-bezier(.22,1,.36,1)), border-color .5s;
}
.design-item:hover { transform: translateY(-5px); border-color: rgba(232,184,101,0.4); }
.design-item.col-6 { grid-column: span 6; }
.design-item.col-4 { grid-column: span 4; }
.design-item.col-8 { grid-column: span 8; }
.design-item.row-2 { grid-row: span 2; }
.design-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease, cubic-bezier(.22,1,.36,1)); }
.design-item:hover img { transform: scale(1.05); }

/* animated placeholder fill */
.design-ph {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(232,184,101,0.08), rgba(212,118,58,0.05)),
    #0d1511;
  overflow: hidden;
}
.design-ph::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(232,184,101,0.12) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: pf-shimmer 3.2s ease-in-out infinite;
}
@keyframes pf-shimmer { to { transform: translateX(100%); } }
.design-ph-glyph { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0.35; color: var(--gold); }
.design-ph-glyph svg { width: 42px; height: 42px; }

.design-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(180deg, transparent 45%, rgba(8,13,10,0.9));
  opacity: 0; transform: translateY(8px);
  transition: opacity .4s, transform .4s;
}
.design-item:hover .design-overlay { opacity: 1; transform: none; }
.design-tag {
  font-family: 'Inter', sans-serif; font-size: 10.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 5px;
}
.design-name { font-family: 'Cinzel', serif; font-size: 19px; color: var(--paper); line-height: 1.15; }

/* ============================================================
   4 · ILLUSTRATIONS (category intro; carousel keeps own styling)
============================================================ */
#illustrations-cat .cat-head { margin-bottom: clamp(24px, 3vw, 40px); }

/* ============================================================
   5 · SOCIAL MEDIA — portrait cards, staggered gallery
============================================================ */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.social-card {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 9px; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(232,184,101,0.12);
  background: #0d1511;
  transition: transform .5s var(--ease, cubic-bezier(.22,1,.36,1)), border-color .5s, box-shadow .5s;
}
.social-card:nth-child(even) { transform: translateY(22px); }
.social-card:hover { transform: translateY(-6px); border-color: rgba(232,184,101,0.42); box-shadow: 0 30px 60px -34px rgba(0,0,0,0.9); }
.social-card:nth-child(even):hover { transform: translateY(16px); }
.social-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease, cubic-bezier(.22,1,.36,1)); }
.social-card:hover img { transform: scale(1.06); }

.social-ph { position: absolute; inset: 0; overflow: hidden; }
.social-ph-1 { background: linear-gradient(160deg, #1c2b24, #0a110d); }
.social-ph-2 { background: linear-gradient(160deg, #2a2119, #0d0a08); }
.social-ph-3 { background: linear-gradient(160deg, #1a2430, #0a0e12); }
.social-ph::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(232,184,101,0.1) 50%, transparent 70%);
  transform: translateX(-100%); animation: pf-shimmer 3.6s ease-in-out infinite;
}
.social-ph-icon { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); opacity: 0.32; }
.social-ph-icon svg { width: 40px; height: 40px; }

.social-meta {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px;
  background: linear-gradient(180deg, transparent 50%, rgba(8,13,10,0.88));
}
.social-platform {
  position: absolute; top: 14px; left: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Inter', sans-serif; font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--paper);
  background: rgba(8,13,10,0.55); backdrop-filter: blur(6px);
  padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(240,232,212,0.14);
}
.social-handle { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--paper-muted); margin-bottom: 3px; font-weight: 300; }
.social-caption { font-family: 'Cinzel', serif; font-size: 16px; color: var(--paper); line-height: 1.2; }

/* ---- Extra Websites live-embed cards (Jolaisa-style, alternating) ---- */
.lp-section { padding: clamp(50px, 6vw, 84px) 0; position: relative; }
.lp-wrap--flip { grid-template-columns: 1fr 300px; }
.lp-wrap--flip .lp-info { order: 2; }
.lp-wrap--flip .lp-browser { order: 1; }
.lp-frame-wrap .lp-shot { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.lp-browser--static { display: block; text-decoration: none; }
@media (max-width: 900px) {
  .lp-wrap--flip .lp-info, .lp-wrap--flip .lp-browser { order: 0; }
}

/* ---- Websites gallery — 2x2 grid; hover slides an info panel out BESIDE the card ---- */
.web-gallery-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px,5vw,52px) clamp(8px,2vw,20px); }
.web-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(22px,2.8vw,36px); }
.web-card { position: relative; transform-origin: center center; will-change: transform; transition: transform .55s var(--ease, cubic-bezier(.22,1,.36,1)), opacity .4s ease, filter .4s ease; }
.web-card:hover { z-index: 10; transform: scale(1.18); }
/* strong scale contrast — the other three shrink and recede while one is focused */
.web-gallery:has(.web-card:hover) .web-card:not(:hover) { transform: scale(0.8); opacity: 0.45; filter: saturate(0.7); }
.web-frame {
  position: relative;
  display: flex; flex-direction: column;
  aspect-ratio: 3 / 2;
  border: 1px solid rgba(232,184,101,0.14);
  border-radius: 10px; overflow: hidden;
  background: var(--bg-tinted, #0c1410);
  transition: border-color .5s, box-shadow .5s, transform .5s var(--ease, cubic-bezier(.22,1,.36,1));
}
.web-card:hover .web-frame { border-color: rgba(232,184,101,0.5); box-shadow: 0 44px 90px -38px rgba(0,0,0,0.95); }
.web-chrome { flex: 0 0 auto; display: flex; align-items: center; gap: 11px; padding: 11px 14px; background: rgba(10,15,12,0.92); border-bottom: 1px solid rgba(232,184,101,0.08); }
.web-url { display: inline-flex; align-items: center; gap: 7px; font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.02em; color: var(--paper-muted); opacity: 0.75; white-space: nowrap; overflow: hidden; }
.web-shot { position: relative; flex: 1 1 auto; overflow: hidden; background: #fff; }
.web-shot iframe { width: 200%; height: 200%; transform: scale(0.5); transform-origin: top left; border: 0; display: block; pointer-events: none; }
.web-card:hover .web-shot iframe { pointer-events: auto; }
.web-shot-img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.web-live { position: absolute; top: 12px; right: 12px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; font-family: 'Inter', sans-serif; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper); background: rgba(8,13,10,0.5); backdrop-filter: blur(6px); padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(240,232,212,0.14); }
.web-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ac36a; box-shadow: 0 0 8px #4ac36a; animation: spline-pulse 2s infinite; }
.web-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 30px 15px 14px; background: linear-gradient(180deg, transparent, rgba(7,11,8,0.9)); transition: opacity .35s ease; }
.web-cap-name { font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--paper); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web-cap-type { font-family: 'Inter', sans-serif; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); display: block; margin-top: 3px; }
.web-card:hover .web-cap { opacity: 0; }

/* side panel — slides out beside the card so the live site underneath stays clickable */
.web-info {
  /* Content (title, copy, 4 meta rows, button) is taller than the card, so a
     fixed height:100% pushed it out top and bottom. Grow with the content and
     stay centred on the card instead. */
  position: absolute; top: 50%; height: auto; min-height: 100%;
  width: min(300px, 84vw);
  z-index: 6; padding: 24px 22px;
  display: flex; flex-direction: column; justify-content: center;
  background: rgba(9,13,10,0.98);
  border: 1px solid rgba(232,184,101,0.22);
  box-shadow: 0 30px 70px -28px rgba(0,0,0,0.95);
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease, transform .5s cubic-bezier(.22,1,.36,1);
}
.web-card:nth-child(odd) .web-info  { left: 100%;  border-radius: 0 10px 10px 0; border-left: 0; transform: translate(-20px, -50%); }
.web-card:nth-child(even) .web-info { right: 100%; border-radius: 10px 0 0 10px; border-right: 0; transform: translate(20px, -50%); }
.web-gallery .web-card:hover .web-info { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }

.web-tag { font-family: 'Cinzel', serif; font-size: 7px; letter-spacing: 3px; text-transform: uppercase; color: var(--teal); opacity: 0.8; margin-bottom: 10px; }
.web-title { font-family: 'Cinzel', serif; font-size: 22px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--paper); line-height: 1.14; margin: 0 0 7px; }
.web-sub { font-family: 'Cinzel', serif; font-size: 8.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--teal); opacity: 0.65; margin-bottom: 12px; }
.web-rule { height: 1px; width: 56px; background: rgba(232,184,101,0.16); margin-bottom: 12px; }
.web-desc { font-family: 'Inter', sans-serif; font-size: 12px; line-height: 1.6; color: var(--paper-muted); opacity: 0.82; margin: 0 0 14px; }
.web-meta { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.web-meta-row { display: flex; gap: 10px; align-items: baseline; }
.web-meta-key { font-family: 'Cinzel', serif; font-size: 6.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); opacity: 0.5; width: 52px; flex-shrink: 0; }
.web-meta-val { font-family: 'Cinzel', serif; font-size: 8px; letter-spacing: 1px; text-transform: uppercase; color: var(--paper-muted); opacity: 0.72; }
.web-visit { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-family: 'Cinzel', serif; font-size: 8.5px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--paper); text-decoration: none; padding: 11px 20px; border-radius: 3px; border: 1px solid rgba(232,184,101,0.4); transition: background .3s, color .3s, border-color .3s; }
.web-visit:hover { background: var(--gold); color: #0d0a05; border-color: var(--gold); }
.web-visit svg { width: 11px; height: 11px; }

@media (max-width: 900px) {
  .web-gallery { grid-template-columns: 1fr; }
  .web-frame { aspect-ratio: auto; height: 300px; }
  .web-cap { opacity: 0 !important; }
  .web-info,
  .web-card:nth-child(odd) .web-info,
  .web-card:nth-child(even) .web-info {
    position: static; width: auto; height: auto; opacity: 1; transform: none; pointer-events: auto;
    border-radius: 0 0 10px 10px; box-shadow: none; border-top: 0;
  }
}

/* ---- TikTok showcase (real content) ---- */
/* 9 clips: a fixed 3-column grid fills exactly 3x3 with no orphan card, and
   it is what the nth-child(3n-1) stagger below is designed for. auto-fill
   resolved to 4 columns, which left one card alone and scattered the offset. */
.tt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1020px;
  margin-inline: auto;
}
.tt-card {
  position: relative;
  aspect-ratio: 9/16;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  border: 1px solid rgba(232,184,101,0.14);
  background: #0d1511;
  font-family: inherit;
  text-align: left;
  transition: transform .5s var(--ease, cubic-bezier(.22,1,.36,1)), border-color .5s, box-shadow .5s;
}
.tt-card:nth-child(3n-1) { transform: translateY(24px); }
.tt-card:hover {
  transform: translateY(-6px);
  border-color: rgba(232,184,101,0.5);
  box-shadow: 0 34px 66px -34px rgba(0,0,0,0.92);
}
.tt-card:nth-child(3n-1):hover { transform: translateY(18px); }
.tt-thumb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease, cubic-bezier(.22,1,.36,1)), filter .5s;
}
.tt-card:hover .tt-thumb { transform: scale(1.06); filter: brightness(1.05); }
.tt-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,13,10,0.35) 0%, transparent 22%, transparent 52%, rgba(8,13,10,0.9) 100%);
  pointer-events: none;
}

/* platform pill — top-left */
.tt-platform {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em; color: var(--paper);
  background: rgba(8,13,10,0.5); backdrop-filter: blur(6px);
  padding: 5px 10px 5px 8px; border-radius: 999px;
  border: 1px solid rgba(240,232,212,0.16);
}
.tt-platform svg { width: 13px; height: 13px; }

/* views badge — the hero metric, top-right */
.tt-views {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Cinzel', serif; font-weight: 600; font-size: 13px;
  color: #0d0a05;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
  padding: 5px 11px 5px 9px; border-radius: 999px;
  box-shadow: 0 4px 16px -4px rgba(232,184,101,0.6);
}
.tt-views svg { width: 11px; height: 11px; }

/* center play button */
.tt-play {
  position: absolute; top: 50%; left: 50%; z-index: 3;
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(8,13,10,0.42); backdrop-filter: blur(3px);
  border: 1.5px solid rgba(240,232,212,0.7);
  transition: transform .4s var(--ease, cubic-bezier(.22,1,.36,1)), background .4s, border-color .4s;
}
.tt-play svg { width: 22px; height: 22px; margin-left: 3px; fill: var(--paper); }
.tt-card:hover .tt-play {
  transform: scale(1.12);
  background: rgba(232,184,101,0.92);
  border-color: var(--gold-hi);
}
.tt-card:hover .tt-play svg { fill: #0d0a05; }

/* bottom meta */
.tt-meta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 16px 15px;
  display: flex; flex-direction: column; gap: 3px;
}
.tt-handle {
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--gold);
}
.tt-cap {
  font-family: 'Inter', sans-serif; font-weight: 300; font-size: 12.5px;
  line-height: 1.35; color: var(--paper-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Below 3 columns the 3n-1 offset lands on arbitrary positions, so drop it
   (keeping the normal hover lift) and step the grid down. */
@media (max-width: 900px) {
  .tt-grid { grid-template-columns: repeat(2, 1fr); max-width: 640px; }
  .tt-card:nth-child(3n-1) { transform: none; }
  .tt-card:nth-child(3n-1):hover { transform: translateY(-6px); }
}
@media (max-width: 560px) {
  .tt-grid { grid-template-columns: 1fr; max-width: 330px; }
}

/* ---- TikTok lightbox ---- */
#tt-lightbox {
  position: fixed; inset: 0; z-index: 9998; display: none;
  place-items: center; padding: 4vh 4vw;
  background: rgba(6,9,7,0.94); backdrop-filter: blur(10px); cursor: zoom-out;
}
#tt-lightbox .tt-lb-frame {
  position: relative; width: min(340px, 92vw); height: min(755px, 88vh);
  cursor: auto;
}
#tt-lightbox iframe {
  width: 100%; height: 100%; border: 0; border-radius: 10px;
  box-shadow: 0 40px 120px -30px #000;
}
#tt-lightbox .tt-lb-close {
  position: absolute; top: -42px; right: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Inter', sans-serif; font-size: 13px; color: var(--paper-muted);
  background: none; border: 0;
}
#tt-lightbox .tt-lb-close:hover { color: var(--gold); }

/* ---- pending-content ribbon (shown on placeholder sections) ---- */
.pf-pending {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 22px;
  font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0.1em;
  color: var(--stone);
  border: 1px dashed rgba(232,184,101,0.25); border-radius: 999px;
  padding: 8px 16px;
}
.pf-pending b { color: var(--gold); font-weight: 500; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .design-item.col-6, .design-item.col-4, .design-item.col-8 { grid-column: span 12; }
  .design-item.row-2 { grid-row: span 1; }
}
@media (max-width: 560px) {
  .social-card:nth-child(even), .social-card:nth-child(even):hover { transform: none; }
}

/* ---- Behance project tiles (Design + Illustrations) ---- */
.bh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bh-card {
  position: relative; display: block; text-decoration: none;
  aspect-ratio: 4 / 3;
  border-radius: 9px; overflow: hidden;
  border: 1px solid rgba(232,184,101,0.14);
  background: #0d1511;
  transform-origin: center center;
  will-change: transform;
  transition: transform .55s var(--ease, cubic-bezier(.22,1,.36,1)),
              border-color .5s, box-shadow .55s, opacity .45s ease, filter .45s ease;
}
.bh-card:hover {
  transform: scale(1.07) translateY(-8px);
  z-index: 5;
  border-color: rgba(232,184,101,0.6);
  box-shadow: 0 44px 72px -30px rgba(0,0,0,0.92),
              0 0 0 1px rgba(232,184,101,0.28),
              0 0 46px -6px rgba(232,184,101,0.3);
}
/* Neighbouring tiles recede so the hovered one is the clear focus */
.bh-grid:has(.bh-card:hover) .bh-card:not(:hover) {
  transform: scale(0.965);
  opacity: 0.5;
  filter: saturate(0.72) brightness(0.85);
}
.bh-thumb { position: absolute; inset: 0; }
.bh-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 1.1s var(--ease, cubic-bezier(.22,1,.36,1)), filter .55s ease;
}
.bh-card:hover .bh-thumb img { transform: scale(1.14); filter: brightness(1.06) contrast(1.04); }
.bh-name { transition: transform .5s var(--ease, cubic-bezier(.22,1,.36,1)); }
.bh-card:hover .bh-name { transform: translateY(-3px); }
.bh-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px;
  background: linear-gradient(180deg, transparent 42%, rgba(8,13,10,0.92));
}
.bh-tag {
  font-family: 'Inter', sans-serif; font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 6px;
  display: inline-flex; align-items: center; gap: 5px;
  opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease;
}
.bh-card:hover .bh-tag { opacity: 1; transform: none; }
.bh-tag svg { width: 10px; height: 10px; }
.bh-name { font-family: 'Cinzel', serif; font-size: 18px; color: var(--paper); line-height: 1.16; }
.bh-desc {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--paper-muted);
  margin-top: 8px;
  max-width: 44ch;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease .04s,
              transform .45s var(--ease, cubic-bezier(.22,1,.36,1)) .04s;
}
.bh-card:hover .bh-desc { opacity: 1; transform: none; }
/* Deepen the scrim on hover so the description stays legible over the cover
   (only on cards that actually carry a description) */
.bh-card:hover:has(.bh-desc) .bh-overlay {
  background: linear-gradient(180deg, rgba(8,13,10,0.12) 18%, rgba(8,13,10,0.82) 54%, rgba(8,13,10,0.96));
}
/* Touch devices have no hover — show the context permanently */
@media (hover: none) {
  .bh-desc, .bh-tag { opacity: 1; transform: none; }
  .bh-card:has(.bh-desc) .bh-overlay {
    background: linear-gradient(180deg, rgba(8,13,10,0.12) 18%, rgba(8,13,10,0.82) 54%, rgba(8,13,10,0.96));
  }
}
.bh-subhead { display: flex; align-items: center; gap: 16px; margin: clamp(40px,5vw,64px) 0 26px; }
.bh-subhead-txt { font-family: 'Cinzel', serif; font-size: clamp(16px,1.6vw,21px); color: var(--paper); letter-spacing: 0.01em; white-space: nowrap; }
.bh-subhead-txt .accent { color: var(--gold); font-style: italic; }
.bh-subhead-line { height: 1px; flex: 1; background: linear-gradient(90deg, rgba(232,184,101,0.32), transparent); }
@media (max-width: 820px) { .bh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .bh-grid { grid-template-columns: 1fr; } }

/* ---- "Brands I worked with" — scrolling logo bar ---- */
.brands-bar {
  padding: clamp(44px,5.5vw,72px) 0;
  border-top: 1px solid rgba(232,184,101,0.10);
  border-bottom: 1px solid rgba(232,184,101,0.10);
  overflow: hidden;
}
.brands-head {
  max-width: 1240px; margin: 0 auto clamp(24px,3vw,36px);
  padding: 0 clamp(20px,5vw,52px);
  display: flex; align-items: center; gap: 18px;
}
.brands-label {
  font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--gold); white-space: nowrap;
}
.brands-rule { height: 1px; flex: 1; background: linear-gradient(90deg, rgba(232,184,101,0.3), transparent); }
.brands-marquee {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.brands-track {
  display: flex; align-items: center; width: max-content;
  gap: clamp(44px,6vw,90px);
  animation: brands-scroll 40s linear infinite;
}
.brands-bar:hover .brands-track { animation-play-state: paused; }
/* Logos are pre-rendered as transparent light silhouettes, so no filter hack.
   A fixed slot + contain keeps very wide and very tall marks optically equal. */
.brands-logo {
  height: clamp(34px,3.8vw,46px);
  width: clamp(100px,11vw,150px);
  object-fit: contain;
  flex: none;
  opacity: 0.62;
  transition: opacity .35s ease;
}
.brands-logo:hover { opacity: 1; }
@keyframes brands-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .brands-track { animation: none; } }

/* ============================================================
   LEGIBILITY PASS
   Goal: every piece of real UI text passes WCAG AA (4.5:1) and is
   at least 11px. Cinzel stays for display type; small UI text moves
   to Inter, per the brand rule that ornamental serif must never be
   used for tags, labels or navigation. Decorative parchment
   annotations are deliberately left as texture.
============================================================ */

/* ---- navigation ---- */
#nav .nav-links a {
  font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.1em; color: var(--paper); opacity: 1;
}
#nav .nav-links a:hover { color: var(--gold); }
#nav .nav-sub {
  font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 400;
  letter-spacing: 0.16em; color: var(--paper-muted); opacity: 0.95;
}
#nav .btn-nav {
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
}

/* ---- hero ---- */
.hero-eyebrow { font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 500; letter-spacing: 0.26em; }
.btn-primary, .btn-secondary { font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; }
.scroll-label { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.2em; color: var(--paper-muted); opacity: 0.95; }

/* ---- contact CTA + temple form (dark text on parchment: size, not colour) ---- */
.cta-eyebrow { font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 500; letter-spacing: 0.2em; }
.temple-form-title { font-size: 16px; letter-spacing: 0.14em; color: #4a2a08; }
.tf-field label {
  font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.1em; color: #5c3a12; opacity: 1;
}
.tf-field input, .tf-field textarea { font-family: 'Inter', sans-serif; font-size: 14px; color: #2a1808; }
.tf-field input::placeholder, .tf-field textarea::placeholder { color: rgba(60,36,10,0.62); }
.tf-submit { font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; }
.temple-hint { font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0.14em; color: var(--paper-muted); opacity: 0.95; }

/* ---- footer ---- */
footer .fc-label {
  font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.16em; color: var(--gold); opacity: 1;
}
footer .fc-tagline { font-family: 'Inter', sans-serif; font-size: 12.5px; letter-spacing: 0.05em; color: var(--paper-muted); opacity: 1; }
footer .fc-coords span { font-family: 'Inter', sans-serif; font-size: 11.5px; letter-spacing: 0.06em; color: var(--paper-muted); opacity: 0.95; }
footer .fc-contact-link { font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: 0.02em; color: var(--paper); opacity: 1; }
footer .fc-contact-link:hover { color: var(--gold); }
footer .fc-base { font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0.01em; line-height: 1.65; color: var(--paper-muted); opacity: 0.95; }
footer .footer-col-nav a { font-family: 'Inter', sans-serif; font-size: 12.5px; letter-spacing: 0.05em; color: var(--paper-muted); opacity: 1; }
footer .footer-col-nav a:hover { color: var(--gold); }
.footer-bottom-copy { font-family: 'Inter', sans-serif; font-size: 11.5px; letter-spacing: 0.06em; color: var(--paper-muted); opacity: 0.95; }
.footer-bottom-route { font-family: 'Inter', sans-serif; font-size: 11.5px; letter-spacing: 0.1em; color: var(--gold); opacity: 0.92; }

/* ---- deployed systems (Chapter VI) small labels ---- */
#deployed-systems .ds-tab-num { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; color: var(--gold); opacity: 1; }
#deployed-systems .ds-tab-type { font-family: 'Inter', sans-serif; font-size: 11.5px; color: var(--paper-muted); opacity: 1; }
#deployed-systems .ds-tab-status-txt { font-family: 'Inter', sans-serif; font-size: 11px; color: var(--paper-muted); opacity: 1; }
#deployed-systems .ds-info-desc { font-family: 'Inter', sans-serif; font-size: 13px; line-height: 1.6; color: var(--paper-muted); opacity: 1; }
#deployed-systems .ds-chrome-url { font-family: 'Inter', sans-serif; font-size: 11.5px; color: var(--paper-muted); opacity: 0.95; }
#deployed-systems .section-sub { color: var(--paper-muted); opacity: 1; }

/* ---- process / waypoints ---- */
#process .waypoint-coord { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.12em; color: var(--gold); opacity: 0.95; }
#process .waypoint-desc { font-size: 14px; line-height: 1.7; color: var(--paper-muted); opacity: 1; }

/* ---- about / parchment content (dark text on parchment) ---- */
#about .about-eyebrow { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; }
#about .about-body { font-size: 14px; line-height: 1.7; }
#about .dossier-intel-key, #about .dossier-intel-val { font-family: 'Inter', sans-serif; font-size: 11.5px; letter-spacing: 0.04em; }

/* ---- live-preview / websites chrome ---- */
.web-url, .lp-chrome-url { font-family: 'Inter', sans-serif; font-size: 11.5px; opacity: 0.95; }

/* decorative archival annotations stay as texture, but are hidden from
   assistive tech since they carry no information */
.parchment-margin-l, .parchment-margin-r, .dossier-seal { user-select: none; }

/* ---- legibility pass: final two ---- */
footer .fc-coords { opacity: 1; }
footer .fc-coords span { color: var(--paper-muted); opacity: 0.95; }
#nav .nav-sub { font-size: 11px; }

/* ---- legibility pass 2: component-level ----
   Root cause: --stone (#5a5448) was used as a *text* colour on the near
   black background (~2.6:1). Stone stays for rules/borders; muted text
   now uses a warm grey that clears AA, and micro-labels get a real size. */
:root { --muted: #9a9082; }

.cat-head-count, .cap, .spline-ph-label, .spline-rail-note,
.web-type, .tt-cap, .foot-in span { color: var(--muted); }

/* websites gallery — badges, side panel, meta */
.web-live { background: rgba(8,13,10,0.86); color: var(--paper); font-size: 11px; border-color: rgba(240,232,212,0.28); }
.web-tag { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.16em; color: #6fc9c1; opacity: 1; }
.web-sub { font-family: 'Inter', sans-serif; font-size: 11.5px; letter-spacing: 0.1em; color: #6fc9c1; opacity: 1; }
.web-desc { font-size: 13px; line-height: 1.65; color: var(--paper-muted); opacity: 1; }
.web-meta-key { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.1em; color: var(--gold); opacity: 0.9; width: 74px; }
.web-meta-val { font-family: 'Inter', sans-serif; font-size: 11.5px; letter-spacing: 0.02em; color: var(--paper-muted); opacity: 1; text-transform: none; }
.web-visit { font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; }
.web-cap-name { font-size: 14px; }
.web-cap-type { font-family: 'Inter', sans-serif; font-size: 11px; color: var(--muted); }

/* spline */
.spline-live-tag { font-size: 11px; }
.spline-ph-label { font-size: 11.5px; letter-spacing: 0.2em; }
.spline-card-cap { font-size: 16px; }

/* live deploys (chapter VI) */
.ds-hover-hint { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--paper); opacity: 1; }
.ds-live-txt { font-family: 'Inter', sans-serif; font-size: 11px; color: var(--paper); opacity: 1; }
.ds-visit-btn { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; }
.ds-tab-name { font-size: 15px; }

/* chapter labels + about dossier */
.chapter-num { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.2em; color: var(--gold); opacity: 1; }
.chapter-name { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.16em; color: var(--paper-muted); opacity: 1; }
.chapter-coords { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.08em; color: var(--paper-muted); opacity: 0.92; }
.chapter-tag { font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 600; letter-spacing: 0.18em; color: var(--gold); opacity: 1; }
.dossier-class-text { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.1em; }

/* social + tiktok cards */
.tt-cap { font-size: 12.5px; }
.tt-handle { font-size: 12.5px; }
.social-handle { font-size: 12.5px; color: var(--paper-muted); }

/* ---- legibility pass 3: the last two real issues ----
   (About/parchment text is dark-on-light over an SVG parchment layer and
   already has strong contrast; automated checks that only read CSS
   backgrounds report it as a false negative.) */
.ds-hover-overlay { background: rgba(8,13,10,0.62); }
.ds-hover-hint { background: rgba(8,13,10,0.9); padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(232,184,101,0.3); }
.bh-tag { font-size: 11px; }

/* ---- legibility pass 4: parchment ink ----
   Text on the parchment was a mid brown sitting at ~4.2:1 against the
   aged paper. Deeper ink brown clears AA comfortably and reads more
   like real archival ink. */
.about-eyebrow, .dossier-intel-key, .about-exhibit-label,
.parchment-page-ref, .parchment-photo-caption, .scrap-note,
.about-sig span { color: #4a2c0a; opacity: 1; }
.about-exhibit-label { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.14em; }
.parchment-page-ref { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.06em; }
.parchment-photo-caption { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.06em; }

/* ---- About: pull quote on the parchment ---- */
.about-pull {
  font-family: 'Cinzel', serif; font-style: italic;
  font-size: clamp(15px, 1.5vw, 19px); line-height: 1.4;
  color: #4a2c0a; margin: 0 0 22px; max-width: 26ch;
}

/* About: with the longer bio the text column is far taller than the photo
   stack, so centring left the scrapbook floating in dead space. */
.parchment-content { align-items: start; }

/* ---- Adventure prop: gold coin that rolls across on scroll ---- */
.rolling-coin {
  position: fixed;
  left: 0; top: 0;
  width: 118px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 16px 20px rgba(0,0,0,0.55));
  transform: translate3d(-240px, 0, 0);
}
.rolling-coin img { width: 100%; height: auto; display: block; }
@media (max-width: 760px) { .rolling-coin { display: none; } }
@media (prefers-reduced-motion: reduce) { .rolling-coin { display: none; } }

/* ---- Adventure prop: character swinging down on a rope ---- */
#spline { overflow: hidden; }
#spline .cat-head, #spline .pf-wrap { position: relative; z-index: 2; }
.rope-swinger {
  position: absolute;
  top: 0; right: -110px;
  width: 340px;
  z-index: 3;                 /* foreground prop, swings past the content */
  pointer-events: none;
  opacity: 0;
  transform-origin: 88% -25%; /* rope anchor, above the frame */
  will-change: transform, opacity;
  filter: drop-shadow(0 26px 32px rgba(0,0,0,0.6));
}
.rope-swinger img { width: 100%; height: auto; display: block; }
@media (max-width: 1100px) { .rope-swinger { display: none; } }
@media (prefers-reduced-motion: reduce) { .rope-swinger { display: none; } }

/* ---- Adventure props: field journal + quill drifting behind the About dossier ---- */
#about .section-wrap,
#about .dossier-class-bar,
#about .parchment-stage { position: relative; z-index: 1; }
.about-prop {
  position: absolute;
  z-index: 0;                /* behind the parchment, never over the text */
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 26px 34px rgba(0,0,0,0.62));
}
.about-prop img { width: 100%; height: auto; display: block; }
.about-prop--journal { left: -74px;  bottom: 6%; width: 320px; }
.about-prop--quill   { right: -66px; top: 26%;   width: 340px; }
@media (max-width: 1180px) { .about-prop { display: none; } }
@media (prefers-reduced-motion: reduce) { .about-prop { display: none; } }

/* ---- Contact: invisible treasure map, lit only around the cursor ---- */
#contact > *:not(.treasure-reveal) { position: relative; z-index: 1; }
.treasure-reveal {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url('../assets/images/contact/treasure-map.jpg') center / cover no-repeat;
  opacity: 0;
  /* fades away slowly when the cursor leaves, comes up quickly when it enters */
  transition: opacity 1.2s ease;
  --mx: 50%;
  --my: 50%;
  --r: 230px;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my),
                        #000 0%, rgba(0,0,0,0.72) 42%, transparent 74%);
          mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my),
                        #000 0%, rgba(0,0,0,0.72) 42%, transparent 74%);
}
.treasure-reveal.is-lit { opacity: 0.82; transition: opacity .28s ease; }
/* No cursor to follow on touch, and nothing to reveal */
@media (hover: none) { .treasure-reveal { display: none; } }

/* ---- Contact form: Netlify honeypot + submit status ---- */
.tf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tf-status {
  margin: 12px 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
  min-height: 1.2em;
  color: var(--paper-muted);
}
.tf-status.is-ok   { color: #2e6b3f; font-weight: 500; }
.tf-status.is-warn { color: #8a5a1c; }
.tf-submit[disabled] { opacity: 0.6; cursor: progress; }
