/* =========================================================
   Lucy Liu portfolio — component stylesheet
   Paired with ../../colors_and_type.css (tokens)
   ========================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
:root {
  --aura-radial: radial-gradient(circle, rgba(114,173,255,0.20) 0%, rgba(196,176,255,0.12) 40%, transparent 70%);
}
html { scroll-behavior: auto; }
body {
  background: var(--bg, #050710);
  color: var(--fg1, #F6FAFF);
  font-family: var(--font-body, 'DM Sans', system-ui);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* ===== ANIMATED GRAIN OVERLAY ===== */
body::before {
  content: ''; position: fixed; inset: -50%;
  pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.96 0 0 0 0 0.98 0 0 0 0 1 0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.04;
  mix-blend-mode: overlay;
  animation: grain 8s steps(8) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0,0); }
  10% { transform: translate(-2%, -3%); }
  20% { transform: translate(-4%, 2%); }
  30% { transform: translate(2%, -4%); }
  40% { transform: translate(-2%, 5%); }
  50% { transform: translate(-4%, 2%); }
  60% { transform: translate(3%, 0%); }
  70% { transform: translate(0%, 4%); }
  80% { transform: translate(-3%, -1%); }
  90% { transform: translate(2%, 3%); }
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }

.container { width: min(1240px, 92vw); margin: 0 auto; }

/* ========== NAV ========== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  padding: 32px 0;
  mix-blend-mode: difference;
  transition: padding .4s ease;
}
.nav.scrolled { padding: 18px 0; }
.nav-inner {
  width: min(1240px, 92vw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo {
  font-family: var(--font-display);
  font-style: italic; font-weight: 400;
  font-size: 26px; letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
  will-change: transform;
}
.nav-links { list-style: none; display: flex; gap: 36px; margin: 0; padding: 0; }
.nav-link {
  font-family: var(--font-ui);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: #fff; position: relative; font-weight: 500;
  transition: opacity .3s;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px;
  background: var(--fg1); transition: width .4s cubic-bezier(.7,0,.2,1);
}
.nav-link:hover { color: var(--fg1); }
.nav-link:hover::after { width: 100%; }
.nav-link:focus-visible,
.nav-logo:focus-visible {
  outline: 2px solid var(--accent, #72ADFF); outline-offset: 4px; border-radius: 2px;
}

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--aura);
  z-index: 60; transform-origin: 0 0;
}

/* ========== CUSTOM CURSOR ========== */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 9999; opacity: 0; mix-blend-mode: difference; }
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 6px; height: 6px; border-radius: 50%;
  background: var(--fog); transform: translate(-50%, -50%); will-change: transform;
}
.cursor-ring {
  position: fixed; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(246,250,255,0.7);
  transform: translate(-50%, -50%); will-change: transform;
  display: flex; align-items: center; justify-content: center;
  transition: width .35s cubic-bezier(.7,0,.2,1), height .35s cubic-bezier(.7,0,.2,1), border-color .3s;
}
.cursor.is-hovering .cursor-ring { width: 72px; height: 72px; border-color: var(--blue-300); }
.cursor.is-hidden { opacity: 0 !important; }
.cursor-label {
  font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.08em;
  text-transform: lowercase; color: var(--fg1); opacity: 0; transition: opacity .2s;
}
@media (pointer: coarse) { .cursor { display: none; } }

/* ========== BUTTONS / TAGS ========== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-ui); font-size: 13px; letter-spacing: 0.04em;
  text-transform: lowercase;
  padding: 14px 26px; border-radius: 6px;
  will-change: transform;
  transition: background .3s, color .3s, border-color .3s;
}
.btn:focus-visible {
  outline: 2px solid var(--accent, #72ADFF); outline-offset: 4px;
}
.btn:active { transform: scale(0.97); }
.btn-secondary { background: var(--fg1); color: var(--void); }
.btn-secondary:hover { background: var(--blue-300); }
.btn-ghost { background: transparent; color: var(--fg1); border: 1px solid var(--border-strong); padding: 13px 25px; }
.btn-ghost:hover { border-color: var(--fg1); background: rgba(235,243,255,0.04); }

.tag {
  display: inline-block;
  font-family: var(--font-code); font-size: 11px; letter-spacing: 0.04em;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(160,200,255,0.06); color: var(--fg2);
  border: 1px solid var(--border);
}
.tag-sm { font-size: 10px; padding: 3px 8px; }

.hover-underline { position: relative; }
.hover-underline::after {
  content:''; position:absolute; left:0; right:0; bottom:-3px; height:1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s cubic-bezier(.7,0,.2,1);
}
.hover-underline:hover::after { transform: scaleX(1); transform-origin: left; }
.hover-underline:focus-visible { outline: 2px solid var(--accent, #72ADFF); outline-offset: 4px; border-radius: 2px; }

/* ========== SCENES (sections) ========== */
.scene { position: relative; padding: 9rem 0; }
.scene-kicker {
  display: inline-block;
  font-family: var(--font-code); font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--fg-accent); margin-bottom: 24px;
  font-weight: 400;
}
.scene-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem); line-height: 1.1; letter-spacing: -0.02em;
  margin: 0; color: var(--fg1); max-width: 16ch; font-weight: 300;
}
.scene-title em { font-style: italic; color: var(--blue-300); }
.scene-about .scene-title { font-size: clamp(2rem, 5.5vw, 4rem); }

