/* ═══════════════════════════════════════════════
   DESIGN TOKENS — Zinc / Glass
   ═══════════════════════════════════════════════ */
:root {
  --bg: #060607;
  --glass-bg: rgba(24, 24, 27, 0.3);
  --glass-bg-hover: rgba(39, 39, 42, 0.5);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-edge-hi: rgba(255, 255, 255, 0.22);
  --glass-edge-lo: rgba(255, 255, 255, 0.02);
  --glass-blur: 22px;
  --text-primary: #ececef;
  --text-secondary: rgba(255, 255, 255, 0.42);
  --text-faint: rgba(255, 255, 255, 0.22);
  --accent: #a1a1aa;
  --accent-glow: rgba(161, 161, 170, 0.25);
  --accent-light: #d4d4d8;
  --surface: #18181b;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.35s var(--ease);
}

/* ═══════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}

::selection {
  background: rgba(255, 255, 255, 0.85);
  color: #09090b;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

/* Film grain — sits over everything except loader/CRT */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  z-index: 500;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(5) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -4%); }
  60%  { transform: translate(-4%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ═══════════════════════════════════════════════
   GLASS UTILITY — frosted panel w/ lit gradient edge
   ═══════════════════════════════════════════════ */
.glass {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01) 40%),
    var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 24px 60px -20px rgba(0, 0, 0, 0.7);
}

/* gradient hairline border (masked) */
.glass::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, var(--glass-edge-hi), var(--glass-edge-lo) 35%, var(--glass-edge-lo) 65%, rgba(255, 255, 255, 0.1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* cursor spotlight (vars set from script.js) */
.hero-card::after,
.script-card::after,
.repo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 255, 255, 0.07), transparent 45%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-card:hover::after,
.script-card:hover::after,
.repo-card:hover::after {
  opacity: 1;
}

/* ═══════════════════════════════════════════════
   ANIMATED BACKGROUND
   ═══════════════════════════════════════════════ */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* faint dot lattice, fades out toward edges */
.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 10%, transparent 75%);
  transition: opacity 1s ease;
}

/* vignette */
.bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}

#neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transition: opacity 1s ease;
}

.bg__orb {
  transition: opacity 1s ease;
}

/* ── Page 2 state — hide neural layer, reveal void ── */
body.on-page-2 #neural-canvas {
  opacity: 0;
}

body.on-page-2 .bg__orb {
  opacity: 0 !important;
}

body.on-page-2 .bg::after {
  opacity: 0.35;
}

.bg__gradient {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(63, 63, 70, 0.18), transparent 70%),
    linear-gradient(135deg, #060607 0%, #111113 25%, #17171b 45%, #0f0f12 70%, #060607 100%);
  animation: gradientShift 24s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(-5%, -5%) rotate(1deg); }
  50%      { transform: translate(-3%, 3%) rotate(-0.5deg); }
  75%      { transform: translate(3%, -2%) rotate(0.5deg); }
}

.bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.22;
  animation: orbFloat 15s ease-in-out infinite;
  mix-blend-mode: screen;
}

.bg__orb--1 {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, #52525b 0%, transparent 70%);
  top: -14%;
  right: -8%;
  animation-duration: 18s;
}

.bg__orb--2 {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, #3f3f46 0%, transparent 70%);
  bottom: -12%;
  left: -6%;
  animation-duration: 22s;
  animation-delay: -5s;
}

.bg__orb--3 {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, #a1a1aa 0%, transparent 70%);
  top: 38%;
  left: 50%;
  margin-left: -170px;
  animation-duration: 25s;
  animation-delay: -10s;
  opacity: 0.08;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -40px) scale(1.06); }
  66%      { transform: translate(-20px, 20px) scale(0.95); }
}

/* ═══════════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════════ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(63, 63, 70, 0.16), transparent 70%),
    var(--bg);
  transition: opacity 1.1s var(--ease),
              transform 1.1s var(--ease),
              filter 1.1s var(--ease),
              visibility 1.1s;
}

.loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.06);
  filter: blur(12px);
}

/* viewfinder corner marks */
.loader::before,
.loader::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  animation: fadeIn 1.2s 0.4s ease both;
}

.loader::before {
  top: 28px;
  left: 28px;
  border-right: none;
  border-bottom: none;
}

