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

/* Tokens */
:root {
  --bg: #050816;
  --bg-deep: #040711;
  --bg-soft: #0a1631;
  --surface: rgba(9, 17, 32, 0.6);
  --surface-strong: rgba(10, 20, 40, 0.9);
  --surface-elevated: rgba(14, 28, 54, 0.86);
  --line: rgba(136, 191, 255, 0.15);
  --line-strong: rgba(136, 191, 255, 0.3);
  --text: #f3f7ff;
  --muted: #95a9c7;
  --cyan: #68f7f0;
  --sky: #78aaff;
  --lime: #d6ff6f;
  --gold: #ffbf8f;
  --violet: #8b92ff;
  --shadow: 0 40px 120px rgba(0, 0, 0, 0.42);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --container: min(1220px, calc(100vw - 40px));
  --story-tone: 0;
  --pointer-x: 50%;
  --pointer-y: 45%;
}

html {
  scroll-behavior: smooth;
}

@media (pointer: fine) {
  html,
  body,
  body * {
    cursor: none !important;
  }
}

/* Base */
body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 18%, rgba(104, 247, 240, 0.14), transparent 22%),
    radial-gradient(circle at 84% 14%, rgba(255, 191, 143, 0.14), transparent 22%),
    radial-gradient(circle at 62% 58%, rgba(120, 170, 255, calc(0.12 + var(--story-tone) * 0.06)), transparent 32%),
    linear-gradient(160deg, #030611 0%, #07101f 40%, #03050c 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::selection {
  background: rgba(104, 247, 240, 0.26);
  color: var(--text);
}

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

button,
a,
.tilt-card,
.magnetic,
.stack-pill {
  cursor: none;
}

.page-shell {
  position: relative;
  isolation: isolate;
}

.ambient-light,
.particle-canvas,
.noise,
.grid-glow,
.scan-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient-light {
  z-index: -4;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(104, 247, 240, calc(0.05 + var(--story-tone) * 0.08)), transparent 16%),
    radial-gradient(circle at calc(100% - var(--pointer-x)) 20%, rgba(255, 191, 143, calc(0.04 + var(--story-tone) * 0.04)), transparent 24%);
  filter: blur(10px);
  transition: background 180ms linear;
}

.particle-canvas {
  z-index: -3;
  opacity: 0.92;
}

.grid-glow {
  z-index: -2;
  background-image:
    linear-gradient(rgba(149, 187, 255, calc(0.035 + var(--story-tone) * 0.02)) 1px, transparent 1px),
    linear-gradient(90deg, rgba(149, 187, 255, calc(0.035 + var(--story-tone) * 0.02)) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 100%);
}

.noise {
  z-index: -1;
  opacity: 0.06;
  background-image: radial-gradient(rgba(255, 255, 255, 0.7) 0.55px, transparent 0.55px);
  background-size: 8px 8px;
  mix-blend-mode: soft-light;
}

.scan-vignette {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 16%, transparent 84%, rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at center, transparent 54%, rgba(0, 0, 0, 0.2) 100%);
}

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 60;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition:
    width 180ms ease,
    height 180ms ease,
    opacity 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.cursor-main {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 16px rgba(104, 247, 240, 0.24));
}

.cursor-main::before,
.cursor-main::after,
.cursor-trail::before {
  content: "";
  position: absolute;
  inset: 0;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.cursor-main::before {
  border: 1px solid rgba(196, 233, 255, 0.58);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(104, 247, 240, 0.12), rgba(120, 170, 255, 0.04)),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(104, 247, 240, 0.06);
  transform: rotate(45deg) scale(1);
}

.cursor-main::after {
  inset: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), #f4fbff);
  box-shadow: 0 0 18px rgba(104, 247, 240, 0.68);
}

.cursor-trail {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  opacity: 0.52;
  filter: blur(1px);
}

