/* ============================================================
   Pratyush Garg — Portfolio
   dark · violet · cinematic-with-bounce
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #08080d;
  --bg-2: #0d0d15;
  --surface: #12121c;
  --surface-2: #181826;
  --line: rgba(167, 139, 250, 0.12);
  --text: #eceaf6;
  --muted: #8d8aa0;
  --accent: #8b5cf6;
  --accent-2: #c084fc;
  --accent-3: #6d28d9;
  --glow: rgba(139, 92, 246, 0.35);

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
}

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

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: #fff;
}

img {
  max-width: 100%;
  display: block;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
kbd {
  font-family: var(--font-mono);
  font-size: 0.72em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--surface);
}
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--accent-2);
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}
.section {
  padding-block: 5rem;
}
.section-top {
  padding-block: 9rem 6rem;
}

/* ---------- ambient layers ---------- */
.noise {
  position: fixed;
  inset: -50%;
  z-index: 4;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(10) infinite;
}
@keyframes grain {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-3%, 2%);
  }
  40% {
    transform: translate(2%, -3%);
  }
  60% {
    transform: translate(-2%, -2%);
  }
  80% {
    transform: translate(3%, 3%);
  }
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.glow-1 {
  width: 480px;
  height: 480px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(109, 40, 217, 0.5), transparent 70%);
  animation: drift1 18s ease-in-out infinite alternate;
}
.glow-2 {
  width: 420px;
  height: 420px;
  bottom: -180px;
  left: -120px;
  background: radial-gradient(
    circle,
    rgba(192, 132, 252, 0.28),
    transparent 70%
  );
  animation: drift2 22s ease-in-out infinite alternate;
}
@keyframes drift1 {
  to {
    transform: translate(-90px, 70px) scale(1.15);
  }
}
@keyframes drift2 {
  to {
    transform: translate(80px, -60px) scale(1.1);
  }
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---------- custom cursor ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  translate: -50% -50%;
}
.cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-2);
  transition:
    scale 0.18s var(--ease-spring),
    opacity 0.2s;
}
.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--glow);
  transition:
    width 0.3s var(--ease-spring),
    height 0.3s var(--ease-spring),
    border-color 0.3s,
    background-color 0.3s,
    opacity 0.2s;
}
body.cursor-hover .cursor-ring {
  width: 58px;
  height: 58px;
  border-color: var(--accent-2);
  background: rgba(139, 92, 246, 0.08);
}
body.cursor-hover .cursor-dot {
  scale: 0.4;
}
body.cursor-down .cursor-ring {
  width: 28px;
  height: 28px;
}
@media (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ---------- preloader: crystal forge ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  clip-path: circle(150% at var(--cx, 50%) var(--cy, 50%));
  transition: clip-path 0.7s var(--ease-smooth);
}
.preloader.is-revealing { clip-path: circle(0% at var(--cx, 50%) var(--cy, 50%)); }
.preloader.is-gone { display: none; }
.crystal-wrap.just-forged { animation: power-on 1.4s var(--ease-out); }
@keyframes power-on {
  0% { opacity: 0; scale: 0.4; filter: hue-rotate(var(--hue)) brightness(3); }
  40% { opacity: 1; scale: 1.12; filter: hue-rotate(var(--hue)) brightness(1.8); }
  100% { opacity: 1; scale: 1; filter: hue-rotate(var(--hue)) brightness(1); }
}
#forge { position: absolute; inset: 0; width: 100%; height: 100%; }
.forge-name {
  position: absolute; translate: -50% 0;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.42em;
  color: var(--accent-2); white-space: nowrap;
  opacity: 0; transition: opacity 0.7s, letter-spacing 0.7s var(--ease-smooth);
}
.forge-name.is-lit { opacity: 1; letter-spacing: 0.5em; }
.forge-ring {
  position: absolute; translate: -50% -50%;
  width: 40px; height: 40px;
  border: 2.5px solid var(--accent-2); border-radius: 50%;
  box-shadow: 0 0 50px var(--glow), inset 0 0 50px var(--glow);
  opacity: 0; pointer-events: none;
}

/* ---------- page transition: circular wipe ---------- */
.transition {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  --cx: 50%;
  --cy: 50%;
}
.t-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--cx) var(--cy),
    #16121f,
    var(--bg-2) 60%
  );
  clip-path: circle(0px at var(--cx) var(--cy));
  transition: clip-path 0.6s var(--ease-smooth);
}
.t-logo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--accent-2);
  opacity: 0;
  scale: 0.6;
  transition:
    opacity 0.25s,
    scale 0.4s var(--ease-spring);
}
.transition.is-covering {
  pointer-events: auto;
}
.transition.is-covering .t-veil {
  clip-path: circle(142vmax at var(--cx) var(--cy));
}
.transition.is-covering .t-logo {
  opacity: 1;
  scale: 1;
  transition-delay: 0.3s;
}
.transition.is-covering.is-leaving .t-veil {
  clip-path: circle(0px at var(--cx) var(--cy));
}
.transition.is-covering.is-leaving .t-logo {
  opacity: 0;
  scale: 1.3;
  transition-delay: 0s;
}

/* ---------- header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(8, 8, 13, 0.85), transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(to bottom, black 75%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent);
}
.logo {
  position: relative;
  z-index: 2;
}
.logo-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.logo-mark em {
  font-style: normal;
  display: inline-block;
  color: var(--accent-2);
}
.logo:hover .logo-mark em {
  animation: logo-pop 0.45s var(--ease-spring);
}
@keyframes logo-pop {
  40% {
    scale: 1.35;
    color: #fff;
  }
}

.nav {
  position: relative;
  display: flex;
  gap: 0.4rem;
}
.nav-link {
  position: relative;
  z-index: 1;
  padding: 0.5rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s;
  border-radius: 99px;
}
.nav-link:hover {
  color: var(--text);
}
.nav-link.is-active {
  color: var(--text);
}
.nav-indicator {
  position: absolute;
  top: 50%;
  height: 34px;
  translate: 0 -50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  z-index: 0;
  opacity: 0;
  transition:
    left 0.5s var(--ease-spring),
    width 0.5s var(--ease-spring),
    opacity 0.3s;
}
.nav-indicator.is-ready {
  opacity: 1;
}

.burger {
  display: none;
  position: relative;
  z-index: 300;
  width: 40px;
  height: 40px;
}
.burger span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    translate 0.3s var(--ease-spring),
    rotate 0.3s var(--ease-spring);
}
.burger span:nth-child(1) {
  top: 15px;
}
.burger span:nth-child(2) {
  top: 23px;
}
.burger.is-open span:nth-child(1) {
  top: 19px;
  rotate: 45deg;
}
.burger.is-open span:nth-child(2) {
  top: 19px;
  rotate: -45deg;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 12vw;
  background: rgba(8, 8, 13, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  clip-path: circle(0% at calc(100% - 48px) 36px);
  transition: clip-path 0.6s var(--ease-smooth);
  visibility: hidden;
}
.mobile-menu.is-open {
  clip-path: circle(150% at calc(100% - 48px) 36px);
  visibility: visible;
}
.m-link {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 600;
  text-align: left;
  color: var(--muted);
  opacity: 0;
  translate: 0 26px;
  transition:
    opacity 0.4s,
    translate 0.5s var(--ease-spring),
    color 0.3s;
}
.m-link:hover,
.m-link.is-active {
  color: var(--text);
}
.mobile-menu.is-open .m-link {
  opacity: 1;
  translate: 0 0;
}
.mobile-menu.is-open .m-link:nth-child(1) {
  transition-delay: 0.15s;
}
.mobile-menu.is-open .m-link:nth-child(2) {
  transition-delay: 0.22s;
}
.mobile-menu.is-open .m-link:nth-child(3) {
  transition-delay: 0.29s;
}
.mobile-menu.is-open .m-link:nth-child(4) {
  transition-delay: 0.36s;
}

/* ---------- views ---------- */
.view {
  display: none;
  position: relative;
  z-index: 1;
}
.view.is-active {
  display: block;
}

