@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --bg: #07060b;
  --panel: rgba(18, 14, 30, 0.78);
  --panel-solid: #120f1c;
  --border: rgba(196, 181, 253, 0.12);
  --border-hi: rgba(196, 181, 253, 0.28);
  --text: #ededf5;
  --muted: #a19db5;
  --faint: #6c6884;
  --violet: #8b5cf6;
  --violet-hi: #a78bfa;
  --violet-lo: #6d28d9;
  --lilac: #c4b5fd;
  --online: #3ba55d;
  --idle: #faa81a;
  --dnd: #ed4245;
  --offline: #747f8d;
  --radius: 18px;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--violet); color: #fff; }

/* ---------- background ---------- */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: .55; }
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.aurora span:nth-child(1) { width: 52vmax; height: 52vmax; left: -14vmax; top: -18vmax; background: radial-gradient(circle, #5b21b6 0%, transparent 65%); animation: drift1 26s ease-in-out infinite alternate; }
.aurora span:nth-child(2) { width: 44vmax; height: 44vmax; right: -16vmax; top: 18vh; background: radial-gradient(circle, #7c3aed 0%, transparent 65%); animation: drift2 32s ease-in-out infinite alternate; opacity: .7; }
.aurora span:nth-child(3) { width: 40vmax; height: 40vmax; left: 20vw; bottom: -26vmax; background: radial-gradient(circle, #312e81 0%, transparent 65%); animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(14vw, 12vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vw, 10vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(10vw, -14vh) scale(1.2); } }

main {
  position: relative; z-index: 1;
  max-width: 1040px; margin: 0 auto;
  padding: clamp(56px, 12vh, 120px) 16px 48px;
}
@media (min-width: 640px) { main { padding-left: 32px; padding-right: 32px; } }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero { text-align: center; margin-bottom: 40px; }
.eyebrow { font: 500 13px var(--mono); color: var(--violet-hi); letter-spacing: .08em; margin: 0 0 8px; opacity: .85; }
.name {
  margin: 0;
  font-size: clamp(72px, 16vw, 148px);
  font-weight: 800; letter-spacing: -0.06em; line-height: .95;
  background: linear-gradient(100deg, #fff 0%, var(--lilac) 30%, var(--violet) 50%, var(--lilac) 70%, #fff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s linear infinite;
  filter: drop-shadow(0 0 40px rgba(139, 92, 246, .35));
}
@keyframes shimmer { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.tagline { color: var(--muted); max-width: 30rem; margin: 18px auto 0; font-size: 17px; }

/* ---------- cards ---------- */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* cursor-following glow (border + inner wash) */
.glow { --mx: 50%; --my: 50%; --o: 0; transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s, box-shadow .35s; isolation: isolate; }
.glow::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: 2; pointer-events: none;
  background: radial-gradient(320px circle at var(--mx) var(--my), var(--violet-hi), rgba(139,92,246,.35) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: var(--o); transition: opacity .35s;
}
.glow::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(139,92,246,.16), transparent 60%);
  opacity: var(--o); transition: opacity .35s;
}
.glow:hover, .glow:focus-visible {
  --o: 1;
  transform: translateY(-4px);
  border-color: var(--border-hi);
  box-shadow: 0 0 0 1px rgba(167,139,250,.12), 0 18px 50px -12px rgba(124,58,237,.55), 0 0 80px -20px rgba(139,92,246,.5);
}
.glow:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 3px; }

/* ---------- discord ---------- */
.discord { display: block; max-width: 520px; margin: 0 auto 72px; padding: 20px; }
.discord[data-status="online"] { border-color: rgba(59,165,93,.25); }
.discord[data-status="dnd"]    { border-color: rgba(237,66,69,.25); }
.discord[data-status="idle"]   { border-color: rgba(250,168,26,.25); }
.dc-top { display: flex; align-items: center; gap: 16px; }
.dc-avatar { position: relative; flex: none; }
.dc-avatar img { width: 72px; height: 72px; border-radius: 50%; display: block; background: var(--panel-solid); box-shadow: 0 0 0 3px var(--panel-solid), 0 0 30px -4px rgba(139,92,246,.6); }
.dc-status {
  position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; border-radius: 50%;
  border: 4px solid var(--panel-solid); background: var(--offline);
  transition: background .4s;
}
.dc-status[data-status="online"] { background: var(--online); box-shadow: 0 0 12px var(--online); animation: pulse 2.4s ease-in-out infinite; }
.dc-status[data-status="idle"] { background: var(--idle); }
.dc-status[data-status="dnd"] { background: var(--dnd); }
@keyframes pulse { 50% { box-shadow: 0 0 2px var(--online); } }
.dc-who { min-width: 0; flex: 1; }
.dc-name { font-weight: 600; font-size: 20px; line-height: 1.2; }
.dc-user { font: 13px var(--mono); color: var(--faint); }
.dc-custom { color: var(--muted); font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.dc-custom:empty { display: none; }
.dc-custom img { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
.dc-badge {
  flex: none; align-self: flex-start;
  font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--faint);
}
.discord[data-status="online"] .dc-badge { color: var(--online); border-color: rgba(59,165,93,.35); }
.discord[data-status="idle"] .dc-badge { color: var(--idle); border-color: rgba(250,168,26,.35); }
.discord[data-status="dnd"] .dc-badge { color: var(--dnd); border-color: rgba(237,66,69,.35); }

.dc-activity { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: grid; gap: 14px; animation: fadeIn .5s ease; }
.dc-activity[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
.act { display: flex; gap: 14px; align-items: center; min-width: 0; }
.act-img { position: relative; flex: none; width: 64px; height: 64px; }
.act-img img.large { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; display: block; background: var(--panel-solid); }
.act-img img.small { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--panel-solid); background: var(--panel-solid); }
.act-img .ph { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--violet-lo), #1e1b4b); font-size: 26px; }
.act-text { min-width: 0; flex: 1; }
.act-kind { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--violet-hi); }
.act-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-line { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-time { font: 12px var(--mono); color: var(--faint); margin-top: 2px; }
.bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); margin-top: 8px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--lilac)); border-radius: inherit; }
.bar-times { display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--faint); margin-top: 4px; }

/* ---------- sections ---------- */
.section { margin-bottom: 72px; }
.section-title { font: 500 14px var(--mono); color: var(--muted); text-transform: lowercase; letter-spacing: .06em; margin: 0 0 20px; display: flex; align-items: center; gap: 12px; }
.section-title span { color: var(--violet-hi); }
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-hi), transparent); }

