* { box-sizing: border-box; }

:root {
  --bg: #0a0b10;
  --ink: #e8eaf2;
  --ink-dim: #9aa0b6;
  --ink-faint: #6b7089;
  --border: #262a3c;
  --blue: #a5c8ff;
  --violet: #b8a4ff;
  --pink: #ffb0d8;
  user-select: none;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html.lock-scroll, html.lock-scroll body {
  overflow: hidden;
  height: 100%;
}

::selection { background: var(--violet); color: #06070c; }

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

body {
  position: relative;
  background: radial-gradient(120% 60% at 50% 0%, #12142e 0%, #08090f 58%, #050609 100%);
}

/* intro gate */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 1.1s ease;
}

.intro.leaving {
  opacity: 0;
  pointer-events: none;
}

.intro-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.fall-star {
  position: absolute;
  top: -10%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #d9e2ff 55%, #ffffff);
  border-radius: 2px;
  opacity: 0;
  filter: drop-shadow(0 0 5px rgba(210, 220, 255, .85));
  animation-name: fallStar;
  animation-timing-function: cubic-bezier(.5, 0, .9, .4);
  animation-fill-mode: forwards;
}

@keyframes fallStar {
  0% { opacity: 0; transform: translateY(0) scaleY(.5); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: translateY(135vh) scaleY(1); }
}

.intro-name {
  position: relative;
}

/* The gate no longer shows the name at all — just hide it (no transition,
   so it snaps straight to visible the instant site-entered lands, never
   fading in or out). */
body.pre-enter .intro-name {
  opacity: 0;
  pointer-events: none;
}

.intro-enter {
  position: relative;
  background: none;
  border: none;
  padding: 8px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  letter-spacing: .18em;
  color: #e2e5f4;
  cursor: pointer;
  opacity: 0;
  text-shadow: 0 0 10px rgba(184, 164, 255, .75), 0 0 22px rgba(165, 200, 255, .4);
  animation: introFadeIn 1s ease forwards .7s, introBob 2.4s ease-in-out 1s infinite;
  transition: color .2s ease, text-shadow .2s ease;
}

/* ghost trail: two faded, blurred copies of the same text running the
   same bob animation slightly out of phase, reading as a motion trail. */
.intro-enter::before,
.intro-enter::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  padding: inherit;
  pointer-events: none;
  animation: introBob 2.4s ease-in-out 1s infinite;
}

.intro-enter::before {
  opacity: .28;
  filter: blur(2px);
  animation-delay: 1.1s;
}

.intro-enter::after {
  opacity: .14;
  filter: blur(4px);
  animation-delay: 1.25s;
}

.intro-enter:hover,
.intro-enter:focus-visible {
  color: #fff;
  text-shadow: 0 0 14px rgba(184, 164, 255, .95), 0 0 30px rgba(165, 200, 255, .55);
}

@keyframes introFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes introBob {
  0%, 100% { transform: translateY(-9px); }
  50% { transform: translateY(11px); }
}

/* hero entrance, gated until the intro is dismissed */
.rise, .pop { opacity: 0; }
body.site-entered .rise { animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards; }
body.site-entered .pop { animation: pop 1s cubic-bezier(.2, .8, .2, 1) forwards; }

/* starfield */
.bg {
  position: fixed;
  inset: -8%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
}

[data-star-layer] {
  animation: twinkleLayer 7s ease-in-out infinite;
}

[data-star-layer]:nth-of-type(2) { animation-duration: 9s; animation-delay: -3s; }
[data-star-layer]:nth-of-type(3) { animation-duration: 11s; animation-delay: -6s; }

.shoot {
  position: absolute;
  width: 120px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #d9e2ff 40%, #ffffff);
  border-radius: 2px;
  transform: rotate(28deg);
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(210, 220, 255, .9));
  pointer-events: none;
  animation: shootAnim 1.1s ease-out forwards;
}

/* .aurora-parallax carries the JS-driven pointer parallax (transform);
   .aurora carries the CSS drift/glowpulse keyframes. Splitting them avoids
   the two transform sources fighting over the same element. */
.aurora-parallax {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}

.aurora {
  position: absolute;
  border-radius: 50%;
}

.aurora-1 {
  top: -160px;
  left: calc(50% - 600px);
  width: 1200px;
  height: 460px;
  background: conic-gradient(from 200deg at 50% 50%, var(--pink), var(--violet), var(--blue), var(--pink), transparent 80%);
  filter: blur(110px);
  opacity: .18;
  animation: drift 18s ease-in-out infinite alternate, glowpulse 10s ease-in-out infinite;
}

.aurora-2 {
  top: 4%;
  left: -12%;
  width: 760px;
  height: 560px;
  background: conic-gradient(from 60deg at 50% 50%, var(--blue), var(--violet), transparent 80%);
  filter: blur(100px);
  opacity: .14;
  animation: drift 23s ease-in-out infinite alternate-reverse, glowpulse 13s ease-in-out infinite .5s;
}