/* ========== HERO ========== */
.scene-hero {
  min-height: 100vh; padding: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; position: relative;
}
.hero-bg-layer {
  position: absolute; inset: -10%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 70% 60% at 75% 30%, rgba(160,200,255,0.13), transparent 60%),
    radial-gradient(ellipse 55% 50% at 15% 75%, rgba(196,176,255,0.10), transparent 60%);
  will-change: transform;
}
.hero-grain {
  position: absolute; inset: 0; opacity: 0.35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
}
.hero-grid-lines {
  position: absolute; inset: 0; opacity: 0.55;
  background-image:
    linear-gradient(rgba(160,200,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160,200,255,0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.hero-orb {
  position: absolute; top: -8%; right: -10%;
  width: clamp(420px, 60vw, 780px); height: clamp(420px, 60vw, 780px); border-radius: 50%;
  background: var(--aura-radial);
  filter: blur(50px);
  z-index: 1; pointer-events: none; will-change: transform;
}
.hero-orb-2 {
  position: absolute; bottom: -20%; left: -15%;
  width: clamp(340px, 50vw, 620px); height: clamp(340px, 50vw, 620px); border-radius: 50%;
  background: radial-gradient(circle, rgba(196,176,255,0.18) 0%, rgba(160,200,255,0.06) 40%, transparent 70%);
  filter: blur(60px);
  z-index: 1; pointer-events: none; will-change: transform;
}

.hero-content {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 2fr 1fr; gap: 80px;
  align-items: end; padding: 0 0 100px;
  width: min(1400px, 96vw); margin: 0 auto;
}
.hero-text { will-change: transform, opacity; }
.hero-eyebrow {
  font-family: var(--font-ui); font-size: 13px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--fg1); margin-bottom: 40px;
  display: flex; gap: 1px; overflow: hidden;
  font-weight: 600;
}
.eyebrow-char, .eyebrow-sep { display: inline-block; }
.eyebrow-sep { width: 4px; }

.hero-heading {
  margin: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.5rem, 5.5vw, 6rem); line-height: 0.92; letter-spacing: -0.025em;
  color: var(--fg1);
}
.hero-heading .italic { font-style: italic; color: var(--blue-300); font-weight: 700; }
.word-mask { display: block; overflow: hidden; padding-right: 0.02em; }
.word { display: inline-block; }
.char { display: inline-block; will-change: transform, opacity; }

.hero-right { display: flex; flex-direction: column; gap: 0; }
.hero-photo-group {
  position: relative; display: inline-block; margin-bottom: 32px;
}
.hero-photo-wrap {
  width: 220px; height: 220px; aspect-ratio: 1/1;
  border-radius: 999px; overflow: hidden;
  border: 1px solid var(--border);
  will-change: transform;
}
.hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: contrast(1.05) saturate(0.92); }
.hero-photo-caption {
  position: absolute; left: calc(100% + 16px); top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: 13px; color: var(--fg3); white-space: nowrap;
  letter-spacing: 0.01em;
}
.hero-photo-caption::before {
  content: ''; display: inline-block; width: 28px; height: 1px;
  background: var(--fg3); vertical-align: middle; margin-right: 10px;
}
.hero-sub {
  font-size: 14px; line-height: 1.85; color: var(--fg2);
  margin: 0 0 16px; max-width: 38ch;
  font-family: var(--font-body);
  font-weight: 400; letter-spacing: 0.005em;
}
.hero-sub em { color: var(--blue-300); font-style: italic; font-family: var(--font-display); font-weight: 400; font-size: 1.15em; }
.hero-toolkit-label {
  font-family: var(--font-code); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--fg3); margin: 0 0 8px;
  font-weight: 400;
}

/* ========== EDITORIAL CORNER STAMPS ========== */
.hero-stamp {
  position: absolute; z-index: 5;
  font-family: var(--font-code); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg3); display: flex; align-items: center; gap: 10px;
  font-weight: 400; pointer-events: none;
}
.hero-stamp-tl { top: 100px; left: 32px; }
.hero-stamp-tr { top: 100px; right: 32px; }
.hero-stamp-bl { bottom: 32px; left: 32px; }
.hero-stamp-br { bottom: 32px; right: 32px; color: var(--fg-accent); }
.hero-stamp-sep { color: var(--fg3); opacity: 0.4; }
.hero-stamp-dot { color: var(--accent, #72ADFF); font-size: 10px; animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@media (max-width: 900px) {
  .hero-stamp-tl, .hero-stamp-tr { top: 80px; }
  .hero-stamp-tr, .hero-stamp-br { display: none; }
}
.hero-toolkit-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  perspective: 600px;
}