/* ---------- reveal system ---------- */
[data-reveal] {
  opacity: 0;
  translate: 0 34px;
  filter: blur(6px);
}
[data-reveal].is-in {
  opacity: 1;
  translate: 0 0;
  filter: blur(0);
  transition:
    opacity 0.7s var(--ease-out) var(--d, 0s),
    translate 0.85s var(--ease-spring) var(--d, 0s),
    filter 0.7s var(--ease-out) var(--d, 0s);
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 4rem;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
  }
  70% {
    box-shadow: 0 0 0 11px rgba(74, 222, 128, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}
.eyebrow-swap {
  display: inline-block;
  overflow: hidden;
}
#eyebrowLine {
  display: inline-block;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9.5vw, 6.8rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero-title .line {
  display: block;
}
.grad {
  background: linear-gradient(
    110deg,
    var(--accent-2),
    var(--accent),
    var(--accent-2)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: grad-slide 5s linear infinite;
}
/* grabbable hero letters */
.h-letter {
  display: inline-block;
  cursor: grab;
  touch-action: none;
  will-change: transform;
}
.h-letter.is-grabbed {
  cursor: grabbing;
}
@keyframes grad-slide {
  to {
    background-position: 200% center;
  }
}
.hero-dot {
  color: var(--accent-2);
  display: inline-block;
  animation: dot-bounce 2.6s var(--ease-spring) infinite 1.5s;
}
@keyframes dot-bounce {
  0%,
  100% {
    translate: 0 0;
  }
  12% {
    translate: 0 -0.12em;
    scale: 1.12;
  }
  24% {
    translate: 0 0;
    scale: 1;
  }
}

.hero-sub {
  max-width: 560px;
  margin-top: 1.8rem;
  color: var(--muted);
  font-size: 1.08rem;
}
.type-wrap {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  background: var(--accent-2);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* sneaky resume: the full stop */
.secret-dot {
  position: relative;
  color: var(--accent-2);
  font-weight: 700;
  padding: 0 0.15em;
  cursor: pointer;
}
.secret-dot:hover {
  text-shadow: 0 0 14px var(--glow);
}
.secret-tip {
  position: absolute;
  bottom: 130%;
  left: 50%;
  translate: -50% 6px;
  white-space: nowrap;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 8px;
  color: var(--accent-2);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s,
    translate 0.3s var(--ease-spring);
}
.secret-dot:hover .secret-tip {
  opacity: 1;
  translate: -50% 0;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.9rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  transition:
    scale 0.25s var(--ease-spring),
    box-shadow 0.3s;
}
.btn:active {
  scale: 0.94;
}
.btn span {
  position: relative;
  z-index: 1;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent-3), var(--accent));
  color: #fff;
  box-shadow: 0 8px 30px -10px var(--glow);
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  translate: -110% 0;
  transition: translate 0.6s var(--ease-smooth);
}
.btn-primary:hover::before {
  translate: 110% 0;
}
.btn-primary:hover {
  box-shadow: 0 12px 42px -8px var(--glow);
}
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(18, 18, 28, 0.5);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.whisper-link {
  align-self: flex-start;
  margin-top: 2.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.55;
  transition:
    opacity 0.3s,
    color 0.3s;
}
.whisper-link:hover {
  opacity: 1;
  color: var(--accent-2);
}
.whisper-arrow {
  display: inline-block;
  transition: translate 0.3s var(--ease-spring);
}
.whisper-link:hover .whisper-arrow {
  translate: 5px 0;
}

.scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  translate: -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.scroll-hint-track {
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--line);
  border-radius: 99px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-hint-ball {
  width: 4px;
  height: 7px;
  border-radius: 99px;
  background: var(--accent-2);
  animation: scroll-ball 1.8s var(--ease-smooth) infinite;
}
@keyframes scroll-ball {
  0% {
    translate: 0 0;
    opacity: 1;
  }
  70% {
    translate: 0 14px;
    opacity: 0;
  }
  100% {
    translate: 0 0;
    opacity: 0;
  }
}
.scroll-hint-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.2em;
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(
    90deg,
    transparent,
    black 12%,
    black 88%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    black 12%,
    black 88%,
    transparent
  );
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.3s;
}
.marquee-track span:hover {
  color: var(--accent-2);
}
.marquee-track i {
  color: var(--accent-3);
  font-style: normal;
  font-size: 0.8rem;
}
@keyframes marquee {
  to {
    translate: -50% 0;
  }
}

/* ---------- sections ---------- */
.section-title {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 2.6rem;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--accent-2);
}
.section-sub {
  color: var(--muted);
  margin: -1.6rem 0 2.6rem;
}

