/* ===== Custom Properties ===== */
:root {
  --bg: #08061a;
  --text: rgba(255,255,255,0.93);
  --muted: rgba(255,255,255,0.65);
  --muted2: rgba(255,255,255,0.45);
  --cyan: #7CF7FF;
  --purple: #B48CFF;
  --pink: #FF7AE5;
  --green: #7CFF9A;
  --r: 24px;
  --glass: blur(26px) saturate(160%) brightness(1.04);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@property --border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* Separate angle property for the cursor rim so it runs at its own speed */
@property --cursor-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes cursor-rim { to { --cursor-angle: 360deg; } }

/* ── Custom lens cursor ──────────────────────────────────────────────────
   A small precise lens that blurs and slightly distorts the background
   behind it — more like a glass disc than a sphere. The backdrop-filter
   IS the effect; gradients are kept to a bare minimum.
   ──────────────────────────────────────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  body, a, button, [role="button"], label, summary,
  .ctrl-btn, .snav-btn, .theme-swatch, .glass-btn,
  .skill-node, .tl-entry, select, textarea, input { cursor: none !important; }
}

/* Restore normal cursor while a modal dialog is open */
html.modal-open,
html.modal-open * {
  cursor: auto !important;
}
html.modal-open #cursor-orb {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#cursor-orb {
  /* Override popover UA stylesheet (it sets inset:0, margin:auto, border,
     padding, background — all must be explicitly reset here)            */
  position: fixed;
  top: 0; left: 0; right: auto; bottom: auto;
  margin: 0; padding: 0; border: none; overflow: visible;
  /* Slightly taller than wide + asymmetric radius = subtle downward lens point */
  width: 22px; height: 24px;
  border-radius: 50% 50% 44% 50% / 50% 50% 57% 50%;
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, box-shadow 0.25s ease;
  will-change: transform;

  /* No backdrop-filter — it blocks the GPU compositor thread and causes
     unavoidable lag. Pure gradient glass instead; the element is fully
     promoted to its own compositor layer via will-change: transform.    */
  background:
    /* primary specular — upper-left glint */
    radial-gradient(ellipse 46% 36% at 32% 26%, rgba(255,255,255,0.55) 0%, transparent 100%),
    /* micro specular pinpoint */
    radial-gradient(ellipse 16% 12% at 36% 29%, rgba(255,255,255,0.90) 0%, transparent 100%),
    /* glass volume — blue-white interior */
    radial-gradient(ellipse 82% 76% at 50% 46%, rgba(160,215,255,0.18) 0%, rgba(100,155,240,0.08) 65%, transparent 100%),
    /* fresnel lower glow */
    radial-gradient(ellipse 64% 40% at 52% 92%, rgba(180,140,255,0.26) 0%, transparent 68%),
    /* very faint base fill so the shape reads in all contexts */
    radial-gradient(ellipse 100% 100% at 50% 50%, rgba(130,180,255,0.06) 0%, transparent 100%);

  /* Blend mode makes the orb slightly lighten whatever is beneath it,
     approximating the lens-brightening effect that blur used to give  */
  mix-blend-mode: screen;

  box-shadow:
    inset 0 0 0 0.5px rgba(255,255,255,0.38),
    inset 0 1px 5px rgba(255,255,255,0.12),
    0 3px 14px rgba(0,0,0,0.30),
    0 0  18px rgba(124,247,255,0.14);
}
#cursor-orb.is-visible { opacity: 1; }

/* Hairline iridescent rim — thinner padding, lower alpha than before */
#cursor-orb::before {
  content: '';
  position: absolute;
  inset: -0.5px;
  border-radius: inherit;
  padding: 0.6px;
  background: conic-gradient(
    from var(--cursor-angle),
    rgba(124,247,255,0.75),
    rgba(180,140,255,0.68),
    rgba(255,122,229,0.60),
    rgba(124,255,154,0.55),
    rgba(124,247,255,0.75)
  );
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: destination-out;
  pointer-events: none;
  animation: cursor-rim 3s linear infinite;
}

/* Hover: expand lens area, slightly more glow — scale via JS lerp */
body.cursor-hover #cursor-orb {
  box-shadow:
    inset 0 0 0 0.5px rgba(255,255,255,0.20),
    0 3px 14px rgba(0,0,0,0.28),
    0 0  18px rgba(124,247,255,0.14);
}

/* Touch / no-hover: hide and restore system cursor */
@media (hover: none), (pointer: coarse) {
  #cursor-orb { display: none; }
  body, a, button, [role="button"], input, textarea, select,
  label, summary { cursor: auto !important; }
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Canvas & Background ===== */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#nebula-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(380px 280px at 14% 10%, rgba(130,95,220,0.05), transparent 44%),
    radial-gradient(320px 260px at 84% 8%, rgba(70,120,230,0.04), transparent 42%),
    radial-gradient(280px 220px at 72% 78%, rgba(140,80,220,0.04), transparent 40%),
    radial-gradient(260px 200px at 22% 82%, rgba(65,105,220,0.03), transparent 38%),
    radial-gradient(200px 180px at 50% 45%, rgba(160,110,220,0.03), transparent 36%),
    radial-gradient(1400px 900px at 18% 20%, rgba(60,35,145,0.06), transparent 60%),
    radial-gradient(1200px 850px at 82% 30%, rgba(32,55,165,0.05), transparent 56%),
    radial-gradient(1000px 900px at 50% 78%, rgba(85,40,160,0.04), transparent 58%),
    radial-gradient(1600px 1000px at 50% 50%, rgba(44,22,110,0.04), transparent 65%),
    linear-gradient(155deg, #0b0720 0%, #0d0f30 30%, #090922 60%, #0c0824 100%);
}

#nebula-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(6,4,18,0.40) 100%);
  pointer-events: none;
}

/* ===== Content Layout ===== */
#content {
  position: relative;
  z-index: 1;
}

.chapter {
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  position: relative;
}

.chapter-inner {
  width: 100%;
  max-width: 960px;
}
.chapter-inner.chapter-wide {
  max-width: min(96vw, 1440px);
  padding-left: clamp(16px, 4vw, 56px);
  padding-right: clamp(16px, 4vw, 56px);
}
.chapter-inner.chapter-discover {
  width: 100%;
  max-width: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
#ch-discover {
  padding-top: clamp(8px, 1.5vh, 16px);
  padding-bottom: clamp(16px, 2.5vh, 32px);
  padding-left: 0;
  padding-right: 0;
  margin-top: clamp(-64px, -9vh, -36px);
  min-height: auto;
  overflow: visible;
}
.discover-header {
  text-align: center;
  margin: 0;
  padding: 0 clamp(12px, 3vw, 24px);
  position: relative;
  z-index: 4;
  pointer-events: none;
  transform: translateY(0);
  margin-bottom: clamp(-28px, -4vh, -16px);
}
.discover-hero-title {
  margin: 0;
  font-size: clamp(34px, 6.8vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  background: linear-gradient(92deg, #7cf7ff 0%, #b48cff 48%, #ff7ae5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 28px rgba(124, 247, 255, 0.18));
}
.discover-viewer-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 0;
  margin-bottom: 0;
  overflow: visible;
}

#ch-projects {
  padding-top: clamp(20px, 3vh, 32px);
}

/* Hero is slightly shorter than the full viewport — the tops of the two summary
   panels below peek up from the bottom edge, hinting there's content to scroll to. */
#ch-hero { min-height: calc(100vh - 120px); min-height: calc(100dvh - 120px); padding-top: 0; padding-bottom: 0; }

/* ===== Glass Panels =====
 *
 * Utility classes:
 *   .glass-panel        — outer shell; hosts iridescent ::before ring + light-sweep ::after.
 *                         Never set overflow-y on this element — use .panel-body instead.
 *   .panel-body         — scrollable inner content container; border stays fixed on outer shell.
 *   .search-bar-wrap    — centers a search bar horizontally inside its panel.
 *   .summary-row        — flex row for side-by-side summary panels (stacks on mobile).
 *   .edge-iris          — semantic alias: same iridescent ring, used for non-.glass-panel
 *                         elements like modals.
 * ===== */
.glass-panel {
  background:
    radial-gradient(
      600px 400px at calc(20% + 50% * var(--scroll-progress, 0)) calc(10% + 30% * var(--scroll-progress, 0)),
      rgba(140,180,255,0.04),
      transparent 55%
    ),
    rgba(16,18,42,0.34);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r);
  padding: 28px;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(124,247,255,0.05) inset,
    0 20px 60px rgba(0,0,0,0.4),
    0 0 60px rgba(124,247,255,0.035),
    0 0 120px rgba(124,247,255,0.015),
    0 0 0 0.5px rgba(180,140,255,0.08) inset;
  overflow: hidden;
}