.aurora-3 {
  bottom: -14%;
  right: -14%;
  width: 820px;
  height: 640px;
  background: conic-gradient(from 320deg at 50% 50%, var(--pink), transparent 77%, var(--violet));
  filter: blur(120px);
  opacity: .15;
  animation: drift 27s ease-in-out infinite alternate, glowpulse 15s ease-in-out infinite 2s;
}

.aurora-4 {
  bottom: 8%;
  left: 6%;
  width: 600px;
  height: 460px;
  background: conic-gradient(from 150deg at 50% 50%, var(--blue), transparent 80%, var(--pink));
  filter: blur(95px);
  opacity: .13;
  animation: drift 20s ease-in-out infinite alternate-reverse, glowpulse 11s ease-in-out infinite 1s;
}

.scroller {
  position: relative;
  z-index: 3;
  min-height: 100vh;
}

/* floating pill bar: a condensed stand-in for the hero (avatar, name,
   links) that fades/slides in once you've scrolled past it, so there's
   still a compact identity + nav floating at the top. */
.pill-bar {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  max-width: calc(100vw - 32px);
  border-radius: 999px;
  background: rgba(14, 15, 24, .68);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-16px) scale(.92);
  transition: opacity .4s ease, transform .4s cubic-bezier(.2, .8, .2, 1);
}

.pill-bar.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.pill-name {
  flex: 0 0 auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #f4f5fc;
  letter-spacing: -.01em;
  text-shadow: 0 0 12px rgba(184, 164, 255, .35);
}

.pill-divider {
  flex: 0 0 auto;
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, .12);
}

.pill-links {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  margin: -10px 0;
  max-width: 230px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}

.pill-links::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* .icon-link. prefix on every override below: .pill-icon-link alone ties
   in specificity with the base .icon-link rules (one class each), and
   since .icon-link is declared later in the file, the tie-break would
   silently win it back to full size. Chaining .icon-link.pill-icon-link
   forces these to always win regardless of source order. */
.icon-link.pill-icon-link {
  width: 28px;
  height: 28px;
}

.icon-link.pill-icon-link svg {
  width: 16px;
  height: 16px;
}

.icon-link.pill-icon-link.glow-blue:hover svg,
.icon-link.pill-icon-link.glow-blue:focus-visible svg { filter: drop-shadow(0 0 3px var(--blue)) drop-shadow(0 0 7px rgba(165, 200, 255, .6)); }
.icon-link.pill-icon-link.glow-violet:hover svg,
.icon-link.pill-icon-link.glow-violet:focus-visible svg { filter: drop-shadow(0 0 3px var(--violet)) drop-shadow(0 0 7px rgba(184, 164, 255, .6)); }
.icon-link.pill-icon-link.glow-pink:hover svg,
.icon-link.pill-icon-link.glow-pink:focus-visible svg { filter: drop-shadow(0 0 3px var(--pink)) drop-shadow(0 0 7px rgba(255, 176, 216, .6)); }

.pill-hint {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 10px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--ink-faint);
  opacity: .85;
  pointer-events: none;
}

/* hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 90px 24px 120px;
  text-align: center;
}

.halo {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 420px;
  height: 420px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(184, 164, 255, .5), rgba(165, 200, 255, .18) 45%, transparent 70%);
  filter: blur(22px);
  animation: halo 7s ease-in-out infinite;
}

.avatar-wrap {
  position: relative;
}

.avatar-tilt {
  transform-origin: center;
  will-change: transform;
}

.avatar-frame {
  width: 210px;
  height: 262px;
  border-radius: 34px;
  padding: 2px;
  animation: floatY 8s ease-in-out infinite;
}

.avatar-slot {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}


.avatar-shadow {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 170px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(184, 164, 255, .45), transparent 100%);
  filter: blur(8px);
}

.name {
  margin: 34px 0 0;
  font-size: 46px;
  font-weight: 700;
  color: #f4f5fc;
  letter-spacing: -.03em;
  line-height: 1;
  text-shadow: 0 0 34px rgba(184, 164, 255, .35);
}

/* scattered, slowly-drifting letters (see initDriftText): .tl holds the
   fixed per-letter scatter rotation, .tl-drift (nested inside) holds the
   slow wander animation — kept on separate elements so the animation
   doesn't overwrite the static rotate(). */
.tl {
  display: inline-block;
}

.tl-drift {
  display: inline-block;
  animation-name: letterDrift;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes letterDrift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(var(--dx, 3px), var(--dy, -3px)); }
}

.tagline {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink-dim);
  font-style: italic;
}

.typed {
  margin: 14px 0 0;
  font-size: 13px;
  color: #aeb4ca;
  min-height: 20px;
}

.bio {
  margin-top: 26px;
  padding: 0 24px;
  max-width: 420px;
}

.bio-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #c9bfff;
  font-style: italic;
  letter-spacing: .02em;
  text-shadow: 0 0 12px rgba(184, 164, 255, .3);
}

.bio-line + .bio-line {
  margin-top: 4px;
  color: var(--ink-dim);
}

.links {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 460px;
}

.icon-link {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #cfd3e2;
  transition: color .2s ease;
}

.icon-link svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  display: block;
  transition: filter .2s ease;
}