.grid { display: grid; gap: 18px; }
.featured { grid-template-columns: 1fr; }
@media (min-width: 720px) { .featured { grid-template-columns: repeat(3, 1fr); } }
.repos { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* featured tiles */
.tile { display: flex; flex-direction: column; overflow: hidden; }
.tile-art {
  height: 150px; display: grid; place-items: center; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.tile-art svg { width: 64px; height: 64px; position: relative; z-index: 1; transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .5s; }
.tile:hover .tile-art svg { transform: scale(1.12) rotate(-6deg); filter: drop-shadow(0 0 22px currentColor); }
.tile-art::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 16px 16px; mask-image: radial-gradient(circle at center, #000, transparent 75%); -webkit-mask-image: radial-gradient(circle at center, #000, transparent 75%); }
.art-luna { background: radial-gradient(circle at 50% 120%, #7c3aed 0%, #2e1065 45%, #0d0b14 80%); color: var(--lilac); }
.art-luna svg { fill: currentColor; }
.art-rift { background: radial-gradient(circle at 50% 120%, #0f766e 0%, #1e1b4b 50%, #0d0b14 80%); color: #5eead4; }
.art-rift svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.art-flex { background: radial-gradient(circle at 50% 120%, #be185d 0%, #2e1065 50%, #0d0b14 80%); color: #f9a8d4; }
.art-flex img { width: 72px; height: 72px; border-radius: 50%; position: relative; z-index: 1; transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .5s; }
.tile:hover .art-flex img { transform: scale(1.12) rotate(-6deg); filter: drop-shadow(0 0 22px #ec4899); }
.art-gh { background: radial-gradient(circle at 50% 120%, #4c1d95 0%, #1a1625 50%, #0d0b14 80%); color: #f5f3ff; }
.art-gh svg { fill: currentColor; }
.tile-body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.tile-body h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.tile-body p { margin: 0 0 16px; color: var(--muted); font-size: 15px; flex: 1; }
.arrow { color: var(--faint); transition: transform .3s, color .3s; }
.glow:hover .arrow { color: var(--violet-hi); transform: translate(3px, -3px); }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font: 12px var(--mono); color: var(--lilac); background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.2); padding: 2px 8px; border-radius: 6px; }

/* repo cards */
.repo { padding: 18px 18px 16px; display: flex; flex-direction: column; min-height: 150px; }
.repo h3 { margin: 0 0 6px; font: 500 15px var(--mono); color: var(--text); display: flex; gap: 8px; align-items: center; overflow-wrap: anywhere; }
.repo h3 svg { flex: none; width: 16px; height: 16px; fill: var(--faint); }
.repo p { margin: 0 0 14px; color: var(--muted); font-size: 14px; flex: 1; }
.repo-meta { display: flex; gap: 16px; font: 12px var(--mono); color: var(--faint); align-items: center; flex-wrap: wrap; }
.repo-meta .lang::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--lc, var(--faint)); margin-right: 6px; vertical-align: -1px; }
.repo-skel { min-height: 150px; background: linear-gradient(100deg, var(--panel) 30%, rgba(139,92,246,.08) 50%, var(--panel) 70%); background-size: 300% 100%; animation: skel 1.6s linear infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.more { display: inline-block; margin-top: 18px; font: 13px var(--mono); color: var(--muted); transition: color .2s; }
.more:hover { color: var(--violet-hi); }

/* ---------- footer ---------- */
.footer { text-align: center; color: var(--faint); font: 13px var(--mono); padding-top: 24px; border-top: 1px solid var(--border); }
.links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }
.links a { color: var(--muted); transition: color .2s; }
.links a:hover { color: var(--violet-hi); }
.footer p { margin: 0; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .glow:hover { transform: none; }
}

/* ---------- anilist ---------- */
.ani-stats { display: flex; align-items: center; gap: 16px; padding: 18px 20px; flex-wrap: wrap; }
.ani-stats img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: none; box-shadow: 0 0 24px -6px rgba(139,92,246,.6); }
.ani-who { flex: 1; min-width: 140px; }
.ani-name { font-weight: 600; font-size: 18px; display: flex; gap: 8px; align-items: center; }
.ani-sub { font: 13px var(--mono); color: var(--faint); }
.ani-nums { display: flex; gap: 28px; margin: 0; }
.ani-nums div { text-align: right; }
.ani-nums dt { font: 11px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.ani-nums dd { margin: 0; font-size: 22px; font-weight: 600; color: var(--lilac); font-variant-numeric: tabular-nums; }
.ani-item { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 2 / 3; position: relative; background: var(--panel-solid); }
.ani-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.ani-item:hover img { transform: scale(1.06); }
.ani-item .ani-cap { position: absolute; inset: auto 0 0 0; padding: 26px 9px 8px; font-size: 12px; line-height: 1.3; background: linear-gradient(transparent, rgba(7,6,11,.95)); }
.ani-cap b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.ani-cap span { font: 10px var(--mono); color: var(--violet-hi); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 480px) { .ani-nums { width: 100%; justify-content: space-between; } .ani-nums div { text-align: left; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero .tagline { margin-top: 6px; }
.ani-strip { position: relative; margin-top: 18px; }
.ani-row {
  display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 10px 2px 14px; margin: -10px 0 -14px;
  scrollbar-width: none;
}
.ani-row::-webkit-scrollbar { display: none; }
.ani-row .ani-item { flex: 0 0 clamp(108px, 14vw, 132px); }

/* ---------- socials ---------- */
.socials { display: flex; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.social {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); background: var(--panel); border: 1px solid var(--border);
  transition: color .25s, border-color .25s, box-shadow .25s, transform .25s cubic-bezier(.2,.7,.2,1), background .25s;
}
.social svg { width: 19px; height: 19px; fill: currentColor; }
.social:hover, .social:focus-visible {
  color: #fff; background: rgba(139,92,246,.18); border-color: var(--violet-hi);
  box-shadow: 0 0 22px -2px rgba(139,92,246,.7); transform: translateY(-3px);
}
.social:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 3px; }

/* strip edge fades: mask the row itself so it blends into any background */
.ani-strip.can-right .ani-row { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.ani-strip.can-left .ani-row { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px); mask-image: linear-gradient(90deg, transparent, #000 56px); }
.ani-strip.can-left.can-right .ani-row { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.ani-cap span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* touch screens: no sticky hover, give a quick press instead */
@media (hover: none) {
  .glow:hover { --o: 0; transform: none; border-color: var(--border); box-shadow: none; }
  .glow:active { --o: 1; transform: scale(.98); border-color: var(--border-hi); }
  .social:hover { color: var(--muted); background: var(--panel); border-color: var(--border); box-shadow: none; transform: none; }
  .social:active { color: #fff; border-color: var(--violet-hi); transform: scale(.94); }
  .tile:hover .tile-art svg { transform: none; filter: none; }
  .ani-item:hover img { transform: none; }
  .glow:hover .arrow { color: var(--faint); transform: none; }
}

/* phones */
@media (max-width: 560px) {
  main { padding-top: 48px; }
  .hero { margin-bottom: 28px; }
  .tagline { font-size: 16px; }
  .section { margin-bottom: 56px; }

  /* discord card: avatar left, name + badge stacked on the right */
  .discord { margin-bottom: 56px; padding: 16px; }
  .dc-top { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "av who" "av badge"; column-gap: 14px; row-gap: 6px; align-items: center; }
  .dc-avatar { grid-area: av; }
  .dc-avatar img { width: 64px; height: 64px; }
  .dc-who { grid-area: who; align-self: end; }
  .dc-badge { grid-area: badge; justify-self: start; align-self: start; }
  .act-img, .act-img img.large, .act-img .ph { width: 56px; height: 56px; }

  /* featured: compact horizontal rows */
  .featured { gap: 12px; }
  .tile { flex-direction: row; }
  .tile-art { flex: 0 0 92px; height: auto; border-bottom: 0; border-right: 1px solid var(--border); }
  .tile-art svg { width: 38px; height: 38px; }
  .tile-body { padding: 14px 16px; }
  .tile-body h3 { font-size: 17px; margin-bottom: 4px; }
  .tile-body p { font-size: 14px; margin-bottom: 10px; line-height: 1.5; }
  .tags li { font-size: 11px; }

  /* github: shorter cards, top 4 only (link below goes to the rest) */
  .repos { gap: 12px; }
  .repo { min-height: 0; padding: 14px 16px; }
  .repo p { margin-bottom: 10px; }
  .repos .repo:nth-child(n+5) { display: none; }

  /* anilist */
  .ani-stats { padding: 16px; }
  .ani-row .ani-item { flex-basis: 104px; }

  .links { gap: 8px 16px; }
}

/* ---------- spotify ---------- */
.music { padding: 10px; }
.music-embed { display: block; width: 100%; height: 352px; border: 0; border-radius: 12px; background: #121212; }
@media (max-width: 560px) { .music { padding: 6px; } }
