:root {
  --ink: #16181d;
  --muted: #3e4450;
  --faint: #5c6472;
  --paper: #e7eef6;
  --font: "Manrope", "Segoe UI", sans-serif;
  --display: "Outfit", "Manrope", "Segoe UI", sans-serif;
  --pad: clamp(1.1rem, 4vw, 2rem);
  --glass-top: rgba(255, 255, 255, 0.62);
  --glass-bot: rgba(255, 255, 255, 0.34);
  --glass-line: rgba(255, 255, 255, 0.72);
  --glass-inset: rgba(255, 255, 255, 0.9);
  --sheen: rgba(255, 255, 255, 0.7);
  --shadow: rgba(40, 55, 90, 0.08);
  --chip: rgba(255, 255, 255, 0.55);
  --chip-strong: rgba(255, 255, 255, 0.82);
  --link: rgba(255, 255, 255, 0.42);
  --link-hover: rgba(255, 255, 255, 0.72);
  --btn: rgba(22, 24, 29, 0.92);
  --btn-text: #fff;
  --btn-hover: #2a2e36;
  --bar: rgba(22, 24, 29, 0.22);
  --bar-on: #17191e;
  --track: rgba(22, 24, 29, 0.18);
  --rail: rgba(22, 24, 29, 0.1);
  --rail-on: rgba(22, 24, 29, 0.62);
  --progress: rgba(22, 24, 29, 0.7);
  --status: #1b6a40;
  --status-bg: rgba(92, 184, 130, 0.18);
  --wash-a: rgba(150, 176, 255, 0.75);
  --wash-b: rgba(255, 176, 210, 0.62);
  --wash-c: rgba(150, 220, 255, 0.55);
  --wash-d: rgba(255, 214, 160, 0.45);
  --orb-a: rgba(170, 190, 255, 0.55);
  --orb-b: rgba(255, 196, 220, 0.5);
  --orb-c: rgba(180, 230, 255, 0.45);
  color-scheme: light;
}

html[data-theme="dark"] {
  --ink: #f2f4f8;
  --muted: #b7c0ce;
  --faint: #8e98a8;
  --paper: #090d14;
  --glass-top: rgba(255, 255, 255, 0.14);
  --glass-bot: rgba(255, 255, 255, 0.05);
  --glass-line: rgba(255, 255, 255, 0.16);
  --glass-inset: rgba(255, 255, 255, 0.22);
  --sheen: rgba(255, 255, 255, 0.14);
  --shadow: rgba(0, 0, 0, 0.4);
  --chip: rgba(255, 255, 255, 0.1);
  --chip-strong: rgba(255, 255, 255, 0.16);
  --link: rgba(255, 255, 255, 0.06);
  --link-hover: rgba(255, 255, 255, 0.12);
  --btn: #f2f4f8;
  --btn-text: #101318;
  --btn-hover: #ffffff;
  --bar: rgba(242, 244, 248, 0.28);
  --bar-on: #f2f4f8;
  --track: rgba(242, 244, 248, 0.22);
  --rail: rgba(242, 244, 248, 0.14);
  --rail-on: rgba(242, 244, 248, 0.72);
  --progress: rgba(242, 244, 248, 0.72);
  --status: #8ee0b2;
  --status-bg: rgba(92, 184, 130, 0.2);
  --wash-a: rgba(118, 92, 255, 0.5);
  --wash-b: rgba(255, 96, 150, 0.28);
  --wash-c: rgba(48, 190, 210, 0.32);
  --wash-d: rgba(255, 160, 70, 0.2);
  --orb-a: rgba(130, 100, 255, 0.42);
  --orb-b: rgba(255, 90, 150, 0.28);
  --orb-c: rgba(50, 200, 220, 0.26);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  background: var(--paper);
  overflow-x: clip;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

::selection { background: var(--chip-strong); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.8rem;
  z-index: 50;
  border-radius: 8px;
}

.skip:focus { top: 0.6rem; }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--progress);
  z-index: 40;
}

.orb {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(30px);
  pointer-events: none;
  opacity: 0.7;
}