.cursor-trail::before {
  inset: 50%;
  width: 100%;
  height: 100%;
  margin: -50% 0 0 -50%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(104, 247, 240, 0.34) 0%, rgba(120, 170, 255, 0.18) 34%, transparent 72%);
  box-shadow:
    0 0 30px rgba(104, 247, 240, 0.22),
    0 0 60px rgba(120, 170, 255, 0.1);
}

.cursor.is-active {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 0 24px rgba(104, 247, 240, 0.34));
}

.cursor.is-active::before {
  border-color: rgba(214, 255, 111, 0.74);
  background:
    linear-gradient(135deg, rgba(214, 255, 111, 0.08), rgba(104, 247, 240, 0.1)),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 24px rgba(104, 247, 240, 0.22);
  transform: rotate(0deg) scale(1.06);
}

.cursor.is-active::after {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: linear-gradient(135deg, var(--lime), #f4fbff);
  box-shadow: 0 0 22px rgba(214, 255, 111, 0.5);
}

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.04);
}

.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--sky), var(--lime));
  box-shadow: 0 0 28px rgba(104, 247, 240, 0.45);
}

.topbar {
  width: 100%;
  margin: 0;
  padding: 18px 34px;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  border-bottom: 1px solid rgba(136, 191, 255, 0.12);
  background: rgba(4, 10, 21, 0.62);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px) saturate(130%);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.topbar.is-scrolled {
  background: rgba(4, 10, 21, 0.94);
  border-color: rgba(136, 191, 255, 0.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.topbar__toggle {
  display: none;
  width: 52px;
  height: 52px;
  padding: 0;
  margin-left: auto;
  border: 1px solid rgba(145, 181, 232, 0.2);
  border-radius: 16px;
  background: rgba(9, 17, 31, 0.5);
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    width 180ms ease;
}

.topbar.is-menu-open .topbar__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.topbar.is-menu-open .topbar__toggle span:nth-child(2) {
  opacity: 0;
}

.topbar.is-menu-open .topbar__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  flex: 0 0 auto;
  margin-right: auto;
}

.brand__text {
  font-size: 1rem;
}

.brand__mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  box-shadow: 0 0 25px rgba(104, 247, 240, 0.84);
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 14, 28, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav a {
  font-size: 0.94rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color 180ms ease;
}

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

.section {
  width: var(--container);
  margin: 0 auto;
}

/* Layout */
.story-zone {
  position: relative;
}

.story-zone::before {
  content: "";
  position: absolute;
  inset: auto auto -70px 50%;
  width: 1px;
  height: 90px;
  background: linear-gradient(180deg, rgba(104, 247, 240, 0.16), transparent);
  transform: translateX(-50%);
}

.story-zone:last-child::before {
  display: none;
}

.hero,
.section--split,
.projects,
.workflow,
.stack,
.contact {
  padding-top: 120px;
}

.hero {
  min-height: calc(100vh - 104px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: center;
  padding-top: 56px;
}

.hero__content,
.hero__visual {
  min-width: 0;
}

.eyebrow,
.section-heading__label,
.experience-card__label,
.manifesto-card__label,
.stack-panel__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

.eyebrow__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(104, 247, 240, 0.8);
}

.hero__title,
.section-heading h2,
.contact-card h2 {
  margin: 18px 0;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.hero__title {
  max-width: 10.5ch;
  font-size: clamp(3rem, 6vw, 5.6rem);
}

.hero__title-line {
  display: block;
}

.hero__title-line--accent {
  color: transparent;
  background: linear-gradient(135deg, #ffffff 0%, #74e7ff 44%, #d6ff6f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 26px rgba(104, 247, 240, 0.18);
}

.hero__text,
.feature-card p,
.manifesto-card p,
.project-card p,
.experience-card p,
.timeline-card p,
.stack-panel p,
.contact-card p {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.78;
  max-width: 62ch;
}

.hero__actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero__actions .pill,
.contact-actions .pill {
  max-width: 100%;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero__trust span,
.manifesto-card__metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(145, 187, 255, 0.16);
  border-radius: 999px;
  background: rgba(9, 19, 38, 0.45);
  color: rgba(243, 247, 255, 0.9);
}

.hero__stats {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pill,
.stack-pill,
.tilt-card,
.magnetic,
[data-parallax] {
  --mx: 0px;
  --my: 0px;
  --py: 0px;
  --lift: 0px;
  --press: 1;
  --rx: 0deg;
  --ry: 0deg;
  --reveal-y: 0px;
  --reveal-scale: 1;
  --shine-x: 50%;
  --shine-y: 50%;
}

.tilt-card,
.magnetic,
.pill,
.stack-pill {
  position: relative;
}

.pill,
.stack-pill,
.tilt-card,
.magnetic {
  transform:
    perspective(1200px)
    translate3d(var(--mx), calc(var(--my) + var(--py) + var(--lift) + var(--reveal-y)), 0)
    rotateX(var(--rx))
    rotateY(var(--ry))
    scale(calc(var(--reveal-scale) * var(--press)));
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.tilt-card.is-interacting,
.magnetic.is-interacting,
.pill.is-interacting,
.stack-pill.is-interacting {
  transition:
    transform 36ms linear,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

[data-parallax]:not(.tilt-card):not(.magnetic):not(.pill):not(.stack-pill) {
  transform: translate3d(0, calc(var(--py) + var(--reveal-y)), 0) scale(var(--reveal-scale));
  transition: transform 160ms ease;
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
}

.pill__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex: 0 0 auto;
}

.pill__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.pill::before,
.stack-pill::before,
.stat-card::after,
.feature-card::after,
.manifesto-card::after,
.project-card::after,
.experience-card::after,
.timeline-card::after,
.stack-panel::after,
.contact-card::after,
.hero-lab::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.18), transparent 34%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.pill:hover::before,
.stack-pill:hover::before,
.tilt-card:hover::after {
  opacity: 1;
}

.pill--solid {
  color: #05111f;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  box-shadow: 0 18px 36px rgba(104, 247, 240, 0.2);
}

.pill--ghost {
  border: 1px solid rgba(145, 181, 232, 0.18);
  background: rgba(9, 17, 31, 0.44);
  color: var(--text);
}

.pill:hover,
.stack-pill:hover {
  --lift: -2px;
}

.section-heading {
  max-width: 860px;
  margin-bottom: 36px;
}

.section-heading h2,
.contact-card h2 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  margin-bottom: 0;
}

/* Components */
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%),
    var(--surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at top left, rgba(104, 247, 240, 0.12), transparent 28%);
  pointer-events: none;
}

.stat-card {
  padding: 24px 22px;
  border-radius: var(--radius-md);
}

.stat-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 2.7rem;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  line-height: 1.55;
}

