:root {
  --bg: #05060d;
  --bg-2: #080a14;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.045);
  --border: rgba(148, 163, 255, 0.1);
  --border-strong: rgba(148, 163, 255, 0.22);
  --text: #e9ecf8;
  --muted: #98a0bd;
  --muted-2: #6d7590;
  --accent: #6d63ff;
  --accent-2: #4f8cff;
  --accent-soft: rgba(109, 99, 255, 0.14);
  --glow: rgba(99, 102, 241, 0.45);
  --green: #34d399;
  --pink: #f472b6;
  --blue: #60a5fa;
  --radius: 14px;
  --radius-lg: 20px;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --container: 1160px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f4f5fb;
  --bg-2: #eceef8;
  --surface: rgba(10, 14, 40, 0.03);
  --surface-2: rgba(10, 14, 40, 0.055);
  --border: rgba(40, 48, 110, 0.12);
  --border-strong: rgba(70, 66, 200, 0.3);
  --text: #141833;
  --muted: #4c5372;
  --muted-2: #6b7290;
  --accent: #5b4ff0;
  --accent-2: #3b74e8;
  --accent-soft: rgba(91, 79, 240, 0.1);
  --glow: rgba(91, 79, 240, 0.3);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

[data-theme="light"] .grain {
  opacity: 0.25;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: var(--nav-h);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand__mark {
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--glow));
}

.brand__text {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.28em;
}

.brand--sm .brand__text {
  font-size: 0.7rem;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav__link {
  position: relative;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
}

.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color 0.25s, background 0.25s, border-color 0.25s;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: block;
}

.nav__burger {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 48px) 0 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__nebula {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% 42%, rgba(88, 96, 220, 0.22), transparent 65%),
    radial-gradient(40% 40% at 20% 80%, rgba(60, 80, 180, 0.12), transparent 70%),
    radial-gradient(90% 70% at 50% 110%, rgba(20, 24, 60, 0.5), transparent 70%);
}

[data-theme="light"] .hero__nebula {
  opacity: 0.35;
}

.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--accent-2);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero .eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.28em;
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 6vw, 4.3rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.grad {
  background: linear-gradient(100deg, #8b7bff 0%, #6d63ff 40%, #3f8cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__tagline {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 500;
  color: var(--text);
}

.hero__desc {
  margin-top: 18px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 0.98rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: translate 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
}

.btn svg {
  transition: transform 0.25s var(--ease);
}

.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 28px -8px var(--glow);
}

.btn--primary:hover {
  translate: 0 -2px;
  box-shadow: 0 14px 34px -8px var(--glow);
}

.btn--primary:hover svg {
  transform: translateX(3px);
}

.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--surface);
}

.btn--ghost:hover {
  translate: 0 -2px;
  background: var(--surface-2);
  border-color: var(--accent);
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 26px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.hero__tags li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.hero__tags svg {
  color: var(--accent-2);
}

.hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  z-index: 2;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

/* ---------- Portal scene ---------- */

.hero__visual {
  position: relative;
  perspective: 1200px;
}

.gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  border-radius: 18px;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
  pointer-events: none;
}

.hero__visual.gl-ready .gl {
  opacity: 1;
}

.hero__visual.gl-ready .scene {
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}

.scene {
  position: relative;
  aspect-ratio: 1 / 1.02;
  max-height: 560px;
  margin-inline: auto;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
}

.portal {
  position: absolute;
  inset: 8% 10% 14% 12%;
  transform: rotateY(-14deg) rotateX(4deg);
  transform-style: preserve-3d;
}

.portal__frame {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 2px solid rgba(150, 170, 255, 0.55);
  background: linear-gradient(160deg, rgba(10, 12, 30, 0.92), rgba(6, 8, 20, 0.98));
  box-shadow:
    0 0 0 1px rgba(90, 110, 255, 0.18),
    0 0 40px rgba(90, 110, 255, 0.35),
    0 0 110px rgba(70, 90, 230, 0.28),
    inset 0 0 60px rgba(40, 50, 140, 0.35);
}

