/* =====================================================
 *  modern.css - cockpit layout refresh
 *  Visual layer only: keeps all existing JS ids/hooks intact.
 * =================================================== */

:root {
  --bg: #05070a;
  --bg-deep: #05070a;
  --surface: rgba(16, 22, 30, 0.78);
  --surface-2: rgba(25, 33, 44, 0.72);
  --surface-3: rgba(36, 46, 60, 0.86);

  --border: rgba(210, 220, 230, 0.13);
  --border-hover: rgba(236, 182, 111, 0.5);

  --text: #f5f0e8;
  --text-muted: #aab5c2;
  --text-faint: #6f7b8a;

  --accent: #ecb66f;
  --accent-hover: #ffd99f;
  --accent-deep: #a96a2d;
  --accent-blue: #72d6d2;
  --accent-cyan: #9adfba;
  --accent-glow: rgba(236, 182, 111, 0.2);

  --font-display: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --radius-full: 999px;

  --shadow-card: 0 18px 62px rgba(0, 0, 0, 0.34);
  --shadow-hover: 0 24px 80px rgba(0, 0, 0, 0.46);
  --transition: 180ms cubic-bezier(0.2, 0, 0, 1);
  --ease: cubic-bezier(0.2, 0, 0, 1);

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.18rem;
  --text-xl: 1.55rem;
  --text-2xl: 2rem;
  --text-hero: 5.75rem;

  --content-max: 1320px;
  --gap: 18px;

  --bg-0: var(--bg-deep);
  --bg-1: var(--surface);
  --bg-2: var(--surface-2);
  --bg-3: var(--surface-3);
  --fg: var(--text);
  --fg-muted: var(--text-muted);
  --fg-subtle: #7e8998;
  --fg-faint: var(--text-faint);
  --line: var(--border);
  --line-strong: rgba(236, 182, 111, 0.28);
  --line-accent: var(--border-hover);
  --accent-soft: var(--accent-hover);
  --accent-faint: rgba(236, 182, 111, 0.11);
  --warn: #f3bf55;
  --error: #ff7d7d;
  --info: var(--accent-blue);
  --display: var(--font-display);
  --body: var(--font-body);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  color: var(--text);
  background:
    radial-gradient(900px 560px at 20% -10%, rgba(236, 182, 111, 0.16), transparent 64%),
    radial-gradient(760px 520px at 92% 8%, rgba(114, 214, 210, 0.11), transparent 62%),
    linear-gradient(145deg, #05070a 0%, #0a0f15 48%, #070a0e 100%);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  letter-spacing: 0;
}

h1,
h2,
h3,
.hero-name,
.sfm-hero .n,
.st-ingame .ig-name {
  letter-spacing: 0;
}

::selection {
  background: rgba(236, 182, 111, 0.28);
  color: #fff7ed;
}

:focus-visible {
  outline-color: var(--accent);
  outline-offset: 3px;
}

/* Backdrop */
.bg {
  background-color: transparent;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    radial-gradient(ellipse 80% 42% at 50% -18%, rgba(236, 182, 111, 0.12), transparent 70%);
  background-size: 40px 40px, 40px 40px, auto;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.9) 45%, transparent 100%);
}

.orb {
  display: none;
}

.grain {
  opacity: 0.13;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0.55px, transparent 0.75px);
  background-size: 5px 5px;
}

.vignette {
  background:
    linear-gradient(180deg, rgba(5, 7, 10, 0.1), transparent 26%, rgba(5, 7, 10, 0.7) 100%),
    radial-gradient(ellipse at 52% 18%, transparent 42%, rgba(0, 0, 0, 0.34) 100%);
}

/* Main cockpit grid */
.page {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(0, auto);
  gap: var(--gap);
  max-width: var(--content-max);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px clamp(18px, 3vw, 42px) 42px;
  position: relative;
  z-index: 10;
}

.profile-rail {
  grid-column: 1 / 4;
  grid-row: 1 / 7;
  align-self: start;
  position: sticky;
  top: 32px;
  min-height: calc(100vh - 64px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-rail::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(236, 182, 111, 0.13), transparent 34%),
    radial-gradient(280px 220px at 20% 0%, rgba(114, 214, 210, 0.12), transparent 68%);
  pointer-events: none;
}

.rail-avatar {
  width: min(100%, 168px);
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.38);
}

.rail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-kicker {
  margin-top: 24px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.rail-name {
  margin-top: 8px;
  font-size: 2.6rem;
  line-height: 0.95;
  font-weight: 700;
}

.rail-copy {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.rail-status {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid rgba(154, 223, 186, 0.34);
  border-radius: var(--radius-full);
  background: rgba(154, 223, 186, 0.1);
  color: #bdf4d4;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.rail-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9adfba;
  box-shadow: 0 0 10px rgba(154, 223, 186, 0.5);
}

.rail-nav {
  margin-top: auto;
  padding-top: 26px;
  display: grid;
  gap: 7px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  border: 1px solid transparent;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}

.rail-nav a::after {
  content: '';
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.45;
}

.rail-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

/* Surfaces */
.glass {
  position: relative;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px) saturate(130%);
}

.glass.card::before {
  display: none;
}

.glass.card::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 2px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, rgba(236, 182, 111, 0.85), rgba(114, 214, 210, 0.65), transparent 72%);
  opacity: 0.48;
  transform: none;
  transition: opacity var(--transition);
}

.glass.card:hover::after {
  opacity: 0.95;
  transform: none;
}

.glass.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.glass > * {
  position: relative;
  z-index: 2;
}

.card {
  min-width: 0;
  padding: 24px;
  overflow: hidden;
}

.card--hero {
  grid-column: 4 / 9;
  grid-row: 1 / 3;
  min-height: 500px;
  display: flex;
  align-items: stretch;
  padding: 32px;
  background:
    radial-gradient(520px 360px at 6% 10%, rgba(236, 182, 111, 0.16), transparent 70%),
    radial-gradient(430px 330px at 100% 92%, rgba(114, 214, 210, 0.12), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.016)),
    rgba(16, 22, 30, 0.8);
}

.card--spotify {
  grid-column: 9 / -1;
  grid-row: 1;
  min-height: 238px;
}

.card--discord {
  grid-column: 9 / -1;
  grid-row: 2;
  min-height: 238px;
}

.card--steam {
  grid-column: 4 / -1;
  grid-row: 3;
}

.card--statsfm {
  grid-column: 4 / 8;
  grid-row: 4;
  order: initial;
}

.card--github {
  grid-column: 8 / -1;
  grid-row: 4;
  order: initial;
}

.card--terminal {
  grid-column: 4 / -1;
  grid-row: 5;
  order: initial;
}

.page-footer {
  grid-column: 4 / -1;
  grid-row: 6;
  order: initial;
}

.card-tag {
  top: 18px;
  right: 20px;
  color: rgba(169, 180, 194, 0.54);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
}

.card:hover .card-tag {
  color: var(--accent);
  letter-spacing: 0.12em;
}

.card-head {
  margin-top: 14px;
  margin-bottom: 18px;
}

.card-head h2 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0;
  background-image: none;
  padding-bottom: 0;
}

.card-head h2::before,
.card-head h2::after {
  display: none;
}

/* Pills and live states */
.glass-pill {
  min-height: 30px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.048);
  border-color: rgba(255, 255, 255, 0.105);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0;
}

.glass-pill::before {
  display: none;
}

.glass-pill:hover {
  color: var(--text);
  background: rgba(236, 182, 111, 0.13);
  border-color: rgba(236, 182, 111, 0.38);
}

.glass-pill b {
  color: var(--text);
}

.pill-available,
.sp-live[data-playing="true"],
.dc-live[data-connected="true"],
.st-live,
.st-ingame .ig-info .st-badge,
.sfm-cta,
.st-ingame .ig-cta {
  background: rgba(154, 223, 186, 0.11);
  border-color: rgba(154, 223, 186, 0.34);
  color: #bdf4d4;
}

.pill-available .dot,
.sp-live .dot,
.dc-live[data-connected="true"] .dot,
.st-live .dot,
.st-state.in-game .dot,
.st-ingame .ig-info .st-badge .dot {
  background: #9adfba;
  box-shadow: 0 0 10px rgba(154, 223, 186, 0.42);
}

