/* ═══════════════════════════════════════════════════════════
   Matthew Yang — 3D Portfolio · shared styles
   Black / parchment / gold · celestial-tarot system
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:        #040406;
  --bg-2:      #090a0e;
  --ink:       #e8ddb5;
  --ink-soft:  #ada17a;
  --ink-mute:  #5d5847;
  --gold:      #c9a961;
  --gold-deep: #8a7338;
  --rule:      rgba(232, 221, 181, 0.11);
  --rule-gold: rgba(201, 169, 97, 0.30);
  --display:   'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --mono:      'JetBrains Mono', ui-monospace, Menlo, monospace;
}
html[data-theme="light"] {
  --bg:        #f3eedc;
  --bg-2:      #ebe4cb;
  --ink:       #1a1610;
  --ink-soft:  #3d3526;
  --ink-mute:  #7a6e54;
  --gold:      #8a6f2a;
  --gold-deep: #5e4a17;
  --rule:      rgba(26, 22, 16, 0.18);
  --rule-gold: rgba(138, 111, 42, 0.4);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); }
/* body is transparent so the fixed #pagestars canvas (z-index:-1) shows
   over the html background colour, behind all page content. */
body { background: transparent; color: var(--ink); }
body {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.5;
  font-size: 18px;
  overflow-x: hidden;
  transition: background 600ms ease, color 600ms ease;
}
::selection { background: var(--gold); color: var(--bg); }
a { color: inherit; text-decoration: none; }

.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; }
.gold { color: var(--gold); }
.soft { color: var(--ink-soft); }
.mute { color: var(--ink-mute); }

/* ───────────── Layout shell ───────────── */
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 64px;
  position: relative;
}

/* ───────────── Top bar ───────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 22px 64px 20px;
  display: flex; justify-content: space-between; align-items: center;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg) 90%, transparent 90%);
}
.topbar > * { pointer-events: auto; }
.sig {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px;
}
.sig::before { content: ""; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 12px var(--gold); }
.nav {
  display: flex; gap: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav a { position: relative; padding-bottom: 4px; }
.nav a:hover { color: var(--gold); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--gold);
  transition: right .4s ease;
}
.nav a:hover::after { right: 0; }
.nav a.back::before { content: "← "; }

/* hover dropdown — "The Constellations" reveals its constellations */
.nav-group { position: relative; display: inline-flex; align-items: center; }
.nav-trigger { display: inline-flex; align-items: center; gap: 8px; }
.nav-caret {
  width: 0; height: 0; flex: none;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 3px solid currentColor;
  opacity: .55;
  transition: transform .35s ease, opacity .35s ease;
}
.nav-group:hover .nav-caret,
.nav-group:focus-within .nav-caret { transform: rotate(180deg); opacity: 1; color: var(--gold); }
.nav-menu {
  position: absolute; top: 100%; left: 0;
  padding-top: 16px;                 /* invisible bridge so the cursor can travel down */
  min-width: 190px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .32s ease, transform .32s ease, visibility .32s;
  z-index: 60;
}
.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu-inner {
  background: var(--bg-2);
  border: 1px solid var(--rule-gold);
  padding: 7px;
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.nav-menu-inner a {
  padding: 11px 14px;
  white-space: nowrap;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px;
  transition: color .3s ease, background .3s ease;
}
.nav-menu-inner a::after { content: none; }   /* cancel the underline sweep */
.nav-menu-inner a::before {
  content: ""; width: 5px; height: 5px; flex: none;
  border: 1px solid var(--rule-gold); transform: rotate(45deg);
  transition: background .3s ease, border-color .3s ease;
}
.nav-menu-inner a:hover { color: var(--gold); background: rgba(201,169,97,0.06); }
.nav-menu-inner a:hover::before { background: var(--gold); border-color: var(--gold); }

/* header contact — stays fixed on scroll */
.topbar-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.topbar-meta a { transition: color .3s ease; }
.topbar-meta a:hover { color: var(--gold); }
.topbar-meta .dotsep { color: var(--ink-mute); }
@media (max-width: 1080px) { .topbar-meta { display: none; } }

/* ───────────── Hero (home) ───────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 720px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#orbit {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 1;
}
.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 62%, var(--bg) 112%);
  z-index: 2; pointer-events: none;
}
.hero-text {
  position: relative; z-index: 3;
  text-align: center;
  padding: 0 24px;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: ""; width: 36px; height: 1px; background: var(--gold);
}
.hero-name {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(60px, 11vw, 156px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  padding-bottom: 0.08em;
}
.hero-name em { font-style: italic; color: var(--gold); font-weight: 400; display: inline-block; }
.hero-tagline {
  margin-top: 56px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--ink-soft);
  max-width: 540px;
  margin-inline: auto;
  line-height: 1.5;
}
.hero-tagline .q, .hero-tagline .attr { color: var(--gold); }
.hero-scroll {
  position: absolute; bottom: 52px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll .line { width: 1px; height: 56px; background: linear-gradient(to bottom, var(--rule-gold), transparent); animation: drip 2.6s ease-in-out infinite; }
@keyframes drip { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

/* Roman corner marks */
.hero-corner {
  position: absolute; z-index: 3;
  font-family: var(--display);
  font-style: italic;
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 0.2em;
}
.hc-tl { top: 96px; left: 64px; }
.hc-tr { top: 96px; right: 64px; text-align: right; }
.hc-bl { bottom: 28px; left: 64px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-mute); }
.hc-br { bottom: 28px; right: 64px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-mute); }