.loader::after {
  bottom: 28px;
  right: 28px;
  border-left: none;
  border-top: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.loader__glass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 64px 88px;
  animation: glassAppear 1.2s var(--ease) forwards;
}

@keyframes glassAppear {
  from { opacity: 0; transform: scale(0.94) translateY(16px); filter: blur(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.loader__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.loader__greeting {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--text-secondary);
  animation: fadeSlideUp 0.9s 0.3s var(--ease) both;
}

.loader__name {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  background: linear-gradient(100deg, #71717a 0%, #f4f4f5 30%, #a1a1aa 45%, #f4f4f5 60%, #71717a 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeSlideUp 0.9s 0.5s var(--ease) both, shimmer 4s 1.2s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 100% 0; }
  50%      { background-position: 0% 0; }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.loader__action {
  position: relative;
  width: 200px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeSlideUp 0.7s 0.7s var(--ease) both;
}

.loader__bar {
  position: absolute;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  transition: height 0.6s var(--ease),
              border-radius 0.6s var(--ease),
              background 0.6s ease,
              box-shadow 0.6s ease;
}

.loader__action.morphing .loader__bar {
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 40px rgba(255, 255, 255, 0.04);
}

.loader__bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, transparent, #a1a1aa 60%, #fff);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  animation: barFill 2.2s 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transition: opacity 0.4s ease;
}

.loader__action.morphing .loader__bar-fill {
  opacity: 0;
}

@keyframes barFill {
  0%   { width: 0%; }
  40%  { width: 45%; }
  70%  { width: 75%; }
  100% { width: 100%; }
}

.loader__enter-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  padding-left: 0.4em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, color 0.3s ease, background 0.3s ease, letter-spacing 0.5s var(--ease);
  z-index: 1;
}

.loader__enter-btn.visible {
  opacity: 1;
  pointer-events: auto;
  animation: enterPulse 2.4s ease-in-out infinite;
}

@keyframes enterPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.025); }
}

.loader__enter-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  letter-spacing: 0.5em;
}

/* ═══════════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════════ */
.toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(-140%) scale(0.96);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px 11px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.toast__icon {
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: #e4e4e7;
  color: #09090b;
  flex-shrink: 0;
}

.toast__text strong {
  font-family: var(--mono);
  font-weight: 500;
  color: #fff;
}

/* ═══════════════════════════════════════════════
   HUD — corner metadata + page index
   ═══════════════════════════════════════════════ */
.hud {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 1.2s ease 0.8s;
}

.main.visible ~ .hud {
  opacity: 1;
}

.hud > span {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud__tl { top: 26px; left: 30px; }
.hud__tr { top: 26px; right: 30px; font-variant-numeric: tabular-nums; }
.hud__bl { bottom: 28px; left: 30px; }
.hud__br { bottom: 28px; right: 30px; gap: 0 !important; }

.hud__tl b {
  font-weight: 500;
  color: var(--text-secondary);
}

.hud__live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d4d4d8;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.hud__br::before {
  content: '01';
  color: var(--text-primary);
}

body[data-page="1"] .hud__br::before { content: '02'; }
body[data-page="2"] .hud__br::before { content: '03'; }

.hud__pager {
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hud__pager i {
  display: block;
  width: 2px;
  height: 16px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  transition: height 0.6s var(--ease), background 0.6s ease;
}

body:not([data-page]) .hud__pager i:nth-child(1),
body[data-page="0"] .hud__pager i:nth-child(1),
body[data-page="1"] .hud__pager i:nth-child(2),
body[data-page="2"] .hud__pager i:nth-child(3) {
  height: 34px;
  background: rgba(255, 255, 255, 0.75);
}

/* ═══════════════════════════════════════════════
   MAIN
   ═══════════════════════════════════════════════ */
.main {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 120px;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  translate: 0 0;
  /* no filter here: it would become a backdrop root and kill the hero glass blur */
  transition: opacity 1.1s var(--ease) 0.15s,
              transform 1.1s var(--ease) 0.15s,
              translate 0.82s cubic-bezier(0.76, 0, 0.24, 1);
}

.main.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.main.page-above {
  translate: 0 -100vh;
}

/* ═══════════════════════════════════════════════
   VIZ PAGE
   ═══════════════════════════════════════════════ */
.viz-page {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  translate: 0 100vh;
  transition: translate 0.82s cubic-bezier(0.76, 0, 0.24, 1);
}

.viz-page.page-visible {
  translate: 0 0;
}

.viz-page.page-above {
  translate: 0 -100vh;
}

/* ═══════════════════════════════════════════════
   SECTION HEADERS (scripts + repos share the look)
   ═══════════════════════════════════════════════ */
.scripts-metrics__header,
.repos-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.scripts-metrics__title,
.repos-header__title {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-transform: lowercase;
  color: var(--text-primary);
}

.scripts-metrics__sub,
.repos-header__sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--accent);
}