.wash {
  position: fixed;
  z-index: 0;
  inset: -35vmax;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 18% 24%, var(--wash-a), transparent 70%),
    radial-gradient(36% 42% at 86% 12%, var(--wash-b), transparent 68%),
    radial-gradient(46% 40% at 62% 88%, var(--wash-c), transparent 70%),
    radial-gradient(30% 32% at 8% 92%, var(--wash-d), transparent 72%);
  filter: blur(18px);
  animation: wash 32s ease-in-out infinite alternate;
}

.orb--a {
  width: 420px;
  height: 420px;
  left: -120px;
  top: 8vh;
  background: var(--orb-a);
  animation: drift 18s ease-in-out infinite;
}

.orb--b {
  width: 360px;
  height: 360px;
  right: -100px;
  top: 22vh;
  background: var(--orb-b);
  animation: drift 22s ease-in-out infinite reverse;
}

.orb--c {
  width: 380px;
  height: 380px;
  left: 34%;
  bottom: -140px;
  background: var(--orb-c);
  animation: drift 20s ease-in-out infinite;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 0.9rem var(--pad) 0;
}

.glass {
  position: relative;
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bot));
  border: 1px solid var(--glass-line);
  box-shadow:
    0 18px 50px var(--shadow),
    inset 0 1px 0 var(--glass-inset);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--sx, 20%) var(--sy, 0%), var(--sheen), transparent 46%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.glass:hover::before { opacity: 1; }

.dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.3rem;
  border-radius: 999px;
}

.dock a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 40px;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
  padding: 0 0.9rem;
  border-radius: 999px;
}

.dock a:hover,
.theme:hover { background: var(--chip); }

.theme {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.theme svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme .moon { display: none; fill: currentColor; stroke: none; }

html[data-theme="dark"] .theme .sun { display: none; }
html[data-theme="dark"] .theme .moon { display: block; }

.hero {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - var(--pad) * 2));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 400px) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
  padding: 1.2rem 0 1.4rem;
}

.portrait {
  margin: 0;
  width: min(100%, 340px);
  height: max-content;
  align-self: center;
  padding: 10px;
  border-radius: 32px;
  background: linear-gradient(165deg, var(--glass-top), var(--glass-bot));
  border: 1px solid var(--glass-line);
  box-shadow:
    0 30px 70px var(--shadow),
    inset 0 1px 0 var(--glass-inset);
  backdrop-filter: blur(16px) saturate(1.3);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
}

.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  max-height: 68vh;
  object-fit: cover;
  object-position: center 55%;
  border-radius: 24px;
}

.intro h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3rem, 5.6vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.role {
  margin: 1.1rem 0 0;
  font-weight: 700;
}

.lead {
  margin: 0.4rem 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.now {
  margin: 0.85rem 0 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  margin-top: 1.4rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-text);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 10px 24px var(--shadow);
}

.btn:hover { background: var(--btn-hover); }

.wrap {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - var(--pad) * 2));
  margin: 0 auto;
  padding-bottom: clamp(1.2rem, 3vw, 2rem);
}

.panel {
  border-radius: 28px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  overflow: hidden;
}

h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); scroll-margin-top: 6.5rem; }

.panel p, .card p {
  margin: 0.75rem 0 0;
  max-width: 40rem;
  color: var(--muted);
}

.section-title { margin: 0.4rem 0 1rem; }

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.7fr);
  gap: clamp(1.2rem, 4vw, 3rem);
  align-items: end;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.95rem;
}

.facts b {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.facts span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
}

.path { position: relative; }

.rail {
  position: absolute;
  left: 0;
  top: 4.4rem;
  bottom: 0.2rem;
  width: 2px;
  border-radius: 99px;
  background: var(--rail);
}

.rail span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--rail-on);
  transform: scaleY(0);
  transform-origin: top center;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.35rem;
  display: grid;
  gap: 0.75rem;
}

