/* ============ Tokens ============ */
:root {
  --accent: #9d7bff;
  --accent-rgb: 157, 123, 255;
  --bg: #16151b;
  --bg-2: #1d1c23;
  --card: rgba(255, 255, 255, 0.035);
  --card-hi: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-hi: rgba(255, 255, 255, 0.18);
  --text: #eeedf4;
  --muted: #9d9bab;
  --dim: #6c6a7a;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --radius: 14px;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
[data-theme="light"] {
  --bg: #f3f2f7;
  --bg-2: #e9e7f0;
  --card: rgba(255, 255, 255, 0.7);
  --card-hi: rgba(255, 255, 255, 0.95);
  --border: rgba(20, 16, 40, 0.1);
  --border-hi: rgba(20, 16, 40, 0.22);
  --text: #17151f;
  --muted: #5d5a6c;
  --dim: #8a8798;
  --shadow: 0 20px 50px -24px rgba(40, 30, 80, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}
body.locked { overflow: hidden; }
::selection { background: rgba(var(--accent-rgb), 0.35); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
svg.i { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); }
.container { width: min(1120px, 100% - 48px); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 48px); }
.center { text-align: center; }

/* ============ Scrollbar ============ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), 0.5); border-radius: 8px; }

/* ============ Splash / intro ============ */
.splash, .intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--bg);
}
.splash-enter {
  background: none; border: 0; padding: 40px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--muted);
  animation: pulse 2.4s ease-in-out infinite;
}
.splash { cursor: pointer; transition: opacity 0.5s; }
.splash.out { opacity: 0; pointer-events: none; }
@keyframes pulse { 50% { color: var(--text); letter-spacing: 0.42em; } }

.intro { opacity: 0; pointer-events: none; transition: opacity 0.7s var(--ease); }
.intro.show { opacity: 1; pointer-events: auto; }
.intro.out { opacity: 0; pointer-events: none; }
.intro-name {
  margin: 0; font-family: var(--mono); font-weight: 700;
  font-size: clamp(56px, 12vw, 150px); line-height: 0.95; letter-spacing: -0.04em;
}
.intro-name span { display: block; }
.intro-name .l2 { color: var(--accent); padding-left: 0.5em; }
.intro-name .ch {
  display: inline-block; opacity: 0; transform: translateY(0.4em) rotate(6deg); filter: blur(8px);
  animation: chIn 0.7s var(--ease) forwards;
}
@keyframes chIn { to { opacity: 1; transform: none; filter: blur(0); } }
.intro-skip {
  position: absolute; right: 28px; bottom: 24px;
  background: none; border: 0; font-family: var(--mono); font-size: 11px; color: var(--dim);
}
.intro-skip:hover { color: var(--text); }

/* ============ Background canvas ============ */
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .footer { position: relative; z-index: 1; }

/* ============ Fixed UI ============ */
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border);
  font-size: 18px; transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.icon-btn:hover { border-color: rgba(var(--accent-rgb), 0.6); color: var(--accent); }
.theme-toggle { position: fixed; top: 14px; left: 14px; z-index: 50; background: color-mix(in srgb, var(--bg-2) 80%, transparent); backdrop-filter: blur(10px); }

.scroll-progress { position: fixed; top: 0; right: 0; width: 3px; height: 100%; z-index: 49; }
.scroll-progress span { display: block; width: 100%; height: 0; background: var(--accent); border-radius: 0 0 3px 3px; box-shadow: 0 0 12px var(--accent); }

