/* ═══════════════════════════════════════════════════════════════════════════
   SHARED DESIGN SYSTEM — jacobrelkin.me
   Tokens, reset, animations, navigation, dark mode, and shared components.
   ═══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #f1f3f5;
  --ink-2: #dee2e6;
  --ink-3: #ced4da;
  --ink-4: #9ea2a8;
  --ink-5: #757980;
  --accent: #7b93d4;
  --accent-soft: rgba(123, 147, 212, 0.10);
  --accent-mid: #96aee0;
  --accent-dark: #6a82c0;
  --accent-glow: rgba(123, 147, 212, 0.12);
  --violet: #9b82cc;
  --violet-soft: rgba(155, 130, 204, 0.10);
  --emerald: #4ec9a0;
  --emerald-soft: rgba(78, 201, 160, 0.10);
  --amber: #d4a94e;
  --amber-soft: rgba(212, 169, 78, 0.10);
  --rose: #cc7b99;
  --rose-soft: rgba(204, 123, 153, 0.10);
  --cyan: #5cb8d4;
  --surface: #1c1e22;
  --bg: #0e1012;
  --border: #363940;
  --border-light: #1e2024;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --display: 'Outfit', var(--sans);
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.35);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.4);
  --spring: cubic-bezier(0.22, 1.36, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: dark;
}

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'ss02', 'cv01';
  overflow-x: hidden;
  font-optical-sizing: auto;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== PAGE TRANSITIONS ===== */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg, #0c0d0f);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.page-transition.active {
  opacity: 1;
  pointer-events: all;
}
/* On page load, start opaque and fade out */
.page-transition.entering {
  opacity: 1;
  pointer-events: all;
}
.page-transition.entering.done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0, 0, 0.2, 1);
}



/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(12, 166, 120, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(12, 166, 120, 0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes slideInFromRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.reveal.visible {
  opacity: 1;
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress { display: none; }
.scroll-progress-bar { display: none; }

/* ===== STICKY NAV ===== */
/* Floating pill nav */
.sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.5s var(--ease-out-expo), opacity 0.4s var(--ease-out-expo);
  padding: 0.75rem clamp(1rem, 3vw, 2rem) 0;
  pointer-events: none;
}
.sticky-nav.visible {
  transform: translateY(0);
  opacity: 1;
}
.sticky-nav-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0.75rem 0.75rem 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(20, 22, 26, 0.80);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
  pointer-events: all;
}
.sticky-nav-brand {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}
.sticky-nav-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.sticky-nav-arrow {
  opacity: 0.4;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
a.sticky-nav-name:hover { color: var(--accent-mid); }
a.sticky-nav-name:hover .sticky-nav-arrow { opacity: 1; transform: translateY(-1px); }
.sticky-nav-subtitle { display: none; }
.sticky-nav-subtitle::before { display: none; }
.sticky-nav-links {
  display: flex;
  gap: 0.2rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(255,255,255,0.04);
  border-radius: 100px;
  padding: 0.25rem;
}
.sticky-nav-links::-webkit-scrollbar { display: none; }
.sticky-nav-links a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-4);
  text-decoration: none;
  padding: 0.4rem 0.95rem;
  border-radius: 100px;
  white-space: nowrap;
  transition: color 0.25s var(--ease-smooth),
              background 0.25s var(--ease-smooth),
              box-shadow 0.25s var(--ease-smooth),
              transform 0.25s var(--ease-smooth);
}
.sticky-nav-links a:hover {
  color: var(--ink);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 12px rgba(123, 147, 212, 0.08);
  transform: translateY(-1px);
}
.sticky-nav-links a.active {
  color: var(--ink);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 16px rgba(123, 147, 212, 0.1);
}
.sticky-nav-links a {
  position: relative;
}
.sticky-nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(123, 147, 212, 0.4);
  transition: transform 0.3s var(--spring), opacity 0.3s var(--ease-smooth);
  opacity: 0;
}
.sticky-nav-links a.active::after {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}
.sticky-nav-right { display: none; }

/* ===== HERO (shared base) ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: #0a0b0d;
  color: white;
}

/* Noise and orbs removed — clean flat background, grid kept */
.hero-noise { display: none; }
.hero-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 45%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 45%, black 10%, transparent 70%);
}
.page-canvas::before,
.page-canvas::after { display: none; }

/* ===== PLAY MODE AMBIENT GLOW ORBS ===== */
.play-mode .page-canvas::before,
.play-mode .page-canvas::after {
  display: block;
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
  z-index: 0;
}
.play-mode .page-canvas::before {
  width: 500px;
  height: 500px;
  top: -15%;
  left: -8%;
  background: radial-gradient(circle, rgba(78, 227, 182, 0.08) 0%, transparent 70%);
  animation: orbFloat1 12s ease-in-out infinite alternate;
}
.play-mode .page-canvas::after {
  width: 400px;
  height: 400px;
  bottom: -10%;
  right: -5%;
  background: radial-gradient(circle, rgba(92, 184, 212, 0.06) 0%, transparent 70%);
  animation: orbFloat2 15s ease-in-out infinite alternate;
}
@keyframes orbFloat1 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.6; }
  50%  { transform: translate(40px, 30px) scale(1.15); opacity: 1; }
  100% { transform: translate(-20px, 50px) scale(0.95); opacity: 0.7; }
}
@keyframes orbFloat2 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50%  { transform: translate(-30px, -25px) scale(1.1); opacity: 0.8; }
  100% { transform: translate(25px, -40px) scale(1.05); opacity: 0.6; }
}

@keyframes orbDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes orbDrift2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, -30px) scale(1.1); }
}

.hero-inner {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  z-index: 1;
  width: 100%;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56,217,169,0.06);
  border: 1px solid rgba(56,217,169,0.18);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 0 20px rgba(56, 217, 169, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(56,217,169,0.85);
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  opacity: 0;
  animation: fadeIn 1s var(--ease-out-expo) 0.5s both;
  transition: background 0.35s var(--spring), border-color 0.35s var(--spring), color 0.35s var(--spring), box-shadow 0.35s var(--spring);
}
.hero-badge:hover {
  background: rgba(56,217,169,0.1);
  border-color: rgba(56,217,169,0.25);
  color: rgba(56,217,169,1);
}
.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ee3b6;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ===== COPY BUTTON ===== */
.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-5);
  padding: 2px;
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 4px;
  vertical-align: middle;
  min-width: 36px;
  min-height: 36px;
}
.copy-btn:hover { color: var(--accent); }
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn.copied { color: var(--emerald); }

/* ===== FOOTER ===== */
.page-footer {
  width: 100%;
  padding: clamp(0.4rem, 0.8vw, 0.6rem) clamp(1rem, 2vw, 1.5rem) clamp(1.25rem, 2vw, 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.25rem, 0.5vw, 0.4rem);
  border-top: none;
  position: relative;
  opacity: 0;
  animation: footerEnter 0.6s var(--ease-out-quint) 0.5s forwards;
}
/* Gradient divider line */
.hp-bottom .page-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(280px, 60%);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(123, 147, 212, 0.2) 30%,
    rgba(155, 130, 204, 0.15) 50%,
    rgba(123, 147, 212, 0.2) 70%,
    transparent 100%
  );
}
@keyframes footerEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Footer CTA — subtle text link */
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.3);
  background: none;
  border: none;
  transition: color 0.25s var(--ease-out-quint);
  position: relative;
}
.footer-cta::before {
  display: none;
}
.footer-cta:hover {
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.01em;
}
.footer-cta-icon { font-size: 0.85rem; line-height: 1; }