/* Iridescent border ring — sits at inset: 0 so it is never clipped by overflow:hidden */
.glass-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from var(--border-angle),
    rgba(124,247,255,0.65),
    rgba(180,140,255,0.60),
    rgba(255,122,229,0.55),
    rgba(124,255,154,0.55),
    rgba(124,247,255,0.65)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.8;
  animation: border-rotate 25s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes border-rotate { to { --border-angle: 360deg; } }

/* Subtle light sweep */
.glass-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255,255,255,0.012) 46%,
    rgba(124,247,255,0.022) 50%,
    rgba(255,255,255,0.012) 54%,
    transparent 65%
  );
  background-size: 250% 100%;
  animation: light-sweep 14s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes light-sweep {
  0%   { background-position: 250% 0; }
  100% { background-position: -250% 0; }
}

/* ===== Panel Body (scrollable inner container — border ring stays on outer shell) ===== */
.panel-body {
  overflow-y: auto;
  max-height: calc(100vh - 260px);
  scrollbar-width: thin;
  scrollbar-color: rgba(124,247,255,0.3) transparent;
  position: relative;
  z-index: 0;
}

.panel-body::-webkit-scrollbar { width: 6px; }
.panel-body::-webkit-scrollbar-thumb {
  background: rgba(124,247,255,0.3);
  border-radius: 999px;
}

/* ===== Search Bar Wrap (centers search bars inside panels) ===== */
.search-bar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.search-bar-wrap .search-bar {
  max-width: 380px;
  width: 100%;
  margin-bottom: 0;
}

/* ===== Hero ===== */
.hero-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-bottom: 60px;
  position: relative;
  /* New stacking context keeps z-index:-1 ::before above the canvas */
  isolation: isolate;
}

/*
 * Soft backdrop blur behind hero text — separates name/headline/summary
 * from the particle canvas without obscuring them. Uses a radial-gradient
 * mask to feather all edges so there is no hard box outline.
 * z-index: -1 + isolation: isolate keeps it above canvas but under text.
 */
.hero-inner::before {
  content: '';
  position: absolute;
  /* Cover the text stack, centred slightly above middle (scroll hint lives at bottom) */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(780px, 95vw);
  height: min(520px, 72vh);
  backdrop-filter: blur(20px) brightness(0.82);
  -webkit-backdrop-filter: blur(20px) brightness(0.82);
  /* Very faint dark tint to add just a whisper of contrast */
  background: radial-gradient(
    ellipse 60% 55% at 50% 48%,
    rgba(8, 6, 26, 0.18) 0%,
    rgba(8, 6, 26, 0.06) 55%,
    transparent 100%
  );
  /* Feather all edges so it dissolves invisibly into the background */
  mask-image: radial-gradient(
    ellipse 68% 62% at 50% 48%,
    black          20%,
    rgba(0,0,0,.9) 38%,
    rgba(0,0,0,.6) 54%,
    rgba(0,0,0,.2) 68%,
    transparent    80%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 68% 62% at 50% 48%,
    black          20%,
    rgba(0,0,0,.9) 38%,
    rgba(0,0,0,.6) 54%,
    rgba(0,0,0,.2) 68%,
    transparent    80%
  );
  pointer-events: none;
  z-index: -1;
}

.hero-portrait {
  width: clamp(200px, 26vw, 320px);
  height: clamp(200px, 26vw, 320px);
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  margin-bottom: 4px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.48),
    0 8px 24px rgba(0, 0, 0, 0.32),
    0 2px 8px rgba(0, 0, 0, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 30, 0.5);
}

.hero-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.hero-name {
  font-size: clamp(36px, 8vw, 76px);
  font-weight: 800;
  background: linear-gradient(135deg, #e4f9ff 0%, #bceeff 35%, #dfbfff 65%, #ffc2ec 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.5px;
}

.hero-headline {
  font-size: clamp(12px, 2vw, 15px);
  color: var(--muted);
  max-width: 600px;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0.3px;
}

.hero-summary {
  font-size: clamp(13px, 1.8vw, 15px);
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  line-height: 1.6;
  margin: 8px 0 0;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

/* ── Hero site link ─────────────────────────────────────── */
.hero-site-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.055);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.78);
  font-size: 12.5px;
  font-family: var(--font);
  letter-spacing: 0.025em;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
}
.hero-site-link:hover {
  background: rgba(124,247,255,0.08);
  border-color: rgba(124,247,255,0.32);
  color: #fff;
  box-shadow: 0 0 18px rgba(124,247,255,0.12);
}
.hero-site-arrow {
  font-size: 13px;
  opacity: 0.65;
  transition: opacity 0.18s, transform 0.18s;
}
.hero-site-link:hover .hero-site-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

/* ── Share button + popup ───────────────────────────────── */
#share-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 92;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

#share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* icon-only circle by default; pill with label on wide screens */
  width: 36px;
  height: 36px;
  padding: 0;
  gap: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(8,6,26,0.72);
  color: rgba(255,255,255,0.80);
  font-size: 12.5px;
  font-family: var(--font);
  letter-spacing: 0.02em;
  cursor: none;
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 2px 16px rgba(0,0,0,0.36),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 14px 4px rgba(180,140,255,0.18),
    0 0 22px 6px rgba(124,247,255,0.10),
    0 0 28px 8px rgba(255,120,200,0.07);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s,
              width 0.2s, padding 0.2s, border-radius 0.2s, gap 0.2s;
}
#share-btn:hover {
  background: rgba(20,15,45,0.84);
  border-color: rgba(124,247,255,0.28);
  box-shadow:
    0 2px 22px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 0 18px 6px rgba(180,140,255,0.26),
    0 0 28px 8px rgba(124,247,255,0.16),
    0 0 36px 10px rgba(255,120,200,0.10);
  transform: scale(1.06);
}
#share-btn svg {
  width: 15px;
  height: 15px;
  opacity: 0.82;
  flex-shrink: 0;
}
.share-btn-label {
  display: none;
  white-space: nowrap;
}

/* Pill with label on screens wide enough that it won't crowd other UI */
@media (min-width: 768px) {
  #share-btn {
    width: auto;
    padding: 9px 16px 9px 13px;
    gap: 7px;
    border-radius: 999px;
  }
  .share-btn-label {
    display: inline;
  }
}

#share-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(8,6,26,0.88);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  min-width: 176px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
#share-popup.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.share-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  font-family: var(--font);
  text-decoration: none;
  cursor: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
  text-align: left;
}
.share-option:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}
.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255,255,255,0.08);
  font-size: 12px;
  font-style: normal;
  flex-shrink: 0;
}
.share-li-icon {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.share-fb-icon {
  font-size: 14px;
  font-weight: 700;
  font-family: Georgia, serif;
}

.share-option.share-copied {
  color: rgba(124,247,255,0.90);
}

/* ── Mobile: tuck share btn higher so it clears the scroll hint ── */
@media (max-width: 600px) {
  #share-wrap {
    bottom: 72px;
    right: 16px;
  }
  #share-btn {
    width: 32px;
    height: 32px;
  }
}

.scroll-hint {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  z-index: 5;
  /* GSAP owns opacity so it can scrub-fade on scroll without CSS conflict */
}

/* Breathing pulse lives on the inner text span, not the container */
.scroll-hint > span {
  color: rgba(255,255,255,0.96);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(124,247,255,0.70),
    0 0 40px rgba(124,247,255,0.30);
  animation: hint-breathe 3.5s ease-in-out infinite;
}

@keyframes hint-breathe {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.68; }
}

.scroll-arrow {
  width: 22px;
  height: 22px;
  border-right: 2.5px solid rgba(255,255,255,0.95);
  border-bottom: 2.5px solid rgba(255,255,255,0.95);
  transform: rotate(45deg);
  filter: drop-shadow(0 0 6px rgba(124,247,255,0.70)) drop-shadow(0 0 16px rgba(124,247,255,0.35));
  animation: scroll-bounce 2.2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: rotate(45deg) translateY(0);   opacity: 1;    }
  50%       { transform: rotate(45deg) translateY(10px); opacity: 0.65; }
}

/* ===== Section Navigation Bar ===== */
#section-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
  transform-origin: top center;
}