.hero__visual {
  display: grid;
  gap: 18px;
  align-items: start;
}

.hero-lab {
  width: min(100%, 408px);
  justify-self: end;
  padding: 14px 14px 12px;
  border-radius: var(--radius-xl);
  min-height: auto;
  background:
    radial-gradient(circle at 50% 18%, rgba(120, 170, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 32%),
    rgba(8, 17, 34, 0.78);
}

.hero-lab__header,
.hero-lab__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-lab__header {
  justify-content: space-between;
  padding: 2px 4px 0;
}

.hero-lab__footer {
  display: none;
}

.hero-lab__tag {
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-lab__meta {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero-lab__scene {
  position: relative;
  min-height: auto;
  padding: 10px 0 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-lab__halo {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(104, 247, 240, calc(0.12 + var(--story-tone) * 0.08)), transparent 46%),
    radial-gradient(circle, rgba(120, 170, 255, 0.12), transparent 62%);
  filter: blur(16px);
  animation: drift 12s ease-in-out infinite alternate;
}

.hero-lab__grid {
  position: absolute;
  inset: 10px 8px;
  border-radius: 28px;
  border: 1px solid rgba(149, 187, 255, 0.1);
  background-image:
    linear-gradient(rgba(149, 187, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(149, 187, 255, 0.07) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 46%, transparent 100%);
}

.core-shell {
  position: relative;
  width: 332px;
  height: 238px;
  display: grid;
  place-items: center;
}

.core-shell__beam {
  position: absolute;
  width: 204px;
  height: 238px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(104, 247, 240, 0.12), transparent);
  filter: blur(10px);
}

.core-shell__center {
  position: relative;
  z-index: 1;
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(149, 187, 255, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent),
    rgba(7, 15, 28, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.core-shell__center strong {
  font-family: "Syne", sans-serif;
  font-size: 3rem;
  line-height: 1;
}

.core-shell__center span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.core-shell__center--portrait {
  position: relative;
  isolation: isolate;
  width: 320px;
  height: 220px;
  padding: 10px;
  overflow: hidden;
  border-radius: 34px;
  background: rgba(7, 15, 28, 0.78);
}

.core-shell__center--portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.core-shell__center--portrait::after {
  inset: 2px;
  border: 1px solid rgba(149, 187, 255, 0.16);
}

.portrait-progress {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(104, 247, 240, 0.22));
}

.portrait-progress__track,
.portrait-progress__snake {
  fill: none;
  stroke-width: 3;
}

.portrait-progress__track {
  stroke: rgba(149, 187, 255, 0.14);
}

.portrait-progress__snake {
  stroke: rgba(104, 247, 240, 0.95);
  stroke-linecap: round;
  stroke-dasharray: 18 82;
  stroke-dashoffset: 0;
  animation: borderSnake 3.2s linear infinite;
}

.core-shell__center--portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
  border-radius: 26px;
  display: block;
  filter: saturate(1.06) contrast(1.02);
}

.hero,
.section--split,
.projects,
.workflow,
.stack,
.contact {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.experience-card,
.feature-card,
.manifesto-card,
.project-card,
.timeline-card,
.stack-panel {
  border-radius: var(--radius-lg);
  padding: 28px;
  z-index: 0;
}

.experience-card.stat-card,
.feature-card.stat-card {
  border-radius: var(--radius-md);
  padding: 24px 22px;
}

.experience-card h3,
.feature-card h3,
.manifesto-card h3,
.project-card h3,
.timeline-card h3,
.stack-panel h3 {
  margin: 14px 0 12px;
  font-size: 1.3rem;
  line-height: 1.18;
}

.experience-card--center {
  display: grid;
  place-items: center;
  text-align: center;
}

.experience-card__core {
  position: relative;
  max-width: 360px;
}

.experience-card__pulse {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(104, 247, 240, 0.24), transparent 62%);
  filter: blur(12px);
}

.feature-card__index,
.project-card__badge,
.timeline-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(104, 247, 240, 0.08);
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

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

.manifesto-card {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at 85% 20%, rgba(120, 170, 255, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%),
    rgba(10, 20, 40, 0.86);
}

.manifesto-card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

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

.project-card {
  padding-top: 28px;
}

.project-card__screen {
  position: absolute;
  inset: 20px;
  display: grid;
  gap: 14px;
  align-content: center;
}

.project-card__screen span {
  display: block;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(104, 247, 240, 0.28));
}

.project-card__screen--wide span:nth-child(1) {
  height: 86px;
  border-radius: 22px;
}

.project-card__screen--wide span:nth-child(2) {
  width: 64%;
}

.project-card__screen--stack span:nth-child(1) {
  width: 72%;
}

.project-card__screen--stack span:nth-child(2) {
  width: 100%;
}

.project-card__screen--stack span:nth-child(3) {
  width: 84%;
}

.project-card__screen--stack span:nth-child(4) {
  width: 52%;
}

.project-card--featured {
  background:
    radial-gradient(circle at top, rgba(214, 255, 111, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%),
    rgba(10, 20, 40, 0.86);
}

.project-card ul {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: rgba(243, 247, 255, 0.88);
}

.project-card li::before {
  content: "*";
  margin-right: 10px;
  color: var(--lime);
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 36px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(104, 247, 240, 0.35), transparent);
}

.stack-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: start;
}

.stack-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.stack-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(145, 187, 255, 0.14);
  border-radius: 999px;
  background: rgba(9, 19, 38, 0.54);
  color: rgba(243, 247, 255, 0.94);
  overflow: hidden;
}