.portal__glow {
  position: absolute;
  inset: -12%;
  border-radius: 20px;
  background: radial-gradient(closest-side, rgba(110, 130, 255, 0.35), transparent 75%);
  filter: blur(18px);
  animation: pulse 6s ease-in-out infinite;
}

.portal__inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 4px;
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(35, 45, 120, 0.45), transparent 70%),
    linear-gradient(180deg, #05060f, #070818 60%, #04050c);
}

.portal__shine {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.14) 0%, transparent 32%, transparent 70%, rgba(140, 160, 255, 0.08) 100%);
  pointer-events: none;
}

.blackhole {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.blackhole__core {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #0a0b18 0%, #000 62%);
  box-shadow:
    0 0 26px 6px rgba(90, 110, 255, 0.45),
    0 0 70px 18px rgba(70, 90, 220, 0.25),
    inset 0 0 22px rgba(120, 140, 255, 0.35);
}

.blackhole__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 128%;
  height: 34%;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-16deg);
  background: conic-gradient(from 210deg, transparent 0deg, rgba(120, 150, 255, 0.15) 60deg, rgba(190, 210, 255, 0.95) 140deg, rgba(130, 160, 255, 0.7) 200deg, rgba(80, 110, 255, 0.25) 280deg, transparent 360deg);
  filter: blur(1px);
  mask: radial-gradient(closest-side, transparent 58%, #000 62%, #000 78%, transparent 82%);
  -webkit-mask: radial-gradient(closest-side, transparent 58%, #000 62%, #000 78%, transparent 82%);
  animation: spin 14s linear infinite;
}

.blackhole__ring--back {
  z-index: 0;
  filter: blur(2px) brightness(0.85);
}

.blackhole__ring--front {
  z-index: 2;
  clip-path: inset(50% 0 0 0);
  animation: spin-front 14s linear infinite;
}

.blackhole__haze {
  position: absolute;
  inset: -35%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(120, 140, 255, 0.3), transparent 70%);
  filter: blur(14px);
  z-index: 1;
}

.scene__floor {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 4%;
  height: 26%;
  background: radial-gradient(ellipse at 50% 0%, rgba(110, 130, 255, 0.2), transparent 68%);
  filter: blur(8px);
}

.scene__reflection {
  position: absolute;
  left: 16%;
  right: 14%;
  bottom: 0;
  height: 22%;
  background: linear-gradient(to bottom, rgba(120, 140, 255, 0.14), transparent 75%);
  filter: blur(6px);
  transform: scaleY(-1);
  opacity: 0.6;
  border-radius: 50%;
}

.rock {
  position: absolute;
  background: linear-gradient(150deg, #14182e, #070912);
  box-shadow: 0 0 18px rgba(90, 110, 240, 0.18), inset 0 0 12px rgba(120, 140, 255, 0.08);
  animation: float 9s ease-in-out infinite;
}

.rock--1 {
  width: 54px;
  height: 40px;
  left: 4%;
  top: 22%;
  clip-path: polygon(20% 0, 85% 12%, 100% 60%, 62% 100%, 8% 78%);
  animation-delay: -1s;
}

.rock--2 {
  width: 36px;
  height: 30px;
  right: 6%;
  top: 14%;
  clip-path: polygon(30% 0, 100% 24%, 78% 100%, 0 70%);
  animation-delay: -3s;
  animation-duration: 11s;
}

.rock--3 {
  width: 70px;
  height: 46px;
  right: 2%;
  bottom: 24%;
  clip-path: polygon(12% 18%, 70% 0, 100% 46%, 66% 100%, 0 74%);
  animation-delay: -5s;
  animation-duration: 12s;
}

.rock--4 {
  width: 28px;
  height: 24px;
  left: 18%;
  bottom: 16%;
  clip-path: polygon(24% 0, 100% 30%, 70% 100%, 0 66%);
  animation-delay: -2s;
  animation-duration: 8s;
}

.rock--5 {
  width: 22px;
  height: 18px;
  left: 46%;
  top: 8%;
  clip-path: polygon(30% 0, 100% 40%, 60% 100%, 0 50%);
  animation-delay: -6s;
  animation-duration: 10s;
  opacity: 0.85;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(-16deg) rotate(360deg);
  }
}