/* ───────────── Section frame ───────────── */
section { position: relative; padding: 140px 0; }
.section-head {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 32px;
  align-items: baseline;
  border-top: 1px solid var(--rule-gold);
  padding-top: 28px;
  margin-bottom: 72px;
}
.roman {
  font-family: var(--display);
  font-style: italic;
  font-size: 28px;
  color: var(--gold);
  letter-spacing: 0.06em;
}
.section-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.section-title em { font-style: italic; color: var(--gold); }
.section-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ───────────── Reel section ───────────── */
.reel-wrap { margin: 0 auto; max-width: 1192px; }
.reel-frame {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-2);
  border: 1px solid var(--rule-gold);
  overflow: hidden;
}
.reel-frame::before, .reel-frame::after {
  content: ""; position: absolute; width: 28px; height: 28px;
  border: 1px solid var(--gold);
}
.reel-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.reel-frame::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.reel-corners > span {
  position: absolute; width: 28px; height: 28px; border: 1px solid var(--gold);
}
.reel-corners .tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.reel-corners .bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.reel-caption {
  margin-top: 24px;
  display: flex; justify-content: space-between; align-items: baseline;
  color: var(--ink-mute);
}

/* ═════════════ STAR CHART — rotating star-sphere ═════════════ */
/* Section sheds its top rule so the sphere reads as part of the sky. */
#reel { padding-bottom: 64px; }
#chart { padding-top: 36px; padding-bottom: 56px; }
/* full-bleed: the chart breaks out of the .page column to span the viewport */
.starsphere-wrap {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: clamp(500px, 76vh, 860px);
  /* seamless: a faint central glow that melts into the page background */
  background: radial-gradient(ellipse 48% 64% at 50% 50%, rgba(201,169,97,0.05), transparent 70%);
  touch-action: pan-y;
}
#starsphere {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; cursor: grab;
  z-index: 1;
}
#starsphere.is-targeting { cursor: pointer; }

/* decorative chart framing — sits behind the sphere so the section reads
   as a celestial chart, not an orb in a void */
