:root {
  --bg: #0b0b0c;
  --bg-2: #121214;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #ededee;
  --muted: #86868e;
  --accent: #c8ff3d;
  --accent-ink: #0b0b0c;
  --online: #23a55a;
  --idle: #f0b232;
  --dnd: #f23f43;
  --offline: #80848e;
  --status: var(--offline);
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--muted); }
em { font-style: normal; color: var(--accent); }

/* ── Loader ─────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--gutter);
  transition: transform 1s var(--ease) .1s;
}
.loader__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.loader__count { font-size: clamp(64px, 14vw, 200px); font-weight: 600; line-height: .85; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.loader__bar { height: 2px; background: var(--line); margin-top: 24px; overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--accent); }
body.is-ready .loader { transform: translateY(-100%); }

/* ── Ambient layers ─────────────────────── */
.glow {
  position: fixed; z-index: -1; pointer-events: none;
  width: 60vmax; height: 60vmax; left: 0; top: 0;
  translate: calc(var(--gx, 50vw) - 50%) calc(var(--gy, 30vh) - 50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 60%);
  filter: blur(20px);
}
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Cursor ─────────────────────────────── */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  body, a, button { cursor: none; }
  .cursor { display: block; position: fixed; inset: 0; z-index: 95; pointer-events: none; }
  .cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; border-radius: 50%; }
  .cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent); }
  .cursor__ring {
    width: 38px; height: 38px; margin: -19px 0 0 -19px;
    border: 1px solid var(--line-2);
    display: grid; place-items: center;
    transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s;
  }
  .cursor__label { font-style: normal; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--accent-ink); opacity: 0; transition: opacity .2s; }
  .cursor.is-hover .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--accent); }
  .cursor.is-label .cursor__ring { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--accent); border-color: var(--accent); }
  .cursor.is-label .cursor__label { opacity: 1; }
  .cursor.is-label .cursor__dot { opacity: 0; }
}

/* ── Nav ────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  transition: background .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(11, 11, 12, .7); backdrop-filter: blur(14px); border-color: var(--line); }
.nav__logo { font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.nav__links { display: flex; gap: 28px; font-size: 14px; }
.nav__links a { position: relative; overflow: hidden; display: inline-block; height: 1.5em; }
.nav__links a span { display: block; transition: transform .45s var(--ease); }
.nav__links a:hover span { transform: translateY(-100%); }
.nav__links a span { text-shadow: 0 1.5em 0 var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 15px;
  transition: transform .3s var(--ease), box-shadow .3s;
  will-change: transform;
}
.btn:hover { box-shadow: 0 10px 40px -10px var(--accent); }
.btn--small { padding: 10px 18px; font-size: 14px; }
.chip {
  padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 999px;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  transition: background .3s, color .3s, border-color .3s;
}
.chip:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ── Hero ───────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 110px var(--gutter) 36px;
}
.hero__meta { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 13px; background: rgba(255, 255, 255, .03);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status); box-shadow: 0 0 0 0 var(--status); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--status) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }

.hero__title {
  margin: 6vh 0;
  font-size: clamp(56px, 16.5vw, 280px);
  line-height: .86; letter-spacing: -.055em; font-weight: 700;
  word-break: break-word;
}
.hero__title .word { display: inline-block; white-space: nowrap; }
.hero__title .ch { display: inline-block; overflow: hidden; vertical-align: top; }
.hero__title .ch > span {
  display: inline-block; transform: translateY(105%);
  transition: transform 1.1s var(--ease), color .3s;
  transition-delay: calc(var(--i) * 45ms + .15s);
}
body.is-ready .hero__title .ch > span { transform: none; }
.hero__title .ch:hover > span { color: var(--accent); transition-delay: 0s; }
.hero__title .outline { -webkit-text-stroke: 1.5px var(--text); color: transparent; }

.hero__bottom { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 32px; align-items: end; }
.hero__lead { margin: 0; font-size: clamp(22px, 3vw, 40px); line-height: 1.15; letter-spacing: -.02em; max-width: 18ch; }
.typed { color: var(--accent); }
.caret { display: inline-block; width: .08em; height: .9em; margin-left: 4px; background: var(--accent); vertical-align: -.08em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__info { display: grid; gap: 10px; margin: 0; }
.hero__info div { display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.hero__info dt { color: var(--muted); }
.hero__info dd { margin: 0; font-variant-numeric: tabular-nums; }
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); }
.scroll-cue i { width: 1px; height: 56px; background: var(--line-2); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--accent); animation: drop 1.8s var(--ease) infinite; }
@keyframes drop { to { top: 100%; } }

/* ── Marquee ────────────────────────────── */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; transform: rotate(-1.2deg) scale(1.02); background: var(--bg); }
.marquee__track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-size: clamp(28px, 4.5vw, 60px); font-weight: 600; letter-spacing: -.03em; padding-right: .6em; white-space: nowrap; }
.marquee__track span:nth-child(odd) { -webkit-text-stroke: 1px var(--muted); color: transparent; }
.marquee__track span::after { content: "✦"; color: var(--accent); -webkit-text-stroke: 0; font-size: .5em; padding-left: .6em; vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Sections ───────────────────────────── */
.section { padding: clamp(96px, 14vw, 180px) var(--gutter) 0; }
.section__head { display: flex; flex-direction: column; gap: 18px; margin-bottom: 48px; }
.section__head h2 { margin: 0; font-size: clamp(40px, 7vw, 104px); line-height: .95; letter-spacing: -.045em; font-weight: 600; max-width: 14ch; }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* ── Cards ──────────────────────────────── */
.card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card__label { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.card__shine { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .09), transparent 45%); }
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease), opacity 1s var(--ease); }
.tilt.is-in { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.tilt:hover { transition: transform .1s linear, opacity 1s var(--ease); }
.tilt:hover .card__shine { opacity: 1; }

.live-grid { display: grid; grid-template-columns: 1.05fr 1.2fr 1fr; gap: 16px; align-items: stretch; }
.live-grid .reveal:nth-child(2) { --d: .1s; }
.live-grid .reveal:nth-child(3) { --d: .2s; }

.presence { padding: 0; }
.presence__banner { height: 110px; background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 30%, #3b2aff)); opacity: .85; }
.presence__avatar { position: relative; width: 112px; height: 112px; margin: -56px 0 0 22px; }
.presence__avatar #avatar { width: 112px; height: 112px; border-radius: 50%; border: 6px solid var(--bg-2); background: var(--bg-2); object-fit: cover; }
.presence__deco { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); pointer-events: none; }
.presence__status { position: absolute; right: 4px; bottom: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--status); border: 6px solid var(--bg-2); transition: background .4s; }
.presence__body { padding: 14px 26px 26px; }
.presence__body h3 { margin: 0; font-size: 28px; letter-spacing: -.03em; font-weight: 600; }
.presence__user { color: var(--muted); text-transform: none; font-size: 13px; transition: color .2s; }
.presence__user:hover { color: var(--accent); }
.presence__custom { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.presence__custom img { width: 20px; height: 20px; }
.presence__platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.presence__platforms span { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); display: inline-flex; align-items: center; gap: 6px; }
.presence__platforms span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--online)); }