@keyframes spin-front {
  to {
    transform: translate(-50%, -50%) rotate(-16deg) rotate(360deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(4deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: 96px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.section-text {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 54ch;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: gap 0.25s var(--ease), color 0.25s;
}

.link-arrow:hover {
  gap: 12px;
  color: var(--text);
}

/* ---------- About ---------- */

.about {
  border-top: 1px solid var(--border);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about__copy .link-arrow {
  margin-top: 24px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.stat {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: translate 0.35s var(--ease), border-color 0.35s, background 0.35s, box-shadow 0.35s;
}

.stat:hover {
  translate: 0 -4px;
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
}

.stat__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  margin-bottom: 26px;
}

.stat__icon--indigo {
  color: var(--accent);
  background: var(--accent-soft);
}

.stat__icon--blue {
  color: var(--blue);
  background: rgba(96, 165, 250, 0.12);
}

.stat__icon--green {
  color: var(--green);
  background: rgba(52, 211, 153, 0.12);
}

.stat__icon--pink {
  color: var(--pink);
  background: rgba(244, 114, 182, 0.12);
}

.stat__value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.1;
}

.stat__value--text {
  font-size: 1.35rem;
}

.stat__label {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Projects ---------- */

.projects {
  border-top: 1px solid var(--border);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: translate 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s, background 0.4s;
}

.card:hover {
  translate: 0 -6px;
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: 0 26px 60px -28px rgba(70, 80, 220, 0.5);
}

.card__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  padding: 16px;
  background:
    radial-gradient(80% 90% at 70% 10%, rgba(80, 100, 220, 0.2), transparent 60%),
    linear-gradient(160deg, #0b0e1c, #070912);
  border-bottom: 1px solid var(--border);
}

.mock {
  height: 100%;
  border-radius: 10px;
  border: 1px solid rgba(140, 160, 255, 0.16);
  background: rgba(10, 13, 28, 0.85);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.7);
}

.mock__bar {
  display: flex;
  gap: 5px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(140, 160, 255, 0.12);
}

.mock__bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(140, 160, 255, 0.28);
}

.mock__bar span:first-child {
  background: rgba(255, 120, 130, 0.55);
}

.mock__bar span:nth-child(2) {
  background: rgba(255, 200, 100, 0.5);
}

.mock__bar span:nth-child(3) {
  background: rgba(110, 220, 160, 0.5);
}

.mock__body {
  flex: 1;
  display: flex;
  gap: 10px;
  padding: 10px;
  min-height: 0;
}

.mock__side {
  width: 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock__side i {
  height: 8px;
  border-radius: 3px;
  background: rgba(140, 160, 255, 0.14);
}

.mock__side i.on {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.mock__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock__row {
  display: flex;
  gap: 8px;
}

.mock__row b,
.mock__row em {
  height: 9px;
  border-radius: 4px;
  background: rgba(140, 160, 255, 0.16);
  flex: 1;
}

.mock__row b.w40 {
  flex: 0 0 40%;
}

.mock__row em.w60 {
  flex: 0 0 60%;
}

.mock__row em.w30 {
  flex: 0 0 30%;
}

.mock__chip {
  align-self: flex-start;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 999px;
  color: #cdd6ff;
  background: rgba(109, 99, 255, 0.22);
  border: 1px solid rgba(140, 160, 255, 0.3);
  font-weight: 600;
}

.mock__lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock__lines u {
  display: block;
  height: 7px;
  border-radius: 3px;
  background: rgba(140, 160, 255, 0.13);
  text-decoration: none;
}

.mock__lines u.w90 {
  width: 90%;
}
.mock__lines u.w85 {
  width: 85%;
}
.mock__lines u.w80 {
  width: 80%;
}
.mock__lines u.w75 {
  width: 75%;
}
.mock__lines u.w70 {
  width: 70%;
}
.mock__lines u.w65 {
  width: 65%;
}
.mock__lines u.w60 {
  width: 60%;
}
.mock__lines u.w55 {
  width: 55%;
}
.mock__lines u.w50 {
  width: 50%;
}
.mock__lines u.w45 {
  width: 45%;
}
.mock__lines u.w40 {
  width: 40%;
}
.mock__lines u.w35 {
  width: 35%;
}

.mock__body--cols {
  gap: 8px;
}

.mock__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(140, 160, 255, 0.05);
  border: 1px solid rgba(140, 160, 255, 0.08);
}

.mock__col--mid {
  background: rgba(109, 99, 255, 0.1);
  border-color: rgba(140, 160, 255, 0.18);
}

.mock__body--graph {
  align-items: center;
  justify-content: center;
}

.mock__graph {
  width: 100%;
  height: 100%;
}

.mock__graph .n-core {
  fill: rgba(109, 99, 255, 0.85);
  filter: drop-shadow(0 0 6px rgba(120, 140, 255, 0.9));
}

.mock__graph circle:not(.n-core) {
  fill: rgba(140, 170, 255, 0.55);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  flex: 1;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
}

.card__arrow {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease), border-color 0.3s;
}

.card:hover .card__arrow {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  transform: translateX(3px);
}

.card__desc {
  font-size: 0.87rem;
  color: var(--muted);
  flex: 1;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.card__tags li {
  font-size: 0.72rem;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
}

.projects__sub {
  margin-top: 64px;
}

.projects__sub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-top: 44px;
  border-top: 1px solid var(--border);
}

.projects__sub-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 10px;
}

.projects__count {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.card__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #565d68;
  flex-shrink: 0;
}

.status-dot--live {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
  animation: status-blink 2.2s ease-in-out infinite;
}

@keyframes status-blink {
  50% {
    opacity: 0.45;
  }
}

.card__features {
  display: grid;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--muted);
}

.card__features li {
  display: flex;
  gap: 9px;
}

.card__features li::before {
  content: "▸";
  color: var(--accent);
  flex-shrink: 0;
}

.card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.btn--sm {
  padding: 9px 17px;
  font-size: 0.8rem;
}

.timeline {
  display: grid;
}

.timeline__item {
  position: relative;
  padding: 0 0 30px 30px;
  border-left: 1px solid var(--border);
}

.timeline__item:last-child {
  padding-bottom: 6px;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px var(--glow);
}

.timeline__item--current::before {
  background: var(--accent);
}

.timeline__period {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline__role {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  margin-top: 8px;
}

.timeline__org {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 3px;
}

.timeline__item .card__features {
  margin-top: 12px;
  max-width: 76ch;
}

.edu {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.edu__degree {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.edu__school {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 3px;
}

.edu__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}

.edu__meta span {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ---------- Skills ---------- */

.skills {
  border-top: 1px solid var(--border);
}

.skills__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}

.tech {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 18px;
}

.tech__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 0.87rem;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s, background 0.3s, translate 0.3s var(--ease);
}

.tech__item:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  translate: 0 -2px;
}

.tech__icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--c, var(--accent));
  background: color-mix(in srgb, var(--c, var(--accent)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 22%, transparent);
}