/* ---------- cards ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.card {
  position: relative;
  padding: 2rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition:
    border-color 0.4s,
    background 0.4s;
  transform-style: preserve-3d;
  will-change: transform;
}
@keyframes spin-border {
  to {
    --angle: 360deg;
  }
}
.card:hover {
  background: var(--surface-2);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 18px 44px -22px var(--glow);
}
.card-icon {
  font-size: 1.9rem;
  margin-bottom: 1.1rem;
  display: inline-block;
  transition:
    scale 0.35s var(--ease-spring),
    rotate 0.35s var(--ease-spring);
}
.card:hover .card-icon {
  scale: 1.25;
  rotate: -8deg;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}
.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  text-align: center;
  padding: 2.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--accent-2);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3.4rem;
  align-items: center;
  margin-bottom: 5.5rem;
}
.photo-frame {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 24px;
  background: var(--surface);
  overflow: visible;
  animation: float 6s ease-in-out infinite;
  transform-style: preserve-3d;
  will-change: transform;
}
@keyframes float {
  50% {
    translate: 0 -12px;
  }
}
.photo-frame::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  z-index: -1;
  background: conic-gradient(
    from var(--angle),
    var(--accent-3),
    var(--accent-2),
    var(--accent-3)
  );
  animation: spin-border 5s linear infinite;
  filter: blur(1px);
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  z-index: -2;
  background: conic-gradient(
    from var(--angle),
    var(--accent-3),
    var(--accent-2),
    var(--accent-3)
  );
  animation: spin-border 5s linear infinite;
  filter: blur(26px);
  opacity: 0.5;
}
.photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}
.photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.5rem;
  color: var(--accent-2);
  border-radius: 24px;
  background: var(--surface);
}
.paperclip {
  position: absolute;
  top: -16px;
  right: 18px;
  z-index: 3;
  font-size: 1.7rem;
  rotate: 12deg;
  display: inline-block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  transition:
    rotate 0.35s var(--ease-spring),
    scale 0.35s var(--ease-spring);
}
.paperclip:hover {
  rotate: -6deg;
  scale: 1.2;
}
.paperclip-tip {
  position: absolute;
  top: 50%;
  right: 120%;
  translate: 6px -50%;
  white-space: nowrap;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 8px;
  color: var(--accent-2);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s,
    translate 0.3s var(--ease-spring);
}
.paperclip:hover .paperclip-tip {
  opacity: 1;
  translate: 0 -50%;
}

.about-text-col p {
  margin-bottom: 1.1rem;
  color: var(--muted);
}
.about-lede {
  font-size: 1.25rem;
  color: var(--text) !important;
}
.about-lede strong,
.about-text-col strong {
  color: var(--accent-2);
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.chip {
  font-size: 0.82rem;
  padding: 0.45rem 0.95rem;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  transition:
    border-color 0.3s,
    color 0.3s,
    translate 0.3s var(--ease-spring);
}
.chip:hover {
  border-color: var(--accent);
  color: var(--text);
  translate: 0 -3px;
}

/* ---------- skills: the filmography ---------- */
.skills-title { margin-top: 1rem; }
.skills-note { font-size: 0.95rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.film-note {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
  margin: -1.6rem 0 2.2rem;
}
.film-note b { color: var(--accent-2); font-weight: 500; }
.filmography { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.film {
  display: flex; gap: 1.2rem; align-items: flex-start;
  padding: 1.15rem; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color 0.35s, translate 0.35s var(--ease-spring), box-shadow 0.35s;
}
.film:hover {
  border-color: rgba(167, 139, 250, 0.45);
  translate: 0 -5px;
  box-shadow: 0 18px 44px -24px var(--glow);
}
.film-poster {
  position: relative; flex: 0 0 84px; aspect-ratio: 2 / 3;
  border-radius: 10px; overflow: hidden;
  background: linear-gradient(165deg, #1c1c32, #0c0c16 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid rgba(167, 139, 250, 0.16);
}
.film-poster::before {
  content: ""; position: absolute; inset: 0; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='90' height='90' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
}
.film-poster::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(238, 237, 254, 0.16) 50%, transparent 62%);
  translate: -130% 0; transition: translate 0.55s;
}
.film:hover .film-poster::after { translate: 130% 0; }
.film-poster img {
  width: 34px; height: 34px; position: relative; z-index: 1;
  transition: scale 0.35s var(--ease-spring);
}
.film:hover .film-poster img { scale: 1.15; }
.pg-badge {
  position: absolute; bottom: 7px; left: 50%; translate: -50%; z-index: 1;
  font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.12em;
  color: var(--accent-2); border: 1px solid rgba(192, 132, 252, 0.5);
  padding: 1.5px 6px; border-radius: 4px; white-space: nowrap;
  background: rgba(8, 8, 13, 0.6);
}
.film-info { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.film-info h3 { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.3; }
.film-review { font-size: 0.86rem; color: var(--muted); font-style: italic; line-height: 1.5; }
.film-tag {
  width: max-content;
  font-family: var(--font-mono); font-size: 0.64rem; color: var(--accent-2);
  background: rgba(139, 92, 246, 0.1); padding: 2.5px 10px; border-radius: 99px;
  margin-top: 0.15rem;
}

/* ---------- achievements ---------- */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}
.ach-card {
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.4s;
  transform-style: preserve-3d;
  will-change: transform;
}
.ach-card:hover {
  border-color: rgba(167, 139, 250, 0.4);
}
.ach-card.featured {
  grid-row: span 1;
}
.ach-media {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-2));
  display: grid;
  place-items: center;
}
.ach-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ach-media-fallback {
  font-size: 3rem;
  opacity: 0.85;
  animation: float 5s ease-in-out infinite;
}
.ach-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 65%
  );
  translate: -130% 0;
}
.ach-card:hover .ach-shine {
  animation: shine 0.9s var(--ease-smooth);
}
@keyframes shine {
  to {
    translate: 130% 0;
  }
}
.ach-body {
  padding: 1.5rem 1.6rem 1.7rem;
  position: relative;
}
.ach-body.center {
  text-align: center;
  padding-block: 3rem;
}
.ach-kind {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.ach-body h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  margin: 0.5rem 0 0.35rem;
}
.ach-body p {
  color: var(--muted);
  font-size: 0.92rem;
}
.ach-year {
  position: absolute;
  top: 1.4rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.ach-body.center .ach-year {
  display: none;
}

.loading-card {
  border-style: dashed;
  background: transparent;
}
.loading-dots {
  display: inline-flex;
  gap: 7px;
  margin-bottom: 1rem;
}
.loading-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-hop 1.2s var(--ease-spring) infinite;
}
.loading-dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.loading-dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes dot-hop {
  30% {
    translate: 0 -9px;
    opacity: 0.5;
  }
  60% {
    translate: 0 0;
    opacity: 1;
  }
}

/* ---------- contact ---------- */
.contact-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 3.4rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-left > p {
  color: var(--muted);
  max-width: 400px;
}

.email-row {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.8rem;
  padding: 0.9rem 1.4rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition:
    border-color 0.3s,
    scale 0.25s var(--ease-spring);
}
.email-row:hover {
  border-color: var(--accent);
}
.email-row:active {
  scale: 0.96;
}
.email-text {
  font-family: var(--font-mono);
  font-size: 0.92rem;
}
.email-copy {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 99px;
}

.socials {
  display: flex;
  gap: 0.9rem;
  margin-top: 2rem;
}
.social {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  transition:
    color 0.3s,
    border-color 0.3s,
    translate 0.35s var(--ease-spring),
    rotate 0.35s var(--ease-spring),
    box-shadow 0.3s;
}
.social:hover {
  color: var(--accent-2);
  border-color: var(--accent);
  translate: 0 -6px;
  rotate: -6deg;
  box-shadow: 0 12px 26px -10px var(--glow);
}