#section-nav.nav-visible { pointer-events: auto; }

/* Iridescent rainbow glow that bleeds softly below the bar */
#section-nav::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -10%;
  right: -10%;
  height: 56px;
  background: linear-gradient(to bottom,
    rgba(124,247,255,0.10) 0%,
    rgba(180,140,255,0.07) 28%,
    rgba(255,122,229,0.04) 55%,
    transparent 100%
  );
  pointer-events: none;
}

.section-nav-inner {
  position: relative;
  display: flex;
  gap: 7px;
  justify-content: center;
  align-items: center;
  padding: 8px 16px 9px;
  /* Richer glass: deeper blur + saturation boost so content behind it smears beautifully */
  background: rgba(6, 5, 20, 0.68);
  backdrop-filter: blur(28px) saturate(140%) brightness(0.92);
  -webkit-backdrop-filter: blur(28px) saturate(140%) brightness(0.92);
  flex-wrap: wrap;
  overflow: hidden;
}

/* Rainbow iridescent bottom edge line */
.section-nav-inner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(124,247,255,0.55) 0%,
    rgba(180,140,255,0.55) 25%,
    rgba(255,122,229,0.50) 50%,
    rgba(124,255,154,0.45) 75%,
    rgba(124,247,255,0.55) 100%
  );
  pointer-events: none;
}

.snav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  letter-spacing: 0.2px;
}

.snav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.09);
}

.snav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.snav-btn:nth-child(1) .snav-dot { background: linear-gradient(90deg, #7CF7FF, #B48CFF); }
.snav-btn:nth-child(2) .snav-dot { background: linear-gradient(90deg, #B48CFF, #FF7AE5); }
.snav-btn:nth-child(3) .snav-dot { background: linear-gradient(90deg, #FF7AE5, #7CFF9A); }
.snav-btn:nth-child(4) .snav-dot { background: linear-gradient(90deg, #7CFF9A, #7CF7FF); }
.snav-btn:nth-child(5) .snav-dot { background: linear-gradient(90deg, #7CF7FF, #FF7AE5); }
.snav-btn:nth-child(6) .snav-dot { background: linear-gradient(90deg, #B48CFF, #7CFF9A); }

/* ===== Summary Row (side-by-side panels — equal height) ===== */
.summary-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
  width: 100%;
}

.summary-panel-mvv,
.summary-panel-domains {
  flex: 1;
  min-width: 0;
}

/* ===== Experience Column (Work History full-width above Education) ===== */
.experience-col {
  display: flex;
  flex-direction: column;
  gap: 72px;
  width: 100%;
}

/* Compact panel bodies for the experience panels */
.jobs-panel-body { max-height: 260px; }
.edu-panel-body  { max-height: 220px; }

/* Legacy inner-card styles kept for reference; no longer used as outer panels */
.mvv-block {
  padding: 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 10px;
  text-align: center;
}

.mvv-block:last-child { margin-bottom: 0; }

.mvv-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.mvv-block p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
}

/* Domains / Focus / Style groups — box-styled to match MVV blocks */
.kpi-group {
  padding: 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 10px;
  text-align: center;
}
.kpi-group:last-child { margin-bottom: 0; }

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
}

.kpi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.kpi-chip {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
}

/* ===== Section Titles ===== */
.section-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-subtitle {
  text-align: center;
  color: var(--muted2);
  font-size: 12px;
  margin: 0 0 16px;
}

.sub-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin: 0 0 10px;
  text-transform: uppercase;
}

/* ===== Chips & Tags ===== */
.chip {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.72);
}

/* ===== Search Bar ===== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.22);
  margin-bottom: 16px;
}

.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  width: 100%;
  font-family: var(--font);
}

.search-bar input::placeholder { color: rgba(255,255,255,0.3); }
.search-icon { opacity: 0.4; font-size: 15px; }

/* ===== Job / Education Cards ===== */
.job-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  outline: none;
}

.job-card:hover,
.job-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05);
}

.job-card:focus-visible {
  box-shadow: 0 0 0 2px rgba(124,247,255,0.4);
}

.job-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.job-title { font-weight: 650; font-size: 13px; }
.job-dates { font-size: 12px; color: var(--muted2); white-space: nowrap; }

.job-preview {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

/* ===== Skills Tree ===== */
.skill-node {
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 6px;
  overflow: hidden;
}

.skill-node summary {
  cursor: pointer;
  list-style: none;
  padding: 11px 14px;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  user-select: none;
  transition: background 0.12s;
}

.skill-node summary:hover { background: rgba(255,255,255,0.03); }
.skill-node summary::-webkit-details-marker { display: none; }

.skill-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255,255,255,0.4);
  border-bottom: 2px solid rgba(255,255,255,0.4);
  transform: rotate(-45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.skill-node[open] > summary .skill-caret { transform: rotate(45deg); }

.skill-body {
  padding: 6px 14px 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.skill-bullets {
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.skill-bullets li { margin: 2px 0; }
.skill-l2 { margin-left: 12px; }
.skill-l3 { margin-left: 20px; }

/* ===== Horizontal Timeline ===== */
.tl-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.tl-zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: nowrap;
}

.tl-btn {
  padding: 4px 11px;
  font-size: 14px;
  font-weight: 500;
  min-width: 30px;
  justify-content: center;
}

#tl-zoom-range {
  width: 90px;
  flex-shrink: 1;
  accent-color: var(--cyan);
  cursor: pointer;
}

.tl-zoom-label {
  font-size: 11px;
  color: var(--muted2);
  min-width: 36px;
  text-align: right;
}

.tl-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 2px 14px;
  margin: 0 -4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,247,255,0.3) transparent;
}

.tl-wrap::-webkit-scrollbar { height: 6px; }
.tl-wrap::-webkit-scrollbar-thumb {
  background: rgba(124,247,255,0.3);
  border-radius: 999px;
}

.tl-track {
  --tl-zoom: 1;
  --tl-card-w: calc(300px * var(--tl-zoom));
  --tl-gap:    calc(28px  * var(--tl-zoom));
  display: flex;
  align-items: flex-start;
  gap: var(--tl-gap);
  width: max-content;
  min-width: 100%;
  padding: 10px 8px 14px;
  position: relative;
}

/* Horizontal iridescent rail line */
.tl-track::before {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 37px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(124,247,255,0.85),
    rgba(180,140,255,0.80),
    rgba(255,122,229,0.75),
    rgba(124,255,154,0.75),
    rgba(124,247,255,0.85)
  );
  box-shadow: 0 0 14px rgba(124,247,255,0.25);
  pointer-events: none;
}

.tl-entry {
  width: var(--tl-card-w);
  min-width: var(--tl-card-w);
  position: relative;
  flex-shrink: 0;
}

.tl-date {
  font-size: 11px;
  color: var(--muted2);
  text-align: center;
  white-space: nowrap;
  margin-bottom: 5px;
  letter-spacing: 0.3px;
}

.tl-rail {
  position: relative;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 0 10px rgba(124,247,255,0.45), 0 0 0 3px rgba(124,247,255,0.12);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.tl-card {
  border-radius: 14px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.09);
  overflow: hidden;
  min-height: 88px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.tl-card:hover { border-color: rgba(255,255,255,0.18); }

.tl-card.tl-card-has-media {
  border-color: rgba(124,247,255,0.15);
}
.tl-card.tl-card-has-media:hover {
  border-color: rgba(124,247,255,0.32);
  background: rgba(124,247,255,0.025);
  box-shadow: 0 0 18px rgba(124,247,255,0.06);
}

/* Summary button — replaces <details><summary> as the card's primary action */
.tl-summary {
  width: 100%;
  padding: 13px 13px 9px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  transition: background 0.1s;
}

.tl-summary:hover { background: rgba(255,255,255,0.03); }
.tl-summary-text  { flex: 1; min-width: 0; }

.tl-summary-end {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding-top: 1px;
}

.tl-summary-arrow {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.30);
  transition: color 0.15s, transform 0.15s;
}
.tl-summary:hover .tl-summary-arrow {
  color: var(--cyan);
  transform: translateX(2px);
}

/* Media count badge on the card */
.tl-media-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(124,247,255,0.10);
  border: 1px solid rgba(124,247,255,0.22);
  color: var(--cyan);
  line-height: 1;
}
.tl-media-badge-icon { font-size: 9px; opacity: 0.75; }

/* Always-visible pill row below the title */
.tl-pills-preview {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 0 12px 11px;
}

/* Glowing dot on entries that have media */
.tl-dot-media {
  animation: dot-media-pulse 3s ease-in-out infinite;
}
@keyframes dot-media-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(124,247,255,0.45), 0 0 0 3px rgba(124,247,255,0.12); }
  50%       { box-shadow: 0 0 22px rgba(124,247,255,0.75), 0 0 0 6px rgba(124,247,255,0.18); }
}