.tech__icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.95;
}

/* ---------- CTA ---------- */

.cta {
  padding-top: 40px;
}

.cta__panel {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 64px 32px;
  border-radius: 24px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(90, 100, 230, 0.18), transparent 65%),
    var(--surface);
}

.cta__panel .eyebrow {
  justify-content: center;
}

.cta__panel .eyebrow::before {
  display: none;
}

.cta__panel .section-text {
  margin-inline: auto;
}

.cta__panel .hero__cta {
  justify-content: center;
}

.cta__glow {
  position: absolute;
  top: -60%;
  left: 50%;
  width: 60%;
  height: 120%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(110, 120, 255, 0.22), transparent);
  filter: blur(20px);
  pointer-events: none;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 28px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.footer__tag {
  font-size: 0.82rem;
  color: var(--muted-2);
  font-style: italic;
}

.footer__links {
  display: flex;
  gap: 20px;
}

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  color: var(--muted);
  transition: color 0.25s;
}

.footer__link:hover {
  color: var(--text);
}

.footer__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  font-size: 0.78rem;
  color: var(--muted-2);
}

.footer__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer__versions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.footer__versions-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
}

.footer__versions .footer__link {
  font-size: 0.78rem;
}

.footer__versions .footer__link + .footer__link,
.footer__version-current {
  position: relative;
  padding-left: 14px;
}