.scripts-metrics__sub::before,
.repos-header__sub::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d4d4d8;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  animation: livePulse 2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════
   REPOS PAGE
   ═══════════════════════════════════════════════ */
.repos-page {
  position: fixed;
  inset: 0;
  z-index: 1;
  translate: 0 100vh;
  transition: translate 0.82s cubic-bezier(0.76, 0, 0.24, 1);
  overflow: hidden;
}

.repos-page.page-visible {
  translate: 0 0;
}

.repos-inner {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 80px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 920px;
  counter-reset: repo;
}

.repo-card {
  counter-increment: repo;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 18px;
  border-radius: var(--radius-md);
  text-align: left;
  width: 100%;
  overflow: hidden;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  animation: cardIn 0.7s var(--ease) both;
}

.repo-card:nth-child(1)  { animation-delay: 0.04s; }
.repo-card:nth-child(2)  { animation-delay: 0.08s; }
.repo-card:nth-child(3)  { animation-delay: 0.12s; }
.repo-card:nth-child(4)  { animation-delay: 0.16s; }
.repo-card:nth-child(5)  { animation-delay: 0.20s; }
.repo-card:nth-child(6)  { animation-delay: 0.24s; }
.repo-card:nth-child(7)  { animation-delay: 0.28s; }
.repo-card:nth-child(8)  { animation-delay: 0.32s; }
.repo-card:nth-child(n+9) { animation-delay: 0.36s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.repo-card:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 60px -20px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.repo-card__name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  padding-right: 22px;
  overflow-wrap: anywhere;
  transition: text-shadow 0.3s ease;
}

.repo-card__name::before {
  content: counter(repo, decimal-leading-zero);
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

/* arrow glyph, top right */
.repo-card__name::after {
  content: '↗';
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 0.9rem;
  color: var(--text-faint);
  transition: transform var(--transition), color var(--transition);
}

.repo-card:hover .repo-card__name::after {
  transform: translate(2px, -2px);
  color: #fff;
}

.repo-card__desc {
  font-size: 0.78rem;
  color: var(--accent);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.repo-card__meta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--mono);
}

.repo-card__meta:empty {
  display: none;
}

.repo-card__stars {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  color: var(--accent);
}

.repo-card__lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.repo-card__lang::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f4f4f5, #71717a);
}

@media (max-width: 700px) {
  .repos-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════
   SCRIPT METRICS
   ═══════════════════════════════════════════════ */
.scripts-metrics {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
  padding: 40px 20px;
}

.scripts-metrics__grid {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.script-card {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 26px 30px 28px;
  border-radius: var(--radius-lg);
  min-width: 280px;
  overflow: hidden;
  animation: cardFloat 6s ease-in-out infinite;
}

.script-card:nth-child(2) {
  animation-delay: -3s;
}

.script-card__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent-light);
  text-transform: lowercase;
}

.script-card__name::after {
  content: 'live';
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
}

.script-card__stats {
  display: flex;
  gap: 28px;
  align-items: flex-end;
}

.script-card__stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.script-card__num {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.script-card__stat:last-child .script-card__num {
  color: var(--accent);
}

.script-card__label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  text-transform: lowercase;
}

.script-card__divider {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.14), transparent);
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .scripts-metrics__grid {
    flex-direction: column;
    align-items: center;
  }

  .script-card {
    min-width: 0;
    width: 100%;
    max-width: 340px;
  }
}

/* ═══════════════════════════════════════════════
   SCROLL HINTS
   ═══════════════════════════════════════════════ */
.scroll-hint {
  position: absolute;
  bottom: 104px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  animation: scrollBounce 2.2s ease-in-out infinite;
}