/* Kept for any legacy detail-modal usage */
.tl-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 6px 12px 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.tl-body {
  padding: 0 12px 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.tl-pill {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  white-space: nowrap;
}

/* First pill (type label) gets a subtle accent tint */
.tl-pill-type {
  border-color: rgba(180,140,255,0.25);
  background: rgba(180,140,255,0.07);
  color: var(--purple);
}

.tl-hint {
  text-align: center;
  font-size: 11px;
  color: var(--muted2);
  margin: 6px 0 0;
  letter-spacing: 0.3px;
}

/* ===== Year Ruler (tape-measure bar, sits between track and scrollbar) =====
 *
 * Layout (32px tall, bottom-anchored):
 *   ─────  ─────────────── (year labels, top: 2px)
 *     |         |   |   |  (tick marks rising from baseline)
 *   ──────────────────────  (baseline, bottom: 0)
 *
 * .tl-tick          base class — absolutely positioned, width:0, transforms to center
 * .tl-tick-year     tallest tick + visible year label
 * .tl-tick-qtr      medium tick (quarter marks), optional label at high zoom
 * .tl-tick-month    shortest tick, no label
 * ===== */
.tl-ruler {
  position: relative;
  height: 32px;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
}

/* Baseline — the thin horizontal "tape" line */
.tl-ruler::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255,255,255,0.14);
}

/* Every tick mark */
.tl-tick {
  position: absolute;
  bottom: 0;
  width: 0;
  transform: translateX(-50%);
}

/* The vertical line rising from the baseline */
.tl-tick::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 1px;
}

.tl-tick-year::before  { height: 11px; background: rgba(255,255,255,0.42); }
.tl-tick-qtr::before   { height: 6px;  background: rgba(255,255,255,0.20); }
.tl-tick-month::before { height: 3px;  background: rgba(255,255,255,0.13); }

/* Labels sit above their tick mark */
.tl-tick-label {
  position: absolute;
  bottom: 13px;   /* above year tick (11px) + 1px baseline + 1px gap */
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: rgba(255,255,255,0.50);
  white-space: nowrap;
  letter-spacing: 0.35px;
  font-variant-numeric: tabular-nums;
}

/* Quarter/month abbreviated labels sit lower than year labels */
.tl-mo-label {
  bottom: 8px;
  font-size: 8px;
  color: rgba(255,255,255,0.30);
}

/* ===== Gallery Modal ===== */

#gallery-modal {
  /* Explicit top-layer centering: fixed + inset:0 + margin:auto = viewport center.
     position:fixed also creates a containing block for ::before ring and lightbox. */
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(1080px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  height: fit-content;
  border: 0;
  padding: 0;
  border-radius: 22px;
  /* Translucent background — backdrop-filter provides the frosted-glass depth */
  background: rgba(6, 10, 22, 0.38);
  backdrop-filter: blur(36px) saturate(190%) brightness(0.80);
  -webkit-backdrop-filter: blur(36px) saturate(190%) brightness(0.80);
  color: var(--text);
  box-shadow:
    0 32px 90px rgba(0,0,0,0.50),
    0 0 0 1px rgba(124,247,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.10);
  overflow: hidden;
}

/* Open — blur clears and modal glides forward */
#gallery-modal[open] {
  animation: gallery-open 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Close — triggered by JS adding .gallery-closing; blur increases as it retreats */
#gallery-modal.gallery-closing {
  animation: gallery-close 0.40s cubic-bezier(0.55, 0, 0.85, 0.05) both;
  pointer-events: none;
}

@keyframes gallery-open {
  0%   { opacity: 0; transform: scale(0.88); filter: blur(22px); }
  55%  { filter: blur(3px); }
  100% { opacity: 1; transform: scale(1);    filter: blur(0px);  }
}

@keyframes gallery-close {
  0%   { opacity: 1; transform: scale(1);    filter: blur(0px);  }
  100% { opacity: 0; transform: scale(0.88); filter: blur(22px); }
}

/* Brighter, more vivid rotating border ring */
#gallery-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--border-angle),
    rgba(124,247,255,0.80),
    rgba(180,140,255,0.72),
    rgba(255,122,229,0.65),
    rgba(124,255,154,0.65),
    rgba(124,247,255,0.80)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.85;
  animation: border-rotate 20s linear infinite;
  pointer-events: none;
  z-index: 1;
}

/* Backdrop: dims + blurs the scene behind; animates with the modal */
#gallery-modal::backdrop {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px) brightness(1.45) saturate(140%);
  -webkit-backdrop-filter: blur(10px) brightness(1.45) saturate(140%);
  animation: gallery-backdrop-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#gallery-modal.gallery-closing::backdrop {
  animation: gallery-backdrop-out 0.40s cubic-bezier(0.55, 0, 0.85, 0.05) both;
}

@keyframes gallery-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes gallery-backdrop-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.gallery-inner {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  position: relative;
  z-index: 2;
}

.gallery-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
}

.gallery-head-content { flex: 1; min-width: 0; }

.gallery-head-date {
  font-size: 11px;
  color: var(--muted2);
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.gallery-head-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--text);
}

.gallery-head-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.gallery-body {
  overflow-y: auto;
  padding: 20px 22px 28px;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,247,255,0.25) transparent;
}
.gallery-body::-webkit-scrollbar { width: 5px; }
.gallery-body::-webkit-scrollbar-thumb {
  background: rgba(124,247,255,0.25);
  border-radius: 999px;
}

.gallery-details {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 22px;
  white-space: pre-wrap;
}

/* ── Cover Flow gallery ── */
.gallery-coverflow-wrap {
  position: relative;
  margin: 4px 0 8px;
  padding: 0 52px;
}
.gallery-coverflow-wrap[hidden] { display: none; }

.cf-viewport {
  position: relative;
  height: min(380px, 52vw);
  perspective: 1500px;
  perspective-origin: 50% 42%;
  overflow: visible;
}

.cf-track {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

.cf-item {
  position: absolute;
  left: -170px;
  top: -200px;
  width: 340px;
  height: 255px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
  transition:
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    opacity 0.4s ease;
  font-family: inherit;
  color: inherit;
}

.cf-item-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(20,24,48,0.9), rgba(8,10,22,0.95));
  box-shadow:
    0 28px 70px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.08);
  backface-visibility: hidden;
}

.cf-item.cf-active .cf-item-inner {
  box-shadow:
    0 36px 90px rgba(0,0,0,0.65),
    0 0 0 2px rgba(124,247,255,0.42),
    0 0 40px rgba(124,247,255,0.18);
}

.cf-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.cf-noposter {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(138,96,255,0.25), rgba(0,232,196,0.15));
}

.cf-play-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 42px;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.28);
  pointer-events: none;
}

.cf-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.78));
  font-size: 12px;
  color: rgba(255,255,255,0.92);
  text-align: left;
  line-height: 1.35;
  pointer-events: none;
}

.cf-floor {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -6px;
  height: 72px;
  background: radial-gradient(ellipse at center, rgba(124,247,255,0.14), transparent 68%);
  transform: perspective(500px) rotateX(72deg);
  opacity: 0.65;
  pointer-events: none;
}

.cf-reflection {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 340px;
  height: 48px;
  margin-left: -170px;
  background: linear-gradient(180deg, rgba(124,247,255,0.12), transparent);
  filter: blur(10px);
  opacity: 0.45;
  pointer-events: none;
}

.cf-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  font-family: inherit;
  transition: background 0.14s, transform 0.14s;
}
.cf-nav:hover:not(:disabled) {
  background: rgba(255,255,255,0.18);
  transform: translateY(-50%) scale(1.06);
}
.cf-nav:disabled {
  opacity: 0.28;
  cursor: default;
}
.cf-prev { left: 0; }
.cf-next { right: 0; }

.cf-hint {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted2);
  margin: 0 0 18px;
}
.cf-hint[hidden] { display: none; }

/* ── Legacy photo grid (unused) ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.gallery-thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1), border-color 0.15s, box-shadow 0.15s;
  padding: 0;
}
.gallery-thumb:hover {
  transform: scale(1.03);
  border-color: rgba(124,247,255,0.38);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Video thumb */