.footer__versions .footer__link + .footer__link::before,
.footer__version-current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  translate: 0 -50%;
  background: var(--border-strong);
}

.footer__version-current {
  font-size: 0.78rem;
  color: var(--text);
}

.footer__status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* ---------- Warp transition ---------- */

.warp {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--wx, 50%) var(--wy, 50%), transparent 0%, rgba(3, 4, 10, 0.35) 42%, rgba(3, 4, 10, 0.88) 78%, rgba(2, 3, 8, 0.97) 100%);
}

.warp::after {
  content: "";
  position: absolute;
  left: var(--wx, 50%);
  top: var(--wy, 50%);
  width: 14vmax;
  height: 14vmax;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #000 0%, #000 34%, rgba(160, 175, 255, 0.35) 37%, rgba(109, 99, 255, 0.14) 44%, transparent 62%);
}

.warp.is-active {
  animation: warp-void 0.7s cubic-bezier(0.5, 0, 0.15, 1) forwards;
}

.warp.is-active::after {
  animation: warp-singularity 0.7s cubic-bezier(0.5, 0, 0.15, 1) forwards;
}

.warp-veil {
  position: fixed;
  inset: 0;
  z-index: 899;
  pointer-events: none;
  opacity: 0;
  backdrop-filter: blur(0px);
  background: rgba(5, 6, 14, 0.5);
}

.warp-veil.is-active {
  animation: warp-veil 0.7s cubic-bezier(0.5, 0, 0.15, 1) forwards;
}

@keyframes warp-void {
  0% { opacity: 0; }
  25% { opacity: 1; }
  60% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes warp-singularity {
  0% { transform: translate(-50%, -50%) scale(0.25); opacity: 0; }
  30% { opacity: 1; }
  60% { transform: translate(-50%, -50%) scale(0.7); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.45); opacity: 0; }
}

@keyframes warp-veil {
  0% { opacity: 0; backdrop-filter: blur(0px); }
  40% { opacity: 1; backdrop-filter: blur(5px); }
  100% { opacity: 0; backdrop-filter: blur(0px); }
}

@media (prefers-reduced-motion: reduce) {
  .warp,
  .warp-veil {
    display: none;
  }
  .status-dot--live {
    animation: none;
  }
}

/* ---------- Ambience ---------- */