.sidenav {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 50;
  background: color-mix(in srgb, var(--bg-2) 75%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 18px; padding: 6px;
  transition: border-color 0.3s;
}
.sidenav:hover { border-color: rgba(var(--accent-rgb), 0.45); }
.sidenav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sidenav a {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 32px; padding: 0 8px; border-radius: 10px;
  color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
}
.sidenav a svg { font-size: 14px; }
.sidenav a span { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width 0.35s var(--ease), opacity 0.25s; }
.sidenav:hover a span { max-width: 120px; opacity: 1; }
.sidenav a:hover { color: var(--text); }
.sidenav a.active { color: var(--accent); background: rgba(var(--accent-rgb), 0.14); }
.sidenav a.active::before { content: ""; position: absolute; left: -2px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--accent); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 10px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #120d22; box-shadow: 0 8px 30px -8px rgba(var(--accent-rgb), 0.7); }
.btn-primary:hover { box-shadow: 0 12px 36px -6px rgba(var(--accent-rgb), 0.9); }
.btn-ghost { background: rgba(10, 10, 14, 0.35); border-color: var(--border-hi); color: var(--text); backdrop-filter: blur(6px); }
[data-theme="light"] .btn-ghost { background: rgba(255,255,255,0.5); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-outline { border-color: rgba(var(--accent-rgb), 0.5); color: var(--accent); background: rgba(var(--accent-rgb), 0.08); text-transform: none; letter-spacing: 0.04em; }
.btn-outline:hover { background: rgba(var(--accent-rgb), 0.16); }

/* ============ Hero ============ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
#marble { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-fade { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse at 20% 50%, color-mix(in srgb, var(--bg) 55%, transparent), transparent 65%),
  linear-gradient(to bottom, transparent 70%, var(--bg)); }
.hero::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.7; box-shadow: 0 0 20px var(--accent); }
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 40px; padding: 90px 0 70px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border-hi); background: rgba(10, 10, 14, 0.4); backdrop-filter: blur(6px);
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
}
[data-theme="light"] .badge { background: rgba(255,255,255,0.6); }
.badge i { width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }
.hero-name { margin: 18px 0 14px; font-family: var(--mono); font-weight: 700; font-size: clamp(48px, 7.4vw, 92px); line-height: 1; letter-spacing: -0.045em; }
.hero-name em { font-style: normal; color: var(--accent); }
.hero-tagline { margin: 0 0 30px; max-width: 34em; font-size: clamp(16px, 1.6vw, 19px); color: color-mix(in srgb, var(--text) 82%, transparent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 26px 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.hero-meta > span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { color: var(--accent); }
.avail i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }

.presence {
  max-width: 320px; padding: 12px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-2) 82%, transparent); border: 1px solid var(--border); backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.presence-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.presence-head .live { color: var(--dim); }
.pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.presence-list { display: flex; flex-direction: column; gap: 8px; }
.presence-body { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; border: 1px solid var(--border-hi); background: color-mix(in srgb, var(--bg) 35%, transparent); animation: paIn 0.35s var(--ease); transition: border-color 0.2s; }
a.presence-body:hover { border-color: rgba(var(--accent-rgb), 0.6); }
@keyframes paIn { from { opacity: 0; transform: translateY(6px); } }
.pa-art { position: relative; width: 52px; height: 52px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: 22px; color: var(--accent); background: rgba(var(--accent-rgb), 0.12); }
.pa-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 9px; object-fit: cover; }
.pa-small { position: absolute; right: -5px; bottom: -5px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--bg-2); object-fit: cover; background: var(--bg-2); }
.presence-info { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.presence-label { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.presence-title { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.presence-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.presence-sub.dim { color: var(--dim); }
.pa-time { margin-top: 3px; font-size: 10.5px; color: var(--dim); }
.pa-bar { display: block; height: 3px; margin-top: 4px; border-radius: 3px; background: var(--border-hi); overflow: hidden; }
.pa-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 1s linear; }
.presence-custom { margin: -2px 2px 10px; font-size: 12.5px; font-style: italic; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.presence-custom img { width: 16px; height: 16px; }
.presence-platforms { margin-left: auto; display: flex; gap: 6px; color: var(--dim); font-size: 12px; }
.presence-platforms span { display: grid; }
.avatar-deco { position: absolute; inset: -9%; width: 118%; height: 118%; pointer-events: none; z-index: 2; }

.hero-avatar { position: relative; z-index: 0; justify-self: center; width: min(360px, 80vw); aspect-ratio: 1; }
.avatar-ring {
  position: absolute; inset: 0; border-radius: 50%; padding: 5px;
  background: conic-gradient(from var(--ang, 0deg), var(--accent), transparent 30%, rgba(var(--accent-rgb), 0.6) 55%, transparent 80%, var(--accent));
  animation: spin 8s linear infinite;
  box-shadow: 0 0 80px -10px rgba(var(--accent-rgb), 0.45);
}
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --ang: 360deg; } }
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--bg-2); border: 4px solid var(--bg); }
.hero-avatar:hover .avatar-ring img { transform: scale(1.02); }
.avatar-ring img { transition: transform 0.5s var(--ease); }
.status-dot { position: absolute; right: 9%; bottom: 9%; width: 26px; height: 26px; border-radius: 50%; background: var(--dim); border: 5px solid var(--bg); transition: background 0.3s; }
.status-dot[data-s="online"] { background: #3ba55d; box-shadow: 0 0 16px #3ba55d; }
.status-dot[data-s="idle"] { background: #faa81a; }
.status-dot[data-s="dnd"] { background: #ed4245; }
.pdot[data-s="online"] { background: #3ba55d; box-shadow: 0 0 8px #3ba55d; }
.pdot[data-s="idle"] { background: #faa81a; }
.pdot[data-s="dnd"] { background: #ed4245; }

.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: var(--accent); font-size: 18px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ============ Sections ============ */
.section { padding: 120px 0; }
.eyebrow { margin: 0 0 22px; font-family: var(--mono); font-size: 18px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head .eyebrow { margin-bottom: 6px; }
.section-sub { margin: 0; color: var(--muted); font-size: 15px; }
.section-sub.mono { font-size: 12.5px; }
.count-pill { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; }
.subhead { margin: 64px 0 18px; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* About */
.about-text { margin: 0 0 40px; font-size: clamp(18px, 2.1vw, 23px); line-height: 1.55; color: color-mix(in srgb, var(--text) 78%, transparent); }
.about-text b { color: var(--text); font-weight: 600; }
.highlights { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 50px; margin-bottom: 48px; }
.highlight { display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; }
.highlight .ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1px solid rgba(var(--accent-rgb), 0.3); background: rgba(var(--accent-rgb), 0.08); color: var(--accent); font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { padding: 22px 12px; text-align: center; border-radius: var(--radius); border: 1px solid var(--border-hi); background: var(--card); backdrop-filter: blur(4px); transition: border-color 0.3s, transform 0.3s var(--ease); }
.stat:hover { border-color: rgba(var(--accent-rgb), 0.6); transform: translateY(-3px); }
.stat strong { display: block; font-family: var(--mono); font-size: clamp(28px, 3.6vw, 40px); font-weight: 500; color: var(--accent); line-height: 1.1; }
.stat span { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); backdrop-filter: blur(6px);
  transition: border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.4s;
}
.project:hover { border-color: rgba(var(--accent-rgb), 0.6); transform: translateY(-4px); box-shadow: var(--shadow), 0 0 0 1px rgba(var(--accent-rgb), 0.15); }
.project.featured { grid-column: 1 / -1; }
.project-banner { position: relative; height: 150px; background-size: cover; background-position: center; overflow: hidden; }
.project.featured .project-banner { height: 230px; }
.project-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 30%, color-mix(in srgb, var(--bg-2) 92%, transparent)); }
.project-banner .gen { position: absolute; inset: -20%; transition: transform 0.8s var(--ease); }
.project:hover .project-banner .gen { transform: scale(1.06) rotate(1deg); }
.project-body { position: relative; padding: 0 22px 22px; margin-top: -36px; z-index: 1; flex: 1; display: flex; flex-direction: column; }
.project-top { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 12px; }
.project-icon { width: 58px; height: 58px; border-radius: 12px; flex: none; display: grid; place-items: center; overflow: hidden; font-family: var(--mono); font-size: 24px; font-weight: 700; color: #120d22; background: var(--accent); border: 3px solid var(--bg-2); box-shadow: 0 8px 20px -8px rgba(0,0,0,0.6); }
.project-icon img { width: 100%; height: 100%; object-fit: cover; }
.project-title { margin: 0; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.project-title svg { font-size: 13px; color: var(--muted); }
.project-type { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--accent); }
.project-desc { margin: 0 0 16px; font-size: 14px; color: var(--muted); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 9px; border-radius: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--card-hi); border: 1px solid var(--border); }

.live-dot { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; background: #3ba55d; box-shadow: 0 0 6px #3ba55d; vertical-align: middle; animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

/* GitHub */
.gh-card { position: relative; margin-top: 26px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); backdrop-filter: blur(6px); }
.gh-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.gh-title { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.gh-title span { display: grid; color: var(--accent); font-size: 16px; }
.gh-head .btn { padding: 9px 14px; }
.gh-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.gh-stats div { padding: 12px; border-radius: 10px; border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 30%, transparent); }
.gh-stats strong { display: block; font-family: var(--mono); font-size: 20px; font-weight: 600; line-height: 1.2; }
.gh-stats span { font-size: 11.5px; color: var(--muted); }
.gh-scroll { overflow-x: auto; padding-bottom: 6px; }
.gh-graph { display: grid; grid-template-rows: 16px repeat(7, auto); grid-auto-flow: column; grid-auto-columns: minmax(10px, 1fr); gap: 3px; min-width: 690px; }
.gh-graph .gh-m { font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; overflow: visible; line-height: 12px; }
.gh-graph i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--border); }
.gh-legend i { display: block; width: 11px; height: 11px; border-radius: 3px; background: var(--border); }
.gh-graph i.e { background: transparent; }
.gh-graph i[data-l="x"] { background: transparent; outline: 1px dashed var(--border); outline-offset: -1px; }
[data-l="1"] { background: rgba(var(--accent-rgb), 0.3) !important; }
[data-l="2"] { background: rgba(var(--accent-rgb), 0.52) !important; }
[data-l="3"] { background: rgba(var(--accent-rgb), 0.75) !important; }
[data-l="4"] { background: rgb(var(--accent-rgb)) !important; }
.gh-graph i[data-tip]:hover { outline: 1px solid var(--text); outline-offset: 0; }
.gh-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 10.5px; color: var(--muted); }
.gh-legend span { margin: 0 4px; }
.gh-tip { position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 8px)); padding: 6px 10px; border-radius: 7px; background: var(--text); color: var(--bg); font-family: var(--mono); font-size: 11px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.gh-tip.show { opacity: 1; }