/* form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
.field {
  position: relative;
}
.field input,
.field textarea {
  width: 100%;
  padding: 1.05rem 1.2rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px rgba(139, 92, 246, 0.12),
    0 8px 30px -14px var(--glow);
}
.field label {
  position: absolute;
  left: 1.1rem;
  top: 1.02rem;
  color: var(--muted);
  font-size: 0.95rem;
  pointer-events: none;
  transition:
    top 0.3s var(--ease-spring),
    font-size 0.3s,
    color 0.3s,
    translate 0.3s var(--ease-spring);
  background: transparent;
  padding: 0 0.3rem;
}
.field input:focus + label,
.field textarea:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label {
  top: -0.55rem;
  font-size: 0.72rem;
  color: var(--accent-2);
  background: var(--bg);
  border-radius: 6px;
}
.contact-form .btn {
  align-self: flex-start;
}
.btn-plane {
  display: inline-block;
  position: relative;
  z-index: 1;
  transition:
    translate 0.45s var(--ease-spring),
    rotate 0.45s var(--ease-spring);
}
.contact-form .btn:hover .btn-plane {
  translate: 4px -3px;
  rotate: 12deg;
}
.contact-form .btn.is-sent .btn-plane {
  translate: 60px -40px;
  rotate: 25deg;
  opacity: 0;
  transition-duration: 0.7s;
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem clamp(1.2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.footer-hint:hover {
  opacity: 1;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  translate: -50% 80px;
  z-index: 9500;
  background: var(--surface-2);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border-radius: 99px;
  box-shadow:
    0 16px 40px -12px rgba(0, 0, 0, 0.6),
    0 0 30px -12px var(--glow);
  opacity: 0;
  pointer-events: none;
  transition:
    translate 0.5s var(--ease-spring),
    opacity 0.3s;
}
.toast.is-show {
  translate: -50% 0;
  opacity: 1;
}

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .nav {
    display: none;
  }
  .burger {
    display: block;
  }
  .cards-3 {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.6rem;
  }
  .about-photo-col {
    max-width: 300px;
    margin-inline: auto;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .section-top {
    padding-block: 7rem 4rem;
  }
  .scroll-hint {
    display: none;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cursor-dot,
  .cursor-ring,
  .noise {
    display: none;
  }
  [data-reveal] {
    opacity: 1;
    translate: 0 0;
    filter: none;
  }
}

/* ============================================================
   toys & easter eggs
   ============================================================ */

/* ---------- comet trail ---------- */
.trail-bit {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9997;
  pointer-events: none;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--glow);
}

/* ---------- matrix rain (type "pratyush") ---------- */
.matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 9800;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s;
}
.matrix-canvas.is-on {
  opacity: 1;
}

/* ---------- bubble wrap ---------- */
.bubble-section {
  padding-top: 0;
}
.bubble-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.bubble-label em {
  font-style: normal;
  opacity: 0.6;
}
.bubble-label b {
  color: var(--accent-2);
}
.bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.bubble {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 32% 30%,
      rgba(255, 255, 255, 0.28),
      transparent 38%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(139, 92, 246, 0.22),
      rgba(139, 92, 246, 0.08) 70%
    );
  border: 1px solid rgba(167, 139, 250, 0.3);
  cursor: pointer;
  transition:
    scale 0.18s var(--ease-spring),
    border-color 0.2s;
}
.bubble:hover {
  scale: 1.12;
  border-color: var(--accent-2);
}
.bubble:active {
  scale: 0.8;
}
.bubble.is-popped {
  scale: 1;
  cursor: default;
  background: none;
  border: 1px dashed rgba(167, 139, 250, 0.18);
  animation: bubble-pop 0.3s var(--ease-out);
}
@keyframes bubble-pop {
  0% {
    scale: 1.25;
    border-color: var(--accent-2);
  }
  100% {
    scale: 1;
  }
}
.bubble.is-reborn {
  animation: bubble-reborn 0.6s var(--ease-spring);
}
@keyframes bubble-reborn {
  0% {
    scale: 0;
  }
  60% {
    scale: 1.15;
  }
  100% {
    scale: 1;
  }
}

/* ---------- combo meter ---------- */
.stat-combo {
  position: relative;
  border-radius: 16px;
  transition: background 0.3s;
}
.stat-combo:hover {
  background: rgba(139, 92, 246, 0.07);
}
.stat-combo:active .stat-num {
  scale: 0.85;
}
.stat-combo .stat-num {
  display: block;
  transition: scale 0.15s var(--ease-spring);
}
.combo-badge {
  position: absolute;
  top: -6px;
  right: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-2);
  opacity: 0;
  pointer-events: none;
}
.combo-badge.is-on {
  opacity: 1;
  animation: combo-pop 0.25s var(--ease-spring);
}
@keyframes combo-pop {
  0% {
    scale: 0.5;
  }
  60% {
    scale: 1.35;
  }
  100% {
    scale: 1;
  }
}
.stat-combo.tier-1 .stat-num {
  text-shadow: 0 0 18px var(--glow);
}
.stat-combo.tier-2 {
  animation: combo-shake 0.3s linear infinite;
}
@keyframes combo-shake {
  25% {
    rotate: 0.6deg;
  }
  75% {
    rotate: -0.6deg;
  }
}

/* floating +1 particles & confetti */
.float-bit {
  position: fixed;
  z-index: 9600;
  pointer-events: none;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-2);
}
.confetti-bit {
  position: fixed;
  z-index: 9600;
  pointer-events: none;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* ---------- photo iris-reveal card ---------- */
.photo-frame { cursor: pointer; }
.flipper { position: absolute; inset: 0; }
.flip-front, .flip-back {
  position: absolute; inset: 0; border-radius: 24px; overflow: hidden;
  background: var(--surface);
}
.flip-front { z-index: 2; }
.flip-back {
  z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 1.8rem;
}
.photo-frame.show-back .flip-back { z-index: 2; }
.photo-frame.show-back .flip-front { z-index: 1; }
.flip-back h4 {
  font-family: var(--font-display); font-size: 1.15rem;
  color: var(--accent-2); margin-bottom: 1rem;
}
.flip-back ul { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.flip-back li { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.flip-hint {
  position: absolute; bottom: 12px; left: 50%; translate: -50%; z-index: 4;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em;
  color: var(--accent-2); background: rgba(8, 8, 13, 0.65);
  padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line);
  opacity: 0; transition: opacity 0.3s;
}
.photo-frame:hover .flip-hint { opacity: 0.9; }
/* the ring of light that wipes the new face in */
.photo-ripple {
  position: absolute; z-index: 7; left: var(--rx, 50%); top: var(--ry, 45%);
  width: 14px; height: 14px; translate: -50% -50%; border-radius: 50%;
  pointer-events: none;
  border: 2px solid rgba(192, 132, 252, 0.9);
  box-shadow: 0 0 30px 8px var(--glow), inset 0 0 12px var(--glow);
}

/* ---------- guitar string ---------- */
.string-box {
  position: relative;
  margin: 0 0 4.5rem;
  padding-block: 0.5rem;
  touch-action: none;
}
.string-box svg {
  width: 100%;
  height: 90px;
  display: block;
  overflow: visible;
}
.string-box path {
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--glow));
}
.string-label {
  position: absolute;
  top: 100%;
  left: 50%;
  translate: -50% -8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  opacity: 0.55;
}
.music-note {
  position: fixed;
  z-index: 9600;
  pointer-events: none;
  color: var(--accent-2);
  font-size: 1.1rem;
}