/* ── 3D flip card ── */
.tool-item {
  width: 46px;
  height: 46px;
  transform-style: preserve-3d;
  will-change: transform;
}
.tool-item:focus-visible { outline: 2px solid var(--accent, #72ADFF); outline-offset: 4px; border-radius: 5px; }
.tool-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.52s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.tool-item:hover .tool-card,
.tool-item:focus-within .tool-card {
  transform: rotateY(180deg);
}

/* Shared face styles */
.tool-face {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Front: dark, restrained, brand-tinted border */
.tool-face-front {
  background: rgba(255,255,255,0.03);
  /* border-color set inline via style prop */
}

/* Back: brand color floods in, name revealed */
.tool-face-back {
  transform: rotateY(180deg);
  flex-direction: column;
  gap: 3px;
  padding: 5px 3px;
  border: 1px solid rgba(255,255,255,0.10);
  /* background set inline */
}

.tool-abbr {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.tool-name-back {
  font-family: var(--font-code);
  font-size: 7px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
  opacity: 0.82;
  padding: 0 2px;
}

/* Fallback: no flip, just show back face on hover */
@media (prefers-reduced-motion: reduce) {
  .tool-card { transition: none; }
  .tool-item:hover .tool-card,
  .tool-item:focus-within .tool-card { transform: none; }
  .tool-face-back {
    opacity: 0;
    transition: opacity 0.2s;
  }
  .tool-item:hover .tool-face-back { opacity: 1; }
  .tool-item:hover .tool-face-front { opacity: 0; }
}
.hero-actions { display: flex; gap: 12px; margin-top: 48px; }

.hero-meta {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem; margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-code); font-size: 0.65rem;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.hero-meta-item { display: flex; flex-direction: column; gap: 4px; }
.hero-meta-k { color: var(--fg3); }
.hero-meta-v { color: var(--fg1); }

.hero-scroll-hint {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-code); font-size: 10px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--fg3);
  z-index: 3; writing-mode: vertical-rl; animation: scrollHint 2.4s ease-in-out infinite;
}
@keyframes scrollHint { 0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); } 50% { opacity: 0.9; transform: translateX(-50%) translateY(8px); } }

/* ========== MARQUEE ========== */
.scene-marquee {
  padding: 18px 0; overflow: hidden;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.marquee-track {
  display: flex; gap: 28px; white-space: nowrap;
  animation: marquee 38s linear infinite;
  font-family: var(--font-code);
  font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg2);
  will-change: transform;
}
.marquee-track > * { flex-shrink: 0; }
.marquee-dot { color: var(--fg-accent); opacity: 0.6; }
@keyframes marquee { to { transform: translateX(-33.333%); } }

/* ========== WORK — HORIZONTAL SCROLL TRACK ========== */
.work {
  position: relative;
  /* height set by JS to pin + scroll all panels */
}

.work-h-stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
  border-top: 1px solid var(--border);
}

.work-h-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem clamp(1.5rem, 5vw, 4rem);
  border-bottom: 0.5px solid rgba(160,200,255,0.10);
  flex-shrink: 0;
}
.work-h-bar-meta { display: flex; align-items: center; gap: 0.75rem; }
.work-h-idx {
  font-family: var(--font-code); font-size: 0.65rem;
  letter-spacing: 0.18em; color: var(--fg-accent); font-weight: 500;
}
.work-h-rule { display: block; width: 24px; height: 1px; background: var(--border); }
.work-h-label {
  font-family: var(--font-code); font-size: 0.65rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg3);
}
.work-h-counter {
  font-family: var(--font-code); font-size: 0.65rem;
  letter-spacing: 0.18em; color: var(--fg3);
  display: flex; align-items: center; gap: 0.35em;
}
.work-h-cur { color: var(--fg1); }

.work-track-clip { flex: 1; overflow: hidden; position: relative; }
.work-track { display: flex; flex-wrap: nowrap; height: 100%; will-change: transform; }

.work-panel {
  min-width: 100vw; height: 100%; flex-shrink: 0;
  position: relative;
  display: flex; flex-direction: column;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 5vw, 4rem);
  border-right: 0.5px solid rgba(160,200,255,0.08);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: background 0.5s var(--ease-out-expo);
  touch-action: manipulation;
  cursor: pointer;
}
.work-panel:hover { background: rgba(160,200,255,0.015); }

.work-panel-cover {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.work-panel-cover img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.07; filter: saturate(0.4);
  transition: opacity 0.7s var(--ease-out-expo);
}
.work-panel:hover .work-panel-cover img { opacity: 0.13; }

.work-panel-aura {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity 0.7s var(--ease-out-expo);
}
.work-panel:hover .work-panel-aura { opacity: 1; }
.work-panel:nth-child(1) .work-panel-aura { background: radial-gradient(ellipse 65% 70% at 72% 38%, rgba(160,200,255,0.10) 0%, transparent 70%); }
.work-panel:nth-child(2) .work-panel-aura { background: radial-gradient(ellipse 65% 70% at 28% 62%, rgba(196,176,255,0.08) 0%, transparent 70%); }
.work-panel:nth-child(3) .work-panel-aura { background: radial-gradient(ellipse 65% 70% at 68% 44%, rgba(114,173,255,0.10) 0%, transparent 70%); }
.work-panel:nth-child(4) .work-panel-aura { background: radial-gradient(ellipse 65% 70% at 38% 56%, rgba(160,200,255,0.08) 0%, transparent 70%); }