.activities { display: grid; gap: 14px; align-content: start; }
.act { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); animation: fadeUp .6s var(--ease) both; }
.act__img { position: relative; width: 72px; height: 72px; }
.act__img > img, .act__img > .act__ph { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: var(--bg-2); }
.act__ph { display: grid; place-items: center; font-size: 28px; font-weight: 700; color: var(--accent); border: 1px solid var(--line); }
.act__small { position: absolute; right: -6px; bottom: -6px; width: 26px !important; height: 26px !important; border-radius: 50% !important; border: 3px solid var(--bg-2); }
.act__type { color: var(--accent); font-size: 11px; }
.act__name { font-weight: 600; font-size: 17px; margin: 2px 0; }
.act__line { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act > div:last-child { min-width: 0; }
.empty { margin: 0; font-size: 15px; }
.activity, .spotify { display: flex; flex-direction: column; }
.activities, .spotify__body { flex: 1; }
.activities:has(> .empty), .spotify__body:has(> .empty) { display: grid; place-items: center; text-align: center; min-height: 220px; border: 1px dashed var(--line-2); border-radius: 16px; }
.activities > .empty::before, .spotify__body > .empty::before { content: attr(data-icon); display: block; font-size: 40px; color: var(--line-2); margin-bottom: 10px; animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }

.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.eq b { width: 2px; height: 30%; background: var(--muted); }
.spotify.is-playing .eq b { background: #1ed760; animation: eq .9s ease-in-out infinite alternate; }
.eq b:nth-child(2) { animation-delay: .2s !important; }
.eq b:nth-child(3) { animation-delay: .4s !important; }
.eq b:nth-child(4) { animation-delay: .1s !important; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }
.spotify__body { display: grid; gap: 16px; }
.sp__art { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; }
.sp__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.spotify:hover .sp__art img { transform: scale(1.05); }
.sp__song { font-weight: 600; font-size: 19px; line-height: 1.2; }
.sp__artist { color: var(--muted); font-size: 14px; }
.sp__bar { height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.sp__bar span { display: block; height: 100%; width: 0; background: #1ed760; transition: width 1s linear; }
.sp__time { display: flex; justify-content: space-between; margin-top: 8px; }

/* ── About ──────────────────────────────── */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(40px, 6vw, 100px); align-items: start; }
.about__text { margin: 0; font-size: clamp(26px, 3.6vw, 52px); line-height: 1.12; letter-spacing: -.03em; font-weight: 500; }
.about__text .w { color: #3a3a40; transition: color .3s; }
.about__text .w.is-lit { color: var(--text); }
.about__side { position: sticky; top: 100px; }

.flip { perspective: 1400px; aspect-ratio: 5 / 6; max-width: 420px; cursor: pointer; }
.flip__inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1s var(--ease); }
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.flip__face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--radius); padding: 24px; border: 1px solid var(--line-2);
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  background: radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), var(--bg-2);
}
.flip__back { transform: rotateY(180deg); background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.flip__back .btn { background: var(--accent-ink); color: var(--accent); align-self: flex-start; }
.flip__top { display: flex; justify-content: space-between; }
.flip__avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
.flip__name { display: block; font-size: clamp(32px, 3.4vw, 44px); letter-spacing: -.04em; line-height: 1; margin-bottom: 6px; }
.flip__actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(0, 0, 0, .15); font-size: 15px; }
.facts li span:first-child { font-family: var(--mono); font-size: 11px; text-transform: uppercase; opacity: .7; padding-top: 3px; }
.facts li span:last-child { text-align: right; font-weight: 600; }