/* ---------- typing game ---------- */
.game {
  position: fixed;
  inset: 0;
  z-index: 9700;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(5, 5, 9, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s,
    visibility 0.35s;
}
.game.is-open {
  opacity: 1;
  visibility: visible;
}
.game-box {
  position: relative;
  width: min(680px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 2.4rem clamp(1.4rem, 4vw, 2.6rem);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.8),
    0 0 60px -30px var(--glow);
  scale: 0.92;
  translate: 0 24px;
  transition:
    scale 0.45s var(--ease-spring),
    translate 0.45s var(--ease-spring);
}
.game.is-open .game-box {
  scale: 1;
  translate: 0 0;
}
.game-close {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  transition:
    color 0.2s,
    border-color 0.2s,
    rotate 0.4s var(--ease-spring);
}
.game-close:hover {
  color: var(--text);
  border-color: var(--accent);
  rotate: 90deg;
}
.game-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-2);
}
.game-box h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0.3rem 0 0.2rem;
}
.game-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.game-text {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  line-height: 1.9;
  letter-spacing: 0.02em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.3rem 1.4rem;
  min-height: 4.4rem;
  cursor: text;
  user-select: none;
}
.game-text span {
  color: var(--muted);
  transition: color 0.1s;
}
.game-text span.ok {
  color: var(--accent-2);
}
.game-text span.bad {
  color: #f87171;
  text-decoration: underline;
}
.game-text span.cur {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
  animation: blink 1s steps(1) infinite;
}
.game-text.is-done span.ok {
  color: #4ade80;
}
.game-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.game-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.game-stats b {
  color: var(--accent-2);
  font-size: 1.05rem;
  margin-left: 4px;
}
.game-actions {
  margin-top: 1.6rem;
}

/* ---------- journey timeline ---------- */
.timeline {
  position: relative;
  margin: 0 0 5.5rem;
  padding-left: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 26px;
  left: 7px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    var(--accent),
    var(--accent-2),
    transparent
  );
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.4s var(--ease-smooth) 0.3s;
}
.timeline.is-in::before {
  transform: scaleY(1);
}
.tl-item {
  position: relative;
}
.tl-dot {
  position: absolute;
  top: 14px;
  left: calc(-2.2rem + 2px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 0 var(--glow);
  animation: tl-pulse 3s ease-out infinite;
}
.tl-item:nth-child(2) .tl-dot {
  animation-delay: 0.7s;
}
.tl-item:nth-child(3) .tl-dot {
  animation-delay: 1.4s;
}
@keyframes tl-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--glow);
  }
  60% {
    box-shadow: 0 0 0 9px rgba(139, 92, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  }
}
.tl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem 1.4rem;
  transition:
    border-color 0.3s,
    translate 0.35s var(--ease-spring),
    box-shadow 0.3s;
}
.tl-card:hover {
  border-color: rgba(167, 139, 250, 0.45);
  translate: 6px 0;
  box-shadow: 0 14px 34px -20px var(--glow);
}
.tl-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.tl-card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 0.25rem 0 0.3rem;
}
.tl-card p {
  color: var(--muted);
  font-size: 0.92rem;
}
.tl-next .tl-card {
  border-style: dashed;
  background: transparent;
}
.tl-next .tl-dot {
  background: transparent;
  border: 2px dashed var(--accent-2);
  animation: none;
}
.tl-next h3 {
  color: var(--muted);
  font-weight: 500;
}

/* ---------- projects: spotlight-glass bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(168px, auto);
  gap: 1.1rem;
}
.b-cell {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.45rem;
  padding: 1.5rem 1.6rem;
  border-radius: 22px;
  background: rgba(18, 18, 28, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  --mx: 50%;
  --my: 50%;
  transition: background 0.35s;
}
/* soft glow that follows the cursor inside each cell */
.b-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(
    340px circle at var(--mx) var(--my),
    rgba(139, 92, 246, 0.13),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s;
}
/* border segment that lights up where the cursor is */
.b-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    220px circle at var(--mx) var(--my),
    rgba(192, 132, 252, 0.8),
    transparent 70%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.bento.is-lit .b-cell::before,
.bento.is-lit .b-cell::after {
  opacity: 1;
}
.b-cell > * {
  position: relative;
  z-index: 1;
}

.b-featured {
  grid-column: span 2;
  grid-row: span 2;
}
.b-proj {
  grid-column: span 2;
}
.b-building {
  grid-column: span 2;
}
.b-soon {
  grid-column: span 2;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.b-kind {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.b-featured .b-kind::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  margin-right: 7px;
  box-shadow: 0 0 10px var(--accent-2);
  animation: pulse 2.4s ease-out infinite;
}
.b-cell h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.b-featured h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.b-cell p {
  color: var(--muted);
  font-size: 0.92rem;
}

.b-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.2rem;
}
.b-tags li {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--accent-2);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid transparent;
  padding: 3px 10px;
  border-radius: 99px;
  transition: border-color 0.25s;
}
.b-cell:hover .b-tags li {
  border-color: rgba(167, 139, 250, 0.3);
}

.b-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.b-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 99px;
  transition:
    scale 0.25s var(--ease-spring),
    box-shadow 0.3s,
    border-color 0.25s,
    color 0.25s;
}
.b-btn:active {
  scale: 0.93;
}
.b-preview {
  background: linear-gradient(120deg, var(--accent-3), var(--accent));
  color: #fff;
  box-shadow: 0 6px 22px -10px var(--glow);
}
.b-preview:hover {
  box-shadow: 0 10px 30px -8px var(--glow);
}
.b-ghostbtn {
  border: 1px solid var(--line);
  color: var(--muted);
}
.b-ghostbtn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.b-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  color: var(--accent-2);
  line-height: 1;
}
.b-small {
  font-size: 0.82rem;
  color: var(--muted);
}
.b-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-2);
  margin-bottom: auto;
}
.b-stat,
.b-now {
  justify-content: flex-end;
}
.b-now p {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.55;
}
.b-code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text) !important;
}
.b-blink {
  color: var(--accent-2);
  animation: blink 1.1s steps(1) infinite;
  margin-left: 3px;
}