/* Hero */
.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  align-content: space-between;
  gap: 26px;
}

.hero-text {
  min-width: 0;
  max-width: 100%;
}

.hero-name {
  display: flex;
  flex-wrap: wrap;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 0.9;
  max-width: 100%;
}

.hero-name .char {
  background-image: linear-gradient(115deg, #fff7ed 0%, #ffd99f 48%, #72d6d2 100%);
  text-shadow: none;
}

.hero-name::before,
.hero-name::after {
  display: none;
}

.hero-tagline {
  margin-top: 24px;
  max-width: 35rem;
  color: #c7d0da;
  font-size: 1.18rem;
  line-height: 1.58;
  font-weight: 500;
}

.hero-tagline::before {
  content: '';
}

.hero-pills {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-avatar {
  justify-self: end;
  width: 172px;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.052);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.42);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-avatar::before,
.hero-avatar::after {
  display: none;
}

/* Shared media shells */
.sp-art,
.dc-avatar,
.st-avatar,
.gh-avatar,
.sfm-list .cover,
.dc-activity .ai,
.st-recent .g .cover {
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.052);
}

.sp-title,
.dc-name,
.st-name,
.gh-name,
.gh-repo .rn {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0;
}

.sp-artist,
.sp-album,
.dc-custom,
.st-state,
.gh-bio,
.gh-repo .rd {
  color: var(--text-muted);
}

/* Spotify */
.card--spotify .card-head,
.card--discord .card-head {
  margin-bottom: 16px;
}

.sp-body {
  gap: 16px;
}

.sp-art {
  width: 88px;
  height: 88px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.sp-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.075);
}

.sp-progress > i {
  background: linear-gradient(90deg, #72d6d2, #9adfba, #ecb66f);
  box-shadow: none;
}

.sp-waveform i {
  background: var(--accent-blue);
  box-shadow: none;
}

.sp-live,
.st-live,
.dc-live {
  letter-spacing: 0.08em;
}

/* Discord */
.card--discord {
  display: flex;
  flex-direction: column;
}

.dc-body {
  gap: 14px;
}

.dc-avatar {
  width: 58px;
  height: 58px;
}

.dc-activity,
.gh-repo,
.gh-event,
.sfm-list .item,
.st-recent .g {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.09);
}

.dc-activity:hover,
.gh-repo:hover,
.gh-event:hover,
.sfm-list .item:hover,
.st-recent .g:hover {
  background: rgba(255, 255, 255, 0.078);
  border-color: rgba(236, 182, 111, 0.3);
}

/* Steam */
.st-top {
  grid-template-columns: auto 1fr minmax(420px, 2fr);
  gap: 24px;
}

.st-recent {
  gap: 12px;
}

.st-recent .g {
  padding: 10px;
}

.st-recent .g .gn,
.st-recent .g .gh,
.st-state,
.st-ingame .ig-label,
.st-ingame .ig-val {
  font-family: var(--mono);
  letter-spacing: 0;
}

.st-ingame {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.048);
  border-color: rgba(236, 182, 111, 0.24);
  box-shadow: none;
}

.st-ingame .ig-info {
  border-left-color: rgba(255, 255, 255, 0.08);
}

/* GitHub */
.gh-top {
  gap: 16px;
}

.gh-pills {
  gap: 10px;
}

.gh-repos {
  grid-template-columns: 1fr;
  gap: 12px;
}

.gh-repo {
  min-height: 108px;
  padding: 16px;
}

.gh-repo::before {
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-blue));
}

.gh-event .ge-icon {
  color: var(--accent);
  background: rgba(236, 182, 111, 0.1);
  border-color: rgba(236, 182, 111, 0.22);
}

/* stats.fm */
.sfm-hero {
  padding: 28px 20px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 182, 111, 0.13), rgba(114, 214, 210, 0.075)),
    rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.1);
}