.scroll-hint svg,
.scroll-up-hint svg {
  width: 18px;
  height: 18px;
  display: block;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50%      { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

.scroll-up-hint {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  animation: scrollBounceUp 2.2s ease-in-out infinite;
}

@keyframes scrollBounceUp {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50%      { transform: translateX(-50%) translateY(-6px); opacity: 1; }
}

/* ═══════════════════════════════════════════════
   HERO CARD
   ═══════════════════════════════════════════════ */
/* circular core so it sits inside the canvas spectrum ring (ring radius is
   measured from this box in script.js measureCenter) */
.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  border-radius: 50%;
  text-align: center;
  width: min(400px, 86vw);
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.55) 0 38%, rgba(0, 0, 0, 0.25) 70%, rgba(255, 255, 255, 0.03) 100%),
    var(--glass-bg);
  animation: cardFloat 7s ease-in-out infinite;
  transition: opacity 1s ease;
}

/* float uses `translate` so `transform` stays free for the tilt */
@keyframes cardFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -8px; }
}

/* 3D parallax tilt (--rx/--ry from script.js) + beat-reactive glow */
.hero-card {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: opacity 1s ease, transform 0.8s var(--ease);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 14px rgba(255, 255, 255, 0.012),
    inset 0 0 0 15px rgba(255, 255, 255, 0.05),
    inset 0 0 calc(30px + var(--beat, 0) * 60px) rgba(255, 255, 255, calc(0.02 + var(--beat, 0) * 0.08)),
    0 24px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 calc(20px + var(--beat, 0) * 90px) rgba(255, 255, 255, calc(var(--beat, 0) * 0.1));
}

/* light that orbits the hero card's edge */
@property --edge-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.hero-card::before {
  background: conic-gradient(from var(--edge-angle),
      rgba(255, 255, 255, 0.04) 0deg,
      rgba(255, 255, 255, 0.04) 220deg,
      rgba(255, 255, 255, 0.55) 290deg,
      rgba(255, 255, 255, 0.04) 330deg);
  animation: edgeOrbit 6s linear infinite;
}

@keyframes edgeOrbit {
  to { --edge-angle: 360deg; }
}

/* Avatar + spinning conic halo */
.hero-card__avatar-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  margin-bottom: 6px;
  display: grid;
  place-items: center;
  scale: calc(1 + var(--beat, 0) * 0.07);
}

.hero-card__avatar-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 1px;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(255, 255, 255, 0.85) 75%, transparent 76% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin 4.5s linear infinite;
}

.hero-card__avatar-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero-card__avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.35), 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 50px rgba(161, 161, 170, 0.15);
  transition: transform 0.6s var(--ease), box-shadow var(--transition);
}

.hero-card__avatar:hover {
  transform: scale(1.06) rotate(-4deg);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.35), 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 60px rgba(212, 212, 216, 0.3);
}

.hero-card__name {
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff 30%, #8a8a93 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px calc(20px + var(--beat, 0) * 20px) rgba(255, 255, 255, calc(0.08 + var(--beat, 0) * 0.25)));
  transition: letter-spacing 0.6s var(--ease);
}

.hero-card__name:hover {
  letter-spacing: -0.035em;
  filter: drop-shadow(0 2px 24px rgba(255, 255, 255, 0.22));
}

.hero-card__tagline {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  line-height: 1.5;
  min-height: 3em;
  max-width: 250px;
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.hero-card__tagline::after {
  content: '';
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 4px;
  vertical-align: -0.18em;
  background: rgba(255, 255, 255, 0.55);
  animation: caret 1.05s steps(1) infinite;
}

@keyframes caret {
  50% { opacity: 0; }
}

.hero-card__tagline.fade {
  opacity: 0;
  filter: blur(4px);
}

.hero-card__links {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  justify-content: center;
}

.social-link {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.4s var(--ease), background var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition);
}

/* sheen sweep */
.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.social-link svg {
  width: 19px;
  height: 19px;
  transition: transform var(--transition);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.8), 0 0 24px rgba(255, 255, 255, 0.06);
  color: #fff;
  transform: translateY(-3px);
}

.social-link:hover::before {
  transform: translateX(120%);
}

.social-link:hover svg {
  transform: scale(1.08);
}

.social-link:active {
  transform: translateY(-1px) scale(0.96);
}

/* ═══════════════════════════════════════════════
   MUSIC PLAYER — floating pill dock
   ═══════════════════════════════════════════════ */