/* ---------- project preview window ---------- */
.pv {
  position: fixed;
  inset: 0;
  z-index: 9700;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(5, 5, 9, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s,
    visibility 0.35s;
}
.pv.is-open {
  opacity: 1;
  visibility: visible;
}
.pv-window {
  width: min(960px, 100%);
  height: min(640px, 82vh);
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.8),
    0 0 60px -30px var(--glow);
  scale: 0.94;
  translate: 0 22px;
  transition:
    scale 0.45s var(--ease-spring),
    translate 0.45s var(--ease-spring);
}
.pv.is-open .pv-window {
  scale: 1;
  translate: 0 0;
}
.pv-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.pv-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.pv-red {
  background: #f87171;
}
.pv-yellow {
  background: #fbbf24;
}
.pv-green {
  background: #4ade80;
}
.pv-url {
  flex: 1;
  margin-left: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pv-visit {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-2);
  border: 1px solid var(--line);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  transition:
    border-color 0.25s,
    background 0.25s;
}
.pv-visit:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
}
.pv-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--muted);
  transition:
    color 0.2s,
    rotate 0.4s var(--ease-spring);
}
.pv-close:hover {
  color: var(--text);
  rotate: 90deg;
}
.pv-body {
  position: relative;
  flex: 1;
  background: #0b0b12;
}
.pv-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.4s;
}
.pv-body.is-ready iframe {
  opacity: 1;
}
.pv-loading,
.pv-empty {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  padding: 1.5rem;
}
.pv-body.is-loading .pv-loading {
  display: flex;
}
.pv-body.is-empty .pv-empty {
  display: flex;
}
.pv-empty code {
  font-size: 0.75rem;
}

/* toys: responsive + reduced motion */
@media (max-width: 880px) {
  .bubble {
    width: 40px;
    height: 40px;
  }
  .game-stats {
    gap: 1.2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cozy-float,
  .trail-bit,
  .matrix-canvas {
    display: none;
  }
  .timeline::before {
    transform: scaleY(1);
  }
}

/* ============================================================
   round 3: eggs & polish
   ============================================================ */

/* letterboxd link on the card back */
.lb-link {
  color: var(--accent-2);
  border-bottom: 1px dashed rgba(192, 132, 252, 0.4);
  transition:
    color 0.25s,
    border-color 0.25s;
}
.lb-link:hover {
  color: var(--text);
  border-color: var(--text);
}

/* "do not click this" */
.dnc {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.45;
  transition:
    opacity 0.3s,
    color 0.3s;
}
.dnc:hover {
  opacity: 1;
  color: #f87171;
}

/* bottom-of-page secret */
.bottom-secret {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 1.1rem 1rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0;
  translate: 0 8px;
  transition:
    opacity 0.8s,
    translate 0.8s var(--ease-spring);
  pointer-events: none;
}
.bottom-secret.is-shown {
  opacity: 1;
  translate: 0 0;
  pointer-events: auto;
}
.bottom-secret button {
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border-bottom: 1px dashed rgba(192, 132, 252, 0.4);
  transition: color 0.25s;
}
.bottom-secret button:hover {
  color: var(--text);
}

/* sudo: golden cursor */
body.sudo-gold .cursor-ring {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.4);
}
body.sudo-gold .cursor-dot {
  background: #fbbf24 !important;
}

/* minecraft achievement (konami) */
.mc-toast {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 9920;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #1a1a1a;
  border: 2px solid #555;
  border-radius: 6px;
  padding: 0.7rem 1.3rem 0.7rem 0.9rem;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.6),
    inset 0 0 0 2px #000;
  font-family: var(--font-mono);
  translate: 0 -130%;
  transition: translate 0.55s var(--ease-spring);
}
.mc-toast.is-show {
  translate: 0 0;
}
.mc-icon {
  font-size: 1.7rem;
}
.mc-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  font-size: 0.82rem;
  color: #fff;
}
.mc-text b {
  color: #fcfc54;
  font-weight: 500;
}

/* CRT mode (konami) */
body.is-crt {
  --bg: #020903;
  --bg-2: #04120a;
  --surface: #06170d;
  --surface-2: #0a2113;
  --line: rgba(74, 222, 128, 0.16);
  --text: #c9f8d2;
  --muted: #67a877;
  --accent: #22c55e;
  --accent-2: #4ade80;
  --accent-3: #15803d;
  --glow: rgba(34, 197, 94, 0.35);
}
body.is-crt * {
  text-shadow: 0 0 6px rgba(74, 222, 128, 0.25);
}
body.is-crt .glow-1 {
  background: radial-gradient(circle, rgba(21, 128, 61, 0.45), transparent 70%);
}
body.is-crt .glow-2 {
  background: radial-gradient(circle, rgba(74, 222, 128, 0.2), transparent 70%);
}
.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9810;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.22) 0 1px,
      transparent 1px 3px
    ),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55));
}
body.is-crt .crt-overlay {
  opacity: 1;
  animation: crt-flicker 0.12s steps(2) infinite;
}
@keyframes crt-flicker {
  50% {
    opacity: 0.93;
  }
}

/* DVD screensaver */
.dvd {
  position: fixed;
  inset: 0;
  z-index: 9850;
  background: rgba(4, 4, 8, 0.93);
  opacity: 0;
  transition: opacity 0.8s;
  cursor: none;
}
.dvd.is-on {
  opacity: 1;
}
.dvd-logo {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
  line-height: 1;
  padding: 0.4rem 1rem;
  border: 2.5px solid currentColor;
  border-radius: 14px;
  will-change: transform;
}
.dvd-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  translate: -50%;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.15em;
}

/* bento responsive */
@media (max-width: 880px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
  }
  .b-cell {
    min-height: 150px;
  }
  .b-featured,
  .b-proj,
  .b-building,
  .b-soon {
    grid-column: span 2;
    grid-row: auto;
  }
  .b-stat,
  .b-now {
    grid-column: span 1;
  }
  .pv-window {
    height: 78vh;
  }
  .pv-url {
    display: none;
  }
  .mc-toast {
    right: 0.8rem;
    left: 0.8rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dvd,
  .crt-overlay {
    display: none;
  }
  .bento .b-cell::before,
  .bento .b-cell::after {
    opacity: 0 !important;
  }
}

/* ============================================================
   round 4: crystal, structure upgrades
   ============================================================ */

/* ---------- the hero crystal: amber power-core ---------- */
.eyebrow, .hero-title, .hero-sub, .hero-cta, .whisper-link { position: relative; z-index: 1; }
.crystal-wrap {
  position: absolute;
  z-index: 0;
  right: clamp(0.5rem, 8vw, 9rem);
  top: 50%;
  width: 250px;
  height: 380px;
  translate: 0 -50%;
  perspective: 1100px;
  pointer-events: auto;
  cursor: grab;
  --hue: 0deg;                 /* color collection rotates this (amber base) */
  --charge: 0;                 /* 0 -> 1 as you click it */
  --cmx: 50%; --cmy: 40%;      /* contact point of the cursor */
  filter: hue-rotate(var(--hue));
  transition: filter 0.8s var(--ease-smooth), scale 0.6s var(--ease-spring),
              right 0.6s var(--ease-spring), top 0.6s var(--ease-spring),
              translate 0.6s var(--ease-spring);
}
.crystal-wrap:active { cursor: grabbing; }