.sfm-hero .n {
  font-size: 4.45rem;
  background: linear-gradient(115deg, #fff7ed, #ffd99f 50%, #72d6d2);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
}

.sfm-grid {
  gap: 18px;
}

.sfm-hero .l,
.sfm-col-title,
.gh-col-title {
  color: var(--text-faint);
  font-family: var(--mono);
  letter-spacing: 0.12em;
}

.sfm-list .item {
  border: 1px solid transparent;
}

.sfm-list .item:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

/* Terminal */
.card--terminal .tr-hint {
  display: none;
}

.tr-window {
  border-radius: 8px;
  background: #070b10;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.34);
}

.tr-chrome {
  background: rgba(255, 255, 255, 0.055);
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

.tr-title,
.tr-body,
.tr-prompt,
.tr-input,
.tr-output .tr-prompt-echo {
  font-family: var(--mono);
}

.tr-body {
  color: #dbe3ea;
}

.tr-prompt,
.tr-output .tr-accent,
.tr-output .tr-prompt-echo {
  color: var(--accent);
  text-shadow: none;
}

.tr-prompt .tr-path {
  color: var(--accent-blue);
}

.tr-input {
  color: #fff7ed;
}

/* Cursor and footer */
.cursor {
  border-color: rgba(236, 182, 111, 0.82);
  background: rgba(236, 182, 111, 0.13);
  box-shadow: none;
}

.cursor::after {
  background: var(--accent);
}

.cursor.hover {
  background: rgba(236, 182, 111, 0.08);
  border-color: rgba(114, 214, 210, 0.85);
}

.page-footer {
  text-align: center;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0;
  padding: 28px 0 4px;
}

.page-footer a:hover {
  color: var(--accent);
}

/* Software renderer fallback keeps the new layout but drops blur. */
.no-gpu .glass,
.no-gpu .profile-rail {
  backdrop-filter: none;
  background: #111820;
}

/* Responsive */
@media (max-width: 1180px) {
  :root {
    --text-hero: 4.6rem;
  }

  .page {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .profile-rail {
    grid-column: 1 / -1;
    grid-row: auto;
    position: relative;
    top: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px 22px;
    align-items: center;
  }

  .rail-avatar {
    width: 132px;
    grid-row: 1 / 5;
  }

  .rail-kicker,
  .rail-name,
  .rail-copy,
  .rail-status {
    margin-top: 0;
  }

  .rail-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    padding-top: 8px;
  }

  .rail-nav a {
    justify-content: center;
  }

  .rail-nav a::after {
    display: none;
  }

  .card--hero {
    grid-column: 1 / 6;
    grid-row: auto / span 2;
  }

  .card--spotify {
    grid-column: 6 / -1;
    grid-row: auto;
  }

  .card--discord {
    grid-column: 6 / -1;
    grid-row: auto;
  }

  .card--steam {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .card--statsfm {
    grid-column: 1 / 5;
    grid-row: auto;
  }

  .card--github {
    grid-column: 5 / -1;
    grid-row: auto;
  }

  .card--terminal,
  .page-footer {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .st-top {
    grid-template-columns: auto 1fr;
  }

  .st-recent {
    grid-column: 1 / -1;
    margin-top: 14px;
  }
}

@media (max-width: 820px) {
  :root {
    --text-hero: 3.7rem;
    --gap: 14px;
  }

  .page {
    grid-template-columns: 1fr;
    padding: 16px 12px 34px;
  }

  .profile-rail,
  .card--hero,
  .card--spotify,
  .card--discord,
  .card--steam,
  .card--statsfm,
  .card--github,
  .card--terminal,
  .page-footer {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .profile-rail {
    display: block;
    padding: 18px;
  }

  .rail-avatar {
    width: 108px;
  }

  .rail-name {
    font-size: 2.25rem;
  }

  .rail-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .rail-nav::-webkit-scrollbar {
    display: none;
  }

  .rail-nav a {
    flex: 0 0 auto;
    min-height: 34px;
  }

  .card,
  .card--hero {
    padding: 18px;
  }

  .card--hero {
    min-height: auto;
    display: block;
  }

  .card-tag {
    position: static;
    display: block;
    margin-bottom: 12px;
  }

  .card-head {
    margin-top: 0;
  }

  .hero-grid {
    gap: 24px;
  }

  .hero-name,
  .hero-pills {
    justify-content: flex-start;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-avatar {
    width: 150px;
    justify-self: start;
  }

  .sp-body,
  .dc-body,
  .gh-top {
    align-items: flex-start;
  }

  .sp-art {
    width: 76px;
    height: 76px;
  }

  .st-top {
    grid-template-columns: auto 1fr;
  }

  .st-recent {
    grid-template-columns: 1fr;
  }

  .sfm-grid {
    grid-template-columns: 1fr;
  }

  .sfm-hero .n {
    font-size: 3.25rem;
  }

  .sfm-sub {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 460px) {
  :root {
    --text-hero: 3.05rem;
  }

  .rail-copy {
    font-size: 0.9rem;
  }

  .hero-pills {
    gap: 8px;
  }

  .glass-pill {
    font-size: 0.68rem;
  }

  .sp-live,
  .st-live,
  .dc-live {
    margin-left: 0;
  }

  .card-head {
    flex-wrap: wrap;
  }
}

/* =====================================================
 *  v2 polish - floating top dock + spotlight dashboard
 * =================================================== */

:root {
  --bg: #070806;
  --bg-deep: #050604;
  --surface: rgba(17, 19, 18, 0.76);
  --surface-2: rgba(28, 31, 29, 0.72);
  --surface-3: rgba(42, 45, 42, 0.86);
  --border: rgba(245, 237, 225, 0.13);
  --border-hover: rgba(246, 193, 120, 0.52);
  --text: #fbf3e8;
  --text-muted: #b8b0a5;
  --text-faint: #776f67;
  --accent: #f6c178;
  --accent-hover: #ffe1ad;
  --accent-deep: #b87938;
  --accent-blue: #75ded3;
  --accent-cyan: #a6e9bf;
  --accent-rose: #ff8797;
  --accent-glow: rgba(246, 193, 120, 0.22);
  --content-max: 1380px;
  --gap: 20px;
  --text-hero: 6.6rem;
  --shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 20px 70px rgba(0, 0, 0, 0.34);
  --shadow-hover:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 28px 90px rgba(0, 0, 0, 0.48);
}

body {
  background:
    linear-gradient(120deg, rgba(246, 193, 120, 0.08), transparent 34%),
    linear-gradient(240deg, rgba(117, 222, 211, 0.09), transparent 32%),
    linear-gradient(180deg, #070806 0%, #0e0d09 42%, #071010 100%);
}

.bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(135deg, rgba(246, 193, 120, 0.09), transparent 34%, rgba(117, 222, 211, 0.08) 72%, transparent);
  background-size: 36px 36px, 36px 36px, auto;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.86) 54%, transparent 100%);
}

.grain {
  opacity: 0.1;
}

.vignette {
  background:
    linear-gradient(180deg, rgba(5, 6, 4, 0.1), transparent 30%, rgba(5, 6, 4, 0.76) 100%),
    radial-gradient(ellipse at 50% 8%, transparent 45%, rgba(0, 0, 0, 0.36) 100%);
}

.page {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  max-width: var(--content-max);
  padding: 24px clamp(18px, 3.2vw, 48px) 46px;
}

.profile-rail {
  grid-column: 1 / -1;
  grid-row: 1;
  position: sticky;
  top: 14px;
  z-index: 50;
  min-height: 86px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 62px 150px minmax(220px, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 3px 16px;
  align-items: center;
  overflow: hidden;
}

.profile-rail::before {
  background:
    linear-gradient(90deg, rgba(246, 193, 120, 0.12), transparent 34%, rgba(117, 222, 211, 0.1)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
}

.rail-avatar {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 62px;
  border-radius: 8px;
  box-shadow: none;
}

.rail-kicker {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  color: var(--accent);
  font-size: 0.63rem;
  letter-spacing: 0.16em;
}

.rail-name {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: 1.55rem;
  line-height: 1;
}

.rail-copy {
  grid-column: 3;
  grid-row: 1 / 3;
  margin: 0;
  max-width: 56ch;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.rail-status {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
  margin: 0;
  min-height: 28px;
  padding: 5px 10px;
}

.rail-nav {
  grid-column: 4;
  grid-row: 2;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.rail-nav a {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.06);
  font-size: 0.68rem;
}

.rail-nav a::after {
  display: none;
}

.rail-nav a:hover {
  transform: translateY(-1px);
  background: rgba(246, 193, 120, 0.12);
  border-color: rgba(246, 193, 120, 0.26);
}

.glass {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018) 42%, rgba(117, 222, 211, 0.035)),
    var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(22px) saturate(135%);
}

.glass.card::after {
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 193, 120, 0.85), rgba(117, 222, 211, 0.75), rgba(255, 135, 151, 0.58), transparent);
  opacity: 0.68;
}

.glass.card:hover {
  transform: translateY(-3px);
}

.card {
  padding: 26px;
}

.card--hero {
  grid-column: 1 / 8;
  grid-row: 2 / 4;
  min-height: 560px;
  padding: clamp(28px, 3.2vw, 48px);
  background:
    linear-gradient(125deg, rgba(246, 193, 120, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(117, 222, 211, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018)),
    rgba(16, 19, 17, 0.82);
}

.card--hero::before {
  content: '';
  position: absolute;
  inset: auto 26px 26px 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 193, 120, 0.5), rgba(117, 222, 211, 0.36), transparent);
  pointer-events: none;
}

.card--spotify {
  grid-column: 8 / -1;
  grid-row: 2;
  min-height: 270px;
}

.card--discord {
  grid-column: 8 / -1;
  grid-row: 3;
  min-height: 270px;
}

.card--steam {
  grid-column: 1 / -1;
  grid-row: 4;
}

.card--statsfm {
  grid-column: 1 / 5;
  grid-row: 5;
}

.card--github {
  grid-column: 5 / -1;
  grid-row: 5;
}

.card--terminal {
  grid-column: 1 / -1;
  grid-row: 6;
}

.page-footer {
  grid-column: 1 / -1;
  grid-row: 7;
}

.card-tag {
  top: 20px;
  right: 22px;
  color: rgba(184, 176, 165, 0.48);
  font-size: 0.62rem;
}

.card-head {
  margin-top: 14px;
  margin-bottom: 20px;
}

.card-head h2 {
  font-size: 1.05rem;
}

.glass-pill {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
  color: #c8c0b5;
}

.pill-available,
.sp-live[data-playing="true"],
.dc-live[data-connected="true"],
.st-live,
.st-ingame .ig-info .st-badge,
.sfm-cta,
.st-ingame .ig-cta {
  background: rgba(166, 233, 191, 0.12);
  border-color: rgba(166, 233, 191, 0.38);
  color: #d2f8df;
}

.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 275px);
  align-items: end;
  align-content: stretch;
  gap: clamp(24px, 4vw, 44px);
}

.hero-text {
  align-self: center;
}

.hero-name {
  font-size: var(--text-hero);
  line-height: 0.86;
}

.hero-name .char {
  background-image: linear-gradient(110deg, #fff4df 0%, #ffd493 42%, #75ded3 75%, #ff8797 100%);
}

.hero-tagline {
  max-width: 38rem;
  color: #d1c8bb;
  font-size: 1.22rem;
  line-height: 1.55;
}

.hero-pills {
  gap: 9px;
}

.hero-avatar {
  width: min(100%, 275px);
  justify-self: end;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 28px 78px rgba(0, 0, 0, 0.42);
}

.hero-avatar img,
.rail-avatar img {
  filter: saturate(1.1) contrast(1.04);
}

.sp-tint {
  display: block;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 19, 18, 0.82), rgba(17, 19, 18, 0.52)),
    var(--sp-art-bg, none);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.card--spotify.has-art .sp-tint {
  opacity: 0.24;
}

.sp-art {
  width: 104px;
  height: 104px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.11),
    0 20px 46px rgba(0, 0, 0, 0.38);
}

.sp-title {
  font-size: 1.08rem;
}

.sp-progress {
  background: rgba(255, 255, 255, 0.085);
}

