/* =========================================================================
   styles.css — theme tokens, layout, animations
   Retheme by editing the :root block. Everything else reads from it.
   ========================================================================= */

/* ------------------------------- TOKENS -------------------------------- */
:root {
  --bg:            #0a0a0c;
  --bg-2:          #0b0b0d;
  --surface:       rgba(20, 18, 23, 0.72);
  --surface-solid: #141217;
  --surface-2:     #121014;
  --border:        rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text:          #f3f2f5;
  --muted:         #8b8b93;
  --muted-2:       #6b6b73;

  --accent:        #b026d3;
  --accent-2:      #7c2fd6;
  --accent-glow:   rgba(176, 38, 211, 0.45);

  --container:     1152px;
  --radius:        20px;
  --radius-sm:     12px;
  --pill:          999px;

  --font-body:     "Onest", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display:  "Chillax", "Onest", system-ui, sans-serif;
  --font-mono:     ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------- RESET --------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.ico { width: 1em; height: 1em; display: block; }
body.is-loading { overflow: hidden; }
::selection { background: var(--accent); color: #fff; }

/* ------------------------- ANIMATED BACKGROUND ------------------------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg-2); pointer-events: none; }
.bg__img {
  position: absolute; inset: -6%;
  background-size: cover; background-position: center;
  opacity: 0.22; filter: saturate(0.9) brightness(0.6);
  transform: scale(1.06);
  animation: bgDrift 34s ease-in-out infinite alternate;
}
.bg__glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; will-change: transform; }
.bg__glow--a {
  width: 46vw; height: 46vw; left: -6vw; top: -8vw;
  background: radial-gradient(circle at 50% 50%, rgba(120, 48, 190, 0.75), rgba(0,0,0,0) 68%);
  animation: floatA 22s ease-in-out infinite alternate;
}
.bg__glow--b {
  width: 42vw; height: 42vw; right: -8vw; bottom: -10vw;
  background: radial-gradient(circle at 50% 50%, rgba(198, 92, 120, 0.5), rgba(0,0,0,0) 70%);
  animation: floatB 26s ease-in-out infinite alternate;
}
.bg__grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 30%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%),
              linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.7));
}
@keyframes bgDrift { from { transform: scale(1.06) translate3d(0,0,0); } to { transform: scale(1.12) translate3d(-2%, -1.5%, 0); } }
@keyframes floatA { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(6vw, 4vh, 0) scale(1.18); } }
@keyframes floatB { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-5vw, -5vh, 0) scale(1.14); } }

/* ----------------------------- CURSOR ---------------------------------- */
.cursor { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.cursor__dot, .cursor__glow { position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate3d(-50%, -50%, 0); }
.cursor__dot { width: 6px; height: 6px; background: #fff; opacity: 0.9; }
.cursor__glow {
  width: 46px; height: 46px;
  background: radial-gradient(circle, var(--accent-glow), rgba(176,38,211,0) 70%);
  transition: width .25s var(--ease), height .25s var(--ease), opacity .25s;
  opacity: 0.75;
}
.cursor.is-hover .cursor__glow { width: 92px; height: 92px; opacity: 1; }
.cursor.is-hover .cursor__dot { opacity: 0; }
@media (hover: none) { .cursor { display: none; } }

/* ------------------------------- GATE ---------------------------------- */
.gate {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: #000; cursor: pointer;
  transition: opacity .6s var(--ease), visibility .6s;
}
.gate__label {
  font-family: var(--font-mono); font-size: 15px; letter-spacing: .04em; color: #fff;
  animation: gatePulse 1.8s ease-in-out infinite;
}
.gate.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes gatePulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

/* ------------------------------- PAGE ---------------------------------- */
.page { position: relative; z-index: 1; }
.section {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: 70px 0;
}
.h2 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em; margin-bottom: 20px;
}

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

.avatar { position: relative; width: 190px; height: 190px; margin-bottom: 26px; }
.avatar img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  position: relative; z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 20px 60px rgba(0,0,0,0.6);
  animation: avatarIn 1s var(--ease-out) both;
}
.avatar__ring {
  position: absolute; inset: -7px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.22); z-index: 1;
}
.avatar__halo {
  position: absolute; inset: -42%; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.28), rgba(255,255,255,0) 62%);
  animation: haloPulse 4.5s ease-in-out infinite;
}
@keyframes avatarIn { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }
@keyframes haloPulse { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: .9; transform: scale(1.06); } }

.name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 6vw, 50px); letter-spacing: 0.01em; line-height: 1.05;
  color: #fff;
  text-shadow: 0 0 14px rgba(255,255,255,0.45), 0 0 5px rgba(255,255,255,0.4), 0 0 30px rgba(255,255,255,0.2);
  margin-bottom: 16px;
}