/* warm ground glow with a teal rim, echoing the reference */
.crystal-shadow {
  position: absolute;
  bottom: 22px; left: 50%;
  width: 210px; height: 64px;
  translate: -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(255, 176, 32, 0.5), rgba(20, 180, 160, 0.14) 58%, transparent 80%);
  filter: blur(15px);
  animation: crystal-shadow 7s ease-in-out infinite;
}
@keyframes crystal-shadow { 50% { scale: 0.85; opacity: 0.7; } }
.crystal-wrap.is-hot .crystal-shadow {
  background: radial-gradient(closest-side,
    rgba(255, 205, 70, 0.62), rgba(20, 180, 160, 0.18) 58%, transparent 80%);
}

.crystal-spin {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 74px;
  transform-style: preserve-3d;
  will-change: transform;
  animation: crystal-bob 7s ease-in-out infinite;
}
@keyframes crystal-bob { 50% { translate: 0 -13px; } }
.crystal {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
/* the six facet planes — tall amber crystal point */
.crystal i {
  position: absolute; inset: 0;
  transform: rotateY(calc(var(--i) * 30deg));
  clip-path: polygon(50% 0%, 70% 24%, 63% 82%, 50% 100%, 37% 82%, 30% 24%);
  background:
    repeating-linear-gradient(118deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 8px),
    repeating-linear-gradient(-118deg, rgba(180,90,10,0.08) 0 3px, transparent 3px 10px),
    linear-gradient(180deg,
      rgba(255, 233, 150, 0.62),
      rgba(255, 184, 60, 0.34) 38%,
      rgba(214, 120, 20, 0.26) 68%,
      rgba(150, 74, 12, 0.52));
  backface-visibility: visible;
}
.crystal i:nth-child(odd) { filter: brightness(1.3); }
/* facet seams + edge highlight = cut texture */
.crystal i::after {
  content: "";
  position: absolute; inset: 0;
  clip-path: polygon(50% 0%, 70% 24%, 63% 82%, 50% 100%, 37% 82%, 30% 24%);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), transparent 15%),
    linear-gradient(96deg, transparent 42%, rgba(255,238,190,0.42) 50%, transparent 58%);
  mix-blend-mode: screen;
  opacity: 0.55;
}
/* internal molten glow */
.crystal-core {
  position: absolute;
  left: 50%; top: 48%;
  width: 60px; height: 210px;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(255, 250, 224, 0.95), rgba(255, 180, 40, 0.45) 55%, transparent);
  filter: blur(15px);
  opacity: calc(0.6 + var(--charge) * 0.4);
  scale: calc(1 + var(--charge) * 0.35);
  transition: opacity 0.4s, scale 0.4s var(--ease-spring);
}
/* the bright fire-line crack down the middle */
.crystal-fire {
  position: absolute;
  left: 50%; top: 46%;
  width: 8px; height: 158px;
  translate: -50% -50%;
  border-radius: 99px;
  background: linear-gradient(180deg,
    rgba(255,255,235,0.95), rgba(255,200,90,0.8) 50%, rgba(255,150,30,0.18));
  filter: blur(3px);
  opacity: 0.85;
  animation: fire-flicker 2.6s ease-in-out infinite;
}
@keyframes fire-flicker {
  0%, 100% { opacity: 0.68; scale: 1 1; }
  50% { opacity: 1; scale: 1.18 1.04; }
}
/* the light that flows across the crystal from where you touch it */
.crystal-veil {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 74px;
  clip-path: polygon(50% -2%, 72% 24%, 64% 84%, 50% 102%, 36% 84%, 28% 24%);
  background: radial-gradient(120px circle at var(--cmx) var(--cmy),
    rgba(255, 248, 220, 0.6), rgba(255, 190, 70, 0.2) 45%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  mix-blend-mode: screen;
}
.crystal-wrap.is-hot .crystal-veil { opacity: 1; }
/* the star hidden inside — only seen on overcharge */
.crystal-star {
  position: absolute;
  left: 50%; top: 46%;
  width: 16px; height: 16px;
  translate: -50% -50%;
  background: radial-gradient(closest-side, #fff, rgba(255,255,255,0.6) 40%, transparent 70%);
  border-radius: 50%;
  opacity: 0; scale: 0;
  box-shadow: 0 0 30px 8px rgba(255,255,255,0.9), 0 0 60px 20px rgba(255,190,70,0.6);
}
.crystal-wrap.is-cracked .crystal-star { animation: star-reveal 1.6s var(--ease-out); }
@keyframes star-reveal {
  0% { opacity: 0; scale: 0; }
  30% { opacity: 1; scale: 1.6; }
  70% { opacity: 1; scale: 1.2; }
  100% { opacity: 0; scale: 2.2; }
}
.crystal-wrap.is-cracked .crystal i { animation: crack-shudder 0.5s ease-out; }
@keyframes crack-shudder {
  0%,100% { transform: rotateY(calc(var(--i) * 30deg)); }
  30% { transform: rotateY(calc(var(--i) * 30deg)) translateX(5px) scale(1.04); }
  60% { transform: rotateY(calc(var(--i) * 30deg)) translateX(-4px); }
}

/* the rocky geode cluster the crystal grows out of */
.crystal-base {
  position: absolute;
  bottom: 34px; left: 50%; translate: -50%;
  width: 168px; height: 92px;
}
.crystal-base i {
  position: absolute; bottom: 0;
  width: 46px; height: 60px;
  background: linear-gradient(158deg, #4a3826 8%, #271c12 55%, #0d0a07 100%);
  border: 1px solid rgba(255, 180, 80, 0.1);
  box-shadow: inset 0 6px 12px rgba(255,200,110,0.08);
}
.crystal-base i:nth-child(1) { left: 4px;  bottom: 2px;  clip-path: polygon(20% 100%, 0 30%, 45% 0, 100% 40%, 80% 100%); transform: rotate(-8deg); }
.crystal-base i:nth-child(2) { left: 30px; bottom: 8px;  width: 52px; height: 72px; clip-path: polygon(15% 100%, 5% 22%, 50% 0, 95% 35%, 85% 100%); }
.crystal-base i:nth-child(3) { left: 64px; bottom: 12px; width: 56px; height: 80px; clip-path: polygon(18% 100%, 8% 18%, 50% 0, 92% 30%, 82% 100%); }
.crystal-base i:nth-child(4) { left: 98px; bottom: 6px;  width: 52px; height: 70px; clip-path: polygon(15% 100%, 6% 26%, 52% 0, 96% 38%, 86% 100%); transform: rotate(6deg); }
.crystal-base i:nth-child(5) { left: 124px;bottom: 2px;  clip-path: polygon(20% 100%, 0 34%, 48% 0, 100% 42%, 80% 100%); transform: rotate(10deg); }
.crystal-base i:nth-child(6) { left: 48px; bottom: 0;    width: 40px; height: 44px; clip-path: polygon(22% 100%, 4% 36%, 50% 0, 96% 40%, 78% 100%); }
.crystal-base i:nth-child(7) { left: 88px; bottom: 0;    width: 42px; height: 46px; clip-path: polygon(20% 100%, 6% 38%, 50% 0, 94% 42%, 80% 100%); }
/* the secret purple gem tucked in the rocks (a nod to the site theme) */
.base-glint {
  position: absolute; z-index: 2;
  left: 52%; bottom: 14px;
  width: 12px; height: 12px;
  clip-path: polygon(50% 0, 100% 38%, 50% 100%, 0 38%);
  background: radial-gradient(closest-side, #e9d5ff, var(--accent) 70%);
  box-shadow: 0 0 10px 2px rgba(139,92,246,0.7);
  animation: glint 4s ease-in-out infinite;
}
@keyframes glint { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }

/* embers rising off the crystal */
.crystal-ember {
  position: absolute; left: 50%; bottom: 96px;
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255, 205, 95, 0.95);
  box-shadow: 0 0 8px 1px rgba(255, 180, 40, 0.85);
  opacity: 0; pointer-events: none;
  animation: ember-rise var(--dur, 4s) ease-in infinite;
  animation-delay: var(--dl, 0s);
}
@keyframes ember-rise {
  0% { transform: translate(-50%, 0) scale(1); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx, 0px)), -210px) scale(0.2); opacity: 0; }
}