.sp-progress > i {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan), var(--accent), var(--accent-rose));
}

.dc-avatar,
.st-avatar,
.gh-avatar {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.dc-activity,
.gh-repo,
.gh-event,
.sfm-list .item,
.st-recent .g {
  background: rgba(255, 255, 255, 0.048);
  border-color: rgba(255, 255, 255, 0.095);
}

.dc-activity:hover,
.gh-repo:hover,
.gh-event:hover,
.sfm-list .item:hover,
.st-recent .g:hover {
  background: rgba(255, 255, 255, 0.082);
  border-color: rgba(246, 193, 120, 0.34);
}

.st-top {
  grid-template-columns: auto 1fr minmax(460px, 2.35fr);
}

.st-recent .g {
  padding: 10px;
}

.st-recent .g .cover {
  border-radius: 7px;
}

.st-ingame {
  background: rgba(255, 255, 255, 0.052);
  border-color: rgba(246, 193, 120, 0.28);
}

.st-tint {
  display: block;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 19, 18, 0.9), rgba(17, 19, 18, 0.64)),
    var(--st-tint-bg, none);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.card--steam.in-game .st-tint {
  opacity: 0.18;
}

.sfm-hero {
  background:
    linear-gradient(140deg, rgba(246, 193, 120, 0.18), rgba(117, 222, 211, 0.1) 54%, rgba(255, 135, 151, 0.1)),
    rgba(255, 255, 255, 0.048);
}

.sfm-hero::before {
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-blue), var(--accent-rose), transparent);
}

.sfm-hero .n {
  background: linear-gradient(110deg, #fff4df, #ffd493 45%, #75ded3 78%, #ff8797);
  -webkit-background-clip: text;
  background-clip: text;
}

.gh-repos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gh-repo {
  min-height: 112px;
}

.gh-repo::before {
  background: linear-gradient(180deg, var(--accent), var(--accent-blue), var(--accent-rose));
}

.tr-window {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    #070907;
}

.tr-body {
  height: clamp(300px, 36vh, 430px);
}

.no-gpu .sp-tint,
.no-gpu .st-tint {
  display: none;
}

@media (max-width: 1240px) {
  :root {
    --text-hero: 5.4rem;
  }

  .profile-rail {
    grid-template-columns: 58px 140px minmax(180px, 1fr);
  }

  .rail-status {
    grid-column: 3;
    grid-row: 1;
  }

  .rail-nav {
    grid-column: 3;
    grid-row: 2;
  }

  .rail-copy {
    display: none;
  }

  .card--hero {
    grid-column: 1 / 8;
  }

  .card--spotify,
  .card--discord {
    grid-column: 8 / -1;
  }
}

@media (max-width: 980px) {
  :root {
    --text-hero: 4.4rem;
  }

  .page {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .profile-rail {
    top: 10px;
    grid-template-columns: 56px 1fr;
    min-height: 0;
  }

  .rail-avatar {
    width: 56px;
  }

  .rail-kicker,
  .rail-name {
    grid-column: 2;
  }

  .rail-status {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
  }

  .rail-nav {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rail-nav::-webkit-scrollbar {
    display: none;
  }

  .card--hero {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 460px;
  }

  .card--spotify,
  .card--discord,
  .card--steam,
  .card--statsfm,
  .card--github,
  .card--terminal,
  .page-footer {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .card--statsfm,
  .card--github {
    grid-column: span 4;
  }

  .st-top {
    grid-template-columns: auto 1fr;
  }

  .st-recent {
    grid-column: 1 / -1;
  }

  .gh-repos {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  :root {
    --text-hero: 3.5rem;
    --gap: 14px;
  }

  .page {
    grid-template-columns: 1fr;
    padding: 14px 12px 34px;
  }

  .profile-rail,
  .card--hero,
  .card--spotify,
  .card--discord,
  .card--steam,
  .card--statsfm,
  .card--github,
  .card--terminal,
  .page-footer {
    grid-column: 1 / -1;
  }

  .profile-rail {
    display: grid;
    padding: 14px;
    border-radius: 8px;
  }

  .card {
    padding: 18px;
  }

  .card--hero {
    min-height: auto;
    display: block;
  }

  .card-tag {
    position: static;
    display: block;
    margin-bottom: 14px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-avatar {
    width: min(100%, 190px);
    justify-self: start;
  }

  .sp-body,
  .dc-body,
  .gh-top {
    align-items: flex-start;
  }

  .sp-art {
    width: 78px;
    height: 78px;
  }

  .st-recent {
    grid-template-columns: 1fr;
  }

  .sfm-grid {
    grid-template-columns: 1fr;
  }
}

.card-tag {
  position: absolute;
  top: 28px;
  right: 30px;
  margin: 0;
}

.card-head {
  margin-top: 24px;
}

@media (max-width: 700px) {
  .card-tag {
    position: static;
    display: block;
    margin-bottom: 18px;
  }

  .card-head {
    margin-top: 0;
  }
}

@media (max-width: 430px) {
  :root {
    --text-hero: 3.05rem;
  }

  .hero-name {
    line-height: 0.92;
  }

  .rail-nav a {
    font-size: 0.66rem;
  }

  .sp-live,
  .dc-live,
  .st-live,
  .sfm-cta {
    margin-left: 0;
  }

  .card-head {
    flex-wrap: wrap;
  }
}

/* Final title fit pass. Keep the animated spans from main.js, but
   prevent the period from wrapping away from the name on desktop. */
.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
}

.hero-name {
  display: block;
  white-space: nowrap;
  font-size: min(var(--text-hero), 6rem);
}

.hero-name .char {
  display: inline-block;
}

.hero-avatar {
  width: min(100%, 240px);
}

@media (max-width: 700px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-name {
    font-size: var(--text-hero);
  }
}

/* =====================================================
 *  v3 liquid glass + scroll particles
 * =================================================== */

:root {
  --pointer-x: 50vw;
  --pointer-y: 20vh;
  --scroll-progress: 0;
  --scroll-shift: 0px;
  --liquid-shift: 0px;
  --liquid-shift-alt: 0px;
  --glass-shift: 0px;
  --liquid-blur: 30px;
  --liquid-bright: rgba(255, 255, 255, 0.12);
  --liquid-edge: rgba(255, 244, 224, 0.22);
}

.liquid-ambient {
  position: fixed;
  inset: -18vh -14vw;
  z-index: 3;
  pointer-events: none;
  opacity: 0.74;
  background:
    radial-gradient(420px 300px at var(--pointer-x) var(--pointer-y), rgba(255, 232, 186, 0.14), transparent 72%),
    radial-gradient(620px 380px at calc(100% - 10vw) 10vh, rgba(117, 222, 211, 0.12), transparent 70%),
    radial-gradient(520px 360px at 8vw 80vh, rgba(255, 135, 151, 0.09), transparent 72%);
  filter: blur(18px) saturate(120%);
  mix-blend-mode: screen;
  animation: liquid-drift 16s ease-in-out infinite alternate;
}

.liquid-ambient::before,
.liquid-ambient::after {
  content: '';
  position: absolute;
  width: 46vw;
  aspect-ratio: 1;
  border-radius: 46% 54% 62% 38% / 52% 38% 62% 48%;
  background:
    radial-gradient(circle at 35% 34%, rgba(255, 255, 255, 0.16), transparent 14%),
    radial-gradient(circle at 65% 72%, rgba(117, 222, 211, 0.15), transparent 28%),
    linear-gradient(135deg, rgba(246, 193, 120, 0.13), rgba(255, 135, 151, 0.08), transparent);
  filter: blur(22px);
  opacity: 0.46;
  transform: translate3d(0, var(--liquid-shift), 0) rotate(0deg);
  animation: liquid-morph 12s ease-in-out infinite;
}

.liquid-ambient::before {
  left: -10vw;
  top: 10vh;
}

.liquid-ambient::after {
  right: -12vw;
  bottom: 4vh;
  animation-delay: -5s;
  animation-direction: reverse;
}

.glass {
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.026) 44%, rgba(117, 222, 211, 0.05)),
    radial-gradient(130% 120% at 20% 0%, rgba(255, 255, 255, 0.1), transparent 42%),
    rgba(18, 20, 18, 0.62);
  border-color: rgba(255, 244, 224, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 22px 76px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(var(--liquid-blur)) saturate(155%) contrast(1.04);
}

.glass::before {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(700px 220px at calc(var(--pointer-x) - 8vw) calc(var(--pointer-y) - 18vh), rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 22%, rgba(117, 222, 211, 0.08) 48%, transparent 68%);
  opacity: 0.42;
  transform: translate3d(0, var(--glass-shift), 0);
  transition: opacity 220ms ease;
}

.glass.card::before {
  display: block;
}

.glass.card::after {
  height: 2px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 244, 224, 0.9), rgba(117, 222, 211, 0.72), rgba(255, 135, 151, 0.62), transparent);
  opacity: 0.84;
  box-shadow: 0 0 22px rgba(246, 193, 120, 0.18);
}

.glass:hover::before {
  opacity: 0.68;
}

.glass.card {
  transition:
    transform 260ms cubic-bezier(0.2, 0, 0, 1),
    border-color 260ms ease,
    box-shadow 260ms ease,
    background 260ms ease;
}

.glass.card:hover {
  transform: translateY(-5px) scale(1.006);
  border-color: rgba(255, 224, 180, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 32px 96px rgba(0, 0, 0, 0.54),
    0 0 58px rgba(117, 222, 211, 0.08);
}

.profile-rail {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 54px rgba(0, 0, 0, 0.36);
}

.profile-rail::after,
.card--hero .hero-grid::before,
.tr-window::before {
  content: '';
  position: absolute;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.16) 48%, transparent 72%);
  transform: translateX(-120%);
  animation: liquid-sheen 7.5s ease-in-out infinite;
}

.profile-rail::after {
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.card--hero .hero-grid::before {
  inset: -15% -30%;
  z-index: 0;
  animation-delay: -2s;
}

.card--hero .hero-grid {
  position: relative;
}

.tr-window::before {
  inset: 0;
  z-index: 1;
  opacity: 0.25;
  animation-delay: -4s;
}

.hero-grid > *,
.tr-window > * {
  position: relative;
  z-index: 2;
}

.hero-name .char {
  background-size: 220% 100%;
  animation:
    char-in 0.7s var(--ease) calc(0.4s + var(--i, 0) * 0.05s) both,
    liquid-text 7s ease-in-out calc(var(--i, 0) * -0.18s) infinite;
}

.hero-avatar,
.rail-avatar,
.sp-art {
  position: relative;
}

.hero-avatar::before,
.rail-avatar::before,
.sp-art::before {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.24), transparent 18%),
    linear-gradient(125deg, rgba(255, 255, 255, 0.16), transparent 42%);
  mix-blend-mode: screen;
  opacity: 0.56;
}