.player {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px 8px 8px;
  border-radius: 999px;
  gap: 16px;
  opacity: 0;
  transform: translate(-50%, 140%);
  transition: opacity 0.8s var(--ease) 0.4s,
              transform 0.8s var(--ease) 0.4s;
}

.player.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Visualizer bars */
.player__visualizer {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  min-width: 26px;
}

.player__visualizer span {
  width: 3px;
  background: linear-gradient(to top, #71717a, #f4f4f5);
  border-radius: 3px;
  height: 4px;
  transition: height 0.2s ease;
}

.player.playing .player__visualizer span:nth-child(1) { animation: vizBar 0.6s ease-in-out infinite alternate; }
.player.playing .player__visualizer span:nth-child(2) { animation: vizBar 0.5s 0.1s ease-in-out infinite alternate; }
.player.playing .player__visualizer span:nth-child(3) { animation: vizBar 0.7s 0.2s ease-in-out infinite alternate; }
.player.playing .player__visualizer span:nth-child(4) { animation: vizBar 0.4s 0.15s ease-in-out infinite alternate; }
.player.playing .player__visualizer span:nth-child(5) { animation: vizBar 0.55s 0.05s ease-in-out infinite alternate; }

/* real FFT drives heights when audio analysis is available */
.player--fft .player__visualizer span {
  animation: none !important;
  transition: height 0.08s linear;
}

@keyframes vizBar {
  0%   { height: 4px; }
  100% { height: 20px; }
}

.player__info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  order: 2;
}

.player__controls {
  display: flex;
  align-items: center;
  gap: 4px;
  order: 1;
}

.player__btn--skip {
  width: 32px;
  height: 32px;
  color: var(--text-secondary);
}

.player__btn--skip svg {
  width: 15px;
  height: 15px;
}

.player__btn--skip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.player__btn--skip:active {
  transform: scale(0.9);
}

.player__right {
  display: flex;
  align-items: center;
  order: 3;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.player__track-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player__track-details::before {
  content: 'now playing';
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}

.player__track-name {
  max-width: 180px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: lowercase;
}

.player__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease), background var(--transition), box-shadow var(--transition);
}

.player__btn svg {
  width: 18px;
  height: 18px;
}

.player__btn--play {
  width: 42px;
  height: 42px;
  background: #ececef;
  color: #09090b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 6px 20px rgba(0, 0, 0, 0.5);
}

.player.playing .player__btn--play {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 26px rgba(255, 255, 255, 0.22);
}

.player__btn--play:hover {
  background: #fff;
  transform: scale(1.07);
}

.player__btn--play:active {
  transform: scale(0.95);
}

.player__volume {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player__volume-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* Volume slider */
#volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 84px;
  height: 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fafafa;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 0 10px rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: transform var(--transition);
}

#volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

#volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fafafa;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 0 10px rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border: none;
}

#volume-slider::-moz-range-progress {
  height: 3px;
  border-radius: 4px;
  background: #d4d4d8;
}

.hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════════
   CUSTOM CURSOR
   ═══════════════════════════════════════════════ */
body.has-cursor,
body.has-cursor * {
  cursor: none !important;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: difference;
  transition: opacity 0.3s ease;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: #fff;
}

.cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease),
              background 0.35s ease, border-color 0.35s ease, opacity 0.3s ease;
}

.cursor-ring.is-hot {
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  background: #fff;
  border-color: transparent;
}

.cursor-ring.is-down {
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 700px) {
  .hero-card {
    padding: 28px;
    gap: 8px;
  }

  .hero-card__avatar-wrap {
    width: 72px;
    height: 72px;
  }

  .hero-card__avatar {
    width: 60px;
    height: 60px;
  }

  .hero-card__name {
    font-size: 2.2rem;
  }

  .player {
    bottom: 14px;
    gap: 12px;
    max-width: calc(100% - 32px);
  }

  .player__track-name {
    max-width: 110px;
  }

  #volume-slider {
    width: 56px;
  }

  .loader__glass {
    padding: 40px 28px;
  }

  .hud__bl,
  .hud__br,
  .hud__pager {
    display: none !important;
  }

  .hud__tl { top: 18px; left: 18px; }
  .hud__tr { top: 18px; right: 18px; }
}