/* ── Links ──────────────────────────────── */
.link-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.link-list li { border-bottom: 1px solid var(--line); }
.link-row {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 60px 1fr auto 40px; gap: 20px; align-items: center;
  padding: 28px 8px;
  transition: color .45s var(--ease), padding .45s var(--ease);
}
.link-row::before { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); z-index: -1; }
.link-row:hover { color: var(--accent-ink); padding-inline: 24px; }
.link-row:hover::before { transform: scaleY(1); }
.link-row:hover .muted { color: var(--accent-ink); opacity: .65; }
.link-row__name { font-size: clamp(28px, 4.5vw, 64px); font-weight: 600; letter-spacing: -.04em; line-height: 1; display: flex; align-items: center; gap: 18px; }
.icon { width: .62em; height: .62em; flex: none; background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.link-row__arrow { font-size: 28px; transition: transform .45s var(--ease); justify-self: end; }
.link-row:hover .link-row__arrow { transform: rotate(45deg); }

/* ── Projects ───────────────────────────── */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.project { display: flex; flex-direction: column; gap: 18px; min-height: 300px; }
.project__top { display: flex; justify-content: space-between; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.project h3 { margin: auto 0 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.035em; line-height: 1; font-weight: 600; }
.project p { margin: 0; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.project__arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background .4s, color .4s, transform .4s var(--ease); }
.project:hover .project__arrow { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: rotate(45deg); }

/* ── Footer ─────────────────────────────── */
.footer { padding: clamp(110px, 16vw, 220px) var(--gutter) 32px; display: flex; flex-direction: column; gap: 32px; }
.footer__cta { font-size: clamp(64px, 17vw, 300px); font-weight: 700; letter-spacing: -.06em; line-height: .85; padding-bottom: .12em; display: flex; flex-wrap: wrap; column-gap: .22em; align-items: center; }
.footer__cta span:nth-child(2) { -webkit-text-stroke: 2px var(--text); color: transparent; transition: color .5s var(--ease), -webkit-text-stroke-color .5s; }
.footer__cta:hover span:nth-child(2) { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.footer__arrow { font-size: .5em; transition: transform .6s var(--ease); color: var(--accent); }
.footer__cta:hover .footer__arrow { transform: rotate(45deg); }
.footer__row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-top: 22px; }
.to-top:hover { color: var(--accent); }

/* ── Toast ──────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 96;
  transform: translate(-50%, 140%); opacity: 0;
  padding: 12px 20px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 500; font-size: 14px;
  transition: transform .5s var(--ease), opacity .5s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ── Responsive ─────────────────────────── */
@media (max-width: 1080px) {
  .live-grid { grid-template-columns: 1fr 1fr; }
  .presence { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .nav__links { display: none; }
  .hero__bottom { grid-template-columns: 1fr; gap: 28px; }
  .scroll-cue { display: none; }
  .live-grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about__side { position: static; }
  .link-row { grid-template-columns: 1fr 32px; padding: 22px 4px; gap: 10px; }
  .link-row > .mono:first-child, .link-row__handle { display: none; }
  .link-row:hover { padding-inline: 12px; }
  .footer__row { flex-direction: column; }
  .footer__cta span:nth-child(2) { -webkit-text-stroke-width: 1.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
}