.ambience {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambience__zone {
  position: absolute;
  inset: -10%;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}

.ambience__zone.is-on {
  opacity: 1;
}

.ambience__zone--home {
  background:
    radial-gradient(55% 45% at 78% 38%, rgba(80, 95, 220, 0.14), transparent 65%),
    radial-gradient(40% 40% at 18% 82%, rgba(55, 75, 170, 0.1), transparent 70%);
}

.ambience__zone--about {
  background:
    radial-gradient(50% 45% at 22% 35%, rgba(90, 80, 220, 0.12), transparent 65%),
    radial-gradient(45% 40% at 85% 75%, rgba(60, 90, 200, 0.1), transparent 70%);
}

.ambience__zone--projects {
  background:
    radial-gradient(55% 50% at 70% 25%, rgba(70, 110, 230, 0.13), transparent 65%),
    radial-gradient(40% 45% at 15% 70%, rgba(100, 70, 210, 0.1), transparent 70%);
}

.ambience__zone--skills {
  background:
    radial-gradient(50% 45% at 30% 30%, rgba(40, 140, 190, 0.11), transparent 65%),
    radial-gradient(45% 40% at 80% 70%, rgba(70, 90, 210, 0.1), transparent 70%);
}

.ambience__zone--contact {
  background:
    radial-gradient(55% 50% at 50% 60%, rgba(110, 80, 230, 0.14), transparent 65%),
    radial-gradient(35% 35% at 20% 20%, rgba(60, 100, 220, 0.1), transparent 70%);
}

main,
.footer {
  position: relative;
  z-index: 1;
}

[data-theme="light"] .ambience__zone {
  opacity: 0;
}

[data-theme="light"] .ambience__zone.is-on {
  opacity: 0.5;
}

/* ---------- Boot sequence ---------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: #04050c;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.no-boot .boot,
.boot.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot__panel {
  width: min(520px, calc(100vw - 48px));
}

.boot__log {
  font-family: "SF Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.9;
  color: #8b93c9;
  min-height: 11.5em;
  white-space: pre-wrap;
}

.boot__log .ok {
  color: #34d399;
}

.boot__log .val {
  color: #93a4ff;
}

.boot__log .cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: #8b93c9;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

.boot__bar {
  margin-top: 22px;
  height: 2px;
  background: rgba(130, 145, 220, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.boot__bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.25s linear;
}

.boot__skip-hint {
  margin-top: 14px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3d4468;
}

/* ---------- Command palette ---------- */

.palette {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: grid;
  place-items: start center;
  padding: 14vh 20px 20px;
}

.palette[hidden] {
  display: none;
}

.palette__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 12, 0.65);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .palette__backdrop {
  background: rgba(230, 232, 245, 0.6);
}

.palette__panel {
  position: relative;
  width: min(560px, 100%);
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg) 92%, #1a1d3a);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(120, 140, 255, 0.06), 0 0 60px -20px rgba(90, 100, 240, 0.35);
  overflow: hidden;
  animation: palette-in 0.22s var(--ease);
}

@keyframes palette-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

.palette__search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-2);
}

.palette__search input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
}

.palette__search input::placeholder {
  color: var(--muted-2);
}

.palette__kbd,
.palette__footer kbd {
  font-family: inherit;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--muted-2);
  background: var(--surface);
}

.palette__list {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.palette__group-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 10px 12px 6px;
}

.palette__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
}

.palette__item svg {
  flex-shrink: 0;
  color: var(--accent-2);
  opacity: 0.85;
}

.palette__item .palette__hint {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted-2);
}

.palette__item.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

.palette__item.is-active svg {
  opacity: 1;
}

.palette__empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted-2);
  font-size: 0.85rem;
}

.palette__footer {
  display: flex;
  gap: 18px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted-2);
}

.palette__footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 640px) {
  .palette-btn {
    display: none;
  }
}

/* ---------- Cursor FX ---------- */

@media (pointer: fine) {
  html.cursor-fx-on,
  html.cursor-fx-on * {
    cursor: none !important;
  }

  html.cursor-fx-on input,
  html.cursor-fx-on textarea,
  html.cursor-fx-on [contenteditable] {
    cursor: text !important;
  }
}