/* Communities */
.comm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.subhead + .comm-grid { margin-top: 0; }
#comm-current-h { margin-top: 0; }
.comm { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); backdrop-filter: blur(6px); transition: border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.4s; }
.comm:hover { border-color: rgba(var(--accent-rgb), 0.6); transform: translateY(-4px); box-shadow: var(--shadow); }
.comm.past { opacity: 0.85; }
.comm.dead .co { opacity: 0.5; }
.comm-banner { position: relative; height: 96px; background: radial-gradient(circle at 25% 120%, hsla(var(--h), 80%, 60%, 0.6), transparent 60%), radial-gradient(circle at 90% -10%, rgba(var(--accent-rgb), 0.45), transparent 55%), linear-gradient(120deg, hsl(var(--h) 25% 14%), hsl(var(--h) 20% 8%)); background-size: cover; background-position: center; transition: transform 0.8s var(--ease); }
.comm-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 35%, color-mix(in srgb, var(--bg-2) 90%, transparent)); }
.comm-body { position: relative; z-index: 1; margin-top: -30px; padding: 0 18px 18px; display: flex; flex-direction: column; flex: 1; }
.comm-top { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.comm-top .vouch-sample { margin-left: auto; align-self: center; }
.comm-icon { width: 54px; height: 54px; flex: none; border-radius: 14px; overflow: hidden; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 22px; color: #120d22; background: var(--accent); border: 3px solid var(--bg-2); box-shadow: 0 8px 18px -8px rgba(0,0,0,0.6); }
.comm-icon img { width: 100%; height: 100%; object-fit: cover; }
.comm-meta { min-width: 0; }
.comm-name { margin: 0; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comm-role { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--accent); }
.comm-desc { margin: 0 0 14px; font-size: 13px; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.comm-counts { display: flex; gap: 16px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.comm-counts span { display: inline-flex; align-items: center; gap: 6px; }
.comm-counts b { color: var(--text); font-weight: 500; }
.comm-counts .on { width: 8px; height: 8px; border-radius: 50%; background: #3ba55d; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill { position: relative; padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); backdrop-filter: blur(6px); overflow: hidden; transition: border-color 0.3s, transform 0.4s var(--ease); }
.skill::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--accent-rgb), 0.12), transparent 45%); opacity: 0; transition: opacity 0.3s; }
.skill:hover { border-color: rgba(var(--accent-rgb), 0.5); transform: translateY(-3px); }
.skill:hover::before { opacity: 1; }
.skill .ico { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; margin-bottom: 16px; color: var(--accent); background: rgba(var(--accent-rgb), 0.1); border: 1px solid rgba(var(--accent-rgb), 0.25); font-size: 19px; }
.skill h4 { position: relative; margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.skill p { position: relative; margin: 0; font-size: 14px; color: var(--muted); }
.stack { display: flex; flex-wrap: wrap; gap: 10px; }
.stack span { padding: 9px 15px; border-radius: 10px; font-family: var(--mono); font-size: 13px; background: var(--card); border: 1px solid var(--border); transition: border-color 0.2s, color 0.2s, transform 0.2s; }
.stack span:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: step; }
.step { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); font-size: 14.5px; counter-increment: step; }
.step .ico { color: var(--accent); font-size: 18px; }
.step::after { content: "0" counter(step); margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }

/* Vouches */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border-hi); background: transparent; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); transition: all 0.2s; }
.filter:hover { color: var(--text); }
.filter.active { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.6); background: rgba(var(--accent-rgb), 0.12); }
.vouch-track { overflow: hidden; }
.vouch-page { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; transition: opacity 0.35s, transform 0.35s var(--ease); }
.vouch-page.swap { opacity: 0; transform: translateX(var(--dir, 20px)); }
.vouch { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); backdrop-filter: blur(6px); transition: border-color 0.3s; }
.vouch:hover { border-color: rgba(var(--accent-rgb), 0.55); }
.vouch-banner { height: 70px; background-size: cover; background-position: center; }
.vouch-body { padding: 18px 22px 22px; }
.vouch-user { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.vouch-av { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; font-weight: 700; color: var(--accent); background: rgba(var(--accent-rgb), 0.15); border: 2px solid rgba(var(--accent-rgb), 0.35); }
.vouch-av img { width: 100%; height: 100%; object-fit: cover; }
.vouch-user strong { display: block; line-height: 1.2; }
.vouch-user span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.vouch-cat { margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); padding: 4px 9px; border-radius: 6px; background: rgba(var(--accent-rgb), 0.1); }
.vouch-sample { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #f0b429; border: 1px dashed rgba(240, 180, 41, 0.6); padding: 3px 7px; border-radius: 6px; }
.vouch-text { position: relative; margin: 0; padding-left: 26px; font-size: 15px; color: color-mix(in srgb, var(--text) 85%, transparent); }
.vouch-text::before { content: "\201C"; position: absolute; left: 0; top: -10px; font-size: 40px; line-height: 1; font-family: Georgia, serif; color: rgba(var(--accent-rgb), 0.5); }
.vouch-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px; font-family: var(--mono); font-size: 13px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 26px; font-size: 13px; color: var(--muted); }
.pager .icon-btn:disabled { opacity: 0.35; pointer-events: none; }