.work-panel-inner {
  position: relative; z-index: 2;
  height: 100%; display: flex; flex-direction: column;
  justify-content: space-between;
  max-width: 1120px; width: 100%; margin: 0 auto;
}
.work-panel-top {
  display: flex; align-items: flex-start; justify-content: space-between;
}
.work-panel-ghost {
  font-family: var(--font-code);
  font-size: clamp(6rem, 14vw, 16rem);
  font-weight: 400; color: var(--fg1); opacity: 0.03;
  line-height: 1; user-select: none; letter-spacing: -0.02em;
}
.work-panel-tags {
  display: flex; flex-direction: column; gap: 0.35rem;
  align-items: flex-end; padding-top: 0.2rem;
}
.work-panel-body { padding-bottom: 2rem; }
.work-panel-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 7rem);
  line-height: 0.95; letter-spacing: -0.01em;
  color: var(--fg1); margin: 0 0 1.1rem;
  transition: color 0.35s var(--ease-out-expo);
}
.work-panel:hover .work-panel-title { color: var(--blue-300); }
.work-panel-sub {
  font-family: var(--font-body); font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--fg2); line-height: 1.7; max-width: 52ch; margin: 0;
}
.work-panel-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 0.5px solid rgba(160,200,255,0.10);
}
.work-panel-year {
  font-family: var(--font-code); font-size: 0.65rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg3);
}
.work-panel-link {
  font-size: 1.4rem; color: var(--fg3); line-height: 1;
  transition: color 0.3s, transform 0.4s var(--ease-out-expo);
}
.work-panel:hover .work-panel-link { color: var(--blue-400); transform: translate(5px, -5px); }

.work-h-progress {
  height: 1.5px; background: rgba(160,200,255,0.08);
  flex-shrink: 0; position: relative;
}
.work-h-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-300));
  width: 0%; transition: width 0.06s linear;
}

@media (max-width: 768px) {
  .work { height: auto !important; }
  .work-h-stage { position: relative; height: auto; overflow: visible; }
  .work-track-clip { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .work-track-clip::-webkit-scrollbar { display: none; }
  .work-track { height: 80vmax; min-height: 480px; }
  .work-panel { min-width: 88vw; height: 100%; scroll-snap-align: start; }
  .work-panel-ghost { font-size: clamp(3.5rem, 10vw, 6rem); }
  .work-panel-title { font-size: clamp(2rem, 7vw, 3.5rem); }
}

/* ========== SKILLS BENTO ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.skill-card {
  background: transparent; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 36px 32px; display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; transform: translateY(40px);
  transition: background .4s, transform .5s;
  position: relative; overflow: hidden;
}
.skill-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--aura-radial); opacity: 0; transition: opacity .5s;
  pointer-events: none;
}
.skill-card:hover::before { opacity: 0.5; }
.skill-card:hover { background: rgba(160,200,255,0.018); }
.skill-lg { grid-column: span 2; grid-row: span 2; }
.skill-md { grid-column: span 2; }
.skill-sm { grid-column: span 1; }
.skill-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.skill-meta { font-family: var(--font-code); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg3); font-weight: 400; }
.skill-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--blue-400); box-shadow: 0 0 12px var(--blue-400); }
.skill-title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem); letter-spacing: -0.02em;
  margin: 0 0 14px; color: var(--fg1); line-height: 1.1;
}
.skill-desc { font-size: 13px; line-height: 1.85; color: var(--fg2); margin: 0; font-family: var(--font-body); letter-spacing: 0.005em; }

/* ========== ABOUT ========== */
.about-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 100px;
  align-items: start;
}
.about-left { position: sticky; top: 120px; }

.about-headshot-wrap {
  width: 160px; height: 160px;
  border-radius: 50%; overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 32px;
  flex-shrink: 0;
}
.about-headshot {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  filter: contrast(1.04) saturate(0.88);
}

.about-para {
  font-size: 16px; line-height: 1.85; color: var(--fg1);
  margin: 0 0 24px; max-width: 52ch;
  font-family: var(--font-body); letter-spacing: 0.005em;
}
.about-para:nth-child(n+2) { color: var(--fg2); font-size: 15px; }
.about-para em { font-family: var(--font-display); font-style: italic; color: var(--blue-300); font-size: 1.15em; font-weight: 400; }
.about-para strong { color: var(--fg1); font-weight: 600; font-family: var(--font-ui); }

.about-facts {
  margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--border); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border);
}
.fact { background: var(--surface); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.fact-k { font-family: var(--font-code); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg3); }
.fact-v { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--fg1); letter-spacing: -0.01em; font-weight: 400; }