.stack-panel {
  min-height: 100%;
}

.contact {
  padding-bottom: 88px;
}

.stack,
.contact {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

.contact-card {
  border-radius: var(--radius-xl);
  padding: 36px;
  background:
    radial-gradient(circle at 82% 20%, rgba(104, 247, 240, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 32%),
    rgba(10, 20, 40, 0.88);
}

@media (max-width: 1280px) {
  .topbar {
    padding: 16px 24px;
  }

  .hero {
    gap: 28px;
  }

  .hero__title {
    font-size: clamp(2.9rem, 5.6vw, 5rem);
  }

  .section-heading h2,
  .contact-card h2 {
    font-size: clamp(2.3rem, 4.8vw, 4.2rem);
  }
}

/* Motion */
.reveal {
  opacity: 0;
  --reveal-y: 50px;
  --reveal-scale: 0.98;
  transition:
    opacity 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal:not(.tilt-card):not(.magnetic):not(.pill):not(.stack-pill):not([data-parallax]) {
  transform: translate3d(0, 50px, 0) scale(0.98);
}

.reveal.is-visible {
  opacity: 1;
  --reveal-y: 0px;
  --reveal-scale: 1;
}

.reveal.is-visible:not(.tilt-card):not(.magnetic):not(.pill):not(.stack-pill):not([data-parallax]) {
  transform: translate3d(0, 0, 0) scale(1);
}

.ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), transparent 64%);
  pointer-events: none;
  animation: ripple 620ms ease-out forwards;
}