/* Pool CTA — emerald hover */
.footer-cta-play:hover {
  color: rgba(78, 227, 182, 0.7);
}
.footer-cta-arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease-out-expo);
}
.footer-cta:hover .footer-cta-arrow {
  transform: translateX(3px);
}
/* Work CTA — blue hover */
.footer-cta-work:hover {
  color: rgba(116, 143, 252, 0.7);
}

/* Bottom line: copyright */
.footer-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.32);
  transition: color 0.3s ease;
}
.footer-bottom:hover {
  color: rgba(255, 255, 255, 0.45);
}

.footer-sep { opacity: 0.4; }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.4s var(--spring);
  color: var(--ink-4);
  backdrop-filter: blur(16px);
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.back-to-top svg { width: 18px; height: 18px; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE LAYOUT — Resume-consistent hero + stacked sections
   ═══════════════════════════════════════════════════════════════════════════ */

.page-inner {
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3.5vw, 2rem);
  padding-bottom: clamp(0.5rem, 1.5vw, 1rem);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: clamp(1.4rem, 2.8vw, 2rem);
  position: relative;
  z-index: 1;
}
/* Grid sections (stats, achievements, projects) need full width */
.page-inner > .page-section {
  width: 100%;
}

/* Accent color system */
.page-inner {
  --pg-accent: #5c7cfa;
  --pg-accent-rgb: 92, 124, 250;
  --pg-accent-glow: rgba(92, 124, 250, 0.2);
}
.play-mode .page-inner {
  --pg-accent: #4ee3b6;
  --pg-accent-rgb: 78, 227, 182;
  --pg-accent-glow: rgba(78, 227, 182, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE HERO — Left-aligned name + right-floating card (matches resume)
   ═══════════════════════════════════════════════════════════════════════════ */
.page-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: heroEnter 0.9s var(--ease-out-expo) 0.1s both;
}
.play-mode .page-hero {
  flex-direction: row;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}
.play-mode .page-hero-text {
  text-align: left;
}
.play-mode .page-hero-tagline {
  text-align: left;
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.1vw, 0.82rem);
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.01em;
}
.play-availability {
  margin-top: clamp(0.25rem, 0.5vw, 0.4rem);
  font-family: var(--mono);
  font-size: 0.72rem;
}
/* Play page staggered load sequence — dramatic entrances */
.play-mode ~ .page-footer {
  animation-delay: 0.95s;
}
.play-mode .page-inner {
  gap: clamp(1rem, 2vw, 1.5rem);
}
/* (play-mode stats-section replaced by .play-grid + .play-card system) */
@keyframes heroEnter {
  from { opacity: 0; transform: translateY(16px) scale(0.97); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0px); }
}

.page-hero-text h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: clamp(0.15rem, 0.4vw, 0.3rem);
  position: relative;
}
/* Ambient glow behind name — disabled for understated style */
.page-hero-text h1::after {
  display: none;
}
@keyframes nameGlow {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.04); }
}
.page-hero-text h1 .gradient-text {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  animation: none;
  color: rgba(255, 255, 255, 0.7);
}
.play-mode .page-hero-text h1 .gradient-text {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  animation: none;
  color: rgba(255, 255, 255, 0.7);
}

/* Badge inside page-hero needs less margin */
.page-hero-text .hero-badge {
  margin-bottom: clamp(0.4rem, 1vw, 0.7rem);
  padding: 10px 24px;
  font-size: 0.84rem;
}

.page-hero-subtitle {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.8vw, 2.3rem);
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: clamp(0.5rem, 1vw, 0.75rem);
}
.play-mode .page-hero-subtitle {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(78, 227, 182, 0.9) 25%,
    rgba(92, 184, 212, 0.85) 50%,
    rgba(78, 227, 182, 0.9) 75%,
    rgba(255, 255, 255, 0.95) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: subtitleShimmer 8s ease-in-out infinite;
}
@keyframes subtitleShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.page-hero-tagline {
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
  max-width: 560px;
  font-weight: 400;
}