.cursor-fx {
  position: fixed;
  inset: 0;
  z-index: 1001;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.cursor-fx.is-on {
  opacity: 1;
}

.cursor-fx__const {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.cursor-fx__dot {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #c4b5fd;
  box-shadow: 0 0 12px rgba(160, 140, 255, 1), 0 0 28px rgba(109, 99, 255, 0.6);
  transition: scale 0.16s var(--ease), opacity 0.16s var(--ease), background 0.25s, box-shadow 0.25s;
  will-change: transform;
}

.cursor-fx__ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 1.5px solid rgba(150, 140, 255, 0.75);
  transition: scale 0.22s var(--ease), border-color 0.25s, background 0.25s, border-width 0.2s, width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease), box-shadow 0.25s, opacity 0.25s;
  will-change: transform;
}

.cursor-fx__ring::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px dashed rgba(160, 170, 255, 0.6);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  animation: fx-orbit 7s linear infinite;
}

.cursor-fx__ring::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(150, 165, 255, 0.55);
  opacity: 0;
}

@keyframes fx-orbit {
  to {
    transform: rotate(360deg);
  }
}

.cursor-fx.is-hover .cursor-fx__ring::before {
  opacity: 0.8;
}

.cursor-fx.is-idle .cursor-fx__ring::after {
  animation: fx-scanner 1.9s ease-out infinite;
}

@keyframes fx-scanner {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.cursor-fx.is-hover .cursor-fx__ring {
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-color: rgba(150, 170, 255, 0.85);
  background: rgba(109, 99, 255, 0.08);
}

.cursor-fx.is-hover .cursor-fx__dot {
  scale: 0;
  opacity: 0;
}

.cursor-fx__ring.is-glitch {
  animation: fx-glitch 0.14s steps(2) 2;
}

@keyframes fx-glitch {
  0% {
    filter: drop-shadow(1.5px 0 rgba(255, 90, 130, 0.9)) drop-shadow(-1.5px 0 rgba(90, 220, 255, 0.9));
    opacity: 0.75;
  }
  50% {
    filter: drop-shadow(-2px 0 rgba(255, 90, 130, 0.7)) drop-shadow(2px 0 rgba(90, 220, 255, 0.7));
    opacity: 1;
  }
  100% {
    filter: none;
    opacity: 1;
  }
}

.cursor-fx__trail {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.cursor-fx__charge {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 4;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s var(--ease);
  will-change: transform, opacity;
}

.cursor-fx.is-charging .cursor-fx__charge {
  opacity: 1;
}

.charge__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 5px rgba(150, 160, 255, 0.7));
}

.charge__track {
  fill: none;
  stroke: rgba(150, 160, 255, 0.18);
  stroke-width: 2;
}

.charge__fill {
  fill: none;
  stroke: #c3cbff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
}

.cursor-fx.is-critical .charge__svg {
  animation: charge-critical 0.5s ease-in-out infinite;
}

@keyframes charge-critical {
  50% {
    filter: drop-shadow(0 0 12px rgba(200, 208, 255, 1));
  }
}

.cursor-fx.is-charging .cursor-fx__ring::after {
  animation: none;
  opacity: 0;
}

.cursor-fx.is-flare .cursor-fx__dot {
  scale: 2.6;
  background: #fff;
  box-shadow: 0 0 18px rgba(210, 205, 255, 1), 0 0 44px rgba(120, 110, 255, 1);
}

.cursor-fx__particle--acc {
  background: radial-gradient(circle, rgba(205, 212, 255, 0.95), rgba(109, 99, 255, 0) 70%);
  animation-duration: 0.55s;
}

.gyro-btn {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  translate: -50% 0;
  z-index: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.gyro-btn[hidden] {
  display: none;
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 400;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  translate: 0 12px;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), translate 0.3s var(--ease), border-color 0.3s, background 0.3s;
}

.to-top.is-visible {
  opacity: 1;
  translate: 0 0;
  pointer-events: auto;
}

.to-top:hover {
  border-color: var(--accent);
}