.hero-avatar img,
.rail-avatar img,
.sp-art img {
  transform: scale(1.01);
}

.glass-pill {
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 22px rgba(0, 0, 0, 0.14);
}

.glass-pill:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 28px rgba(0, 0, 0, 0.24);
}

.sp-progress,
.sfm-hero,
.tr-window,
.st-ingame,
.dc-activity,
.gh-repo,
.gh-event,
.sfm-list .item,
.st-recent .g {
  backdrop-filter: blur(18px) saturate(145%);
}

.st-recent .g,
.gh-repo,
.sfm-list .item {
  transition:
    transform 240ms cubic-bezier(0.2, 0, 0, 1),
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.st-recent .g:hover,
.gh-repo:hover,
.sfm-list .item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.scroll-points {
  position: fixed;
  top: 50%;
  z-index: 70;
  display: grid;
  gap: 13px;
  pointer-events: none;
  opacity: 0.16;
  transform: translateY(-50%) scale(0.9);
  transition: opacity 220ms ease, transform 320ms cubic-bezier(0.2, 0, 0, 1);
}

.scroll-points--left {
  left: clamp(10px, 2.3vw, 34px);
}

.scroll-points--right {
  right: clamp(10px, 2.3vw, 34px);
}

.scroll-points span {
  --y: 0px;
  --scale: 0.82;
  --alpha: 0.72;
  --off: -18px;
  --dot-delay: 0ms;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 58%, var(--accent-blue));
  box-shadow:
    0 0 18px currentColor,
    0 0 34px rgba(117, 222, 211, 0.3),
    0 0 58px rgba(246, 193, 120, 0.14);
  opacity: 0;
  transform:
    translateX(var(--off))
    translateY(var(--y))
    scale(0.46);
  transition:
    opacity 240ms ease var(--dot-delay),
    transform 340ms cubic-bezier(0.2, 0, 0, 1) var(--dot-delay);
}

.scroll-points span {
  opacity: 0.14;
}

.scroll-points--left {
  --off: -18px;
}

.scroll-points--right {
  --off: 18px;
}

.scroll-points span:nth-child(1) { --y: -44px; --scale: 0.66; --alpha: 0.36; --dot-delay: 0ms; }
.scroll-points span:nth-child(2) { --y: -31px; --scale: 0.74; --alpha: 0.54; --dot-delay: 18ms; }
.scroll-points span:nth-child(3) { --y: -19px; --scale: 0.84; --alpha: 0.68; --dot-delay: 36ms; }
.scroll-points span:nth-child(4) { --y: -8px;  --scale: 0.94; --alpha: 0.84; --dot-delay: 54ms; }
.scroll-points span:nth-child(5) { --y: 3px;   --scale: 1.08; --alpha: 1;    --dot-delay: 72ms; }
.scroll-points span:nth-child(6) { --y: 16px;  --scale: 0.94; --alpha: 0.84; --dot-delay: 90ms; }
.scroll-points span:nth-child(7) { --y: 29px;  --scale: 0.84; --alpha: 0.68; --dot-delay: 108ms; }
.scroll-points span:nth-child(8) { --y: 42px;  --scale: 0.74; --alpha: 0.54; --dot-delay: 126ms; }
.scroll-points span:nth-child(9) { --y: 56px;  --scale: 0.66; --alpha: 0.36; --dot-delay: 144ms; }

.is-scrolling .scroll-points {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.is-scrolling .scroll-points span {
  opacity: var(--alpha);
  transform:
    translateX(0)
    translateY(calc(var(--y) + var(--scroll-shift)))
    scale(var(--scale));
  animation: scroll-dot-pulse 860ms ease-in-out var(--dot-delay) infinite alternate;
}

.scroll-points--right span {
  animation-delay: calc(var(--dot-delay) + 80ms);
}

html[data-scroll-dir="up"] .scroll-points span {
  transform:
    translateX(0)
    translateY(calc(var(--y) + var(--scroll-shift)))
    scale(var(--scale));
}

.card {
  animation: liquid-card-float 9s ease-in-out infinite;
  animation-delay: calc(var(--float-delay, 0) * -1s);
}

.card--spotify { --float-delay: 1; }
.card--discord { --float-delay: 2; }
.card--steam { --float-delay: 3; }
.card--statsfm { --float-delay: 4; }
.card--github { --float-delay: 5; }
.card--terminal { --float-delay: 6; }

@keyframes liquid-drift {
  0% { transform: translate3d(-1.5vw, -1vh, 0) scale(1); }
  100% { transform: translate3d(1.8vw, 1.4vh, 0) scale(1.035); }
}

@keyframes liquid-morph {
  0%, 100% {
    border-radius: 46% 54% 62% 38% / 52% 38% 62% 48%;
    transform: translate3d(0, var(--liquid-shift), 0) rotate(0deg);
  }
  50% {
    border-radius: 58% 42% 38% 62% / 41% 56% 44% 59%;
    transform: translate3d(3vw, var(--liquid-shift-alt), 0) rotate(11deg);
  }
}

@keyframes liquid-sheen {
  0%, 58%, 100% { transform: translateX(-120%); opacity: 0; }
  68% { opacity: 0.55; }
  82% { transform: translateX(120%); opacity: 0; }
}

@keyframes liquid-text {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes scroll-dot-pulse {
  from { filter: blur(0); opacity: 0.45; }
  to { filter: blur(0.7px); opacity: 1; }
}

@keyframes liquid-card-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -2px; }
}