/* ========== CONTACT ========== */
.scene-contact { padding-top: 160px; padding-bottom: 0; text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; gap: 36px; padding-bottom: 140px; }
.contact-head {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(4rem, 12vw, 13rem); line-height: 0.9; letter-spacing: -0.02em;
  margin: 0; color: var(--fg1);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.contact-accent { display: inline-block; will-change: transform; }
.contact-italic { font-style: italic; color: var(--blue-300); }
.contact-email {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(28px, 4vw, 52px); letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--fg1); will-change: transform;
  padding-bottom: 6px; border-bottom: 1px solid var(--border-strong);
  transition: color .3s, border-color .3s;
}
.contact-email:hover { color: var(--blue-300); border-color: var(--blue-300); }
.contact-arrow { font-size: 0.6em; }
.contact-copy {
  font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.1em; text-transform: lowercase;
  color: var(--fg2); border-bottom: 1px dashed var(--border);
  padding: 10px 8px;
}
.contact-copy:hover { color: var(--fg1); }
.contact-copy:focus-visible { outline: 2px solid var(--accent, #72ADFF); outline-offset: 4px; border-radius: 2px; }
.contact-email:focus-visible { outline: 2px solid var(--accent, #72ADFF); outline-offset: 6px; border-radius: 2px; }
.contact-socials {
  margin-top: 16px;
  font-family: var(--font-ui); font-size: 13px; letter-spacing: 0.04em;
  color: var(--fg2); display: flex; gap: 18px; align-items: center;
}
.contact-sep { color: var(--fg3); }

.site-footer {
  border-top: 1px solid var(--border); padding: 28px 0;
  background: var(--surface);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-code); font-size: 11px; letter-spacing: 0.1em;
  color: var(--fg3);
}
.footer-mid { color: var(--fg2); }

/* ========== TWEAKS PANEL ========== */
.tweaks-panel {
  position: fixed; bottom: 20px; right: 20px; z-index: 100;
  background: rgba(10,15,42,0.88); backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong); border-radius: 14px;
  padding: 18px; width: 280px;
  color: var(--fg1); font-family: var(--font-ui);
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.6);
  display: none; flex-direction: column; gap: 14px;
}
.tweaks-panel.is-open { display: flex; }
.tweaks-head { display: flex; justify-content: space-between; align-items: center; }
.tweaks-head h4 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 18px; letter-spacing: -0.01em; }
.tweaks-head small { font-family: var(--font-code); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg3); }
.tweak-row { display: flex; flex-direction: column; gap: 6px; }
.tweak-row label { font-family: var(--font-code); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); }
.tweak-row select, .tweak-row input[type="text"] {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; color: var(--fg1); font-family: var(--font-body); font-size: 13px;
}
.tweak-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tweak-chip {
  padding: 6px 10px; border-radius: 999px; font-family: var(--font-ui); font-size: 11px;
  border: 1px solid var(--border); color: var(--fg2); background: transparent;
}
.tweak-chip.on { background: var(--fg1); color: var(--void); border-color: var(--fg1); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 48px; padding: 0 0 80px; align-items: start; }
  .hero-orb { width: 420px; height: 420px; right: -20%; }
  .nav-links { gap: 20px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-lg, .skill-md { grid-column: span 2; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-left { position: static; }
  .scene { padding: 6rem 0; }
  .hero-heading { font-size: clamp(2rem, 9vw, 6rem); }
  .hero-photo-caption { display: none; }

  /* Spreads collapse to single column */
  .work-opener { padding: 7rem 0 5rem; }
  .work-opener-grid { grid-template-columns: 1fr; gap: 32px; }
  .work-opener-margin { position: static; flex-direction: row; gap: 14px; padding-top: 0; }
  .work-opener-foot { grid-template-columns: 1fr; gap: 28px; }
  .work-filters { justify-self: start; }
  .spread, .spread:nth-child(even) {
    grid-template-columns: 1fr; gap: 32px; padding: 5rem 0;
  }
  .spread:nth-child(even) .spread-margin,
  .spread:nth-child(even) .spread-narrative,
  .spread:nth-child(even) .spread-plate { order: initial; }
  .spread:nth-child(even) .spread-margin > * { text-align: left; align-self: start; }
  .spread-margin { flex-direction: row; align-items: baseline; gap: 24px; flex-wrap: wrap; padding-top: 0; }
  .spread-num { font-size: 4rem; }
  .spread-rule { display: none; }
  .spread-plate { position: static; aspect-ratio: 4/3; }
  .spread-plate-glyph { font-size: 200px; }
  .spread-beat { grid-template-columns: 1fr; gap: 8px; }

  .marquee-track { animation-duration: 30s; }
  .cursor { display: none !important; }
}

@media (min-width: 769px) and (max-width: 900px) {
  .work-panel-title { font-size: clamp(2rem, 7vw, 3rem); }
  .work-panel-sub { font-size: 0.95rem; }
  .nav-links { gap: 20px; }
  .scene { padding: 5rem 0; }
}

/* ========== SKIP LINK ========== */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; z-index: 10000;
  width: auto; height: auto; overflow: visible;
  background: var(--bg); color: var(--fg1);
  padding: 12px 20px; border-radius: 6px;
  font-family: var(--font-ui); font-size: 14px; letter-spacing: 0.03em;
  border: 1px solid var(--border-strong);
  outline: 2px solid var(--accent); outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero-orb, .marquee-track { animation: none !important; }
}