.chart-frame { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cf-rail {
  position: absolute; top: 12%; bottom: 12%; width: 13px;
  background: repeating-linear-gradient(to bottom, var(--rule-gold) 0 1px, transparent 1px 24px);
  opacity: 0.7;
}
.cf-left  { left: clamp(20px, 4vw, 72px); border-left: 1px solid var(--rule-gold); }
.cf-right { right: clamp(20px, 4vw, 72px); border-right: 1px solid var(--rule-gold);
  background: repeating-linear-gradient(to bottom, var(--rule-gold) 0 1px, transparent 1px 24px); }
.cf-deg {
  position: absolute; transform: translateY(-50%);
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; color: var(--ink-soft);
  white-space: nowrap;
}
.cf-left .cf-deg { left: 20px; }
.cf-right .cf-deg { right: 20px; text-align: right; }
.cf-deg sup { font-size: 0.7em; }
.cf-equator {
  position: absolute; left: 0; right: 0; top: 50%;
  border-top: 1px dashed var(--rule-gold); opacity: 0.30;
}
.cf-tag {
  position: absolute; font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-soft); opacity: 0.9;
}
.cf-tl { top: 26px; left: clamp(20px, 4vw, 72px); }
.cf-tr { top: 26px; right: clamp(20px, 4vw, 72px); text-align: right; }
.cf-bl { bottom: 26px; left: clamp(20px, 4vw, 72px); }
.cf-br { bottom: 26px; right: clamp(20px, 4vw, 72px); text-align: right; }
@media (max-width: 700px) {
  .cf-tag { font-size: 8px; letter-spacing: 0.18em; }
  .cf-rail { display: none; }
}

/* index + hint live BELOW the canvas in normal flow (no overlap) */
.sphere-foot {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  margin-top: 26px;
}
.sphere-hint {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink-mute);
  display: flex; align-items: center; gap: 12px;
}
.sphere-hint::before, .sphere-hint::after { content: ""; width: 22px; height: 1px; background: var(--rule-gold); }

/* constellation index — always reachable */
.sphere-legend {
  display: flex; align-items: center; justify-content: center; gap: 14px 22px;
  flex-wrap: wrap;
  max-width: 1100px;
}
.legend-div { width: 1px; height: 30px; background: var(--rule-gold); opacity: .5; }
.legend-item {
  display: flex; align-items: center; gap: 12px;
  background: none; border: none; cursor: pointer; padding: 8px 6px;
  color: var(--ink-soft); text-align: left;
  transition: color .35s ease;
}
.legend-item .li-mark {
  font-family: var(--display); font-style: italic; font-size: 15px; color: var(--gold);
  width: 24px; height: 24px; display: grid; place-items: center;
  border: 1px solid var(--rule-gold); border-radius: 50%;
  transition: background .35s ease, color .35s ease, box-shadow .35s ease;
  flex: none;
}
.legend-item .li-text { display: flex; flex-direction: column; line-height: 1.1; }
.legend-item .li-name { font-family: var(--display); font-size: 17px; letter-spacing: 0.01em; }
.legend-item .li-latin { font-family: var(--mono); font-size: 8px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-mute); margin-top: 3px; }
.legend-item:hover, .legend-item.active { color: var(--ink); }
.legend-item:hover .li-mark, .legend-item.active .li-mark { background: var(--gold); color: var(--bg); box-shadow: 0 0 18px rgba(201,169,97,0.4); }
.legend-item:focus-visible { outline: 1px solid var(--rule-gold); outline-offset: 4px; }

/* slide-in summary panel */
.sphere-panel {
  position: absolute; top: 50%; right: clamp(20px, 7vw, 130px);
  transform: translate(36px, -50%);
  width: 330px; max-width: 78vw;
  background: linear-gradient(180deg, rgba(12,12,17,0.96), rgba(8,8,11,0.96));
  border: 1px solid var(--rule-gold);
  padding: 28px 28px 26px;
  opacity: 0; pointer-events: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1);
  z-index: 20;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
html[data-theme="light"] .sphere-panel {
  background: linear-gradient(180deg, rgba(243,238,220,0.97), rgba(235,228,203,0.97));
}
.sphere-panel.open { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.sphere-panel .sp-roman { font-family: var(--display); font-style: italic; color: var(--gold); font-size: 14px; letter-spacing: 0.22em; margin-bottom: 12px; }
.sphere-panel .sp-thumb { width: 100%; height: auto; object-fit: contain; display: block; border: 1px solid var(--rule); margin-bottom: 18px; }
.sphere-panel .sp-thumb--portrait {
  height: auto; aspect-ratio: 1 / 1;
  object-fit: cover; object-position: 56% 30%;
}
.sphere-panel .sp-figure {
  width: 100%; aspect-ratio: 16/10; display: grid; place-items: center; border: 1px solid var(--rule); margin-bottom: 18px;
  background: radial-gradient(circle at 50% 45%, rgba(201,169,97,0.14), transparent 65%), var(--bg-2);
}
.sphere-panel .sp-title { font-family: var(--display); font-weight: 300; font-size: 32px; line-height: 1.04; letter-spacing: -0.01em; margin-bottom: 4px; }
.sphere-panel .sp-title em { font-style: italic; color: var(--gold); }
.sphere-panel .sp-latin { font-family: var(--mono); font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 16px; }
.sphere-panel .sp-summary { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 22px; }
.sphere-panel .sp-cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold);
}
.sphere-panel .sp-cta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); transition: transform .3s ease; }
.sphere-panel:hover .sp-cta .dot { transform: scale(1.6); }