/* Vouch modal */
.vouch-who { min-width: 0; }
.vouch-who strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal { width: min(500px, calc(100% - 32px)); max-height: calc(100svh - 40px); padding: 26px; border-radius: 18px; border: 1px solid var(--border-hi); background: var(--bg-2); color: var(--text); box-shadow: 0 40px 80px -20px rgba(0,0,0,0.7); overflow-y: auto; }
.modal::backdrop { background: rgba(8, 6, 14, 0.6); backdrop-filter: blur(6px); }
.modal[open] { animation: modalIn 0.35s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.modal h3 { margin: 0 0 6px; font-family: var(--mono); font-size: 20px; }
.modal-sub { margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.modal-x { position: absolute; top: 14px; right: 14px; margin: 0; }
.modal-x .icon-btn { width: 34px; height: 34px; font-size: 16px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field em { font-style: normal; text-transform: none; color: var(--dim); }
.field input, .field textarea, .field select { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border-hi); background: var(--bg); color: var(--text); font: inherit; font-size: 14.5px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2); }
.field input[name="discordId"] { font-family: var(--mono); }
.counter { display: block; text-align: right; margin-top: 4px; font-size: 11px; color: var(--dim); }
.hint { margin: -6px 0 12px; font-size: 12px; color: var(--dim); }
.hint b { color: var(--muted); }
.vm-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(var(--accent-rgb), 0.35); background: rgba(var(--accent-rgb), 0.08); font-size: 13px; }
.vm-preview img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.vm-preview strong, .vm-preview small { display: block; line-height: 1.3; }
.vm-preview small { color: var(--muted); }
.vm-preview > svg { margin-left: auto; color: #3ba55d; }
.muted { color: var(--muted); }
.linkish { display: inline-block; margin: 0 0 16px; padding: 0; border: 0; background: none; color: var(--accent); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(237, 66, 69, 0.45); background: rgba(237, 66, 69, 0.1); color: #ff8a8c; font-size: 13px; }
.vm-submit { width: 100%; justify-content: center; }
.btn.busy { opacity: 0.7; pointer-events: none; }
.btn.busy svg { animation: spinSlow 0.8s linear infinite; }
.vm-done { text-align: center; padding: 10px 0; }
.vm-done-ico { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: rgba(var(--accent-rgb), 0.15); color: var(--accent); font-size: 26px; }
.vm-done form { margin-top: 18px; }
[hidden] { display: none !important; }

/* Contact */
.contact-title { margin: 0 0 16px; font-size: clamp(34px, 5.4vw, 60px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; }
.contact-title em { font-style: normal; color: var(--accent); }
.contact-blurb { margin: 0 auto 36px; max-width: 34em; color: var(--muted); font-size: 17px; }
.socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; text-align: left; }
.social { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); backdrop-filter: blur(6px); transition: border-color 0.3s, transform 0.3s var(--ease); width: 100%; text-align: left; }
.social:hover { border-color: rgba(var(--accent-rgb), 0.6); transform: translateY(-3px); }
.social .ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: rgba(var(--accent-rgb), 0.1); font-size: 18px; flex: none; }
.social div { min-width: 0; }
.social small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.social strong { display: block; font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social .end { margin-left: auto; color: var(--dim); font-size: 14px; }
.social { border-style: solid; font-family: var(--sans); color: var(--text); }

.dm-btn { margin-top: 22px; }
.footer { display: flex; justify-content: space-between; padding: 30px 0 40px; border-top: 1px solid var(--border); font-size: 12px; color: var(--dim); }
.footer a:hover { color: var(--accent); }

/* ============ Music player ============ */
.player { position: fixed; left: 0; bottom: 70px; z-index: 60; display: flex; align-items: flex-end; }
.player-tab {
  order: 2; display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 8px;
  background: color-mix(in srgb, var(--bg-2) 85%, transparent); border: 1px solid var(--border); border-left: 0;
  border-radius: 0 10px 10px 0; backdrop-filter: blur(10px); color: var(--muted); font-size: 14px;
}
.player-tab:hover { color: var(--accent); }
.player-tab .eq { display: none; }
.player.playing .player-tab .eq { display: inline-flex; }
.eq { gap: 2px; align-items: flex-end; height: 12px; }
.eq i { width: 2px; background: var(--accent); animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.3s; } .eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { 0%,100% { height: 3px; } 50% { height: 12px; } }
.player-panel {
  order: 1; width: 290px; padding: 12px; border-radius: 0 14px 14px 0;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent); border: 1px solid var(--border); border-left: 0;
  backdrop-filter: blur(14px); box-shadow: var(--shadow);
  transition: width 0.4s var(--ease), padding 0.4s var(--ease), opacity 0.3s, border-width 0.3s;
  overflow: hidden;
}
.player.collapsed .player-panel { width: 0; padding-left: 0; padding-right: 0; opacity: 0; border-width: 0; }
.player.collapsed .player-tab { border-left: 1px solid var(--border); border-radius: 0 10px 10px 0; }
.player-row { display: flex; align-items: center; gap: 10px; width: 266px; }
.player-cover { width: 38px; height: 38px; border-radius: 8px; flex: none; display: grid; place-items: center; color: var(--accent); background: rgba(var(--accent-rgb), 0.14) center/cover; font-size: 16px; }
.player.playing .player-cover:not([style*="url"]) svg { animation: spinSlow 4s linear infinite; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.player-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.player-state { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.player-title { font-family: var(--mono); font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-ctrls { display: flex; align-items: center; }
.player-ctrls button { background: none; border: 0; width: 24px; height: 28px; display: grid; place-items: center; color: var(--muted); font-size: 12px; padding: 0; }
.player-ctrls button:hover { color: var(--text); }
.player-ctrls button.on { color: var(--accent); }
.player-ctrls .play { width: 30px; height: 30px; border-radius: 50%; color: var(--text); font-size: 13px; }
.player-line { display: flex; align-items: center; gap: 8px; margin-top: 8px; width: 266px; font-size: 10.5px; color: var(--muted); }
.player-line .mono { min-width: 30px; }
.player-line .t-dur, .player-line .vol-pct { text-align: right; }
.vol-ico { font-size: 13px; display: grid; }
.range { -webkit-appearance: none; appearance: none; flex: 1; height: 4px; border-radius: 4px; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--accent) var(--p, 0%), var(--border-hi) var(--p, 0%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: var(--text); border: 0; }
.range::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: var(--text); border: 0; }
.seek::-webkit-slider-thumb { width: 0; } .seek:hover::-webkit-slider-thumb { width: 10px; }
.queue-toggle { display: flex; align-items: center; gap: 6px; width: 266px; margin-top: 10px; padding: 0; background: none; border: 0; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.queue-toggle:hover { color: var(--text); }
.queue-toggle .q-chev { margin-left: auto; display: grid; transition: transform 0.3s; }
.player.qopen .q-chev { transform: rotate(180deg); }
.queue { list-style: none; margin: 0; padding: 0; width: 266px; max-height: 0; overflow-y: auto; transition: max-height 0.4s var(--ease), margin 0.3s; }
.player.qopen .queue { max-height: 180px; margin-top: 8px; }
.queue li { display: flex; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 12px; cursor: pointer; color: var(--muted); }
.queue li:hover { background: var(--card-hi); color: var(--text); }
.queue li.cur { color: var(--accent); }
.queue li b { font-family: var(--mono); font-weight: 400; color: var(--dim); min-width: 18px; }
.queue li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 80; padding: 10px 18px; border-radius: 10px; background: var(--accent); color: #120d22; font-family: var(--mono); font-size: 12.5px; opacity: 0; pointer-events: none; transition: all 0.35s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; padding-top: 80px; }
  .hero-avatar { grid-row: 1; width: min(220px, 60vw); justify-self: start; }
  .skills-grid, .comm-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .gh-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .container, .container.narrow { width: calc(100% - 32px); }
  .section { padding: 84px 0; }
  .projects-grid, .vouch-page, .skills-grid, .process, .comm-grid { grid-template-columns: 1fr; }
  .gh-stats { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr; }
  .sidenav { top: auto; bottom: 12px; right: 50%; transform: translateX(50%); border-radius: 14px; }
  .sidenav ul { flex-direction: row; }
  .sidenav:hover a span { max-width: 0; opacity: 0; }
  .sidenav a.active::before { display: none; }
  .player { bottom: 76px; }
  .hero-name { font-size: 15vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============ Gaming ============ */
.game-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.game { display: flex; flex-direction: column; padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); backdrop-filter: blur(6px); transition: border-color 0.3s, transform 0.4s var(--ease); }
.game:hover { border-color: rgba(var(--accent-rgb), 0.5); }
.game-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.game-head h4 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.2; }
.game-head .mono { font-size: 11.5px; color: var(--muted); }
.game-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 10px; color: var(--accent); background: rgba(var(--accent-rgb), 0.12); border: 1px solid rgba(var(--accent-rgb), 0.25); font-size: 18px; }
.game-ico img { width: 100%; height: 100%; object-fit: cover; }
.live-pill { margin-left: auto; padding: 3px 8px; border-radius: 6px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #3ba55d; background: rgba(59, 165, 93, 0.12); }
.game-body { flex: 1; display: flex; flex-direction: column; }
.game-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.game-stats div { padding: 14px 12px; border-radius: 10px; border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 30%, transparent); }
.game-stats strong { display: block; font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--accent); line-height: 1.2; }
.game-stats span { font-size: 11.5px; color: var(--muted); }
.game-src { margin: 10px 0 0; font-size: 10.5px; color: var(--dim); text-align: right; }
.game-note { margin: 0; padding: 16px; border-radius: 10px; border: 1px dashed var(--border-hi); font-size: 13.5px; color: var(--muted); }
.game-loading { display: flex; gap: 6px; justify-content: center; padding: 30px; }
.game-loading i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1s infinite; }
.game-loading i:nth-child(2) { animation-delay: 0.2s; } .game-loading i:nth-child(3) { animation-delay: 0.4s; }
.game.minecraft { grid-row: span 2; }
.game.roblox { grid-column: 1 / -1; }
.game.roblox .game-body:has(.rbx-stage) { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 24px; align-items: center; }
.rbx-info h5 { margin: 6px 0 2px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.rbx-info .mono { font-size: 12px; }
.rbx-info .game-actions { margin-top: 16px; }
.mc-stage, .rbx-stage { position: relative; flex: 1; min-height: 300px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb), 0.22), transparent 65%), color-mix(in srgb, var(--bg) 40%, transparent); }
.mc-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.mc-stage canvas:active { cursor: grabbing; }
.mc-hint { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.rbx-stage { display: grid; place-items: center; perspective: 800px; }
.rbx-stage img { width: min(100%, 360px); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.25s var(--ease); filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.45)); animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 50% { translate: 0 -8px; } }
.rbx-bio { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.game-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border-hi); background: transparent; font-family: var(--mono); font-size: 11.5px; color: var(--text); transition: border-color 0.2s, color 0.2s; }
.chip:hover, .chip.on { border-color: var(--accent); color: var(--accent); }
.chip.link { margin-left: auto; }
@media (max-width: 900px) { .game-grid { grid-template-columns: 1fr; } .game.minecraft { grid-row: auto; } .game.roblox .game-body:has(.rbx-stage) { grid-template-columns: 1fr; } }
@media (max-width: 500px) { .game-stats { grid-template-columns: repeat(2, 1fr); } }