@media (max-width: 400px) {
  .loader__glass {
    padding: 32px 20px;
  }

  .loader__action {
    width: 160px;
  }

  .player__track-details::before {
    display: none;
  }

  .player__volume-icon {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  .bg__gradient,
  .bg__orb,
  .hero-card,
  .script-card,
  .hero-card__avatar-wrap::before,
  .loader__name,
  .hero-card::before,
  .edit-sweep {
    animation: none !important;
  }
}

/* ═══════════════════════════════════════════════
   TIKTOK EDIT VIBES — PAGES 2 & 3
   ═══════════════════════════════════════════════ */

/* Scanlines */
.viz-page::before,
.repos-page::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.065) 3px,
    rgba(0, 0, 0, 0.065) 4px
  );
  opacity: 0;
  transition: opacity 1s ease 0.4s;
}

.viz-page.page-visible::before,
.repos-page.page-visible::before {
  opacity: 1;
}

/* Vignette */
.viz-page::after,
.repos-page::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 199;
  background: radial-gradient(
    ellipse at 50% 50%,
    transparent 30%,
    rgba(0, 0, 0, 0.65) 100%
  );
  opacity: 0;
  transition: opacity 1s ease 0.4s;
}

.viz-page.page-visible::after,
.repos-page.page-visible::after {
  opacity: 1;
}

/* Snap-in glitch on page entry */
@keyframes page-snap-in {
  0%   { filter: brightness(1.7) contrast(1.4) saturate(0.6); }
  5%   { filter: brightness(0.6) contrast(2.0) saturate(0.4); }
  10%  { filter: brightness(1.3) contrast(1.2) saturate(0.8); }
  18%  { filter: brightness(1); }
  100% { filter: brightness(1); }
}

.viz-page.page-visible,
.repos-page.page-visible {
  animation: page-snap-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* RGB chromatic aberration + glitch on headings */
@keyframes rgb-glitch {
  0%, 80%, 100% {
    text-shadow: -1px 0 rgba(255, 0, 70, 0.35), 1px 0 rgba(0, 210, 255, 0.35);
    transform: none;
  }
  81% {
    text-shadow: -7px 0 rgba(255, 0, 70, 1), 7px 0 rgba(0, 210, 255, 1);
    transform: translate(-3px, 0);
  }
  82% {
    text-shadow: 6px 0 rgba(255, 0, 70, 1), -6px 0 rgba(0, 210, 255, 1);
    transform: translate(3px, 0) skewX(0.8deg);
  }
  83% {
    text-shadow: -2px 0 rgba(255, 0, 70, 0.5), 2px 0 rgba(0, 210, 255, 0.5);
    transform: none;
  }
  84% {
    text-shadow: -5px 0 rgba(255, 0, 70, 0.8), 5px 0 rgba(0, 210, 255, 0.8);
    transform: translate(-1px, 0);
  }
  85% {
    text-shadow: -1px 0 rgba(255, 0, 70, 0.35), 1px 0 rgba(0, 210, 255, 0.35);
    transform: none;
  }
}

.scripts-metrics__title {
  animation: rgb-glitch 5s ease-in-out infinite;
}

.repos-header__title {
  animation: rgb-glitch 5s ease-in-out infinite;
  animation-delay: -2.5s;
}

/* Neon breathing on execution numbers */
@keyframes neon-breathe {
  0%, 100% { text-shadow: 0 0 8px rgba(228, 228, 231, 0.15); }
  50%      { text-shadow: 0 0 18px rgba(228, 228, 231, 0.45),
                          0 0 40px rgba(228, 228, 231, 0.12); }
}

.script-card__num {
  animation: neon-breathe 2.8s ease-in-out infinite;
}

.script-card:nth-child(2) .script-card__num {
  animation-delay: -1.4s;
}

/* Repo card: RGB split on hover */
.repo-card:hover .repo-card__name {
  text-shadow: -1px 0 rgba(255, 0, 70, 0.5), 1px 0 rgba(0, 210, 255, 0.5);
}

/* Sweeping light line across the page */
@keyframes sweep-line {
  0%        { transform: translateY(-4px); opacity: 0; }
  3%        { opacity: 1; }
  96%       { opacity: 0.5; }
  99%, 100% { transform: translateY(100vh); opacity: 0; }
}

.edit-sweep {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 15%,
    rgba(255, 255, 255, 0.2)  50%,
    rgba(255, 255, 255, 0.05) 85%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 202;
  animation: sweep-line 5.5s ease-in-out infinite;
}

.repos-page .edit-sweep {
  animation-delay: -2.75s;
}

@keyframes crtGlitch {
  0%   { transform: translateX(0)    skewX(0deg);     filter: brightness(1); }
  15%  { transform: translateX(-5px) skewX(-2.5deg);  filter: brightness(2.5); }
  30%  { transform: translateX(4px)  skewX(1.5deg);   filter: brightness(1); }
  55%  { transform: translateX(-2px) skewX(0deg); }
  75%  { transform: translateX(3px);                  filter: brightness(1.4); }
  100% { transform: translateX(0)    skewX(0deg);     filter: brightness(1); }
}

/* ═══════════════════════════════════════════════
   EASTER EGG — "it" (built by triggerCRTEasterEgg in script.js)
   ═══════════════════════════════════════════════ */
.egg {
  --egg-red: #e5484d;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  color: #e4e4e7;
  font-family: var(--mono);
  overflow: hidden;
  cursor: none;
  opacity: 0;
  transition: opacity 1.8s ease;
}

.egg.is-on {
  opacity: 1;
}

/* vignette + faint scanlines so the black isn't flat */
.egg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.85) 100%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(255, 255, 255, 0.012) 2px 3px);
}