@media (max-width: 700px) {
  .sphere-panel { left: 50%; right: auto; top: auto; bottom: 16px; transform: translate(-50%, 24px); width: 86%; }
  .sphere-panel.open { transform: translate(-50%, 0); }
}

/* ───────────── Subpage hero (project / about) ───────────── */
.subhero {
  position: relative;
  padding: 180px 0 70px;
  overflow: hidden;
}
.subhero canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  opacity: .9;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 60%, transparent 100%);
}
.subhero .subhero-inner { position: relative; z-index: 2; }
.subhero-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold); display: inline-flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.subhero-eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--gold); }
.subhero h1 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(48px, 8vw, 116px); line-height: 0.98; letter-spacing: -0.02em;
  padding-bottom: 0.06em;
}
.subhero h1 em { font-style: italic; color: var(--gold); }
.subhero .subhero-sub { margin-top: 22px; font-family: var(--display); font-style: italic; font-size: clamp(18px, 2vw, 24px); color: var(--ink-soft); max-width: 640px; }

/* ───────────── Project (tarot card) ───────────── */
.project-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: start;
}
.tarot-card {
  position: relative;
  aspect-ratio: 3/4.4;
  background: var(--bg-2);
  border: 1px solid var(--rule-gold);
  padding: 20px;
  overflow: hidden;
}
.tarot-inner {
  position: absolute; inset: 20px;
  border: 1px solid var(--rule-gold);
  padding: 24px;
  display: flex; flex-direction: column;
}
.tarot-art {
  flex: 1; position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.tarot-art--img { padding: 0; border: 1px solid var(--rule-gold); }
.tarot-art--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tarot-foot {
  margin-top: 18px; text-align: center;
  font-family: var(--display); font-style: italic; color: var(--gold);
  letter-spacing: 0.2em; font-size: 13px;
}
.tarot-head {
  text-align: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-mute);
  margin-bottom: 14px;
}
.project-meta { padding-top: 8px; }
.project-roman { font-family: var(--display); font-style: italic; color: var(--gold); font-size: 18px; letter-spacing: 0.2em; margin-bottom: 18px; }
.project-title {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(40px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.01em; margin-bottom: 8px;
}
.project-title em { font-style: italic; color: var(--gold); }
.project-sub { font-family: var(--display); font-style: italic; color: var(--ink-soft); font-size: 20px; margin-bottom: 36px; }
.project-body { font-size: 18px; line-height: 1.7; color: var(--ink-soft); max-width: 52ch; margin-bottom: 36px; }
.project-body p + p { margin-top: 14px; }

/* Introduction + wide grey block-out plate */
.project-lede { max-width: 62ch; }
.tarot-card--wide {
  aspect-ratio: auto;
  margin: 52px 0 30px;
}
.tarot-card--wide .tarot-inner { position: static; inset: auto; }
.tarot-card--wide .tarot-art--img { aspect-ratio: 16 / 9; }
.meta-grid--cols { max-width: 760px; margin-bottom: 8px; }

/* Block-out plate · slim tarot frame with crest fleurons (transparent ground) */
.blockout-plate { margin: 52px auto 30px; max-width: 1192px; }
.bp-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 18px; }
.bp-head .hr { height: 1px; width: 110px; }
.bp-head .hr.l { background: linear-gradient(90deg, transparent, var(--gold-deep)); }
.bp-head .hr.r { background: linear-gradient(90deg, var(--gold-deep), transparent); }
.bp-num { font-family: var(--display); font-size: 26px; color: var(--gold); letter-spacing: 0.3em; padding-left: 0.3em; }
.bp-frame { position: relative; border: 1px solid var(--gold-deep); line-height: 0; }
.bp-frame::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(201,169,97,0.42); pointer-events: none; z-index: 2; }
.bp-frame img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.bp-boss { position: absolute; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); z-index: 3; }
.bp-boss.tl { left: -4px; top: -4px; } .bp-boss.tr { right: -4px; top: -4px; }
.bp-boss.bl { left: -4px; bottom: -4px; } .bp-boss.br { right: -4px; bottom: -4px; }
.bp-crest { position: absolute; left: 50%; top: 0; transform: translate(-50%, -52%); z-index: 3;
            color: var(--gold); font-size: 19px; line-height: 1; }