/* ── TOOTH GEMS — story card ── */
/* ── Gem section — amplified editorial spread ── */
.gem-section {
  position: relative;
  padding: clamp(100px, 13vh, 160px) 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

/* Amethyst glow bleeding from card position into section void */
.gem-bg-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 90% at 72% 50%, oklch(0.48 0.18 295 / 0.20) 0%, transparent 65%),
    radial-gradient(ellipse 40% 55% at 76% 28%, oklch(0.56 0.22 285 / 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 30% 70%, oklch(0.36 0.10 305 / 0.07) 0%, transparent 70%);
}

/* Scattered gem-light particles */
.gem-particles {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.gem-p {
  position: absolute;
  border-radius: 50%;
  background: oklch(0.82 0.16 285);
  animation: gem-p-twinkle 4s ease-in-out infinite;
}
.gem-p:nth-child(1) { width:4px;height:4px; top:17%;  left:9%;   animation-duration:3.8s; animation-delay:0.0s; opacity:0.22; }
.gem-p:nth-child(2) { width:2px;height:2px; top:31%;  left:28%;  animation-duration:5.2s; animation-delay:0.7s; opacity:0.32; }
.gem-p:nth-child(3) { width:3px;height:3px; top:64%;  left:16%;  animation-duration:4.5s; animation-delay:1.2s; opacity:0.18; }
.gem-p:nth-child(4) { width:2px;height:2px; top:78%;  left:40%;  animation-duration:3.2s; animation-delay:0.4s; opacity:0.28; }
.gem-p:nth-child(5) { width:6px;height:6px; top:20%;  right:24%; animation-duration:6.1s; animation-delay:1.8s; opacity:0.10; filter:blur(1.5px); }
.gem-p:nth-child(6) { width:2px;height:2px; top:54%;  right:17%; animation-duration:4.8s; animation-delay:0.9s; opacity:0.25; }
.gem-p:nth-child(7) { width:3px;height:3px; top:83%;  right:32%; animation-duration:5.5s; animation-delay:2.1s; opacity:0.16; }
.gem-p:nth-child(8) { width:2px;height:2px; top:42%;  right:41%; animation-duration:4.0s; animation-delay:0.3s; opacity:0.30; }
@keyframes gem-p-twinkle {
  0%,100% { transform: scale(1);   filter: blur(0); }
  50%     { transform: scale(1.8); filter: blur(0.5px); opacity: 0.6; }
}
@media (prefers-reduced-motion: reduce) {
  .gem-p { animation: none; }
}

/* Two-column editorial layout */
.gem-layout {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(48px, 7vw, 120px);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
}

/* Left editorial column */
.gem-left {
  position: relative;
}
.gem-left-ghost {
  position: absolute;
  top: -0.25em; left: -0.12em;
  font-family: var(--font-display);
  font-size: clamp(130px, 20vw, 220px);
  font-weight: 700; font-style: italic;
  line-height: 1; user-select: none; pointer-events: none;
  color: oklch(0.55 0.16 285 / 0.055);
  letter-spacing: -0.04em;
}
.gem-left-top {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.gem-left-idx {
  font-family: var(--font-code); font-size: 11px; letter-spacing: 0.14em;
  color: oklch(0.72 0.16 285 / 0.7);
}
.gem-left-rule {
  width: 40px; height: 1px;
  background: oklch(0.55 0.16 285 / 0.35);
}
.gem-left-cat {
  font-family: var(--font-code); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: oklch(0.62 0.12 285 / 0.65);
}
.gem-left-desc {
  font-family: var(--font-ui); font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.65; color: oklch(0.78 0.04 285 / 0.72);
  max-width: 36ch; margin-bottom: 32px;
}
.gem-left-metas { display: flex; flex-direction: column; gap: 10px; }
.gem-left-meta  { display: flex; align-items: baseline; gap: 12px; }
.gem-lmk {
  font-family: var(--font-code); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: oklch(0.55 0.10 285 / 0.6);
  min-width: 62px;
}
.gem-lmv {
  font-family: var(--font-code); font-size: 12px;
  color: oklch(0.82 0.16 285 / 0.88);
}

/* Mobile: stack vertically */
@media (max-width: 700px) {
  .gem-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 48px;
  }
  .gem-left { text-align: left; max-width: 380px; }
  .gem-left-ghost { display: none; }
}

.gem-photo {
  position: absolute; inset: 0; z-index: 0;
}
.gem-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: saturate(0.6) brightness(0.55);
}
.gem-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    160deg,
    oklch(0.15 0.28 288 / 0.75) 0%,
    oklch(0.22 0.26 305 / 0.60) 50%,
    oklch(0.12 0.30 275 / 0.80) 100%
  );
}