.gallery-thumb-noposter {
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.05);
}

.gallery-thumb-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: rgba(255,255,255,0.88);
  background: rgba(0,0,0,0.30);
  border-radius: inherit;
  pointer-events: none;
}

.gallery-thumb-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 9px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.70));
  font-size: 10.5px;
  color: rgba(255,255,255,0.88);
  line-height: 1.3;
  text-align: left;
  pointer-events: none;
}

/* Empty state */
.gallery-empty {
  text-align: center;
  color: var(--muted2);
  font-size: 13px;
  padding: 32px 0 16px;
  line-height: 1.6;
}
.gallery-empty code {
  font-size: 11px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--cyan);
}

/* ── Links section ── */
.gallery-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.gallery-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(124,247,255,0.08);
  border: 1px solid rgba(124,247,255,0.22);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
  font-family: inherit;
}
.gallery-link-btn:hover {
  background: rgba(124,247,255,0.16);
  border-color: rgba(124,247,255,0.42);
}

/* ── Lightbox overlay (inside the dialog) ── */
.gallery-lightbox {
  position: absolute;
  inset: 0;
  background: rgba(4,6,16,0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 22px;
}
.gallery-lightbox[hidden] { display: none; }

.lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 68px 72px;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  cursor: default;
  touch-action: none;
}
.lb-stage.lb-panning { cursor: grabbing; }

.lb-zoom-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.lb-stage img,
.lb-zoom-wrap img {
  max-width: min(96vw, 920px);
  max-height: min(78vh, 720px);
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  display: block;
  transform-origin: center center;
  will-change: transform;
}
.lb-stage video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  outline: none;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, transform 0.12s;
  z-index: 12;
  font-family: inherit;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-prev:hover { background: rgba(255,255,255,0.20); transform: translateY(-50%) scale(1.08); }
.lb-next:hover { background: rgba(255,255,255,0.20); transform: translateY(-50%) scale(1.08); }

.lb-info {
  display: flex;
  justify-content: center;
  align-items: baseline;
  width: 100%;
  padding: 8px 68px 18px;
  gap: 12px;
}

.lb-caption {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  flex: 1;
  line-height: 1.4;
}
.lb-counter {
  font-size: 11px;
  color: var(--muted2);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s;
  z-index: 13;
  font-family: inherit;
}
.lb-close:hover { background: rgba(255,255,255,0.22); }

.lb-zoom-toolbar {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(8,12,24,0.72);
  border: 1px solid rgba(255,255,255,0.14);
  z-index: 14;
}
.lb-zoom-toolbar[hidden] { display: none; }

.lb-zoom-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
}
.lb-zoom-btn:hover { background: rgba(255,255,255,0.16); }
.lb-zoom-reset { font-size: 11px; letter-spacing: 0.3px; }

.lb-zoom-level {
  min-width: 48px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ===== Legacy Timeline (kept for compatibility — unused) ===== */
.timeline-entry {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.12s;
  border-radius: 8px;
  padding-left: 4px;
  padding-right: 4px;
}

.timeline-entry:hover { background: rgba(255,255,255,0.03); }
.timeline-entry:last-child { border-bottom: none; }

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  flex-shrink: 0;
  margin-top: 3px;
  box-shadow: 0 0 12px rgba(124,247,255,0.3);
}

.timeline-content { flex: 1; min-width: 0; }
.timeline-date { font-size: 12px; color: var(--muted2); margin-bottom: 2px; }
.timeline-title { font-weight: 600; font-size: 14px; }

.timeline-type {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  margin-top: 6px;
}

/* ===== Passions & Capabilities ===== */
.passions-inner {
  display: flex;
  gap: 16px;
  max-width: 960px;
  width: 100%;
}

.half-panel { flex: 1; min-width: 0; }

.passions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.passion-bubble {
  padding: 14px;
  border-radius: 16px;
  background:
    radial-gradient(120% 160% at 16% 14%, rgba(124,247,255,0.08), transparent 54%),
    radial-gradient(120% 140% at 88% 90%, rgba(255,122,229,0.06), transparent 56%),
    rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.82);
  text-align: center;
  display: grid;
  place-items: center;
}

.cap-group { margin-bottom: 14px; }
.cap-group:last-child { margin-bottom: 0; }

.cap-group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 6px;
}

.cap-items {
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.cap-items li { margin: 2px 0; }

/* ===== Ending Statement ===== */
.ending-panel {
  text-align: center;
  padding: 56px 48px;
}

.ending-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 20px;
}

.ending-headline {
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 800;
  background: linear-gradient(135deg, #e4f9ff 0%, #bceeff 35%, #dfbfff 65%, #ffc2ec 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 28px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.ending-body {
  font-size: clamp(14px, 2vw, 16px);
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 0 auto 16px;
  line-height: 1.75;
  text-align: left;
}

/* ===== Contact / CTA Panel ===== */
.contact-panel {
  text-align: center;
  padding: 64px 48px;
}

.contact-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 28px;
}

.contact-headline {
  font-size: clamp(22px, 4.5vw, 46px);
  font-weight: 800;
  background: linear-gradient(135deg, #e4f9ff 0%, #bceeff 35%, #dfbfff 65%, #ffc2ec 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.18;
  letter-spacing: -0.5px;
  max-width: 680px;
  margin: 0 auto 52px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255,255,255,0.90);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: transform 0.16s cubic-bezier(0.34,1.56,0.64,1), border-color 0.15s, background 0.15s, box-shadow 0.15s, color 0.15s;
  font-family: var(--font);
}

.contact-link:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: rgba(124,247,255,0.38);
  background: rgba(124,247,255,0.09);
  box-shadow: 0 8px 28px rgba(0,0,0,0.28), 0 0 14px rgba(124,247,255,0.12);
  color: #fff;
}

.contact-link-icon {
  font-size: 15px;
  opacity: 0.72;
  flex-shrink: 0;
}

/* ===== Footer ===== */
.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.glass-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 13px;
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
  cursor: pointer;
  font-family: var(--font);
}

.glass-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
}

.footer-copy {
  color: var(--muted2);
  font-size: 11px;
  margin: 0;
}

/* ===== Controls ===== */
/* Standard Resume pill — top-right, above the nav */
#btn-std-resume {
  position: fixed;
  top: 9px;
  right: 16px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(8, 6, 26, 0.72);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  font-family: var(--font);
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
#btn-std-resume:hover {
  border-color: rgba(255,255,255,0.32);
  background: rgba(8,6,26,0.88);
  color: #fff;
}

/* Controls cluster — upper left corner */
#controls {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctrl-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,14,30,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.7);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  padding: 0;
  font-family: var(--font);
}

.ctrl-btn:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(10,14,30,0.7);
}

/* ===== Settings modal sections ===== */
.settings-section { margin-bottom: 20px; }
.settings-section:last-of-type { margin-bottom: 0; }

/* ── Color scheme swatches ─────────────────────────────── */
.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.theme-swatch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.70);
  font-size: 12px;
  font-family: var(--font);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.theme-swatch:hover {
  border-color: rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.theme-swatch.active {
  border-color: var(--cyan);
  background: rgba(255,255,255,0.09);
  color: #fff;
  font-weight: 600;
}
.swatch-preview {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(255,255,255,0.15);
}

/* ── Galactic aurora overlay ──────────────────────────────
   Parallax horizontal aurora bands — three layers at
   different scroll speeds, 7 bands total, each with its
   own independently-timed fade + drift animation.
   Renders below the Three.js canvas (z-index: -1).
   ─────────────────────────────────────────────────────── */
#galactic-aurora {
  position: fixed;
  inset: 0;
  overflow: hidden; /* clip parallax layers that extend beyond viewport */
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.5s ease;
}
[data-color-theme="galactic"] #galactic-aurora { opacity: 0.45; }

/* Parallax container: extends 30vh above & below so bands
   don't pop out as the layer translates upward on scroll */
.ga-layer {
  position: absolute;
  top: -30vh; bottom: -30vh; left: 0; right: 0;
  transform: translateY(calc(var(--scroll-progress, 0) * var(--pa, -0.1) * 100vh));
  will-change: transform;
}

/* All bands: ultra-wide diagonal ribbons spanning the full screen.
   top values are relative to .ga-layer whose top edge is 30vh
   above the viewport, so:  band top:33vh → 3vh from viewport top
                             band top:46vh → 16vh
                             band top:59vh → 29vh  ... etc.
   width:200vw / left:-50vw ensures no raw edge is visible after
   the ~10° rotation applied inside every keyframe transform.    */