/* Availability badge */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: clamp(0.4rem, 0.8vw, 0.6rem);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(78, 201, 160, 0.75);
}
.availability-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
  animation: availPulse 2.5s ease-in-out infinite;
}
@keyframes availPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(78, 201, 160, 0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(78, 201, 160, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .availability-dot { animation: none; }
}

/* Floating Fargo card (play mode) — animated gradient border */
.page-hero-fargo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 0.75rem);
  padding: clamp(1rem, 2.2vw, 1.5rem) clamp(1.5rem, 3vw, 2.5rem);
  min-width: 300px;
  background: rgba(12, 16, 18, 0.85);
  border-radius: 16px;
  border: 1px solid rgba(78, 227, 182, 0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 80px -20px rgba(78, 227, 182, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
  animation: fargoEnter 1s var(--ease-out-expo) 0.25s both;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.15s ease-out, border-color 0.4s var(--spring), box-shadow 0.4s var(--spring);
}
a.page-hero-fargo {
  text-decoration: none;
  color: inherit;
}
/* Animated rotating gradient border glow */
.page-hero-fargo::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 0%,
    rgba(78, 227, 182, 0.4) 10%,
    rgba(92, 184, 212, 0.3) 20%,
    transparent 30%,
    transparent 70%,
    rgba(78, 227, 182, 0.3) 80%,
    rgba(92, 184, 212, 0.2) 90%,
    transparent 100%
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  animation: borderRotate 6s linear infinite;
  z-index: 2;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.4s ease;
}
.page-hero-fargo:hover::before { opacity: 1; }
@keyframes borderRotate {
  to { --border-angle: 360deg; }
}
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.page-hero-fargo:hover {
  border-color: rgba(78, 227, 182, 0.25);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 80px -15px rgba(78, 227, 182, 0.2),
    0 0 120px -30px rgba(92, 184, 212, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
@keyframes fargoEnter {
  from { opacity: 0; transform: perspective(800px) translateY(20px) rotateX(6deg) scale(0.95); filter: blur(4px); }
  to   { opacity: 1; transform: perspective(800px) translateY(0) rotateX(0deg) scale(1); filter: blur(0); }
}
.page-hero-fargo-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.page-hero-fargo-logo {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.page-hero-fargo:hover .page-hero-fargo-logo {
  opacity: 0.8;
}
.page-hero-fargo-rating {
  font-family: var(--display);
  font-size: 4.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #fff 10%, var(--emerald) 40%, var(--cyan) 70%, var(--emerald) 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: ratingShimmer 4s ease-in-out infinite;
  position: relative;
  filter: drop-shadow(0 0 20px rgba(78, 227, 182, 0.15));
}
@keyframes ratingShimmer {
  0%, 100% { background-position: 0% 50%; filter: drop-shadow(0 0 20px rgba(78, 227, 182, 0.15)); }
  50% { background-position: 100% 50%; filter: drop-shadow(0 0 30px rgba(78, 227, 182, 0.25)); }
}
.page-hero-fargo-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.3);
}
.page-hero-fargo-level {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(78, 227, 182, 0.75);
  background: rgba(78, 227, 182, 0.06);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(78, 227, 182, 0.1);
  font-size: 0.58rem;
}
.page-hero-fargo-sep {
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.5rem;
}
.page-hero-fargo-robustness {
  font-weight: 500;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

/* Fargo progress bar */
.page-hero-fargo-progress {
  width: 100%;
  margin-top: clamp(0.5rem, 1vw, 0.75rem);
}
.page-hero-fargo-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.page-hero-fargo-fill {
  height: 100%;
  width: 53.5%;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(78, 227, 182, 0.5), rgba(92, 184, 212, 0.6));
  box-shadow: 0 0 8px rgba(78, 227, 182, 0.2);
  animation: fargoFill 1.5s var(--ease-out-expo) 0.8s both;
}
@keyframes fargoFill {
  from { width: 0; }
  to { width: 53.5%; }
}
.page-hero-fargo-range {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-family: var(--mono);
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTION BAR — Buttons + social icons (matches resume's hero-links)
   ═══════════════════════════════════════════════════════════════════════════ */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(0.7rem, 1.4vw, 0.9rem);
  opacity: 0;
  animation: heroEnter 0.7s var(--ease-out-expo) 0.35s both;
}
.hero-actions + .hero-actions {
  margin-top: -0.25rem;
}
.hero-actions .action-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 0.35rem;
}
/* Pill-shaped action buttons (matches resume) */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.25s var(--ease-out-quint);
  font-family: var(--sans);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.action-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.action-btn img { width: auto; filter: brightness(0) invert(1); opacity: 0.55; transition: all 0.3s ease; }
.action-btn img[alt="Instagram"] { height: 16px; }
.action-btn img[alt="Salotto"] { height: 14px; }
.action-btn img[alt="Digital Pool"] { height: 16px; }
.action-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 20px rgba(123, 147, 212, 0.06);
}
.action-btn:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.1s;
}
/* Click ripple */
.action-btn::after {
  content: '';
  position: absolute;
  left: var(--ripple-x, 50%);
  top: var(--ripple-y, 50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}
.action-btn.rippling::after {
  animation: btnRipple 0.6s var(--ease-out-expo) forwards;
}
.action-btn-primary::after {
  background: rgba(0, 0, 0, 0.08);
}
@keyframes btnRipple {
  0% { width: 0; height: 0; opacity: 0.4; }
  100% { width: 300px; height: 300px; opacity: 0; }
}
.action-btn:hover img { opacity: 1; }

/* Brand-colored action button hovers */
.action-btn[data-brand="linkedin"]:hover {
  border-color: rgba(10, 102, 194, 0.3);
  box-shadow: 0 4px 20px rgba(10, 102, 194, 0.15), 0 0 0 1px rgba(10, 102, 194, 0.1);
}
.action-btn[data-brand="x"]:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.action-btn[data-brand="email"]:hover {
  border-color: rgba(123, 147, 212, 0.25);
  box-shadow: 0 4px 20px rgba(123, 147, 212, 0.12), 0 0 0 1px rgba(123, 147, 212, 0.08);
}

/* Stack Overflow highlight pill */
.so-highlight {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  gap: 8px;
}
.so-highlight svg {
  color: #f48024;
  flex-shrink: 0;
}
.so-highlight-rep {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.so-highlight:hover svg {
  color: #f48024;
}
.so-highlight:hover {
  box-shadow: 0 4px 20px rgba(244, 128, 36, 0.12), 0 0 0 1px rgba(244, 128, 36, 0.1);
  border-color: rgba(244, 128, 36, 0.2);
}
.so-highlight .so-badges {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  margin-left: 2px;
}
.so-badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 2px;
  margin-left: 6px;
}
.so-badge-dot:first-child { margin-left: 0; }
.so-badge-gold { background: #ffcc00; }
.so-badge-silver { background: #aaa; }
.so-badge-bronze { background: #cd7f32; }

/* GitHub highlight pill */
.gh-highlight {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  gap: 8px;
}
.gh-highlight > svg { color: #f0f6fc; flex-shrink: 0; }
.gh-highlight:hover > svg { color: #f0f6fc; }
.gh-highlight:hover {
  box-shadow: 0 4px 20px rgba(57, 211, 83, 0.1), 0 0 0 1px rgba(57, 211, 83, 0.08);
  border-color: rgba(57, 211, 83, 0.15);
}

/* Active dot — pulsing green when recent */
.gh-highlight-dot {
  display: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #39d353;
  flex-shrink: 0;
  margin-left: 0;
  margin-right: -2px;
  animation: gh-pulse 2s ease-in-out infinite;
}
.gh-highlight-dot.active { display: block; }
@keyframes gh-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(57, 211, 83, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(57, 211, 83, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .gh-highlight-dot { animation: none; }
}

/* Hero number */
.gh-highlight-contribs {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

/* Year count */
.gh-highlight-year {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  margin-left: -2px;
}

/* Highlight pill loading / failed states */
.highlight-loading .gh-highlight-contribs,
.highlight-loading .gh-highlight-year,
.highlight-loading .gh-highlight-dot,
.highlight-loading .so-highlight-rep,
.highlight-loading .so-badges,
.highlight-failed .gh-highlight-contribs,
.highlight-failed .gh-highlight-year,
.highlight-failed .gh-highlight-dot,
.highlight-failed .so-highlight-rep,
.highlight-failed .so-badges {
  display: none;
}
.gh-highlight.highlight-loading::after,
.gh-highlight.highlight-failed::after {
  content: 'GitHub';
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  transition: opacity 0.5s var(--ease-smooth);
}
.so-highlight.highlight-loading::after,
.so-highlight.highlight-failed::after {
  content: 'Stack Overflow';
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  transition: opacity 0.5s var(--ease-smooth);
}
.highlight-fade-out::after {
  opacity: 0;
}
.highlight-fade-in .gh-highlight-contribs,
.highlight-fade-in .gh-highlight-year,
.highlight-fade-in .gh-highlight-dot,
.highlight-fade-in .so-highlight-rep,
.highlight-fade-in .so-badges {
  animation: highlight-fade-in 0.5s var(--ease-smooth);
}
@keyframes highlight-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.action-btn-primary {
  background: white;
  color: #08090a;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 2px 16px rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}
.action-btn-primary::before {
  display: none;
}
.action-btn-primary:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: transparent;
  color: #08090a;
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.action-btn-primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 1px 8px rgba(255, 255, 255, 0.08);
  transition-duration: 0.1s;
}

/* Social icon buttons (small circles) */
.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: all 0.35s var(--spring);
  cursor: pointer;
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 20px color-mix(in srgb, var(--accent) 12%, transparent);
}
.social-icon:active {
  transform: translateY(0) scale(0.95);
  transition-duration: 0.1s;
}

/* Play page profile logos (subtle, logo-only links) */
.play-profiles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding: 0.35rem 0 0;
  margin-top: -0.15rem;
  animation: profilesEnter 0.8s var(--ease-out-expo) 0.65s both;
}
@keyframes profilesEnter {
  from { opacity: 0; transform: translateY(10px); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.play-profile-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  min-width: 120px;
  min-height: 44px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}
.play-profile-link img {
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.5;
  transition: all 0.3s ease;
}
/* Width-based sizing for uniform horizontal footprint */
.play-profile-link img[alt="Instagram"] { width: 90px; }
.play-profile-link img[alt="Salotto"] { width: 100px; }
.play-profile-link img[alt="Digital Pool"] { width: 100px; }
.play-profile-link:hover img {
  opacity: 0.95;
  transform: scale(1.08);
  filter: brightness(0) invert(1)
    drop-shadow(0 0 12px rgba(78, 227, 182, 0.25))
    drop-shadow(0 0 4px rgba(78, 227, 182, 0.12));
}
.play-profile-link:active img {
  transform: scale(0.95);
  transition-duration: 0.1s;
}
/* Profile labels hidden */
.play-profile-label {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT SECTIONS — Full-width strips below hero
   ═══════════════════════════════════════════════════════════════════════════ */
.page-section {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: clamp(1.1rem, 2.5vw, 1.5rem) clamp(1.25rem, 3vw, 2rem);
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-smooth);
  opacity: 0;
  animation: fadeIn 0.5s var(--ease-out-quint) both;
}
.page-section:nth-child(3) { animation-delay: 0.5s; }
.page-section:nth-child(4) { animation-delay: 0.57s; }
.page-section:nth-child(5) { animation-delay: 0.64s; }

/* Subtle hover on sections */
.page-section:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}

/* ===== SO SPOTLIGHT SECTION ===== */
/* Base = compact (homepage). Overridden by .so-card-lg for CV. */
.so-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  text-decoration: none;
  color: inherit;
  overflow: visible;
  max-width: 100%;
  padding: clamp(1rem, 2vw, 1.4rem) clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(244, 128, 36, 0.05), transparent),
    linear-gradient(165deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}
/* ─── Card Skeleton Placeholders ─────────────────────────────────────── */
.card-skeleton { min-height: 80px; }
.skeleton-pulse {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}
.skeleton-icon { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.skeleton-text-lg { width: 80px; height: 18px; }
.skeleton-text-sm { width: 48px; height: 12px; }
.skeleton-row { display: flex; gap: 0.6rem; margin-top: 0.5rem; }

.so-section { text-decoration: none; color: inherit; cursor: pointer; }
.so-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.so-icon {
  color: rgba(244, 128, 36, 0.25);
  flex-shrink: 0;
}
.so-icon svg { width: 20px; height: 20px; }
.so-number {
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  flex-shrink: 0;
  background: linear-gradient(135deg, #fff 15%, #ffa94d 50%, #f48024 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.so-label {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-5);
}
.so-label-img {
  height: 18px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.45;
}
.so-badges {
  display: flex;
  gap: 0.5rem;
  flex-basis: 100%;
  align-items: center;
}
.so-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.so-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.so-badge-gold::before { background: #ffcc00; }
.so-badge-silver::before { background: #b4b8bc; }
.so-badge-bronze::before { background: #d1a684; }
.so-bottom {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  flex-basis: 100%;
}
.so-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.so-tag {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(244, 128, 36, 0.06);
  border: 1px solid rgba(244, 128, 36, 0.1);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  transition: all 0.2s ease;
  text-decoration: none;
}
.so-tag:hover {
  background: rgba(244, 128, 36, 0.16);
  border-color: rgba(244, 128, 36, 0.28);
  color: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(244, 128, 36, 0.08);
}
.so-section:hover .so-tag {
  background: rgba(244, 128, 36, 0.08);
  border-color: rgba(244, 128, 36, 0.15);
}
.so-tag-score {
  color: rgba(244, 128, 36, 0.55);
  font-size: 0.55rem;
  margin-left: 0.15rem;
  font-weight: 600;
}
.so-tags-toggle {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(244, 128, 36, 0.5);
  background: rgba(244, 128, 36, 0.04);
  border: 1px solid rgba(244, 128, 36, 0.12);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.so-tags-toggle:hover {
  background: rgba(244, 128, 36, 0.1);
  border-color: rgba(244, 128, 36, 0.2);
  color: rgba(244, 128, 36, 0.8);
}
.so-refreshed {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.15);
  margin-left: auto;
}

/* -- Shared community card base -- */
.so-card-md, .so-card-sm {
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--ease-smooth);
}
.so-card-md:hover, .so-card-sm:hover {
  border-color: color-mix(in srgb, var(--border), #f48024 40%);
  box-shadow: 0 8px 32px rgba(244, 128, 36, 0.08), 0 0 60px -20px rgba(244, 128, 36, 0.06);
  transform: translateY(-2px);
}

/* -- SO Card: Medium/CV modifier -- */
.so-card-md {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.75rem 1rem;
  border-color: color-mix(in srgb, var(--border), #f48024 20%);
  background: linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--surface), #f48024 4%) 100%);
  box-shadow: 0 1px 8px rgba(244, 128, 36, 0.03);
}
.so-card-md .so-icon { color: #f48024; opacity: 0.3; }
.so-card-md .so-icon svg { width: 18px; height: 18px; }
.so-card-md .so-number { font-size: 1.15rem; }
.so-card-md .so-label { font-size: 0.48rem; }
.so-card-md .so-label-img { height: 14px; }
.so-card-md .so-badges { gap: 0.5rem; }
.so-card-md .so-badge { font-size: 0.62rem; color: var(--ink-3); gap: 0.18rem; }
.so-card-md .so-badge::before { width: 7px; height: 7px; }
.so-card-md .so-tags { gap: 0.2rem; }
.so-card-md .so-tag {
  font-size: 0.48rem;
  color: var(--ink-3);
  background: color-mix(in srgb, var(--surface), #f48024 5%);
  border-color: color-mix(in srgb, var(--border), #f48024 12%);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}
.so-card-md .so-tag:hover {
  background: color-mix(in srgb, var(--surface), #f48024 10%);
  border-color: color-mix(in srgb, var(--border), #f48024 25%);
}
.so-card-md .so-tag-score { color: #f48024; opacity: 0.5; font-size: 0.44rem; }
.so-card-md .so-tags-toggle { font-size: 0.46rem; padding: 0.08rem 0.3rem; }
.so-card-md .so-refreshed { color: var(--ink-5); font-size: 0.42rem; margin-left: auto; }

/* ===== SO CARD FULL (homepage standalone, no community-row wrapper) ===== */
.so-card-full {
  border-radius: var(--radius);
  width: 100%;
}

/* ===== SO CARD SMALL (homepage half-width) ===== */
.so-card-sm {
  container-type: inline-size;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: clamp(0.5rem, 2.5cqw, 0.85rem) clamp(0.65rem, 3cqw, 1.1rem);
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--border), #f48024 15%);
  background: linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--surface), #f48024 3%) 100%);
  box-shadow: 0 1px 8px rgba(244, 128, 36, 0.02);
  text-decoration: none;
}
.so-card-sm .so-icon svg { width: clamp(14px, 3.5cqw, 20px); height: clamp(14px, 3.5cqw, 20px); }
.so-card-sm .so-number { font-size: clamp(0.9rem, 4.5cqw, 1.4rem); }
.so-card-sm .so-label { font-size: clamp(0.42rem, 1.3cqw, 0.6rem); }
.so-card-sm .so-label-img { height: clamp(12px, 3.2cqw, 18px); }
.so-card-sm .so-badges { gap: 0.5rem; }
.so-card-sm .so-badge { font-size: clamp(0.52rem, 1.6cqw, 0.72rem); }
.so-card-sm .so-badge::before { width: clamp(6px, 1.6cqw, 9px); height: clamp(6px, 1.6cqw, 9px); }
.so-card-sm .so-tags { gap: 0.22rem; }
.so-card-sm .so-tag { font-size: clamp(0.44rem, 1.4cqw, 0.62rem); padding: clamp(0.08rem, 0.5cqw, 0.15rem) clamp(0.25rem, 1cqw, 0.45rem); }
.so-card-sm .so-tag-score { font-size: clamp(0.4rem, 1.2cqw, 0.58rem); }
.so-card-sm .so-tags-toggle { font-size: clamp(0.4rem, 1.2cqw, 0.58rem); padding: 0.1rem 0.35rem; }
.so-card-sm .so-refreshed { font-size: clamp(0.38rem, 1.1cqw, 0.55rem); margin-left: auto; }

/* ===== PROJECT CARDS ROW ===== */
.projects-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.85rem, 1.5vw, 1.15rem);
  padding: 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.projects-row:hover {
  border-color: transparent;
  box-shadow: none;
}
.projects-row::after { display: none; }

.project-card {
  container-type: inline-size;
  padding: clamp(1.25rem, 5.5cqw, 1.8rem) clamp(1.1rem, 5cqw, 1.6rem);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.015) 100%);
  cursor: default;
  transition: transform 0.15s ease-out, border-color 0.4s var(--spring), box-shadow 0.4s var(--spring);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}
/* Top accent bar */
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-mid));
  border-radius: 14px 14px 0 0;
  opacity: 0.7;
  transition: opacity 0.4s ease, height 0.4s ease;
}
.project-card:hover {
  border-color: rgba(123, 147, 212, 0.22);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 80px -20px rgba(123, 147, 212, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.project-card:hover::before { opacity: 1; }
.project-card:hover .project-card-name { color: #fff; }
.project-card:hover .project-card-desc { color: rgba(255, 255, 255, 0.7); }

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: clamp(0.35rem, 2cqw, 0.6rem);
}
.project-card-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.15rem, 5.5cqw, 1.4rem);
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}
.project-card-badge {
  font-family: var(--mono);
  font-size: clamp(0.5rem, 2.8cqw, 0.65rem);
  font-weight: 500;
  padding: clamp(2px, 1cqw, 4px) clamp(6px, 3cqw, 10px);
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.project-card-badge-muted { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.5); border: 1px solid rgba(255, 255, 255, 0.08); }
.project-card-badge-blue { background: var(--accent-soft); color: var(--accent); }
.project-card-badge-amber { background: var(--amber-soft); color: var(--amber); }
.project-card-badge-green { background: var(--emerald-soft); color: var(--emerald); }
.project-card-desc {
  font-size: clamp(0.75rem, 4cqw, 0.88rem);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.55;
  transition: color 0.3s ease;
}

/* Per-card accent colors for top bar */
.project-card-accent-blue::before {
  background: linear-gradient(90deg, var(--accent), var(--accent-mid));
}
.project-card-accent-green::before {
  background: linear-gradient(90deg, var(--emerald), #5ce0c0);
}
.project-card-accent-amber::before {
  background: linear-gradient(90deg, var(--amber), #e0bf6a);
}

/* Staggered entrance for project cards */
.project-card {
  opacity: 0;
  animation: cardEnter 0.6s var(--ease-out-quint) both;
}
.project-card:nth-child(1) { animation-delay: 0.35s; }
.project-card:nth-child(2) { animation-delay: 0.42s; }
.project-card:nth-child(3) { animation-delay: 0.49s; }
.project-card:nth-child(4) { animation-delay: 0.56s; }

@keyframes cardEnter {
  from { opacity: 0; transform: perspective(800px) translateY(20px) rotateX(4deg); }
  to { opacity: 1; transform: perspective(800px) translateY(0) rotateX(0deg); }
}

/* ===== STATS SECTION ===== */
.stats-section {
  container-type: inline-size;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: clamp(0.75rem, 1.5vw, 1rem) clamp(0.75rem, 1.5vw, 1rem);
  background:
    linear-gradient(135deg, rgba(var(--pg-accent-rgb), 0.03), transparent 60%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}
.stats-section:hover {
  border-color: rgba(var(--pg-accent-rgb), 0.12);
  box-shadow: var(--shadow-sm), 0 0 40px -10px rgba(var(--pg-accent-rgb), 0.06);
}
.stat-item {
  text-align: center;
  flex-shrink: 0;
  position: relative;
}
.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: clamp(-0.5rem, -1vw, -0.75rem);
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}
.stat-value {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5cqw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #fff 40%, rgba(var(--pg-accent-rgb), 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: clamp(0.55rem, 1.1cqw, 0.78rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-top: clamp(0.2rem, 0.5vw, 0.3rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== SECTION LABEL ===== */
.section-label {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
  opacity: 0;
  animation: fadeIn 0.6s var(--ease-out-quint) 0.4s both;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.play-mode .section-label::before,
.play-mode .section-label::after {
  content: '';
  height: 1px;
  flex: 1;
  max-width: 80px;
  background: linear-gradient(90deg, transparent, rgba(78, 227, 182, 0.25));
  animation: lineGrow 1s var(--ease-out-expo) 0.6s both;
}
.play-mode .section-label::after {
  background: linear-gradient(90deg, rgba(78, 227, 182, 0.25), transparent);
}
@keyframes lineGrow {
  from { max-width: 0; opacity: 0; }
  to   { max-width: 80px; opacity: 1; }
}

/* ===== PLAY GRID — Unified stat + achievement cards ===== */
.play-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: clamp(0.5rem, 1.1vw, 0.8rem);
  row-gap: clamp(0.5rem, 1.2vw, 0.85rem);
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}

.play-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: clamp(0.9rem, 2vw, 1.5rem) clamp(0.6rem, 1.1vw, 0.9rem);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(78, 227, 182, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: all 0.35s var(--spring);
  transform-style: preserve-3d;
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  /* staggered entrance */
  opacity: 0;
  animation: playCardEnter 0.7s var(--ease-out-expo) both;
}
.play-card:nth-child(1) { animation-delay: 0.45s; }
.play-card:nth-child(2) { animation-delay: 0.5s; }
.play-card:nth-child(3) { animation-delay: 0.55s; }
.play-card:nth-child(4) { animation-delay: 0.6s; }
.play-card:nth-child(5) { animation-delay: 0.65s; }
.play-card:nth-child(6) { animation-delay: 0.7s; }
.play-card:nth-child(7) { animation-delay: 0.75s; }
.play-card:nth-child(8) { animation-delay: 0.8s; }

@keyframes playCardEnter {
  from { opacity: 0; transform: perspective(800px) translateY(14px) rotateX(4deg) scale(0.96); filter: blur(3px); }
  to   { opacity: 1; transform: perspective(800px) translateY(0) rotateX(0deg) scale(1); filter: blur(0); }
}

.play-card:hover {
  border-color: rgba(78, 227, 182, 0.2);
  background: rgba(78, 227, 182, 0.04);
  transform: perspective(800px) translateY(-2px);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.3),
    0 0 40px -10px rgba(78, 227, 182, 0.1);
}

/* Stat cards — big number + label */
.play-card-stat {
  --stat-color: rgba(78, 227, 182, 0.85);
  --stat-glow: rgba(78, 227, 182, 0.15);
  --stat-border: rgba(78, 227, 182, 0.07);
}
.play-card-stat:nth-child(1) {
  --stat-color: rgba(78, 227, 182, 0.85);
  --stat-glow: rgba(78, 227, 182, 0.15);
  --stat-border: rgba(78, 227, 182, 0.12);
}
.play-card-stat:nth-child(2) {
  --stat-color: rgba(212, 169, 78, 0.9);
  --stat-glow: rgba(212, 169, 78, 0.15);
  --stat-border: rgba(212, 169, 78, 0.12);
}
.play-card-stat:nth-child(3) {
  --stat-color: rgba(155, 130, 204, 0.9);
  --stat-glow: rgba(155, 130, 204, 0.15);
  --stat-border: rgba(155, 130, 204, 0.12);
}
.play-card-stat:nth-child(4) {
  --stat-color: rgba(92, 184, 212, 0.9);
  --stat-glow: rgba(92, 184, 212, 0.15);
  --stat-border: rgba(92, 184, 212, 0.12);
}
.play-card-stat {
  border-color: var(--stat-border);
}
.play-card-stat .stat-value {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #fff 30%, var(--stat-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 14px var(--stat-glow));
  transition: transform 0.3s var(--spring);
}
.play-card-stat .stat-label {
  font-size: clamp(0.52rem, 0.9vw, 0.68rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.1rem;
  transition: color 0.3s ease;
}
.play-card-stat:hover {
  border-color: var(--stat-border);
  background: color-mix(in srgb, var(--stat-color) 4%, transparent);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.3),
    0 0 40px -10px var(--stat-glow);
}
.play-card-stat:hover .stat-value {
  transform: scale(1.06);
}
.play-card-stat:hover .stat-label {
  color: rgba(255, 255, 255, 0.7);
}

/* Highlight/achievement cards — themed accents */
.play-card-highlight {
  --hl-color: rgba(78, 227, 182, 0.5);
  --hl-glow: rgba(78, 227, 182, 0.08);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: clamp(0.75rem, 1.5vw, 1.1rem) clamp(0.6rem, 1.1vw, 0.9rem);
  border-top: 2px solid transparent;
}
/* Most Improved — gold */
.play-card-highlight:nth-child(5) {
  --hl-color: rgba(212, 169, 78, 0.6);
  --hl-glow: rgba(212, 169, 78, 0.06);
  border-top-color: rgba(212, 169, 78, 0.2);
}
/* Back-to-Back Finals — emerald */
.play-card-highlight:nth-child(6) {
  --hl-color: rgba(78, 227, 182, 0.6);
  --hl-glow: rgba(78, 227, 182, 0.06);
  border-top-color: rgba(78, 227, 182, 0.2);
}
/* Cash Streak — orange/rose */
.play-card-highlight:nth-child(7) {
  --hl-color: rgba(224, 130, 80, 0.6);
  --hl-glow: rgba(224, 130, 80, 0.06);
  border-top-color: rgba(224, 130, 80, 0.2);
}
/* 500 Fargo Club — cyan */
.play-card-highlight:nth-child(8) {
  --hl-color: rgba(92, 184, 212, 0.6);
  --hl-glow: rgba(92, 184, 212, 0.06);
  border-top-color: rgba(92, 184, 212, 0.2);
}
.play-card-highlight .play-card-emoji {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.3s var(--spring);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}
.play-card-highlight .play-card-title {
  font-size: clamp(0.6rem, 0.95vw, 0.72rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-align: center;
  transition: color 0.3s ease;
}
.play-card-highlight .play-card-title strong {
  display: block;
  font-size: clamp(0.68rem, 1.1vw, 0.82rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0.15rem;
}
.play-card-highlight .play-card-subtitle {
  display: block;
  font-size: clamp(0.52rem, 0.8vw, 0.62rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.play-card-highlight:hover {
  background: var(--hl-glow);
  border-color: var(--hl-color);
  border-top-color: var(--hl-color);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.3),
    0 0 30px -10px var(--hl-glow);
}
.play-card-highlight:hover .play-card-emoji {
  transform: scale(1.2);
}
.play-card-highlight:hover .play-card-title {
  color: rgba(255, 255, 255, 0.9);
}
.play-card-highlight:hover .play-card-title strong {
  color: #fff;
}
.play-card-highlight:hover .play-card-subtitle {
  color: var(--hl-color);
}

/* ===== ACHIEVEMENTS ROW (Play Mode) ===== */
.achievements-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.5rem, 1vw, 0.75rem);
  padding: clamp(0.5rem, 1vw, 0.75rem);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.achievements-row:hover { border-color: transparent; box-shadow: none; }
.achievements-row::after { display: none; }

.achievement-card {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(0.5rem, 4cqw, 1rem) clamp(0.4rem, 3cqw, 0.75rem);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.015) 100%);
  gap: clamp(0.2rem, 1.5cqw, 0.4rem);
  transition: transform 0.15s ease-out, border-color 0.4s var(--spring), box-shadow 0.4s var(--spring);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}
/* Top accent bar on achievement cards */
.achievement-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(78, 227, 182, 0.4), transparent);
  z-index: 2;
}
.achievement-card:hover {
  border-color: rgba(78, 227, 182, 0.18);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(78, 227, 182, 0.06),
    0 0 60px -20px rgba(78, 201, 160, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
/* Staggered entrance for achievement cards */
.achievement-card {
  opacity: 0;
  animation: cardEnter 0.6s var(--ease-out-quint) both;
}
.achievement-card:nth-child(1) { animation-delay: 0.35s; }
.achievement-card:nth-child(2) { animation-delay: 0.42s; }
.achievement-card:nth-child(3) { animation-delay: 0.49s; }
.achievement-card:nth-child(4) { animation-delay: 0.56s; }

.achievement-icon {
  width: clamp(1.75rem, 10cqw, 2.25rem);
  height: clamp(1.75rem, 10cqw, 2.25rem);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(78, 227, 182, 0.06);
  border: 1px solid rgba(78, 227, 182, 0.08);
  font-size: clamp(1rem, 6.5cqw, 1.5rem);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}
.achievement-icon:empty { display: none; }
.achievement-title {
  font-size: clamp(0.68rem, 4.5cqw, 0.92rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.achievement-detail {
  font-size: clamp(0.5rem, 3.2cqw, 0.72rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
  line-height: 1.35;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE — Hero + Bento Grid
   ═══════════════════════════════════════════════════════════════════════════ */

/* Custom selection color */
::selection {
  background: rgba(123, 147, 212, 0.25);
  color: var(--ink);
}

/* Scroll snap (homepage only) */
html:has(.hp-hero) {
  scroll-snap-type: y mandatory;
}
html:has(.hp-hero) .scroll-progress { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE HERO
   ═══════════════════════════════════════════════════════════════════════════ */
.hp-hero {
  scroll-snap-align: start;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
/* Bottom vignette — anticipates scroll transition */
.hp-hero-vignette {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30vh;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(14, 16, 18, 0.4) 60%,
    rgba(14, 16, 18, 0.8) 100%
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Ambient gradient orbs — slow-drifting accent blobs */
.hp-hero::before,
.hp-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  z-index: 0;
}
.hp-hero::before {
  width: 480px;
  height: 480px;
  top: -12%;
  left: -10%;
  background: radial-gradient(circle, rgba(123, 147, 212, 0.06) 0%, transparent 70%);
  animation: hpOrbDrift1 14s ease-in-out infinite alternate;
}
.hp-hero::after {
  width: 400px;
  height: 400px;
  bottom: -8%;
  right: -6%;
  background: radial-gradient(circle, rgba(155, 130, 204, 0.05) 0%, transparent 70%);
  animation: hpOrbDrift2 16s ease-in-out infinite alternate;
}
@keyframes hpOrbDrift1 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50%  { transform: translate(50px, 35px) scale(1.12); opacity: 0.9; }
  100% { transform: translate(-25px, 55px) scale(0.95); opacity: 0.6; }
}
@keyframes hpOrbDrift2 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.4; }
  50%  { transform: translate(-35px, -30px) scale(1.08); opacity: 0.75; }
  100% { transform: translate(30px, -45px) scale(1.02); opacity: 0.5; }
}

/* Staggered entrance — each child animates in sequence */
.hp-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 0 clamp(1.25rem, 3.5vw, 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.75rem, 1.8vw, 1.25rem);
}
/* Override hero-actions animation inside hp-hero — stagger from parent instead */
.hp-hero-inner .hero-actions {
  opacity: 0;
  animation: heroEnter 0.9s var(--ease-out-expo) both;
}
.hp-hero-inner > * {
  opacity: 0;
  animation: heroEnter 0.9s var(--ease-out-expo) both;
}
.hp-hero-inner > :nth-child(1) { animation-delay: 0.08s; }  /* name */
.hp-hero-inner > :nth-child(2) { animation-delay: 0.2s; }   /* subtitle */
.hp-hero-inner > :nth-child(3) { animation-delay: 0.3s; }   /* availability */
.hp-hero-inner > :nth-child(4) { animation-delay: 0.42s; }  /* actions */
.hp-hero-inner > :nth-child(5) { animation-delay: 0.54s; }  /* dev profiles */
/* Stagger individual buttons within hero action rows */
.hp-hero-inner .hero-actions .action-btn {
  opacity: 0;
  animation: btnStagger 0.5s var(--ease-out-expo) both;
}
.hp-hero-inner > :nth-child(4) .action-btn:nth-child(1) { animation-delay: 0.44s; }
.hp-hero-inner > :nth-child(4) .action-btn:nth-child(2) { animation-delay: 0.50s; }
.hp-hero-inner > :nth-child(4) .action-btn:nth-child(3) { animation-delay: 0.56s; }
.hp-hero-inner > :nth-child(4) .action-btn:nth-child(4) { animation-delay: 0.62s; }
.hp-hero-inner > :nth-child(5) .action-btn:nth-child(1) { animation-delay: 0.58s; }
.hp-hero-inner > :nth-child(5) .action-btn:nth-child(2) { animation-delay: 0.66s; }
@keyframes btnStagger {
  from { opacity: 0; transform: translateY(8px) scale(0.95); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Name — gradient text with slow shimmer */
.hp-hero-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: clamp(0.15rem, 0.4vw, 0.35rem);
}
.hp-hero-name .gradient-text {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    var(--accent-mid) 40%,
    var(--violet) 60%,
    rgba(255, 255, 255, 0.95) 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: nameShimmer 8s ease-in-out infinite;
}
@keyframes nameShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Subtitle */
.hp-hero-subtitle {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: -0.01em;
  margin-bottom: clamp(0.1rem, 0.3vw, 0.2rem);
}
/* Availability */
.hp-hero-avail {
  font-family: var(--mono);
  font-size: clamp(0.68rem, 1vw, 0.78rem);
  font-weight: 400;
  color: var(--ink-5);
  letter-spacing: 0.02em;
}

/* Scroll indicator */
.hp-scroll-hint {
  position: absolute;
  bottom: clamp(1.5rem, 3vh, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: hintEnter 0.8s var(--ease-out-expo) 1.2s both;
  background: none;
  border: none;
  padding: 0.75rem;
  cursor: pointer;
  transition: opacity 0.4s var(--ease-out-quint), transform 0.4s var(--ease-out-quint), filter 0.4s ease;
}
.hp-scroll-hint:hover {
  opacity: 0.9;
  transform: translateX(-50%) translateY(-2px);
}
.hp-scroll-hint:active {
  transform: translateX(-50%) translateY(2px);
}
.hp-scroll-hint.dismissing {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(8px) scale(0.92);
  filter: blur(2px);
  pointer-events: none;
}
.hp-scroll-hint svg {
  width: 16px;
  height: 16px;
  color: var(--ink-4);
  animation: scrollBounce 1.6s var(--spring) infinite;
}
@keyframes hintEnter {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  35% { transform: translateY(10px); opacity: 0.9; }
  55% { transform: translateY(-3px); opacity: 0.7; }
  75% { transform: translateY(5px); opacity: 0.85; }
  90% { transform: translateY(-1px); opacity: 0.6; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE BOTTOM (content + footer)
   ═══════════════════════════════════════════════════════════════════════════ */
.hp-bottom {
  scroll-snap-align: start;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
/* Ambient gradient orbs — visual continuity with hero */
.hp-bottom::before,
.hp-bottom::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(140px);
  z-index: 0;
}
.hp-bottom::before {
  width: 400px;
  height: 400px;
  top: 10%;
  right: -8%;
  background: radial-gradient(circle, rgba(123, 147, 212, 0.04) 0%, transparent 70%);
  animation: hpOrbDrift2 18s ease-in-out infinite alternate;
}
.hp-bottom::after {
  width: 350px;
  height: 350px;
  bottom: 15%;
  left: -6%;
  background: radial-gradient(circle, rgba(155, 130, 204, 0.035) 0%, transparent 70%);
  animation: hpOrbDrift1 16s ease-in-out infinite alternate;
}
.hp-bottom .page-footer {
  margin-top: auto;
}

/* Content section */
.hp-content {
  max-width: 740px;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 8rem) clamp(1.25rem, 3.5vw, 2rem) 0;
  flex: 1;
  display: flex;
  align-items: center;
}

/* (divider removed) */

/* About section — structured highlights */
.hp-about {
  font-family: var(--display);
  text-align: center;
  letter-spacing: -0.01em;
}
.hp-about-intro {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--ink-3);
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.6;
  transition: opacity 0.3s var(--ease-smooth);
}
/* Word-stagger reveal */
.hp-about-intro .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out-expo),
              transform 0.5s var(--ease-out-expo),
              color 0.6s var(--ease-smooth);
}
.hp-about.visible .hp-about-intro .word {
  opacity: 1;
  transform: translateY(0);
}
/* Industry keyword accent flash */
.hp-about-intro .word-accent {
  color: var(--accent-mid);
  transition: opacity 0.5s var(--ease-out-expo),
              transform 0.5s var(--ease-out-expo),
              color 1.2s var(--ease-smooth) 0.8s;
}
.hp-about.visible .hp-about-intro .word-accent {
  color: var(--ink-3);
}
.hp-about:has(.hp-logo:hover) .hp-about-intro {
  opacity: 0.3;
}

.hp-logos {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
  position: relative;
}
.hp-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--ink-3);
  text-decoration: none;
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  transition: color 0.3s var(--ease-smooth), transform 0.3s var(--spring), opacity 0.3s var(--ease-smooth);
}
.hp-logo:hover {
  color: var(--logo-color, var(--ink-2));
  transform: translateY(-3px);
}
/* Dim non-hovered siblings */
.hp-logos:hover .hp-logo:not(:hover) {
  opacity: 0.4;
}
.hp-logos:hover .hp-logo:not(:hover) svg {
  opacity: 0.35;
}
/* Staggered reveal + glow pulse */
.hp-about.visible .hp-logo {
  animation: logoReveal 0.5s var(--ease-out-expo) forwards,
             logoPulse 0.6s ease-in-out forwards;
}
.hp-about.visible .hp-logo:nth-child(1) { animation-delay: 0.15s, 0.55s; }
.hp-about.visible .hp-logo:nth-child(2) { animation-delay: 0.25s, 0.65s; }
.hp-about.visible .hp-logo:nth-child(3) { animation-delay: 0.35s, 0.75s; }
.hp-about.visible .hp-logo:nth-child(4) { animation-delay: 0.45s, 0.85s; }
@keyframes logoReveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes logoPulse {
  0% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 12px var(--logo-glow, rgba(123, 147, 212, 0.3))); }
  100% { filter: drop-shadow(0 0 0 transparent); }
}
.hp-logo svg {
  width: 36px;
  height: 36px;
  opacity: 0.7;
  transition: opacity 0.3s var(--ease-smooth), color 0.3s var(--ease-smooth),
              filter 0.3s var(--ease-smooth), transform 0.3s var(--spring);
}
.hp-logo:hover svg {
  opacity: 1;
  color: var(--logo-color, var(--ink-2));
  filter: drop-shadow(0 0 8px var(--logo-glow, transparent));
  transform: scale(1.1);
}
/* Brand colors + glows */
.hp-logo:nth-child(1) { --logo-color: #1a8dff; --logo-glow: rgba(26, 141, 255, 0.35); } /* Doximity */
.hp-logo:nth-child(2) { --logo-color: #4a90d9; --logo-glow: rgba(74, 144, 217, 0.35); } /* JSwipe */
.hp-logo:nth-child(3) { --logo-color: #8c9197; --logo-glow: rgba(140, 145, 151, 0.3); } /* Square */
.hp-logo:nth-child(4) { --logo-color: #00c853; --logo-glow: rgba(0, 200, 83, 0.3); }    /* Breathometer */
.hp-logo span {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.3s var(--ease-smooth);
}
.hp-logo em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--ink-5);
  letter-spacing: 0.01em;
  margin-top: -0.15rem;
  transition: color 0.3s var(--ease-smooth);
}
.hp-logo:hover em {
  color: var(--ink-3);
}
/* Tooltip */
.hp-logo::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(0.85);
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--logo-color, var(--border));
  border-radius: var(--radius-xs);
  padding: 0.35rem 0.6rem;
  pointer-events: none;
  opacity: 0;
  filter: blur(4px);
  transition: opacity 0.35s var(--ease-out-expo),
              transform 0.4s var(--spring),
              filter 0.3s var(--ease-out-expo);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.hp-logo:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  filter: blur(0);
}

/* Reveal with upward slide + blur */
.hp-content .reveal {
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out-quint), transform 0.7s var(--ease-out-quint);
}
.hp-content .reveal.visible {
  transform: translateY(0);
}
@media (prefers-reduced-motion: no-preference) {
  .hp-content .reveal {
    filter: blur(6px);
    transition: opacity 0.7s var(--ease-out-quint),
                transform 0.7s var(--ease-out-quint),
                filter 0.7s var(--ease-out-quint);
  }
  .hp-content .reveal.visible { filter: blur(0); }
}
/* ═══════════════════════════════════════════════════════════════════════════
   PAGE LAYOUT RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
  .so-number { font-size: 2.2rem; }
}

/* ===== TABLET ===== */
@media (max-width: 1024px) {
  .page-hero { grid-template-columns: 1fr; }
  .play-mode .page-hero { flex-direction: column; }
  .play-mode .page-hero-text { text-align: center; }
  .play-mode .page-hero-tagline { text-align: center; }
  .page-hero-fargo { width: 100%; max-width: 320px; }
  .projects-row { grid-template-columns: repeat(2, 1fr); }
  .achievements-row { grid-template-columns: repeat(2, 1fr); }
  .stats-section { flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
  .stat-item + .stat-item::before { display: none; }
}

/* ===== MOBILE ===== */
@media (max-width: 700px) {
  .hp-hero-name { font-size: 2.5rem; }
  .hp-scroll-hint { font-size: 0.55rem; }
  .hp-about { text-align: center; }
  .hp-logos { gap: clamp(1rem, 3vw, 1.5rem); }
  .hp-logo svg { width: 28px; height: 28px; }
  .hp-logo::after { display: none; } /* Hide tooltips on small screens — no hover */
  .hp-bottom::before, .hp-bottom::after { opacity: 0.5; }

  .page-canvas::before { width: 300px; height: 300px; opacity: 0.25; }
  .page-canvas::after { width: 250px; height: 250px; opacity: 0.2; }
  .page-hero-text h1 { font-size: 1.4rem; }
  .page-hero-fargo { width: 100%; max-width: none; min-width: 0; }
  .page-hero-fargo-rating { font-size: 2.4rem; }
  .page-hero-fargo-logo { height: 22px; }
  .projects-row { grid-template-columns: 1fr; }
  .achievements-row { grid-template-columns: repeat(2, 1fr); }
  .stats-section { flex-wrap: wrap; gap: 0.75rem 1rem; justify-content: center; }
  .stat-item + .stat-item::before { display: none; }
  .so-top { flex-wrap: wrap; }
  .so-number { font-size: 1.8rem; }
  .so-tags { gap: 0.3rem; }
  .so-tag { font-size: 0.6rem; padding: 0.15rem 0.4rem; }
  .so-tag-score { font-size: 0.52rem; }
  .sticky-nav-subtitle { display: none; }
  .sticky-nav-inner {
    max-width: none;
    padding: 0.45rem 0.45rem 0.45rem 1rem;
    gap: 0.6rem;
    border-radius: var(--radius);
  }
  .sticky-nav-name { font-size: 0.8rem; }
  .sticky-nav-links {
    border-radius: var(--radius-sm);
    padding: 0.15rem;
    gap: 0.1rem;
  }
  .sticky-nav-links a {
    font-size: 0.68rem;
    padding: 0.3rem 0.65rem;
  }
  .back-to-top { bottom: 1.25rem; right: 1.25rem; }
  /* Play page mobile overrides */
  .play-mode .page-inner { gap: 0.6rem; padding-top: 0.5rem; }
  .play-mode .page-hero { gap: 0.5rem; }
  .play-mode .page-hero-subtitle { font-size: 1.15rem; margin-bottom: 0; }
  .play-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
  }
  .play-card {
    padding: 0.4rem 0.35rem;
    border-radius: 10px;
    gap: 0.15rem;
  }
  .play-card-stat .stat-value { font-size: 1.3rem; }
  .play-card-stat .stat-label { font-size: 0.55rem; }
  .play-card-highlight .play-card-title { font-size: 0.6rem; }
  .play-card-highlight .play-card-title strong { font-size: 0.65rem; }
  .play-card-highlight .play-card-subtitle { font-size: 0.5rem; }
  .play-card-highlight .play-card-emoji { font-size: 0.9rem; }
  .play-card-highlight { gap: 0.2rem; padding: 0.4rem 0.35rem; }
  .play-profiles { gap: 0.75rem; margin-top: 0; }
  .play-profile-link { min-width: 60px; min-height: 32px; padding: 0.4rem; }
  .play-profile-link img[alt="Instagram"] { width: 60px; }
  .play-profile-link img[alt="Salotto"] { width: 68px; }
  .play-profile-link img[alt="Digital Pool"] { width: 68px; }
}

/* ===== FOCUS VISIBLE (Accessibility) ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.play-mode :focus-visible {
  outline-color: var(--emerald);
}
.action-btn:focus-visible,
.social-icon:focus-visible,
.footer-cta:focus-visible {
  outline-offset: 4px;
}

@media (max-width: 400px) {
  .sticky-nav-inner {
    padding: 0.4rem 0.4rem 0.4rem 0.8rem;
    gap: 0.4rem;
  }
  .sticky-nav-name { font-size: 0.72rem; }
  .sticky-nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .sticky-nav-links a {
    font-size: 0.68rem;
    padding: 0.3rem 0.55rem;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .project-card, .achievement-card, .page-hero-fargo { opacity: 1; transform: none; }
  .hp-hero-inner > * { opacity: 1; }
  .hp-logo { opacity: 1; transform: none; }
  .hp-hero-name .gradient-text { animation: none; -webkit-text-fill-color: var(--ink); }
  .hp-hero::before, .hp-hero::after { display: none; }
  .hp-hero-vignette { display: none; }
  .hp-about-intro .word { opacity: 1; transform: none; }
  .hp-scroll-hint { display: none; }
  html:has(.hp-hero) { scroll-snap-type: none; }
  .hp-bottom::before, .hp-bottom::after { display: none; }
}