.icon-link.glow-blue:hover,
.icon-link.glow-blue:focus-visible { color: #fff; }
.icon-link.glow-blue:hover svg,
.icon-link.glow-blue:focus-visible svg { filter: drop-shadow(0 0 5px var(--blue)) drop-shadow(0 0 13px rgba(165, 200, 255, .65)); }

.icon-link.glow-violet:hover,
.icon-link.glow-violet:focus-visible { color: #fff; }
.icon-link.glow-violet:hover svg,
.icon-link.glow-violet:focus-visible svg { filter: drop-shadow(0 0 5px var(--violet)) drop-shadow(0 0 13px rgba(184, 164, 255, .65)); }

.icon-link.glow-pink:hover,
.icon-link.glow-pink:focus-visible { color: #fff; }
.icon-link.glow-pink:hover svg,
.icon-link.glow-pink:focus-visible svg { filter: drop-shadow(0 0 5px var(--pink)) drop-shadow(0 0 13px rgba(255, 176, 216, .65)); }

.scroll-cue {
  /* left/right + margin auto instead of left:50%+translateX(-50%): the
     bob keyframes below own `transform` for the whole animation (not just
     at each keyframe), so a static translateX(-50%) on the same property
     would get silently dropped the instant the animation started. */
  position: absolute;
  bottom: 120px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: max-content;
  font-size: 12px;
  color: #dcdff0;
  letter-spacing: .14em;
  text-shadow: 0 0 10px rgba(184, 164, 255, .7), 0 0 20px rgba(165, 200, 255, .35);
  animation: bob 2.4s ease-in-out infinite;
}

/* ghost trail: two faded, blurred copies running the same bob animation
   out of phase, reading as a trailing afterimage. */
.scroll-cue::before,
.scroll-cue::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: bob 2.4s ease-in-out infinite;
}

.scroll-cue::before {
  opacity: .3;
  filter: blur(2px);
  animation-delay: .15s;
}

.scroll-cue::after {
  opacity: .15;
  filter: blur(4px);
  animation-delay: .3s;
}

.about-me {
  position: relative;
  padding: 40px 24px 120px;
}

.about-me-eyebrow {
  text-align: center;
  font-size: 12px;
  color: #7f8498;
  letter-spacing: .28em;
  margin-bottom: 46px;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}

.about-me-sections {
  display: flex;
  flex-direction: column;
  gap: 46px;
  max-width: 620px;
  margin: 0 auto;
}

.about-me-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease .05s, transform .8s cubic-bezier(.2, .7, .2, 1) .05s;
}

.about-me-section-tilt {
  transform-origin: center;
  will-change: transform;
}

.about-me-section h2 {
  font-size: 20px;
  font-weight: 400;
  color: #c9bfff;
  letter-spacing: .06em;
  margin: 0 0 14px;
}

.about-me-section h2.pink { color: var(--pink); }

.about-me-section p {
  font-size: 15px;
  line-height: 2;
  color: #dfe3f0;
  font-weight: 300;
  margin: 0;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}

.footer-text {
  font-size: 12px;
  color: #575c72;
  letter-spacing: .1em;
  margin: 0;
}

/* reveal state */
[data-reveal].in-view {
  opacity: 1 !important;
  transform: none !important;
}

@keyframes twinkleLayer { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes drift { 0% { transform: translate3d(-4%, 0, 0); } 100% { transform: translate3d(4%, 2%, 0); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pop { 0% { opacity: 0; transform: scale(.86); } 60% { opacity: 1; transform: scale(1.03); } 100% { opacity: 1; transform: scale(1); } }
@keyframes glowpulse { 0%, 100% { opacity: .2; } 50% { opacity: .3; } }
@keyframes halo { 0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(1); } 50% { opacity: .9; transform: translate(-50%, -50%) scale(1.08); } }
@keyframes blink { 0%, 49% { border-right-color: #b8a4ff; } 50%, 100% { border-right-color: transparent; } }
@keyframes bob { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(11px); } }
@keyframes shootAnim { 0% { opacity: 0; transform: rotate(28deg) translateX(0) scaleX(.3); } 15% { opacity: 1; } 100% { opacity: 0; transform: rotate(28deg) translateX(280px) scaleX(1); } }

@media (max-width: 640px) {
  .avatar-frame { width: 168px; height: 210px; border-radius: 30px; }
  .avatar-slot { border-radius: 28px; }
  .name { font-size: 38px; }
  .about-me-section p { font-size: 16px; line-height: 1.9; }
  .intro-name { font-size: 40px; }
  .intro-enter { bottom: 130px; }
  .scroll-cue { bottom: 95px; }

  /* The aurora blobs are sized for desktop viewports (up to 1200px wide);
     left at that size on a phone they blow out and cover the whole screen.
     Scale them down and recenter aurora-1 (whose left offset depends on
     its own width). */
  .aurora-1 { width: 500px; height: 200px; left: calc(50% - 250px); top: -70px; filter: blur(48px); }
  .aurora-2 { width: 320px; height: 240px; filter: blur(42px); }
  .aurora-3 { width: 340px; height: 270px; filter: blur(50px); }
  .aurora-4 { width: 250px; height: 200px; filter: blur(40px); }
}