.ga-band {
  position: absolute;
  left: -50vw;
  width: 200vw;
  border-radius: 50%;
  will-change: opacity, transform;
}

/* ── 7 bands evenly spaced top→bottom, ~13vh apart ──────── */

/* B1 green main — top of screen */
.ga-b1 {
  top: 33vh; height: 20vh;
  background: radial-gradient(ellipse 70% 100% at 50% 50%,
    rgba(0,235,150,0.40) 0%, rgba(0,200,120,0.16) 42%, transparent 70%);
  filter: blur(28px);
  animation: ga-b1 26s ease-in-out infinite;
}
/* B2 violet — 16vh from top */
.ga-b2 {
  top: 46vh; height: 16vh;
  background: radial-gradient(ellipse 65% 100% at 50% 50%,
    rgba(115,48,248,0.30) 0%, rgba(85,36,195,0.11) 44%, transparent 70%);
  filter: blur(36px);
  animation: ga-b2 35s ease-in-out infinite;
}
/* B3 cyan — 29vh from top */
.ga-b3 {
  top: 59vh; height: 14vh;
  background: radial-gradient(ellipse 62% 100% at 50% 50%,
    rgba(0,205,255,0.26) 0%, rgba(0,168,228,0.09) 44%, transparent 70%);
  filter: blur(42px);
  animation: ga-b3 21s ease-in-out infinite;
}
/* B4 bright needle — screen center (42vh from top) */
.ga-b4 {
  top: 72vh; height: 11vh;
  background: radial-gradient(ellipse 56% 100% at 50% 50%,
    rgba(80,255,175,0.50) 0%, rgba(30,220,130,0.16) 38%, transparent 65%);
  filter: blur(18px);
  animation: ga-b4 17s ease-in-out infinite;
}
/* B5 deep teal — 55vh from top */
.ga-b5 {
  top: 85vh; height: 24vh;
  background: radial-gradient(ellipse 74% 100% at 50% 50%,
    rgba(0,168,108,0.22) 0%, rgba(0,140,88,0.08) 46%, transparent 70%);
  filter: blur(60px);
  animation: ga-b5 46s ease-in-out infinite;
}
/* B6 magenta — 68vh from top */
.ga-b6 {
  top: 98vh; height: 11vh;
  background: radial-gradient(ellipse 58% 100% at 50% 50%,
    rgba(220,55,178,0.24) 0%, rgba(175,36,148,0.08) 44%, transparent 70%);
  filter: blur(50px);
  animation: ga-b6 54s ease-in-out infinite;
}
/* B7 ice blue — bottom of screen (81vh from top) */
.ga-b7 {
  top: 111vh; height: 13vh;
  background: radial-gradient(ellipse 62% 100% at 50% 50%,
    rgba(52,175,255,0.20) 0%, rgba(38,148,228,0.07) 44%, transparent 70%);
  filter: blur(48px);
  animation: ga-b7 39s ease-in-out infinite;
}

/* ── Keyframes ───────────────────────────────────────────
   Every transform includes rotate(~-10°) so the band
   sweeps diagonally. The translate values add the organic
   drift on top of that fixed tilt.
   Opacity pulses independently to mimic aurora timelapse. */

@keyframes ga-b1 {
  0%   { opacity: 0.04; transform: rotate(-11deg) translate(  0vw,  0.0vh); }
  8%   { opacity: 0.60; transform: rotate(-11deg) translate(  2vw, -0.8vh); }
  22%  { opacity: 0.95; transform: rotate(-11deg) translate(  5vw, -2.0vh); }
  38%  { opacity: 0.42; transform: rotate(-11deg) translate(  3vw, -0.5vh); }
  52%  { opacity: 0.88; transform: rotate(-11deg) translate( -2vw, -1.5vh); }
  67%  { opacity: 0.25; transform: rotate(-11deg) translate( -5vw,  0.3vh); }
  80%  { opacity: 0.72; transform: rotate(-11deg) translate( -3vw, -1.0vh); }
  93%  { opacity: 0.08; transform: rotate(-11deg) translate(  0vw,  0.0vh); }
  100% { opacity: 0.04; transform: rotate(-11deg) translate(  0vw,  0.0vh); }
}
@keyframes ga-b2 {
  0%   { opacity: 0.38; transform: rotate(-10deg) translate( -4vw,  0.5vh); }
  15%  { opacity: 0.72; transform: rotate(-10deg) translate( -6vw, -1.5vh); }
  32%  { opacity: 0.18; transform: rotate(-10deg) translate( -2vw,  0.0vh); }
  50%  { opacity: 0.65; transform: rotate(-10deg) translate(  3vw, -0.8vh); }
  68%  { opacity: 0.88; transform: rotate(-10deg) translate(  5vw, -2.0vh); }
  83%  { opacity: 0.28; transform: rotate(-10deg) translate(  3vw,  0.4vh); }
  100% { opacity: 0.38; transform: rotate(-10deg) translate( -4vw,  0.5vh); }
}
@keyframes ga-b3 {
  0%   { opacity: 0.08; transform: rotate(-12deg) translate(  6vw, -0.5vh); }
  14%  { opacity: 0.62; transform: rotate(-12deg) translate(  3vw, -1.5vh); }
  28%  { opacity: 0.18; transform: rotate(-12deg) translate(  0vw,  0.0vh); }
  48%  { opacity: 0.78; transform: rotate(-12deg) translate( -4vw, -1.2vh); }
  63%  { opacity: 0.12; transform: rotate(-12deg) translate( -6vw,  0.2vh); }
  80%  { opacity: 0.55; transform: rotate(-12deg) translate( -2vw, -0.8vh); }
  100% { opacity: 0.08; transform: rotate(-12deg) translate(  6vw, -0.5vh); }
}
@keyframes ga-b4 {
  0%   { opacity: 0.00; transform: rotate(-9deg) translate(  0vw,  0.0vh) scaleX(1.0); }
  10%  { opacity: 0.00; transform: rotate(-9deg) translate(  2vw, -0.3vh) scaleX(1.0); }
  16%  { opacity: 0.88; transform: rotate(-9deg) translate(  6vw, -1.0vh) scaleX(1.2); }
  22%  { opacity: 1.00; transform: rotate(-9deg) translate(  8vw, -1.5vh) scaleX(1.3); }
  28%  { opacity: 0.20; transform: rotate(-9deg) translate(  4vw, -0.3vh) scaleX(1.0); }
  42%  { opacity: 0.00; transform: rotate(-9deg) translate(  0vw,  0.0vh) scaleX(0.9); }
  55%  { opacity: 0.00; transform: rotate(-9deg) translate( -2vw,  0.2vh) scaleX(0.9); }
  63%  { opacity: 0.82; transform: rotate(-9deg) translate( -6vw, -0.8vh) scaleX(1.2); }
  70%  { opacity: 0.15; transform: rotate(-9deg) translate( -3vw,  0.1vh) scaleX(1.0); }
  80%  { opacity: 0.00; transform: rotate(-9deg) translate(  0vw,  0.0vh) scaleX(0.9); }
  100% { opacity: 0.00; transform: rotate(-9deg) translate(  0vw,  0.0vh) scaleX(1.0); }
}
@keyframes ga-b5 {
  0%   { opacity: 0.28; transform: rotate(-11deg) translate(  0vw,  0.0vh); }
  25%  { opacity: 0.55; transform: rotate(-11deg) translate(  4vw, -1.2vh); }
  50%  { opacity: 0.22; transform: rotate(-11deg) translate(  2vw,  0.6vh); }
  75%  { opacity: 0.50; transform: rotate(-11deg) translate( -3vw, -0.8vh); }
  100% { opacity: 0.28; transform: rotate(-11deg) translate(  0vw,  0.0vh); }
}
@keyframes ga-b6 {
  0%   { opacity: 0.00; transform: rotate(-13deg) translate(  0vw,  0.0vh); }
  6%   { opacity: 0.00; transform: rotate(-13deg) translate(  0vw,  0.0vh); }
  13%  { opacity: 0.52; transform: rotate(-13deg) translate( -5vw, -1.0vh); }
  19%  { opacity: 0.72; transform: rotate(-13deg) translate( -8vw, -2.0vh); }
  26%  { opacity: 0.08; transform: rotate(-13deg) translate( -3vw, -0.5vh); }
  32%  { opacity: 0.00; transform: rotate(-13deg) translate(  0vw,  0.0vh); }
  74%  { opacity: 0.00; transform: rotate(-13deg) translate(  0vw,  0.0vh); }
  82%  { opacity: 0.62; transform: rotate(-13deg) translate(  6vw, -1.5vh); }
  90%  { opacity: 0.12; transform: rotate(-13deg) translate(  3vw, -0.3vh); }
  96%  { opacity: 0.00; transform: rotate(-13deg) translate(  0vw,  0.0vh); }
  100% { opacity: 0.00; transform: rotate(-13deg) translate(  0vw,  0.0vh); }
}
@keyframes ga-b7 {
  0%   { opacity: 0.18; transform: rotate(-10deg) translate( -2vw, -0.4vh); }
  28%  { opacity: 0.48; transform: rotate(-10deg) translate( -5vw, -1.4vh); }
  54%  { opacity: 0.12; transform: rotate(-10deg) translate( -1vw,  0.1vh); }
  78%  { opacity: 0.42; transform: rotate(-10deg) translate(  4vw, -1.0vh); }
  100% { opacity: 0.18; transform: rotate(-10deg) translate( -2vw, -0.4vh); }
}