.step {
  border-radius: 22px;
  padding: 1rem 1.15rem 1.1rem;
  opacity: 0.34;
  transform: translate3d(22px, 12px, 0);
  transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.step.is-here {
  opacity: 1;
  transform: none;
}

.step h3,
.step p {
  position: relative;
  z-index: 1;
}

.step h3 { font-size: 1.35rem; }

.step p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.project__head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 1rem;
}

.project .status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.38rem 0.75rem 0.38rem 0.6rem;
  border-radius: 999px;
  background: var(--status-bg);
  color: var(--status);
  font-weight: 700;
  font-size: 0.92rem;
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3caf6e;
  box-shadow: 0 0 0 5px rgba(60, 175, 110, 0.22);
  animation: pulse 2.4s ease-in-out infinite;
}

.pieces {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.pieces li {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--chip);
  font-weight: 600;
}

.player {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 1.4rem));
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 4.5rem;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem 0.85rem 0.45rem 0.45rem;
  border-radius: 999px;
}

.play {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
}

.play svg {
  width: 16px;
  height: 16px;
  fill: var(--btn-text);
  display: none;
}

.play .icon-play { display: block; }

.play.is-playing .icon-play { display: none; }

.play.is-playing .icon-pause { display: block; }

.eq {
  position: relative;
  z-index: 1;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.eq i {
  display: block;
  flex: 0 0 3px;
  width: 3px;
  height: var(--h);
  border-radius: 99px;
  background: var(--bar);
  transform-origin: center;
}

.eq i.is-on { background: var(--bar-on); }

.player.is-on .eq i {
  animation: breathe 1.6s ease-in-out infinite;
}

.player.is-on .eq i:nth-child(3n) { animation-delay: 0.2s; }
.player.is-on .eq i:nth-child(3n + 1) { animation-delay: 0.45s; }

#time {
  position: relative;
  z-index: 1;
  min-width: 2.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.vol {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 44px;
}

.vol input {
  width: 72px;
  height: 14px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.vol input::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 99px;
  background: var(--track);
}

.vol input::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border: 0;
  border-radius: 50%;
  background: var(--bar-on);
}

.vol input::-moz-range-track {
  height: 3px;
  border: 0;
  border-radius: 99px;
  background: var(--track);
}

.vol input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--bar-on);
}

@keyframes breathe {
  50% { transform: scaleY(0.78); }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 7px rgba(60, 175, 110, 0.08); }
}

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

.card {
  border-radius: 24px;
  padding: 1.25rem 1.2rem 1.35rem;
  text-align: left;
  color: inherit;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel h2,
.panel p,
.panel a,
.card h3,
.card p {
  position: relative;
  z-index: 1;
}

.card h3 { font-size: 1.45rem; }

.card p { font-size: 0.98rem; }

.card.is-on {
  background: linear-gradient(180deg, var(--chip-strong), var(--glass-top));
  transform: translateY(-4px);
}

.project a {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  text-underline-offset: 0.25em;
}

.links {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.links a {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  text-decoration: none;
  background: var(--link);
}

.links a:hover { background: var(--link-hover); }

.links span {
  color: var(--muted);
  font-weight: 700;
}

.links strong {
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.colophon {
  margin: 1.4rem 0 0;
  color: var(--faint);
}

#contact { padding-bottom: 7rem; }

body { padding-bottom: 0; }

@keyframes drift {
  50% { transform: translate3d(48px, -32px, 0); }
}

@keyframes wash {
  to { transform: translate3d(-3%, 4%, 0) rotate(14deg); }
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    justify-items: center;
    text-align: center;
    padding-top: 1.2rem;
  }

  .portrait { width: min(100%, 320px); }

  .intro h1 { font-size: clamp(2.7rem, 12vw, 3.8rem); }

  .lead { margin-inline: auto; }

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

  .player {
    width: calc(100% - 1rem);
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 0.65rem;
  }

  .vol { display: none; }

  .links a {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .links strong { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb, .wash { animation: none; }
  .portrait { transform: none !important; }
  .card, .step { transition: none; }
  .step { opacity: 1; transform: none; }
  .rail span { transform: none; }
  .status__dot, .eq i { animation: none; }
}