/* charge ring readout that fills as you click */
.crystal-wrap::after {
  content: "";
  position: absolute;
  inset: 28px -6px 64px -6px;
  border-radius: 50%;
  background: conic-gradient(#ffc24a calc(var(--charge) * 360deg), transparent 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  opacity: calc(var(--charge) * 0.9);
  transition: opacity 0.4s;
  pointer-events: none;
}
/* tooltip when it's a companion orb */
.orb-tip {
  position: absolute;
  bottom: -22px; left: 50%; translate: -50%;
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--accent-2);
  white-space: nowrap; opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
/* companion orb: shrunk into the corner after you scroll */
.crystal-wrap.is-companion {
  position: fixed;
  right: 1.6rem; top: auto; bottom: 1.4rem;
  width: 86px; height: 132px;
  translate: 0 0; scale: 1;
  z-index: 60; cursor: pointer;
}
.crystal-wrap.is-companion .crystal-shadow { opacity: 0.5; }
.crystal-wrap.is-companion:hover .orb-tip { opacity: 1; }
/* full-charge surge tint on the whole site */
body.is-surging { --glow: rgba(255, 190, 70, 0.5); }

@media (max-width: 1000px) { .crystal-wrap { display: none; } }

/* ---------- featured teaser (home) ---------- */
.teaser {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: left;
  padding: 1.5rem 2rem;
  border-radius: 20px;
  background: linear-gradient(
    120deg,
    rgba(109, 40, 217, 0.16),
    rgba(18, 18, 28, 0.6) 55%
  );
  border: 1px solid var(--line);
  transition:
    border-color 0.35s,
    translate 0.35s var(--ease-spring),
    box-shadow 0.35s;
}
.teaser:hover {
  border-color: rgba(167, 139, 250, 0.5);
  translate: 0 -4px;
  box-shadow: 0 20px 50px -25px var(--glow);
}
.teaser-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.teaser-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
}
.teaser-sub {
  color: var(--muted);
  font-size: 0.88rem;
}
.teaser-cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  white-space: nowrap;
}
.teaser:hover .whisper-arrow {
  translate: 5px 0;
}

/* ---------- beyond the code ---------- */
.beyond-title {
  margin-top: 5rem;
}

/* ---------- project filters ---------- */
.b-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
}
.b-filter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.45rem 1.2rem;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition:
    color 0.25s,
    border-color 0.25s,
    background 0.25s,
    scale 0.2s var(--ease-spring);
}
.b-filter:hover {
  color: var(--text);
  border-color: var(--accent);
}
.b-filter:active {
  scale: 0.93;
}
.b-filter.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent-3), var(--accent));
}
.b-cell.is-filtered {
  opacity: 0;
  scale: 0.92;
  position: absolute;
  pointer-events: none;
  visibility: hidden;
}
.b-cell {
  transition:
    background 0.35s,
    opacity 0.35s,
    scale 0.35s var(--ease-spring);
}

/* ---------- github cell ---------- */
.b-github {
  grid-column: span 2;
  gap: 0.9rem;
}
.gh-grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 3px;
  height: 86px;
}
.gh-grid b {
  border-radius: 3px;
  background: rgba(139, 92, 246, calc(var(--g) * 0.22 + 0.05));
  transition: scale 0.2s var(--ease-spring);
}
.gh-grid b:hover {
  scale: 1.4;
}
.gh-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.25s;
}
.gh-link:hover {
  color: var(--accent-2);
}
.b-soon {
  grid-column: span 4;
  min-height: 130px;
}

/* ---------- certificate lightbox ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 9710;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(5, 5, 9, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s,
    visibility 0.35s;
}
.lb.is-open {
  opacity: 1;
  visibility: visible;
}
.lb-fig {
  max-width: min(900px, 100%);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  scale: 0.92;
  transition: scale 0.45s var(--ease-spring);
}
.lb.is-open .lb-fig {
  scale: 1;
}
.lb-fig img {
  max-height: 76vh;
  width: auto;
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.85),
    0 0 70px -30px var(--glow);
  object-fit: contain;
}
.lb-fig figcaption {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.lb-close {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  transition:
    color 0.2s,
    border-color 0.2s,
    rotate 0.4s var(--ease-spring);
}
.lb-close:hover {
  color: var(--text);
  border-color: var(--accent);
  rotate: 90deg;
}
.ach-card:not(.loading-card) {
  cursor: pointer;
}

/* ---------- contact quick chips ---------- */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.qchip {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 1.05rem;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  transition:
    color 0.25s,
    border-color 0.25s,
    translate 0.3s var(--ease-spring),
    scale 0.2s var(--ease-spring);
}
.qchip:hover {
  color: var(--text);
  border-color: var(--accent);
  translate: 0 -3px;
}
.qchip:active {
  scale: 0.93;
}
.qchip.is-picked {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent-3), var(--accent));
}

/* round 4 responsive + reduced motion */
@media (max-width: 880px) {
  .teaser {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
  .b-github,
  .b-soon {
    grid-column: span 2;
  }
  .gh-grid {
    height: 70px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .crystal-wrap {
    display: none;
  }
}

/* ---------- round 5: filmography responsive + crystal fx ---------- */
@media (max-width: 760px) {
  .filmography { grid-template-columns: 1fr; }
}
.surge-ripple {
  position: fixed; left: 50%; top: 50%; z-index: 9880;
  width: 10px; height: 10px; translate: -50% -50%;
  border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(244, 240, 255, 0.9);
  box-shadow: 0 0 40px 10px var(--glow);
}
@media (prefers-reduced-motion: reduce) {
  #forge { display: none; }
  .crystal-ember, .crystal-fire { display: none; }
}