.cursor-fx__discharge {
  position: fixed;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2px solid rgba(205, 210, 255, 0.9);
  box-shadow: 0 0 16px rgba(140, 150, 255, 0.7);
  pointer-events: none;
  animation: discharge-ring 0.5s var(--ease) forwards;
  will-change: transform, opacity;
}

@keyframes discharge-ring {
  0% {
    opacity: 0.95;
    transform: scale(0.4);
  }
  100% {
    opacity: 0;
    transform: scale(var(--ds, 6));
  }
}

.cursor-fx__pop {
  position: fixed;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(200, 206, 255, 0.85);
  box-shadow: 0 0 10px rgba(140, 150, 255, 0.6), inset 0 0 6px rgba(140, 150, 255, 0.4);
  pointer-events: none;
  animation: pop-implode 0.35s var(--ease) forwards;
  will-change: transform, opacity;
}

@keyframes pop-implode {
  0% {
    opacity: 0.8;
    transform: scale(2.2);
  }
  100% {
    opacity: 0;
    transform: scale(0.25);
  }
}

.cursor-fx__particle {
  position: fixed;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 190, 255, 0.95), rgba(109, 99, 255, 0));
  pointer-events: none;
  animation: particle-drift 0.7s var(--ease) forwards;
  will-change: transform, opacity;
}

@keyframes particle-drift {
  0% {
    opacity: 0.85;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--px, 0px), var(--py, 18px)) scale(0.15);
  }
}

/* ---------- Magnetic + spotlight ---------- */

.spotlight {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(340px circle at var(--sx, 50%) var(--sy, 50%), rgba(130, 145, 255, 0.14), rgba(109, 99, 255, 0.04) 42%, transparent 68%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.spotlight:hover::after,
.spotlight.is-lit::after {
  opacity: 1;
}

.spotlight > * {
  position: relative;
  z-index: 1;
}

[data-theme="light"] .spotlight::after {
  background: radial-gradient(340px circle at var(--sx, 50%) var(--sy, 50%), rgba(91, 79, 240, 0.1), rgba(59, 116, 232, 0.03) 42%, transparent 68%);
}

.card.is-tilt,
.stat.is-tilt {
  transition: transform 0.25s var(--ease), border-color 0.4s, box-shadow 0.4s, background 0.4s;
}

@media (prefers-reduced-motion: reduce) {
  .cursor-fx {
    display: none !important;
  }
}

.cursor-fx.is-touch .cursor-fx__dot {
  display: none;
}

.cursor-fx.is-touch .cursor-fx__ring {
  opacity: 0;
}

.cursor-fx.is-touch.is-charging .cursor-fx__ring {
  opacity: 1;
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal[data-delay="1"] {
  transition-delay: 0.08s;
}
.reveal[data-delay="2"] {
  transition-delay: 0.16s;
}
.reveal[data-delay="3"] {
  transition-delay: 0.24s;
}
.reveal[data-delay="4"] {
  transition-delay: 0.32s;
}
.reveal[data-delay="5"] {
  transition-delay: 0.4s;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .blackhole__ring,
  .rock,
  .portal__glow,
  .footer__status i {
    animation: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero__visual {
    order: -1;
    max-width: 460px;
    margin-inline: auto;
    width: 100%;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 28px);
    min-height: auto;
  }

  .about__grid,
  .skills__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .cards .card:last-child {
    grid-column: 1 / -1;
    max-width: 520px;
    margin-inline: auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .nav__burger {
    display: grid;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 501;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  }

  .nav__links.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav__link {
    padding: 13px 4px;
    border-bottom: 1px solid var(--border);
  }

  .nav__link::after {
    display: none;
  }

  .section {
    padding: 72px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .cards .card:last-child {
    max-width: none;
  }

  .tech {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    gap: 12px;
  }

  .stat {
    padding: 18px;
  }

  .footer__inner,
  .footer__base {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .hero__tags {
    gap: 14px 18px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .tech {
    grid-template-columns: 1fr;
  }
}