/* Pause aurora when user has requested reduced motion */
@media (prefers-reduced-motion: reduce) { .ga-band { animation: none !important; } }
.reduced-motion .ga-band                { animation-play-state: paused; }

.settings-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted2);
  margin: 0 0 10px;
}

.settings-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 18px 0;
}

.vfx-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.vfx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  flex: 1;
  min-width: 180px;
  justify-content: flex-start;
}

.vfx-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.vfx-label { flex: 1; text-align: left; }

/* ===== Modal (shared: detail + settings) ===== */
#detail-modal,
#settings-modal {
  width: min(720px, calc(100vw - 32px));
  border: 0;
  padding: 0;
  border-radius: 22px;
  background: rgba(10,14,30,0.92);
  color: var(--text);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

/* Iridescent border ring on modals */
#detail-modal::before,
#settings-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--border-angle),
    rgba(124,247,255,0.50),
    rgba(180,140,255,0.45),
    rgba(255,122,229,0.40),
    rgba(124,255,154,0.40),
    rgba(124,247,255,0.50)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.7;
  animation: border-rotate 30s linear infinite;
  pointer-events: none;
  z-index: 1;
}

#detail-modal::backdrop,
#settings-modal::backdrop {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal-head {
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.modal-title { font-weight: 700; font-size: 15px; }
.modal-meta { color: var(--muted2); font-size: 12px; margin-top: 4px; }

.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  cursor: pointer;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 0.12s;
}

.modal-close:hover { background: rgba(255,255,255,0.18); }

.modal-body {
  padding: 18px 20px 24px;
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  max-height: 60vh;
  overflow-y: auto;
  position: relative;
  z-index: 2;
}

/* ===== Settings / Import Modal ===== */
.settings-body {
  white-space: normal;
}

.settings-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.6;
}

.settings-hint strong { color: rgba(255,255,255,0.85); }

#import-json {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px;
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  resize: vertical;
  margin-bottom: 12px;
  outline: none;
  display: block;
}

#import-json:focus {
  border-color: rgba(124,247,255,0.4);
  box-shadow: 0 0 0 1px rgba(124,247,255,0.2) inset;
}

.settings-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.settings-status {
  font-size: 12px;
  min-height: 18px;
  margin: 0;
  line-height: 1.5;
  transition: color 0.2s;
}

.settings-status.ok { color: var(--green); }
.settings-status.err { color: var(--pink); }

/* ===== Fallback ===== */
#fallback {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  align-items: center;
  justify-content: center;
}

#fallback.active { display: flex; }

.fallback-inner { text-align: center; padding: 40px; }

.fallback-orb {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.5), rgba(124,247,255,0.15) 60%, rgba(180,140,255,0.1) 80%);
  margin: 0 auto 24px;
  box-shadow: 0 0 40px rgba(124,247,255,0.15);
}

.fallback-title {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #e4f9ff, #bceeff, #dfbfff, #ffc2ec);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
}

.fallback-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
}

.fallback-msg {
  color: var(--muted2);
  font-size: 14px;
  margin: 24px 0 28px;
}

.fallback-btn {
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .chapter { padding: 36px 16px; min-height: auto; }
  #ch-hero { min-height: calc(100vh - 120px); min-height: calc(100dvh - 120px); padding-top: 0; padding-bottom: 0; }
  .glass-panel { padding: 20px; border-radius: 20px; }
  .summary-row { flex-direction: column; align-items: stretch; }
  .jobs-panel-body { max-height: 200px; }
  .edu-panel-body  { max-height: 180px; }
  .passions-inner { flex-direction: column; }
  .skill-l2, .skill-l3 { margin-left: 8px; }
  #btn-std-resume { font-size: 11px; padding: 5px 11px; }
  #controls { top: 10px; left: 10px; }
  .ctrl-btn { width: 34px; height: 34px; font-size: 13px; border-radius: 10px; }
  .vfx-btn { min-width: 140px; font-size: 12px; padding: 8px 12px; }
  .hero-name { font-size: clamp(28px, 10vw, 48px); }
  .hero-portrait { width: clamp(168px, 42vw, 220px); height: clamp(168px, 42vw, 220px); }
  .hero-chips { gap: 6px; }
  .hero-chips .chip { font-size: 10px; padding: 3px 7px; }
  .section-title { font-size: 16px; }
  .job-title { font-size: 12px; }
  .job-dates { font-size: 11px; }
  .job-preview { font-size: 11px; }
  .footer-links { gap: 8px; }
  .glass-btn { padding: 8px 14px; font-size: 12px; }
  .ending-panel { padding: 36px 24px; }
  .ending-body { text-align: center; }
  .contact-panel { padding: 40px 20px; }
  .contact-headline { font-size: clamp(20px, 5vw, 32px); margin-bottom: 36px; }
  .panel-body { max-height: calc(100vh - 200px); }
  .search-bar-wrap .search-bar { max-width: 100%; }
  /* Nav scales down on mobile — keep single row, shrink text */
  .snav-btn { padding: 5px 9px; font-size: 10px; gap: 4px; }
  .snav-dot { width: 5px; height: 5px; }
  .section-nav-inner { gap: 5px; padding: 8px 10px 9px; }
  /* Timeline zoom controls wrap on mobile */
  .tl-zoom-controls { flex-wrap: wrap; }
  #tl-zoom-range { width: 70px; }
}