/* badges */
.badges {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding: 7px 10px; margin-bottom: 16px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: var(--pill); backdrop-filter: blur(8px);
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 500; color: #e7e7ea;
  padding: 3px 9px 3px 6px; border-radius: var(--pill);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.06);
  transition: transform .2s var(--ease), background .2s, border-color .2s;
  white-space: nowrap;
}
.badge:hover { transform: translateY(-2px); background: rgba(255,255,255,0.12); border-color: var(--border-strong); }
.badge .ico { width: 13px; height: 13px; opacity: .85; }
.badge[data-b="staff"] .ico    { color: #58a6ff; }
.badge[data-b="verified"] .ico { color: #3fb6ff; }
.badge[data-b="bughunt"] .ico  { color: #f0a020; }
.badge[data-b="og"] .ico       { color: #ffd166; }
.badge[data-b="summer"] .ico   { color: #ff8f3f; }
.badge[data-b="uid"] .ico      { color: #b8b8c0; }

/* status typewriter */
.status { font-size: 15px; color: #d8d8dd; min-height: 22px; margin-bottom: 26px; }
.caret {
  display: inline-block; width: 2px; height: 1.05em; margin-left: 2px;
  background: #fff; vertical-align: -2px; animation: caret 1s steps(1) infinite;
}
@keyframes caret { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

/* socials */
.socials { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.social {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 14px; color: #dcdce0;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s;
}
.social .ico { width: 22px; height: 22px; }
.social:hover {
  transform: translateY(-4px) scale(1.04); color: #fff;
  background: rgba(255,255,255,0.1); box-shadow: 0 12px 30px rgba(0,0,0,0.4), 0 0 0 1px var(--border-strong);
}

/* scroll hint */
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-size: 12px; letter-spacing: .04em;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.scroll-hint .ico { width: 20px; height: 20px; animation: bounce 1.8s ease-in-out infinite; }
.scroll-hint.is-hidden { opacity: 0; transform: translateX(-50%) translateY(10px); pointer-events: none; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ------------------------------- CARDS --------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.04);
}
.bio { padding: 22px 24px; }
.bio p { color: #d6d6db; font-size: 15px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* discord card */
.discord { display: flex; align-items: center; gap: 16px; }
.discord__avatar { position: relative; flex: none; width: 56px; height: 56px; }
.discord__avatar img { width: 56px; height: 56px; border-radius: 50%; }
.discord__status {
  position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px;
  border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--surface-solid);
  background: var(--surface-solid);
}
.discord__status img { width: 100%; height: 100%; border-radius: 50%; }
.discord__meta strong { display: block; font-size: 15px; font-weight: 600; }
.discord__meta span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* clock card */
.clock { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.clock__time { font-family: var(--font-display); font-weight: 600; font-size: 34px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.clock__sub { font-size: 13px; color: var(--muted); }
.clock__label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2); margin-top: 8px; }
.clock__me { font-size: 12.5px; color: var(--muted); }
.clock__me em { color: var(--accent); font-style: normal; }

/* ------------------------------- TAGS ---------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--pill); font-size: 13.5px; color: #e6e6ea;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.tag:hover { transform: translateY(-2px); background: rgba(255,255,255,0.1); border-color: var(--border-strong); }
.tag .dot { width: 9px; height: 9px; border-radius: 50%; }

/* ------------------------------ PLAYER --------------------------------- */
.player { display: flex; flex-direction: column; gap: 16px; }
.player__head { display: flex; align-items: center; gap: 16px; }
.player__cover {
  position: relative; flex: none; width: 68px; height: 68px; border-radius: 14px; overflow: hidden;
  box-shadow: 0 10px 30px -12px #000;
}
.player__cover img { width: 100%; height: 100%; object-fit: cover; }
.player__disc {
  position: absolute; inset: 0; border-radius: 14px;
  background: repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0 1px, rgba(0,0,0,0.05) 1px 3px);
  opacity: 0; transition: opacity .3s;
}
.player.is-playing .player__cover { border-radius: 50%; animation: spin 6s linear infinite; }
.player.is-playing .player__disc { opacity: .0; }
.player__info { flex: 1; min-width: 0; }
.player__title { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__artist { color: var(--muted); font-size: 13px; margin-top: 1px; }
.player__prod { color: var(--muted-2); font-size: 11.5px; margin-top: 3px; }
.player__btn {
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #0a0a0c; transition: transform .2s var(--ease), box-shadow .2s;
}
.player__btn .ico { width: 20px; height: 20px; }
.player__btn:hover { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(255,255,255,0.08); }
@keyframes spin { to { transform: rotate(360deg); } }

.player__bar { position: relative; height: 6px; border-radius: var(--pill); background: rgba(255,255,255,0.09); cursor: pointer; }
.player__fill { position: absolute; left: 0; top: 0; height: 100%; width: 0; border-radius: var(--pill); background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.player__thumb {
  position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.6); opacity: 0; transition: opacity .2s;
}
.player__bar:hover .player__thumb { opacity: 1; }
.player__times { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -6px; }

.lyrics {
  max-height: 210px; overflow: hidden auto; scroll-behavior: smooth;
  display: flex; flex-direction: column; gap: 10px; padding-right: 6px;
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}
.lyrics::-webkit-scrollbar { width: 4px; }
.lyrics::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.lyric { color: var(--muted-2); font-size: 14.5px; transition: color .3s, transform .3s, opacity .3s; opacity: .55; }
.lyric.is-active { color: #fff; opacity: 1; transform: translateX(6px); font-weight: 500; }

/* ----------------------------- PROJECTS -------------------------------- */
.projects { display: flex; flex-direction: column; gap: 24px; }
.project__link {
  display: block; position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: transform .55s var(--ease), box-shadow .55s var(--ease), border-color .3s;
}
.project__link:hover {
  transform: translateY(-5px); border-color: var(--border-strong);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.95), 0 0 0 1px var(--border-strong);
}
.project__media { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: #0c0b10; }
.project__img { width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform .9s var(--ease); }
.project__link:hover .project__img { transform: scale(1.05); }
.project__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.30), rgba(0,0,0,0.12) 42%, rgba(0,0,0,0.62));
}
.project__tags { position: absolute; top: 16px; left: 16px; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; }
.ptag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--pill);
  font-size: 12px; color: #e4e4e8; background: rgba(10,10,14,0.5);
  border: 1px solid rgba(255,255,255,0.12); backdrop-filter: blur(8px);
}
.ptag .dot { width: 8px; height: 8px; border-radius: 2px; }
.project__visit {
  position: absolute; z-index: 2; left: 50%; top: 50%;
  transform: translate(-50%, -46%) scale(.9);
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 18px; border-radius: var(--pill);
  background: #fff; color: #0a0a0c; font-weight: 600; font-size: 13px; opacity: 0;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.85);
  transition: transform .4s var(--ease), opacity .4s var(--ease), box-shadow .4s;
}
.project__link:hover .project__visit,
.project__link:focus-visible .project__visit {
  transform: translate(-50%, -50%) scale(1); opacity: 1;
  box-shadow: 0 0 0 8px rgba(255,255,255,0.08), 0 16px 44px -12px rgba(0,0,0,0.9);
}
@media (hover: none) { .project__visit { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.project__visit .ico { width: 15px; height: 15px; }
.project__body { padding: 18px 22px 22px; }
.project__title { font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.project__desc { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 80ch; }

/* ------------------------- RAIL — section nav -------------------------- */
.rail {
  position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 60;
  display: flex; flex-direction: column; gap: 12px;
}
.rail__dot { width: 24px; height: 24px; display: grid; place-items: center; }
.rail__dot span {
  display: block; width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.22); transition: transform .4s var(--ease), background .4s var(--ease), height .4s var(--ease);
}
.rail__dot:hover span { background: rgba(255,255,255,0.6); transform: scale(1.25); }
.rail__dot.is-active span { background: #fff; height: 20px; border-radius: 4px; transform: none; }

/* ------------------------------ FOOTER --------------------------------- */
.foot { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; padding: 40px 0 60px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.foot .stat { display: inline-flex; align-items: center; gap: 7px; }
.foot .ico { width: 16px; height: 16px; }
.foot .sep { color: var(--muted-2); }

/* --------------------------- REVEAL ANIMATION -------------------------- */
.reveal { opacity: 0; will-change: transform, opacity; transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal[data-reveal="up"]    { transform: translateY(26px); }
.reveal[data-reveal="scale"] { transform: scale(.9); }
.reveal[data-reveal="left"]  { transform: translateX(-26px); }
.reveal[data-reveal="right"] { transform: translateX(26px); }
.reveal.is-in { opacity: 1; transform: none; }

/* --------------------------- RESPONSIVE -------------------------------- */
@media (max-width: 1120px) { .rail { display: none; } }
@media (hover: none) {
  html { scroll-snap-type: y proximity; }
  .hero, .section { scroll-snap-align: start; }
  .foot { scroll-snap-align: end; }
}
@media (max-width: 760px) {
  .avatar { width: 148px; height: 148px; }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 44px 0; min-height: auto; align-content: start; }
  .project__media { aspect-ratio: 16 / 10; }
  .project__title { font-size: 18px; }
  .player__cover { width: 58px; height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