.bp-crest.bottom { top: auto; bottom: 0; transform: translate(-50%, 52%) rotate(180deg); }
.bp-foot { text-align: center; margin-top: 18px; font-family: var(--mono); font-style: normal; font-weight: 500;
           text-transform: uppercase; letter-spacing: 0.34em; font-size: 12px; color: var(--ink-soft); }

/* Block-out description, centered beneath the plate */
.plate-caption { max-width: 1192px; margin: 0 auto; text-align: center; color: var(--ink-soft); font-size: 18px; line-height: 1.75; }
.plate-caption p + p { margin-top: 14px; }

/* Lighting-reference board — plain plate, image carries its own ground */
.ref-plate { max-width: 1192px; margin: 0 auto; border: 1px solid var(--gold-deep); line-height: 0; position: relative; }
.ref-plate::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(201,169,97,0.42); pointer-events: none; }
.ref-plate img { display: block; width: 100%; object-fit: cover; }

.meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px;
  border-top: 1px solid var(--rule); padding-top: 28px;
}
.meta-grid h4 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 10px; font-weight: 400; }
.meta-grid p { color: var(--ink); font-size: 17px; line-height: 1.5; }
.meta-grid ul { list-style: none; }
.meta-grid li { padding: 4px 0; border-bottom: 1px dotted var(--rule); display: flex; justify-content: space-between; font-size: 15px; color: var(--ink); }
.meta-grid li:last-child { border-bottom: none; }
.meta-grid li span { color: var(--gold); font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; }

/* ───────────── BTS gallery (masonry) ───────────── */
.bts-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 0 36px;
}
/* Ornamented divider above the lightbox — centered fleuron + diamonds, rule fades out */
.orn-rule { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 120px 0 30px; }
.orn-rule .line { height: 1px; flex: 1; }
.orn-rule .line.l { background: linear-gradient(90deg, transparent, var(--rule-gold)); }
.orn-rule .line.r { background: linear-gradient(90deg, var(--rule-gold), transparent); }
.orn-rule .cluster { display: flex; align-items: center; gap: 11px; color: var(--gold); flex: none; }
.orn-rule .dia { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
.orn-rule .fleur { font-size: 19px; line-height: 1; }
.bts-head h3 { font-family: var(--display); font-style: italic; font-weight: 300; font-size: 32px; color: var(--ink); }
.bts-grid { column-count: 3; column-gap: 14px; }
@media (max-width: 900px) { .bts-grid { column-count: 2; } }
@media (max-width: 560px) { .bts-grid { column-count: 1; } }
.bts-cell {
  position: relative; break-inside: avoid; margin-bottom: 14px;
  border: 1px solid var(--rule); overflow: hidden; cursor: zoom-in; background: var(--bg-2);
}
.bts-cell img {
  display: block; width: 100%; height: auto;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .5s ease;
  filter: saturate(.92);
}
.bts-cell::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,18,.55), transparent 45%);
  opacity: 0; transition: opacity .5s ease; pointer-events: none;
}
.bts-cell:hover img { transform: scale(1.04); filter: saturate(1.05); }
.bts-cell:hover::after { opacity: 1; }
.bts-cell .cap {
  position: absolute; left: 12px; bottom: 11px; z-index: 2;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink);
  opacity: 0; transform: translateY(4px);
  transition: opacity .5s ease, transform .5s ease;
  text-shadow: 0 1px 8px rgba(0,0,0,.8);
}
.bts-cell:hover .cap { opacity: 1; transform: translateY(0); }
.bts-cell .idx {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; color: var(--gold);
  text-shadow: 0 1px 8px rgba(0,0,0,.8);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,6,12,.94);
  display: none; align-items: center; justify-content: center;
  padding: 48px; cursor: zoom-out;
  opacity: 0; transition: opacity .35s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; border: 1px solid var(--rule-gold); box-shadow: 0 30px 120px rgba(0,0,0,.7); }