@keyframes drift {
  from {
    transform: translate3d(-16px, -12px, 0);
  }

  to {
    transform: translate3d(18px, 18px, 0);
  }
}

@keyframes borderSnake {
  from {
    stroke-dashoffset: 100;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes ripple {
  from {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(0);
  }

  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(16);
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 16px 22px;
  }

  .topbar__actions {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .hero,
  .about-grid,
  .projects-grid,
  .timeline,
  .stack-layout {
    grid-template-columns: 1fr;
  }

  .hero__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero__visual {
    justify-content: center;
  }

  .hero-lab {
    justify-self: center;
  }

  .section-heading {
    max-width: 100%;
  }

  .timeline::before {
    display: none;
  }
}

@media (max-width: 920px) {
  .topbar {
    padding: 14px 18px;
  }

  .brand {
    margin-right: 0;
  }

  .topbar__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 16px;
  }

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

  .hero,
  .section--split,
  .projects,
  .workflow,
  .stack,
  .contact {
    padding-top: 96px;
  }

  .hero {
    min-height: auto;
    gap: 28px;
  }

  .hero__title {
    max-width: 100%;
    font-size: clamp(2.7rem, 8vw, 4.3rem);
  }

  .hero__text,
  .feature-card p,
  .project-card p,
  .contact-card p {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .cursor {
    display: none;
  }

  button,
  a,
  .tilt-card,
  .magnetic,
  .stack-pill {
    cursor: pointer;
  }

  .section {
    width: min(100vw - 28px, 1220px);
  }

  .topbar {
    width: 100%;
    top: 0;
    padding: 12px 14px;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }

  .brand {
    width: auto;
    justify-content: flex-start;
    gap: 10px;
    letter-spacing: 0.14em;
    margin-right: 0;
  }

  .brand__text {
    font-size: 0.92rem;
  }

  .topbar__toggle {
    display: inline-flex;
  }

  .topbar__actions {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-left: 0;
    padding-top: 4px;
  }

  .topbar.is-menu-open .topbar__actions {
    display: flex;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: 22px;
  }

  .nav a {
    font-size: 0.92rem;
    padding: 10px 12px;
    border-radius: 14px;
  }

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

  .hero,
  .section--split,
  .projects,
  .workflow,
  .stack,
  .contact {
    padding-top: 92px;
  }

  .hero {
    min-height: auto;
    gap: 22px;
  }

  .hero__title,
  .section-heading h2,
  .contact-card h2 {
    font-size: clamp(2.25rem, 11vw, 3.4rem);
  }

  .hero__title {
    max-width: 100%;
  }

  .hero__text,
  .feature-card p,
  .project-card p,
  .contact-card p,
  .stack-panel p {
    font-size: 1rem;
    line-height: 1.68;
  }

  .hero__actions,
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .pill,
  .contact-actions .pill {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
    padding: 14px 18px;
  }

  .hero__visual {
    justify-content: center;
  }

  .hero-lab {
    width: min(100%, 360px);
    justify-self: center;
    padding: 12px;
  }

  .hero-lab__header {
    padding: 0 2px 4px;
  }

  .hero-lab__meta {
    font-size: 0.92rem;
  }

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

  .core-shell {
    width: min(100%, 280px);
    height: 210px;
  }

  .core-shell__center {
    width: 102px;
    height: 102px;
  }

  .core-shell__center--portrait {
    width: min(100%, 220px);
    height: auto;
    aspect-ratio: 320 / 220;
  }

  .contact-card,
  .feature-card,
  .manifesto-card,
  .project-card,
  .experience-card,
  .timeline-card,
  .stack-panel,
  .stat-card {
    padding: 22px 20px;
  }

  .stack-cloud {
    justify-content: center;
    gap: 12px;
  }

  .stack-pill {
    min-height: 46px;
    padding: 0 16px;
  }

  .contact-card {
    padding: 26px 20px;
  }
}

@media (max-width: 480px) {
  .section {
    width: min(100vw - 20px, 1220px);
  }

  .topbar {
    padding: 10px 10px 12px;
  }

  .nav {
    gap: 10px;
    padding: 10px 12px;
    border-radius: 24px;
  }

  .nav a {
    font-size: 0.84rem;
  }

  .hero,
  .section--split,
  .projects,
  .workflow,
  .stack,
  .contact {
    padding-top: 84px;
  }

  .hero__title,
  .section-heading h2,
  .contact-card h2 {
    font-size: clamp(1.95rem, 10vw, 2.8rem);
  }

  .eyebrow,
  .section-heading__label {
    gap: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }

  .hero__text,
  .feature-card p,
  .project-card p,
  .contact-card p {
    font-size: 0.96rem;
  }

  .hero-lab {
    width: min(100%, 320px);
  }

  .core-shell {
    width: min(100%, 248px);
    height: 184px;
  }

  .core-shell__center--portrait {
    width: min(100%, 204px);
  }

  .project-card ul {
    gap: 8px;
  }

  .stack-cloud {
    gap: 10px;
  }

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    --reveal-y: 0px;
    --reveal-scale: 1;
  }
}

/* Fallbacks */
html[data-performance="balanced"] .ambient-light {
  filter: blur(8px);
}

html[data-performance="balanced"] .hero-lab__halo {
  filter: blur(12px);
}

html[data-performance="balanced"] .scan-vignette {
  opacity: 0.88;
}

html[data-performance="lite"] .cursor,
html[data-performance="lite"] .ambient-light,
html[data-performance="lite"] .scan-vignette {
  display: none;
}

html[data-performance="lite"] .hero-lab__halo,
html[data-performance="lite"] .experience-card__pulse {
  animation: none;
  filter: none;
}

html[data-performance="lite"] .tilt-card,
html[data-performance="lite"] .magnetic,
html[data-performance="lite"] .pill,
html[data-performance="lite"] .stack-pill {
  transform: none !important;
  transition-duration: 120ms;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cursor-main,
  .topbar,
  .pill--ghost,
  .nav,
  .signal-tags li,
  .stack-pill {
    backdrop-filter: none;
    background: rgba(9, 17, 31, 0.88);
  }
}

@supports not (content-visibility: auto) {
  .hero,
  .section--split,
  .projects,
  .workflow,
  .stack,
  .contact {
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }
}