@media (max-width: 700px) {
  :root {
    --liquid-blur: 22px;
  }

  .liquid-ambient {
    opacity: 0.55;
  }

  .scroll-points {
    gap: 10px;
  }

  .scroll-points span {
    width: 5px;
    height: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .liquid-ambient,
  .liquid-ambient::before,
  .liquid-ambient::after,
  .profile-rail::after,
  .card--hero .hero-grid::before,
  .tr-window::before,
  .hero-name .char,
  .scroll-points span,
  .card {
    animation: none !important;
  }

  .scroll-points {
    display: none;
  }
}

.no-gpu .liquid-ambient,
.no-gpu .scroll-points,
.no-gpu .profile-rail::after,
.no-gpu .card--hero .hero-grid::before,
.no-gpu .tr-window::before {
  display: none;
}

.no-gpu .glass,
.no-gpu .glass-pill,
.no-gpu .sp-progress,
.no-gpu .sfm-hero,
.no-gpu .tr-window,
.no-gpu .st-ingame,
.no-gpu .dc-activity,
.no-gpu .gh-repo,
.no-gpu .gh-event,
.no-gpu .sfm-list .item,
.no-gpu .st-recent .g {
  backdrop-filter: none;
}

/* =====================================================
 *  v4 dark spacious pass
 * =================================================== */

:root {
  --bg: #030504;
  --bg-deep: #020302;
  --surface: rgba(8, 11, 10, 0.78);
  --surface-2: rgba(14, 18, 17, 0.76);
  --surface-3: rgba(21, 26, 24, 0.84);
  --border: rgba(236, 229, 218, 0.105);
  --border-hover: rgba(246, 193, 120, 0.38);
  --text: #f4ecdf;
  --text-muted: #aca497;
  --text-faint: #686158;
  --gap: 30px;
  --liquid-blur: 34px;
  --shadow-card:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 26px 90px rgba(0, 0, 0, 0.54);
  --shadow-hover:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 36px 110px rgba(0, 0, 0, 0.64);
}

body {
  background:
    radial-gradient(900px 560px at 14% -10%, rgba(246, 193, 120, 0.055), transparent 66%),
    radial-gradient(760px 520px at 92% 8%, rgba(117, 222, 211, 0.05), transparent 64%),
    linear-gradient(180deg, #030504 0%, #080806 46%, #030807 100%);
}

.bg {
  opacity: 0.8;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(135deg, rgba(246, 193, 120, 0.04), transparent 38%, rgba(117, 222, 211, 0.035) 74%, transparent);
}

.liquid-ambient {
  opacity: 0.42;
  filter: blur(24px) saturate(105%);
}

.liquid-ambient::before,
.liquid-ambient::after {
  opacity: 0.28;
}

.grain {
  opacity: 0.075;
}

.vignette {
  background:
    linear-gradient(180deg, rgba(2, 3, 2, 0.18), transparent 28%, rgba(2, 3, 2, 0.82) 100%),
    radial-gradient(ellipse at 50% 8%, transparent 38%, rgba(0, 0, 0, 0.48) 100%);
}

.page {
  gap: var(--gap);
  padding: 34px clamp(22px, 3.4vw, 58px) 64px;
}

.glass {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018) 48%, rgba(117, 222, 211, 0.026)),
    radial-gradient(120% 120% at 20% 0%, rgba(255, 255, 255, 0.052), transparent 42%),
    rgba(8, 11, 10, 0.78);
  border-color: rgba(236, 229, 218, 0.105);
}

.glass::before {
  opacity: 0.27;
}

.glass:hover::before {
  opacity: 0.46;
}

.glass.card:hover {
  border-color: rgba(246, 193, 120, 0.3);
}

.profile-rail {
  min-height: 96px;
  padding: 16px 18px;
  grid-template-columns: 68px 168px minmax(260px, 1fr) auto;
  gap: 6px 22px;
}

.rail-avatar {
  width: 68px;
}

.rail-nav {
  gap: 9px;
}

.rail-nav a {
  padding-inline: 12px;
}

.card {
  padding: 34px;
}

.card--hero {
  min-height: 620px;
  padding: clamp(38px, 4vw, 62px);
}

.card--spotify,
.card--discord {
  min-height: 300px;
}

.hero-grid {
  gap: clamp(34px, 5vw, 70px);
}

.hero-tagline {
  margin-top: 34px;
  line-height: 1.68;
}

.hero-pills {
  margin-top: 34px;
  gap: 13px;
}

.hero-avatar {
  align-self: end;
}

.card-head {
  margin-bottom: 28px;
}

.card-tag {
  top: 24px;
  right: 26px;
}

.sp-body,
.dc-body,
.gh-top {
  gap: 22px;
}

.sp-progress {
  margin-top: 28px;
}

.dc-activity {
  margin-top: 28px;
  margin-bottom: 22px;
}

.st-top {
  gap: 34px;
}

.st-recent {
  gap: 18px;
}

.st-recent .g {
  padding: 14px;
}

.st-ingame {
  margin-top: 28px;
}

.sfm-hero {
  margin-bottom: 28px;
  padding-block: 38px;
}

.sfm-grid {
  gap: 30px;
}

.sfm-list .item {
  padding-block: 12px;
}

.gh-pills {
  margin-bottom: 26px;
}

.gh-repos {
  gap: 18px;
}

.gh-repo {
  padding: 20px;
  min-height: 130px;
}

.gh-activity {
  margin-top: 30px;
}

.tr-body {
  height: clamp(340px, 40vh, 500px);
  padding: 22px 24px;
}

.scroll-points {
  opacity: 0.11;
}

.is-scrolling .scroll-points span {
  opacity: calc(var(--alpha) * 0.82);
}