.gem-story-card {
  position: relative;
  display: flex; flex-direction: column;
  width: min(310px, 88vw);
  min-height: 420px; /* fallback if aspect-ratio unsupported */
  aspect-ratio: 9/16;
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none; color: inherit;
  cursor: pointer;
  background: #0d0a18; /* fallback for non-oklch browsers */
  background:
    radial-gradient(ellipse 70% 45% at 25% 18%, oklch(0.55 0.22 285 / 0.50) 0%, transparent 65%),
    radial-gradient(ellipse 80% 55% at 75% 80%, oklch(0.42 0.18 305 / 0.38) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 52% 50%, oklch(0.18 0.06 285 / 0.70) 0%, transparent 70%),
    oklch(0.08 0.018 285);
  box-shadow: 0 32px 80px rgba(0,0,0,0.55), 0 0 0 1px oklch(0.30 0.08 285 / 0.50);
  transition: transform .45s cubic-bezier(0.25,1,0.5,1), box-shadow .45s;
}
.gem-story-card:hover {
  transform: scale(1.025) translateY(-5px);
  box-shadow: 0 52px 110px rgba(0,0,0,0.68), 0 0 0 1px oklch(0.45 0.16 285 / 0.40),
              0 0 40px -8px oklch(0.55 0.22 285 / 0.30);
}
/* glint sweep on hover — gem catching light */
.gem-story-card::after {
  content: '';
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(
    112deg,
    transparent 28%,
    oklch(0.92 0.10 285 / 0.09) 48%,
    oklch(0.96 0.08 290 / 0.06) 53%,
    transparent 72%
  );
  background-size: 220% 100%;
  background-position: -100% 0;
  transition: background-position 0.75s cubic-bezier(0.4,0,0.2,1);
}
.gem-story-card:hover::after { background-position: 210% 0; }

/* Progress bars */
.gem-bars {
  position: absolute; top: 14px; left: 14px; right: 14px;
  display: flex; gap: 4px; z-index: 10;
}
.gem-bar {
  height: 2px; flex: 1;
  background: oklch(0.92 0.008 285 / 0.20);
  border-radius: 2px; overflow: hidden;
}
.gem-bar-fill {
  height: 100%; width: 0%;
  background: oklch(0.92 0.012 285 / 0.85);
  border-radius: 2px;
}
.gem-bar--done .gem-bar-fill { width: 100%; }
.gem-bar--empty .gem-bar-fill { width: 0%; }
@keyframes gem-bar-play {
  0%   { width: 0%; }
  100% { width: 100%; }
}
.gem-bar-fill.is-playing {
  animation: gem-bar-play 3.2s cubic-bezier(0.35, 0, 0.65, 1) forwards;
}
@media (prefers-reduced-motion: reduce) {
  .gem-bar-fill.is-playing { animation: none; width: 100%; }
}

/* Username row */
.gem-user {
  position: absolute; top: 30px; left: 16px; right: 16px;
  display: flex; align-items: center; gap: 8px; z-index: 10;
}
.gem-avatar {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: oklch(0.52 0.22 285);
  border: 1.5px solid oklch(0.72 0.16 285 / 0.55);
}
.gem-username {
  font-family: var(--font-code); font-size: 11px; letter-spacing: 0.05em;
  color: oklch(0.88 0.06 285 / 0.82);
}

/* Main content */
.gem-content {
  position: absolute; bottom: 72px; left: 20px; right: 20px; z-index: 10;
}
.gem-eyebrow {
  font-family: var(--font-code); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: oklch(0.72 0.16 285 / 0.65);
  margin-bottom: 8px;
}
.gem-title {
  font-family: var(--font-display); font-weight: 400; font-style: italic;
  font-size: clamp(40px, 14vw, 52px); line-height: 0.90; letter-spacing: -0.04em;
  color: oklch(0.97 0.015 290);
}

/* CTA */
.gem-cta {
  position: absolute; bottom: 20px; left: 20px; right: 20px; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-code); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: oklch(0.78 0.18 285);
  transition: gap .35s, color .35s;
}
.gem-story-card:hover .gem-cta { gap: 16px; color: oklch(0.88 0.20 285); }
.gem-cta-line {
  flex: 1; height: 1px;
  background: oklch(0.78 0.18 285 / 0.35);
  transition: background .35s;
}
.gem-story-card:hover .gem-cta-line { background: oklch(0.88 0.20 285 / 0.55); }
.gem-cta-arrow { transition: transform .35s cubic-bezier(0.25,1,0.5,1); }
.gem-story-card:hover .gem-cta-arrow { transform: rotate(-45deg) translate(2px,-2px); }