.egg__stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

/* small, quiet line */
.egg__line {
  font-size: clamp(12px, 1.3vw, 14px);
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.5);
  transition: opacity 0.9s ease, filter 0.9s ease;
}

/* big statement */
.egg__say {
  font-family: var(--font);
  font-size: clamp(24px, 3.4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 18em;
  color: #f4f4f5;
  transition: opacity 0.7s ease, filter 0.7s ease;
}

.egg__line.is-out,
.egg__say.is-out {
  opacity: 0;
  filter: blur(8px);
}

.egg__say.is-red {
  color: var(--egg-red);
  text-shadow: 0 0 30px rgba(229, 72, 77, 0.45);
}

.egg .is-glitch {
  animation: crtGlitch 0.2s ease-in-out;
}

.egg__hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.16);
  white-space: nowrap;
  z-index: 1;
}

/* ── the file it keeps on you ── */
.egg-file {
  position: relative;
  width: min(580px, 100%);
  text-align: left;
  padding: 22px 26px 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.015);
}

.egg-file__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}

.egg-file__head b {
  color: var(--egg-red);
  font-weight: 500;
}

.egg-file__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 7px 0;
  font-size: 12.5px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.egg-file__row.is-in {
  opacity: 1;
  transform: none;
}

.egg-file__k {
  padding-top: 2px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.egg-file__v {
  position: relative;
  justify-self: start;
  color: #e4e4e7;
  overflow-wrap: anywhere;
}

/* redaction bar that wipes off the value */
.egg-file__v::after {
  content: '';
  position: absolute;
  inset: 1px -3px;
  background: #d4d4d8;
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1);
}

.egg-file__v.is-open::after {
  transform: scaleX(0);
}

.egg-stamp {
  position: absolute;
  right: 22px;
  bottom: 16px;
  padding: 4px 12px 4px 16px;
  border: 2px solid var(--egg-red);
  color: var(--egg-red);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.32em;
  opacity: 0;
  transform: rotate(-9deg) scale(2.6);
  transition: transform 0.18s cubic-bezier(0.2, 1.6, 0.4, 1), opacity 0.12s;
}

.egg-stamp.is-on {
  opacity: 0.92;
  transform: rotate(-9deg) scale(1);
}

.egg-shake {
  animation: eggShake 0.35s ease-out;
}

@keyframes eggShake {
  20% { translate: -6px 3px; }
  40% { translate: 5px -2px; }
  60% { translate: -3px 1px; }
  80% { translate: 2px 0; }
}

/* ── cursors: yours, and the one that copies you ── */
.egg-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10001;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  pointer-events: none;
}

.egg-cursor--it {
  opacity: 0;
  transition: opacity 1.4s ease, border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

.egg-cursor--it.is-on {
  opacity: 1;
}

.egg-cursor--it.is-red {
  border-color: var(--egg-red);
  background: var(--egg-red);
  box-shadow: 0 0 18px rgba(229, 72, 77, 0.8);
}

.egg-coords {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10001;
  margin: 14px 0 0 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  pointer-events: none;
}