@media (max-width: 980px) {
  :root {
    --gap: 24px;
  }

  .profile-rail {
    grid-template-columns: 62px 1fr;
  }

  .rail-avatar {
    width: 62px;
  }

  .card--hero {
    min-height: 520px;
  }

  .card--statsfm,
  .card--github {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  :root {
    --gap: 18px;
    --liquid-blur: 24px;
  }

  .page {
    padding: 14px 12px 42px;
  }

  .profile-rail {
    min-height: 0;
    padding: 16px;
    gap: 8px 14px;
  }

  .card {
    padding: 22px 18px;
  }

  .card--hero {
    min-height: auto;
    padding: 24px 18px;
  }

  .hero-grid {
    gap: 30px;
  }

  .hero-tagline,
  .hero-pills {
    margin-top: 26px;
  }

  .card-head {
    margin-bottom: 22px;
  }

  .sp-progress,
  .dc-activity,
  .st-ingame,
  .gh-activity {
    margin-top: 22px;
  }

  .sfm-grid,
  .gh-repos,
  .st-recent {
    gap: 16px;
  }
}

/* =====================================================
 *  v5 dark terminal stream
 *  Reference-inspired, but its own layout:
 *  first-screen hero + alternating scroll panels.
 * =================================================== */

:root {
  --terminal-bg: #020203;
  --terminal-ink: #f7f3ea;
  --terminal-muted: #aaa7a0;
  --terminal-dim: #64625d;
  --panel-bg: rgba(10, 11, 12, 0.72);
  --panel-bg-strong: rgba(16, 17, 19, 0.84);
  --panel-line: rgba(255, 255, 255, 0.115);
  --panel-line-strong: rgba(255, 255, 255, 0.2);
  --scan-purple: #a86cff;
  --scan-blue: #5ea9ff;
  --scan-green: #61e7a3;
  --scan-warm: #ffd48a;
  --dock-height: 58px;
  --stream-side: max(24px, calc((100vw - 1180px) / 2));
}

html {
  scroll-padding-top: 110px;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(780px 420px at 12% 12%, rgba(168, 108, 255, 0.14), transparent 65%),
    radial-gradient(720px 460px at 82% 88%, rgba(94, 169, 255, 0.13), transparent 68%),
    radial-gradient(520px 360px at 45% 58%, rgba(97, 231, 163, 0.06), transparent 70%),
    linear-gradient(180deg, #020203 0%, #050507 52%, #020203 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 24%, rgba(168, 108, 255, 0.04) 24.15%, transparent 24.5% 63%, rgba(94, 169, 255, 0.035) 63.15%, transparent 63.5%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 7px);
  opacity: 0.52;
  mix-blend-mode: screen;
}

.bg {
  opacity: 1;
  background:
    radial-gradient(circle at 10% 8%, rgba(168, 108, 255, 0.42) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 18%, rgba(94, 169, 255, 0.38) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 64%, rgba(168, 108, 255, 0.32) 0 1px, transparent 2px),
    radial-gradient(circle at 22% 72%, rgba(97, 231, 163, 0.26) 0 1px, transparent 2px),
    linear-gradient(118deg, transparent 8%, rgba(168, 108, 255, 0.14) 8.08%, transparent 8.22% 31%, rgba(94, 169, 255, 0.1) 31.08%, transparent 31.22% 100%),
    linear-gradient(58deg, transparent 0 71%, rgba(168, 108, 255, 0.12) 71.08%, transparent 71.2%),
    transparent;
  background-size:
    240px 220px,
    310px 270px,
    380px 320px,
    290px 260px,
    100% 100%,
    100% 100%,
    auto;
  mask-image: none;
}

.grain {
  opacity: 0.11;
}

.vignette {
  background:
    linear-gradient(180deg, rgba(2, 2, 3, 0.2), transparent 24%, rgba(2, 2, 3, 0.9) 100%),
    radial-gradient(ellipse at 50% 28%, transparent 44%, rgba(0, 0, 0, 0.58) 100%);
}

.liquid-ambient {
  z-index: 2;
  opacity: 0.56;
  filter: blur(28px) saturate(125%);
  background:
    radial-gradient(520px 260px at var(--pointer-x) var(--pointer-y), rgba(168, 108, 255, 0.16), transparent 72%),
    radial-gradient(620px 420px at 88vw 78vh, rgba(94, 169, 255, 0.13), transparent 72%),
    radial-gradient(500px 340px at 10vw 78vh, rgba(97, 231, 163, 0.08), transparent 74%);
}

.liquid-ambient::before,
.liquid-ambient::after {
  opacity: 0.3;
}

.page {
  display: block;
  max-width: none;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 0 120px;
  position: relative;
  z-index: 10;
}

/* Top system bar */
.profile-rail {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 90;
  width: min(1290px, calc(100vw - 36px));
  min-height: 58px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 42px auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(4, 4, 6, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 22px 70px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(24px) saturate(150%);
  overflow: hidden;
}

.profile-rail::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(168, 108, 255, 0.12), transparent 28%, rgba(94, 169, 255, 0.08) 72%, transparent),
    radial-gradient(320px 80px at calc(var(--pointer-x, 50vw) - 14vw) 0, rgba(255, 255, 255, 0.13), transparent 72%);
}

.profile-rail::after {
  display: none;
}

.rail-avatar {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 28px rgba(168, 108, 255, 0.22);
}

.rail-avatar::before {
  display: none;
}

.rail-kicker {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  color: var(--terminal-muted);
  font-size: 0.58rem;
  line-height: 1;
  letter-spacing: 0.12em;
}

.rail-name {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: var(--terminal-ink);
  font-family: var(--mono);
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(168, 108, 255, 0.28);
}

.rail-copy {
  display: none;
}

.rail-nav {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.rail-nav a {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 8px;
  color: #b9bac0;
  font-size: 0.72rem;
  background: transparent;
  border: 1px solid transparent;
}

.rail-nav a::before {
  content: '/';
  margin-right: 5px;
  color: rgba(168, 108, 255, 0.72);
}

.rail-nav a::after {
  display: none;
}

.rail-nav a:hover {
  color: #fff;
  transform: none;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.11);
}

.rail-status {
  grid-column: 4;
  grid-row: 1 / 3;
  margin: 0;
  min-height: 34px;
  padding: 7px 12px;
  color: #baf6cf;
  background: rgba(97, 231, 163, 0.105);
  border-color: rgba(97, 231, 163, 0.28);
  white-space: nowrap;
}

/* First viewport */
.card--hero {
  width: min(1080px, calc(100vw - 40px));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(128px, 17vh, 180px) 20px 96px;
  display: grid;
  place-items: center;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.card--hero.glass::before,
.card--hero.glass::after,
.card--hero .card-tag {
  display: none;
}

.card--hero:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  gap: 28px;
  width: 100%;
}

.hero-avatar {
  order: -1;
  justify-self: center;
  align-self: center;
  width: clamp(96px, 11vw, 138px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.025),
    0 0 58px rgba(168, 108, 255, 0.25),
    0 0 92px rgba(94, 169, 255, 0.13);
}

.hero-avatar::before {
  border-radius: inherit;
  opacity: 0.42;
}

.hero-text {
  display: grid;
  justify-items: center;
  max-width: 980px;
}

.hero-name {
  justify-content: center;
  color: var(--terminal-ink);
  font-family: var(--mono);
  font-size: clamp(4.75rem, 10vw, 9.4rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: none;
  text-shadow:
    0 0 34px rgba(168, 108, 255, 0.22),
    0 8px 0 rgba(255, 255, 255, 0.045);
}

.hero-name .char {
  background-image: linear-gradient(100deg, #fff 0%, #f3efe6 32%, #bca4ff 54%, #76bdff 78%, #fff 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-tagline {
  max-width: 780px;
  margin-top: 26px;
  color: #c9c7c0;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.7;
  font-weight: 500;
}

.hero-pills {
  justify-content: center;
  margin-top: 28px;
  gap: 10px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 8px;
  color: #f5f3ee;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(150%);
  transition: transform 220ms var(--ease), border-color 220ms ease, background 220ms ease;
}

.hero-cta--primary {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.035)),
    linear-gradient(90deg, rgba(168, 108, 255, 0.84), rgba(94, 169, 255, 0.78));
  border-color: rgba(196, 172, 255, 0.46);
  box-shadow: 0 18px 46px rgba(94, 169, 255, 0.18);
}

.hero-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Alternating scroll stream */
.card:not(.card--hero) {
  width: min(780px, calc(100vw - 48px));
  min-height: auto;
  margin-top: clamp(110px, 17vh, 190px);
  margin-bottom: clamp(110px, 17vh, 190px);
  padding: clamp(26px, 3.1vw, 40px);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025) 48%, rgba(94, 169, 255, 0.045)),
    radial-gradient(700px 260px at 12% 0%, rgba(168, 108, 255, 0.1), transparent 68%),
    var(--panel-bg);
  border-color: var(--panel-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 28px 92px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(28px) saturate(145%);
  animation: none;
  --reveal-x: 0px;
}

.card:not(.card--hero)::before {
  opacity: 0.22;
}

.glass.card::after {
  left: 24px;
  right: 24px;
  top: 0;
  height: 2px;
  opacity: 0.9;
  background: linear-gradient(90deg, transparent, rgba(168, 108, 255, 0.95), rgba(94, 169, 255, 0.86), rgba(97, 231, 163, 0.7), transparent);
  box-shadow: 0 0 28px rgba(168, 108, 255, 0.22);
}

.glass.card:hover {
  transform: none;
  translate: 0 -5px;
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 34px 105px rgba(0, 0, 0, 0.66),
    0 0 70px rgba(94, 169, 255, 0.08);
}

.card--hero.glass.card:hover {
  transform: none;
  translate: 0 0;
  border-color: transparent;
  box-shadow: none;
}

.card--spotify,
.card--steam,
.card--statsfm {
  margin-left: var(--stream-side);
  margin-right: auto;
  --reveal-x: -120px;
}

.card--discord,
.card--github,
.card--terminal {
  margin-left: auto;
  margin-right: var(--stream-side);
  --reveal-x: 120px;
}

.card--spotify {
  margin-top: clamp(70px, 9vh, 120px);
}

.card--steam,
.card--terminal {
  width: min(980px, calc(100vw - 48px));
}

.card--github,
.card--statsfm {
  width: min(860px, calc(100vw - 48px));
}