@media (max-width: 480px) {
  .chapter { padding: 48px 12px; }
  .glass-panel { padding: 16px; border-radius: 18px; }
  .kpi-chip { font-size: 11px; padding: 4px 8px; }
  .hero-headline { font-size: 11px; }
  .settings-actions { flex-direction: column; }
  .settings-actions .glass-btn { width: 100%; justify-content: center; }
  /* Gallery coverflow on small phones */
  .gallery-coverflow-wrap { padding: 0 40px; }
  .cf-item { left: -120px; top: -145px; width: 240px; height: 180px; }
  .cf-reflection { width: 240px; margin-left: -120px; }
  .cf-viewport { height: min(280px, 58vw); }
  .lb-stage { padding: 50px 40px 64px; }
  .lb-info { padding: 8px 48px 14px; }
  .gallery-head { padding: 14px 16px 12px; }
  .gallery-body { padding: 16px 16px 22px; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .glass-panel::before,
  .glass-panel::after,
  #detail-modal::before,
  #settings-modal::before,
  #gallery-modal::before,
  #gallery-modal[open],
  #gallery-modal.gallery-closing,
  #gallery-modal::backdrop,
  #gallery-modal.gallery-closing::backdrop,
  .cf-item,
  .scroll-hint,
  .scroll-arrow { animation: none !important; }
  /* Disable the hero blur on low-motion: backdrop-filter can cause jitter */
  .hero-inner::before {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(8,6,26,0.25) !important;
    mask-image: radial-gradient(ellipse 68% 62% at 50% 48%, black 20%, rgba(0,0,0,.6) 55%, transparent 80%) !important;
    -webkit-mask-image: radial-gradient(ellipse 68% 62% at 50% 48%, black 20%, rgba(0,0,0,.6) 55%, transparent 80%) !important;
  }
}

.reduced-motion .glass-panel::before,
.reduced-motion .glass-panel::after,
.reduced-motion #detail-modal::before,
.reduced-motion #settings-modal::before,
.reduced-motion #gallery-modal::before,
.reduced-motion #gallery-modal,
.reduced-motion #gallery-modal::backdrop,
.reduced-motion .scroll-hint,
.reduced-motion .scroll-arrow { animation: none !important; }

.reduced-motion .cf-item { transition: none !important; }

.reduced-motion .hero-inner::before {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(8,6,26,0.25) !important;
  mask-image: radial-gradient(ellipse 68% 62% at 50% 48%, black 20%, rgba(0,0,0,.6) 55%, transparent 80%) !important;
  -webkit-mask-image: radial-gradient(ellipse 68% 62% at 50% 48%, black 20%, rgba(0,0,0,.6) 55%, transparent 80%) !important;
}

.reduced-motion .chapter .glass-panel,
.reduced-motion .chapter .hero-inner {
  opacity: 1 !important;
  transform: none !important;
}

/* ===== Site switcher ===== */
.site-switcher {
  position: fixed;
  top: 9px;
  right: 16px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(8, 6, 26, 0.72);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.site-switch-link {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-family: var(--font);
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.site-switch-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.site-switch-link[aria-current="page"] {
  color: #fff;
  background: rgba(124,247,255,0.14);
  border: 1px solid rgba(124,247,255,0.28);
}

/* ===== Portfolio hero ===== */
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 10px;
  opacity: 0.85;
}
.hero-reel {
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  overflow: hidden;
  opacity: 0.35;
  pointer-events: auto;
  cursor: pointer;
}
.hero-reel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-reel-img.active { opacity: 1; }

/* ===== Discover ===== */
.disc-filters, .proj-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.disc-filter.active, .proj-filter.active {
  border-color: rgba(124,247,255,0.35);
  color: #fff;
}
.disc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

/* ===== Discover 3D ring ===== */
.discover-ring-wrap {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: clamp(360px, 54vh, 560px);
  min-height: 340px;
  margin-top: 0;
  background: transparent;
  border: none;
  overflow: visible;
  isolation: isolate;
  touch-action: none;
  cursor: grab;
}
.discover-ring-wrap.is-dragging {
  cursor: grabbing;
}
.discover-ring-stage {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 4%,
    black 14%,
    black 86%,
    rgba(0, 0, 0, 0.55) 96%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 4%,
    black 14%,
    black 86%,
    rgba(0, 0, 0, 0.55) 96%,
    transparent 100%
  );
}
.discover-ring-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(24vw, 300px);
  pointer-events: none;
  z-index: 3;
}
.discover-ring-fade--left {
  left: 0;
  background: linear-gradient(to right, rgba(8, 10, 24, 0.55), transparent 78%);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-mask-image: linear-gradient(to right, black 0%, black 32%, transparent 100%);
  mask-image: linear-gradient(to right, black 0%, black 32%, transparent 100%);
}
.discover-ring-fade--right {
  right: 0;
  background: linear-gradient(to left, rgba(8, 10, 24, 0.55), transparent 78%);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-mask-image: linear-gradient(to left, black 0%, black 32%, transparent 100%);
  mask-image: linear-gradient(to left, black 0%, black 32%, transparent 100%);
}
#discover-ring-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  background: transparent;
}
.discover-ring-wrap.is-dragging #discover-ring-canvas {
  cursor: grabbing;
}
.discover-ring-caption {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: 4;
  pointer-events: none;
  text-align: center;
  max-width: min(92%, 560px);
  padding: clamp(10px, 2vw, 14px) clamp(22px, 4.5vw, 36px) clamp(12px, 2.2vw, 16px);
  border-radius: 9999px;
  background: rgba(16, 18, 42, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(124, 247, 255, 0.06) inset,
    0 8px 28px rgba(0, 0, 0, 0.3);
}
.discover-ring-caption[hidden] {
  display: none !important;
}
.discover-ring-caption-title {
  font-size: clamp(15px, 2.2vw, 18px);
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}
.discover-ring-caption-sub {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(220, 228, 245, 0.9);
}
.discover-ring-caption-hint {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(124, 247, 255, 0.72);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.discover-ring-fallback[hidden] {
  display: none !important;
}
@media (max-width: 640px) {
  .discover-ring-wrap {
    height: clamp(320px, 52vh, 460px);
  }
  .discover-ring-caption-hint {
    display: none;
  }
}
@media (min-width: 1100px) {
  .disc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .disc-tile.disc-tile--wide {
    grid-column: span 2;
  }
  .disc-tile.disc-tile--wide .cover-montage {
    aspect-ratio: 21/9;
  }
}
.disc-tile .cover-montage { aspect-ratio: 16/10; }
.disc-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(10,14,30,0.45);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  font-family: inherit;
}
.disc-tile:hover {
  border-color: rgba(124,247,255,0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.disc-tile img:not(.cover-montage-img) {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.cover-montage {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}
.disc-tile .cover-montage { aspect-ratio: 16/10; }
.proj-card-hero .cover-montage { aspect-ratio: 16/9; }
.cover-montage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.cover-montage-img.active { opacity: 1; }
.disc-tile-placeholder, .proj-card-placeholder {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(138,96,255,0.18), rgba(0,232,196,0.12));
}
.disc-tile-body { padding: 12px 14px 14px; color: var(--text); }
.disc-tile-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.disc-tile-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.disc-empty, .proj-empty {
  text-align: center;
  color: var(--muted2);
  padding: 28px 0;
  font-size: 13px;
}

/* ===== Projects grid ===== */
.proj-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.proj-card {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r);
  overflow: hidden;
  background: rgba(10,14,30,0.35);
  transition: border-color 0.18s;
}
.proj-card:hover { border-color: rgba(255,255,255,0.2); }
.proj-card-hit {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
}
.proj-card-hero img:not(.cover-montage-img) {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.proj-card-body { padding: 14px 16px 12px; }
.proj-card-title { font-size: 16px; margin: 0 0 4px; }
.proj-card-sub { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.proj-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.proj-card-meta { font-size: 12px; color: var(--muted2); margin: 0; }
.proj-timeline-link {
  display: block;
  padding: 10px 16px 14px;
  font-size: 12px;
  color: var(--cyan);
  text-decoration: none;
}
.proj-timeline-link:hover { text-decoration: underline; }

/* ===== Companies ===== */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.company-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r);
  overflow: hidden;
  background: rgba(10,14,30,0.4);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  font-family: inherit;
}
.company-card:hover {
  border-color: rgba(124,247,255,0.35);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}
.company-card-hero .cover-montage { aspect-ratio: 16/9; }
.company-card-placeholder {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(138,96,255,0.2), rgba(0,232,196,0.1));
}
.company-card-body { padding: 16px 18px 18px; }
.company-card-title { font-size: 18px; margin: 0 0 6px; }
.company-card-sub { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.company-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-pill.org-pill {
  border-color: rgba(138,96,255,0.35);
  color: rgba(220,210,255,0.95);
}
.tl-pill.kind-pill {
  border-color: rgba(255,180,120,0.35);
  color: rgba(255,230,210,0.95);
}
.tl-pill.kind-life-moment {
  border-color: rgba(255,140,180,0.4);
  color: rgba(255,220,235,0.98);
}
.tl-pill.kind-gallery {
  border-color: rgba(120,220,255,0.35);
  color: rgba(210,245,255,0.98);
}

.org-panel {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(96vw, 1100px);
  width: 100%;
}
.org-panel::backdrop {
  background: rgba(4, 6, 18, 0.72);
  backdrop-filter: blur(8px);
}
.org-panel-inner {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  margin: 2vh auto;
}
.org-panel-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.org-panel-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 8px;
}
.org-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.org-proj-card { margin: 0; }

.career-subhead {
  font-size: 15px;
  font-weight: 600;
  margin: 28px 0 4px;
  color: var(--text);
}
.career-roles-lead { margin: 0 0 14px; }
.jobs-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.jobs-compact-grid .job-card { margin: 0; }

/* ===== Timeline hero strip ===== */
.tl-hero-strip {
  margin: -2px -2px 10px;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  max-height: 88px;
}
.tl-hero-strip img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  display: block;
}

/* ===== Gallery extras ===== */
.gallery-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.gal-tag-filter.active { border-color: rgba(124,247,255,0.35); color: #fff; }
.gallery-load-more {
  display: block;
  margin: 16px auto 0;
}

@media (max-width: 720px) {
  .site-switcher { right: 10px; top: 8px; max-width: calc(100vw - 70px); overflow-x: auto; }
  .site-switch-link { font-size: 10px; padding: 4px 8px; }
  .disc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .proj-grid { grid-template-columns: 1fr; }
}