/* ── Portfolio main — constellation sidebar nav ───────────── */
.pf-const {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 20px;
  z-index: 50;
  width: 84px;
  height: 400px;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.pf-const.is-visible { opacity: 1; pointer-events: auto; }

.pf-const-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Segments between nodes */
.pf-seg {
  stroke: rgba(160,200,255,0.09);
  stroke-width: 1;
  stroke-dasharray: 2.5 7;
  fill: none;
  transition: stroke 0.5s ease, stroke-dasharray 0.5s ease, stroke-width 0.5s ease;
}
.pf-seg.is-lit {
  stroke: rgba(114,173,255,0.38);
  stroke-dasharray: none;
  stroke-width: 1;
}

/* Breathing aura halo — only on active node */
.pf-halo {
  fill: rgba(114,173,255,0);
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
}
.pf-node.is-active .pf-halo {
  fill: rgba(114,173,255,0.13);
  animation: pf-breathe 3.2s ease-in-out infinite;
}

/* Outer ring */
.pf-ring {
  fill: none;
  stroke: rgba(114,173,255,0);
  stroke-width: 1;
  transition: stroke 0.4s ease;
}
.pf-node:hover .pf-ring { stroke: rgba(160,200,255,0.22); }
.pf-node.is-active .pf-ring { stroke: rgba(114,173,255,0.48); }

/* The star dot */
.pf-dot {
  fill: rgba(160,200,255,0.28);
  transition: fill 0.4s ease, filter 0.4s ease;
}
.pf-node:not(.is-active) .pf-dot { animation: pf-twinkle 5s ease-in-out infinite; }
.pf-node:hover .pf-dot { fill: rgba(235,243,255,0.75); animation: none; }
.pf-node.is-active .pf-dot {
  fill: #72ADFF;
  animation: none;
  filter: drop-shadow(0 0 4px #72ADFF) drop-shadow(0 0 10px rgba(114,173,255,0.55));
}

/* Inner facet highlight — crystal shimmer */
.pf-dot-hi {
  fill: rgba(255, 255, 255, 0.28);
  pointer-events: none;
  transition: fill 0.4s ease;
}
.pf-node.is-active .pf-dot-hi { fill: rgba(255, 255, 255, 0.50); }
.pf-node:hover .pf-dot-hi { fill: rgba(255, 255, 255, 0.40); }

/* Crystal kite facets — triangular faces between ring and diamond */
.pf-fk {
  fill: oklch(0.70 0.06 225 / 0.10);
  transition: fill 0.4s ease;
}
.pf-node:hover .pf-fk,
.pf-cluster:hover .pf-fk { fill: oklch(0.80 0.05 225 / 0.20); }
.pf-node.is-active .pf-fk { fill: oklch(0.68 0.12 225 / 0.28); }

/* Crystal corner triangle facets */
.pf-ft {
  fill: oklch(0.85 0.03 220 / 0.06);
  transition: fill 0.4s ease;
}
.pf-node:hover .pf-ft,
.pf-cluster:hover .pf-ft { fill: oklch(0.85 0.03 220 / 0.14); }
.pf-node.is-active .pf-ft { fill: oklch(0.82 0.07 220 / 0.18); }

.pf-cluster:hover .pf-ring { stroke: rgba(160,200,255,0.25); }

/* Transparent hit target */
.pf-hit { fill: transparent; cursor: pointer; }
.pf-node { cursor: pointer; }
.pf-node:focus-visible { outline: none; }
.pf-node:focus-visible .pf-ring { stroke: rgba(114,173,255,0.8); }

/* Labels — slide in from right, appear left of the SVG */
.pf-label {
  position: absolute;
  right: 90px;
  font-family: var(--font-code);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg3);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease, letter-spacing 0.25s ease;
  line-height: 1;
  pointer-events: auto;
  cursor: pointer;
}
.pf-label.is-visible { opacity: 1; transform: translateX(0); }
.pf-label.is-active  { color: #72ADFF; letter-spacing: 0.15em; }

/* Editorial constellation name at base */
.pf-name {
  position: absolute;
  bottom: -26px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(160,200,255,0.15);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}

@keyframes pf-breathe {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.7); opacity: 0.15; }
}
@keyframes pf-twinkle {
  0%, 100% { opacity: 0.65; }
  40%       { opacity: 0.18; }
  72%       { opacity: 0.9; }
}

/* Project sub-clusters (work section only) */
.pf-work-clusters {
  opacity: 0;
  transform-origin: 18px 96px;
  transition: opacity 0.5s cubic-bezier(0.16,1,0.3,1);
}
.pf-const.section-work .pf-work-clusters { opacity: 1; }

.pf-cluster-spoke {
  stroke: rgba(160,200,255,0.09);
  stroke-width: 0.6;
  fill: none;
  stroke-dasharray: 1 4;
}

/* Each cluster fades in with staggered delay when work is active */
.pf-cluster { opacity: 0; transition: opacity 0.4s ease; cursor: pointer; }
.pf-const.section-work .pf-cluster:nth-child(5) { opacity: 1; transition-delay: 0.05s; }
.pf-const.section-work .pf-cluster:nth-child(6) { opacity: 1; transition-delay: 0.12s; }
.pf-const.section-work .pf-cluster:nth-child(7) { opacity: 1; transition-delay: 0.19s; }
.pf-const.section-work .pf-cluster:nth-child(8) { opacity: 1; transition-delay: 0.26s; }

.pf-cluster-hit  { fill: transparent; cursor: pointer; }
.pf-cluster-main { transition: fill 0.3s ease, filter 0.3s ease; }
.pf-cluster:hover .pf-cluster-main {
  fill: rgba(220,236,255,0.72);
  filter: drop-shadow(0 0 3px rgba(160,200,255,0.5));
  animation: none;
}
.pf-cluster:focus-visible { outline: none; }
.pf-cluster:focus-visible .pf-cluster-main { fill: rgba(114,173,255,0.85); }

@media (max-width: 900px) { .pf-const { display: none; } }