.card--terminal {
  margin-bottom: 160px;
}

.card-tag {
  top: 26px;
  right: 28px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.65rem;
}

.card-head h2 {
  font-family: var(--mono);
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  color: var(--terminal-ink);
}

.glass-pill {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.12);
}

.glass-pill:hover {
  background: rgba(168, 108, 255, 0.13);
  border-color: rgba(168, 108, 255, 0.34);
}

.sp-art,
.dc-avatar,
.st-avatar,
.gh-avatar,
.sfm-list .cover,
.dc-activity .ai,
.st-recent .g .cover {
  border-radius: 8px;
}

.sp-title,
.dc-name,
.st-name,
.gh-name,
.gh-repo .rn,
.st-ingame .ig-name {
  font-family: var(--mono);
}

.st-recent .g,
.gh-repo,
.gh-event,
.sfm-list .item,
.dc-activity,
.st-ingame,
.tr-window {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.105);
}

.st-recent .g:hover,
.gh-repo:hover,
.sfm-list .item:hover,
.dc-activity:hover {
  border-color: rgba(168, 108, 255, 0.35);
  background: rgba(255, 255, 255, 0.075);
}

.sp-progress > i {
  background: linear-gradient(90deg, var(--scan-purple), var(--scan-blue), var(--scan-green));
}

.sfm-hero {
  background:
    linear-gradient(135deg, rgba(168, 108, 255, 0.18), rgba(94, 169, 255, 0.09), rgba(97, 231, 163, 0.08)),
    rgba(255, 255, 255, 0.052);
}

.sfm-hero .n {
  background: linear-gradient(105deg, #fff, #cdbdff 45%, #82c3ff 75%, #b6ffd1);
  -webkit-background-clip: text;
  background-clip: text;
}

.tr-window {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.058), transparent),
    #050507;
}

.tr-body {
  color: #e3e0d8;
}

.tr-prompt,
.tr-output .tr-accent,
.tr-output .tr-prompt-echo {
  color: #b99cff;
}

.tr-prompt .tr-path {
  color: #74b8ff;
}

/* JS-driven reveal. Without JS the cards stay visible. */
.reveal-ready .card:not(.card--hero) {
  opacity: 0;
  filter: blur(16px);
  transform: translate3d(var(--reveal-x), 72px, 0) scale(0.965);
  transition:
    opacity 700ms ease,
    filter 760ms ease,
    transform 820ms cubic-bezier(0.17, 0.84, 0.22, 1),
    border-color 220ms ease,
    box-shadow 220ms ease;
  will-change: transform, opacity, filter;
}

.reveal-ready .card:not(.card--hero).is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

.reveal-ready .card:not(.card--hero).is-visible:hover {
  transform: translate3d(0, -7px, 0) scale(1.006);
}

.reveal-ready .card:not(.card--hero):not(.is-visible) {
  pointer-events: none;
}

.reveal-ready .card--hero {
  opacity: 1;
}

/* Side scan markers while scrolling */
.scroll-points {
  top: 50%;
  gap: 11px;
  opacity: 0;
  transform: translateY(-50%) scaleY(0.92);
}

.scroll-points--left {
  left: clamp(10px, 2vw, 28px);
}

.scroll-points--right {
  right: clamp(10px, 2vw, 28px);
}

.scroll-points span {
  width: 3px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--scan-purple), var(--scan-blue), var(--scan-green));
  box-shadow:
    0 0 18px rgba(168, 108, 255, 0.55),
    0 0 30px rgba(94, 169, 255, 0.34);
}

.is-scrolling .scroll-points {
  opacity: 1;
  transform: translateY(-50%) scaleY(1);
}

.is-scrolling .scroll-points span {
  transform:
    translateX(0)
    translateY(calc(var(--y) + var(--scroll-shift)))
    scaleY(var(--scale));
}

.cursor {
  border-color: rgba(168, 108, 255, 0.82);
  background: rgba(168, 108, 255, 0.1);
}

.cursor::after {
  background: #8abfff;
}

.cursor.hover {
  border-color: rgba(94, 169, 255, 0.9);
  background: rgba(94, 169, 255, 0.08);
}

.page-footer {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 88;
  width: min(720px, calc(100vw - 36px));
  min-height: var(--dock-height);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  color: #b7b7bd;
  font-size: 0.72rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.022)),
    rgba(4, 4, 6, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(24px) saturate(150%);
}

.page-footer::before {
  content: 'System Online';
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-right: 16px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #baf6cf;
  background: rgba(97, 231, 163, 0.1);
  border: 1px solid rgba(97, 231, 163, 0.24);
}

.page-footer a {
  color: #d6caff;
}

@media (max-width: 980px) {
  :root {
    --stream-side: max(18px, calc((100vw - 760px) / 2));
  }

  .profile-rail {
    grid-template-columns: 42px auto minmax(0, 1fr);
  }

  .rail-status {
    display: none;
  }

  .rail-nav {
    grid-column: 3;
  }

  .card--spotify,
  .card--steam,
  .card--statsfm,
  .card--discord,
  .card--github,
  .card--terminal {
    width: min(760px, calc(100vw - 36px));
  }
}

@media (max-width: 740px) {
  html {
    scroll-padding-top: 140px;
  }

  .profile-rail {
    top: 10px;
    width: calc(100vw - 20px);
    grid-template-columns: 40px minmax(90px, auto) 1fr;
    min-height: 78px;
    padding: 9px;
    gap: 4px 10px;
  }

  .rail-avatar {
    width: 40px;
  }

  .rail-name {
    font-size: 0.96rem;
  }

  .rail-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 5px;
    padding-bottom: 2px;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }

  .rail-nav::-webkit-scrollbar {
    display: none;
  }

  .rail-nav a {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 6px 9px;
    font-size: 0.66rem;
  }

  .card--hero {
    width: min(100%, calc(100vw - 24px));
    min-height: 100svh;
    padding: 150px 10px 76px;
  }

  .hero-name {
    font-size: clamp(3.7rem, 18vw, 5.4rem);
    white-space: normal;
  }

  .hero-tagline {
    font-size: 1rem;
    line-height: 1.62;
  }

  .hero-actions,
  .hero-pills {
    gap: 9px;
  }

  .hero-cta {
    min-height: 40px;
    padding-inline: 14px;
  }

  .card:not(.card--hero) {
    width: calc(100vw - 24px);
    margin: 88px 12px;
    padding: 22px 18px;
  }

  .card--spotify,
  .card--steam,
  .card--statsfm,
  .card--discord,
  .card--github,
  .card--terminal {
    margin-left: 12px;
    margin-right: 12px;
    --reveal-x: 0px;
  }

  .reveal-ready .card:not(.card--hero) {
    transform: translate3d(0, 54px, 0) scale(0.98);
  }

  .reveal-ready .card:not(.card--hero).is-visible {
    transform: translate3d(0, 0, 0) scale(1);
  }

  .scroll-points {
    display: none;
  }

  .page-footer {
    position: relative;
    left: auto;
    bottom: auto;
    width: calc(100vw - 24px);
    margin: 96px 12px 0;
    transform: none;
    border-radius: 8px;
    text-align: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-footer::before {
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-ready .card:not(.card--hero) {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
}

/* Edge flicker guard.
   The lower-right liquid blob used to sit partly outside the viewport while
   blurred and animated, which can shimmer on some hosted/browser GPU paths. */
.liquid-ambient {
  inset: 0;
  overflow: hidden;
  contain: paint;
  isolation: isolate;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.liquid-ambient::before,
.liquid-ambient::after {
  transform: translate3d(0, var(--liquid-shift), 0);
  backface-visibility: hidden;
}

.liquid-ambient::after {
  right: 4vw;
  bottom: 10vh;
  width: min(480px, 38vw);
  opacity: 0.18;
  animation: none;
  transform: translate3d(0, var(--liquid-shift-alt), 0) rotate(-8deg);
}

.page-footer,
.profile-rail {
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.page-footer {
  transform: translate3d(-50%, 0, 0);
}

@media (max-width: 740px) {
  .page-footer {
    transform: none;
  }
}