.lightbox .lb-cap { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft); }
.lightbox .lb-close { position: absolute; top: 26px; right: 32px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--ink-soft); text-transform: uppercase; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--display); font-size: 40px; color: var(--ink-soft); cursor: pointer; padding: 20px; user-select: none; transition: color .3s ease; }
.lightbox .lb-nav:hover { color: var(--gold); }
.lightbox .lb-prev { left: 16px; }
.lightbox .lb-next { right: 16px; }

/* ───────────── About ───────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; }
.star-card {
  position: relative; aspect-ratio: 3/4;
  border: 1px solid var(--rule-gold); padding: 28px; background: var(--bg-2);
  display: flex; flex-direction: column;
}
.star-card .top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-mute); }
.star-svg { flex: 1; display: grid; place-items: center; }
.star-card .glyph-name { text-align: center; font-family: var(--display); font-style: italic; color: var(--gold); letter-spacing: 0.3em; font-size: 14px; padding-top: 16px; border-top: 1px solid var(--rule); }
.about-body { font-size: 19px; line-height: 1.75; color: var(--ink-soft); max-width: 60ch; }
.about-body p { margin-bottom: 20px; }
.about-body em { color: var(--gold); font-style: italic; }
.about-quote {
  font-family: var(--display); font-style: italic;
  font-size: clamp(24px, 2.4vw, 30px); line-height: 1.4; color: var(--ink);
  margin: 32px 0; padding: 24px 0 24px 28px; border-left: 1px solid var(--gold);
}
.about-meta { margin-top: 36px; border-top: 1px solid var(--rule); padding-top: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 40px; }
.about-meta h4 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 8px; font-weight: 400; }
.about-meta p { color: var(--ink); font-size: 16px; line-height: 1.5; }

/* ───────────── Footer (single line) ───────────── */
footer {
  border-top: 1px solid var(--rule-gold);
  padding: 26px 0 30px;
  margin-top: 60px;
}
.footer-line {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.footer-line a { transition: color .3s ease; }
.footer-line a:hover { color: var(--gold); }
.footer-line .fl-mail { color: var(--ink); letter-spacing: 0.02em; }
.footer-line .fl-phone { color: var(--ink-soft); }
.footer-line .fl-lorem { color: var(--ink-mute); font-style: normal; }
.footer-line .fl-sep { width: 1px; height: 13px; background: var(--rule-gold); opacity: .6; }
.footer-line .fl-spacer { flex: 1 1 auto; }
.footer-icons { display: flex; gap: 10px; align-items: center; }
.footer-icons a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--rule-gold); border-radius: 50%;
  color: var(--ink-soft);
  transition: color .3s ease, border-color .3s ease, background .3s ease, transform .3s ease;
}
.footer-icons a:hover { color: var(--gold); border-color: var(--gold); transform: translateY(-2px); }
.footer-icons a svg { width: 15px; height: 15px; display: block; }
.cv-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px; border: 1px solid var(--gold); color: var(--gold);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  transition: background .3s ease, color .3s ease;
}
.cv-chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.cv-chip:hover { background: var(--gold); color: var(--bg); }
@media (max-width: 720px) {
  .footer-line .fl-spacer { flex-basis: 100%; height: 0; }
}

/* ───────────── Responsive ───────────── */
@media (max-width: 900px) {
  .page, .topbar { padding-left: 28px; padding-right: 28px; }
  .hc-tl, .hc-tr, .hc-bl, .hc-br { display: none; }
  .project-grid, .about-grid { grid-template-columns: 1fr; gap: 56px; }
  .section-head { grid-template-columns: 48px 1fr; }
  .section-meta { display: none; }
  section { padding: 80px 0; }
  .nav { gap: 18px; }
}
