/* ============================================================
   RIDHWAN.NET V2 — Unified Stylesheet
   Modern Cyberpunk Portfolio | Mobile-First
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Core palette */
  --bg-primary: #04050d;
  --bg-secondary: #080918;
  --bg-card: rgba(14, 16, 36, 0.65);
  --bg-glass: rgba(14, 18, 42, 0.55);
  --border-glass: rgba(0, 255, 136, 0.14);
  --border-subtle: rgba(255, 255, 255, 0.07);

  /* Neon accents */
  --neon-green: #00ff88;
  --neon-cyan: #00e5ff;
  --neon-purple: #b44aff;
  --neon-pink: #ff2d7b;
  --neon-orange: #ff9100;
  --neon-blue: #3d5afe;

  /* Text */
  --text-primary: #f1f3fa;
  --text-secondary: #9498b8;
  --text-muted: #5e6284;
  --text-accent: var(--neon-green);

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #00ff88 0%, #00e5ff 45%, #b44aff 90%);
  --gradient-card: linear-gradient(145deg, rgba(0,255,136,0.06) 0%, rgba(0,229,255,0.03) 100%);
  --gradient-btn: linear-gradient(135deg, #00ff88, #00e5ff);
  --gradient-glow: radial-gradient(600px at var(--mx, 50%) var(--my, 50%), rgba(0,255,136,0.08), transparent 60%);
  --gradient-aurora: radial-gradient(circle at 18% 12%, rgba(0, 255, 136, 0.08) 0%, transparent 42%),
                     radial-gradient(circle at 82% 28%, rgba(0, 229, 255, 0.08) 0%, transparent 48%),
                     radial-gradient(circle at 48% 68%, rgba(180, 74, 255, 0.05) 0%, transparent 52%),
                     radial-gradient(circle at 20% 92%, rgba(0, 255, 136, 0.05) 0%, transparent 45%);

  /* Typography */
  --font-display: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 1px var(--border-glass);
  --shadow-glow: 0 0 20px rgba(0,255,136,0.15), 0 0 60px rgba(0,255,136,0.05);
  --shadow-btn: 0 4px 16px rgba(0,255,136,0.25);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-normal: 0.35s var(--ease-out);
  --transition-slow: 0.6s var(--ease-out);

  /* Layout */
  --container-max: 1200px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-green) var(--bg-secondary);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--neon-green); border-radius: 3px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  background-image: var(--gradient-aurora);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, .nav-brand {
  font-family: var(--font-display);
}

a {
  color: var(--neon-green);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--neon-cyan); }

img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ---------- Matrix Canvas ---------- */
#matrix-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(5, 5, 16, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  z-index: 1000;
  transition: background var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(5, 5, 16, 0.95);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--neon-green);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-brand .brand-dot {
  width: 8px; height: 8px;
  background: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-green);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--neon-green); }
  50% { opacity: 0.5; box-shadow: 0 0 16px var(--neon-green); }
}

.nav-links {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--neon-green);
  background: rgba(0, 255, 136, 0.06);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: var(--space-sm);
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: calc(var(--nav-height) + 10px);
    right: 14px;
    width: calc(100vw - 28px);
    max-width: 360px;
    height: auto;
    max-height: calc(100vh - var(--nav-height) - 95px);
    flex-direction: column;
    background: rgba(8, 12, 28, 0.88);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 255, 136, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.12);
    padding: 1.25rem;
    gap: 0.5rem;
    transform: translateY(-15px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    align-items: stretch;
    z-index: 1002;
    overflow-y: auto;
  }
  .nav-links.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
  }
  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(0, 255, 136, 0.14);
    border-color: rgba(0, 255, 136, 0.4);
    color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
  }
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
  position: relative;
}

/* Status beacon pill */
.hero-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--neon-green);
  letter-spacing: 1px;
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
}

.pulse-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
  position: relative;
  flex-shrink: 0;
}

.pulse-beacon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--neon-green);
  animation: beacon-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-beacon-red {
  background: #ff0055;
  box-shadow: 0 0 12px #ff0055;
}

.pulse-beacon-red::after {
  border-color: #ff0055;
}

.badge-high-roi {
  color: #ff0055;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 0, 85, 0.9), 0 0 20px rgba(255, 0, 85, 0.6), 0 0 30px rgba(255, 0, 85, 0.35);
  letter-spacing: 0.5px;
  display: inline-block;
  animation: pulse-red-glow 2.4s ease-in-out infinite alternate;
}

@keyframes pulse-red-glow {
  0% {
    text-shadow: 0 0 8px rgba(255, 0, 85, 0.8), 0 0 16px rgba(255, 0, 85, 0.4);
    transform: scale(1);
  }
  100% {
    text-shadow: 0 0 14px rgba(255, 0, 85, 1), 0 0 28px rgba(255, 0, 85, 0.8), 0 0 45px rgba(255, 0, 85, 0.5);
    transform: scale(1.05);
  }
}

@keyframes beacon-ping {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

.hero-profile {
  position: relative;
  margin-bottom: var(--space-xl);
}

.hero-profile::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.25) 0%, rgba(0, 229, 255, 0.15) 50%, transparent 70%);
  filter: blur(15px);
  z-index: 0;
  animation: aura-pulse 4s ease-in-out infinite alternate;
}

@keyframes aura-pulse {
  0% { transform: scale(0.95); opacity: 0.6; }
  100% { transform: scale(1.08); opacity: 1; }
}

.hero-profile img {
  position: relative;
  z-index: 1;
  width: 146px;
  height: 146px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(0, 255, 136, 0.7);
  box-shadow: 0 0 35px rgba(0, 255, 136, 0.25), 0 0 70px rgba(0, 229, 255, 0.15);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hero-profile img:hover {
  transform: scale(1.04);
  box-shadow: 0 0 45px rgba(0, 255, 136, 0.4);
}

.hero-profile .status-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--neon-green);
  border-right-color: var(--neon-cyan);
  border-bottom-color: var(--neon-purple);
  animation: spin-ring 4s linear infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes spin-ring {
  to { transform: rotate(360deg); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
}

.hero .tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 600;
  color: #c0c5e0;
  margin-bottom: var(--space-md);
  letter-spacing: -0.2px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  transition: all var(--transition-fast);
}

.hero-chip:hover {
  border-color: var(--neon-green);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.hero-chip svg {
  width: 14px;
  height: 14px;
  color: var(--neon-green);
}

.hero .bio {
  max-width: 660px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: var(--space-2xl);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: var(--gradient-btn);
  color: #04050d;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 25px rgba(0, 255, 136, 0.35);
  transition: all var(--transition-fast);
}

.btn-primary-glow:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 35px rgba(0, 255, 136, 0.5);
  color: #04050d;
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  transform: translateY(-3px);
}

/* ---------- Section Styling ---------- */
.section {
  padding: var(--space-3xl) 0;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  letter-spacing: -0.5px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 1.2em;
  background: var(--gradient-btn);
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--neon-green);
}

/* ---------- Glass Card 2.0 ---------- */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08), 0 8px 32px rgba(0, 0, 0, 0.45);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.15), 0 16px 40px -10px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 255, 136, 0.18);
  border-color: rgba(0, 255, 136, 0.35);
}

.glass-card:hover::before { opacity: 1; }

/* ---------- Navigation Grid (Dossier Links) ---------- */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.nav-grid .nav-item {
  display: flex;
  flex-direction: column;
  padding: var(--space-xl);
  text-decoration: none;
  color: var(--text-primary);
  border-radius: var(--radius-lg);
}

.nav-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.nav-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-item:hover .nav-icon-badge {
  transform: scale(1.1) rotate(2deg);
}

.badge-cyan { background: rgba(0, 229, 255, 0.12); color: #00e5ff; border: 1px solid rgba(0, 229, 255, 0.3); box-shadow: 0 0 16px rgba(0, 229, 255, 0.15); }
.badge-purple { background: rgba(180, 74, 255, 0.12); color: #b44aff; border: 1px solid rgba(180, 74, 255, 0.3); box-shadow: 0 0 16px rgba(180, 74, 255, 0.15); }
.badge-blue { background: rgba(61, 90, 254, 0.12); color: #3d5afe; border: 1px solid rgba(61, 90, 254, 0.3); box-shadow: 0 0 16px rgba(61, 90, 254, 0.15); }
.badge-orange { background: rgba(255, 145, 0, 0.12); color: #ff9100; border: 1px solid rgba(255, 145, 0, 0.3); box-shadow: 0 0 16px rgba(255, 145, 0, 0.15); }
.badge-green { background: rgba(0, 255, 136, 0.12); color: #00ff88; border: 1px solid rgba(0, 255, 136, 0.3); box-shadow: 0 0 16px rgba(0, 255, 136, 0.15); }
.badge-pink { background: rgba(255, 45, 123, 0.12); color: #ff2d7b; border: 1px solid rgba(255, 45, 123, 0.3); box-shadow: 0 0 16px rgba(255, 45, 123, 0.15); }

.nav-arrow {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.nav-item:hover .nav-arrow {
  color: var(--neon-green);
  transform: translate(3px, -3px);
}

.nav-grid .nav-item h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  letter-spacing: -0.3px;
  transition: color var(--transition-fast);
}

.nav-item:hover h3 {
  color: var(--neon-green);
}

.nav-grid .nav-item p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.nav-item-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ---------- Social Grid (Pill Badges with SVG Icons) ---------- */
.social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: rgba(14, 18, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-pill svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.social-pill:hover {
  transform: translateY(-3px);
  color: #ffffff;
  border-color: var(--brand-color, var(--neon-green));
  box-shadow: 0 8px 24px -4px var(--brand-glow, rgba(0, 255, 136, 0.35));
}

.social-pill:hover svg {
  transform: scale(1.18);
  fill: var(--brand-color, var(--neon-green));
}

/* ---------- Terminal Console ---------- */
.terminal-wrapper {
  background: rgba(4, 5, 16, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 255, 136, 0.08);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px var(--space-lg);
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border-glass);
}

.terminal-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  transition: opacity var(--transition-fast);
}

.terminal-dot.red { background: #ff5f57; box-shadow: 0 0 6px rgba(255, 95, 87, 0.4); }
.terminal-dot.yellow { background: #ffbd2e; box-shadow: 0 0 6px rgba(255, 189, 46, 0.4); }
.terminal-dot.green { background: #28c840; box-shadow: 0 0 6px rgba(40, 200, 64, 0.4); }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: var(--space-sm);
  letter-spacing: 0.5px;
}

.terminal-body {
  padding: var(--space-xl);
  max-height: 320px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.8;
}

.terminal-body p { color: var(--neon-green); margin-bottom: 3px; }
.terminal-body .error { color: var(--neon-pink); }
.terminal-body .success { color: var(--neon-cyan); }
.terminal-body .system { color: var(--text-muted); }

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-xl) var(--space-xl);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.terminal-input-line label {
  color: var(--neon-green);
  white-space: nowrap;
  font-weight: 700;
  text-shadow: 0 0 8px var(--neon-green);
}

.terminal-input-line input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  caret-color: var(--neon-green);
}

/* ---------- Skills Matrix Upgrade ---------- */
.skill-category-filters {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--space-md);
}

.skill-item {
  display: flex;
  flex-direction: column;
  padding: 1.1rem;
  background: rgba(14, 18, 42, 0.55);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
  position: relative;
}

.skill-item:hover {
  border-color: rgba(0, 255, 136, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 255, 136, 0.12);
}

.skill-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.85rem;
}

.skill-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-green);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.skill-item:hover .skill-icon-wrap {
  transform: scale(1.1);
  background: rgba(0, 255, 136, 0.15);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.25);
}

.skill-icon-wrap svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.skill-title-block {
  flex: 1;
  min-width: 0;
}

.skill-title {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-category-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.skill-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.badge-expert { background: rgba(0, 255, 136, 0.15); color: var(--neon-green); border: 1px solid rgba(0, 255, 136, 0.35); }
.badge-advanced { background: rgba(0, 229, 255, 0.15); color: var(--neon-cyan); border: 1px solid rgba(0, 229, 255, 0.35); }
.badge-intermediate { background: rgba(180, 74, 255, 0.15); color: var(--neon-purple); border: 1px solid rgba(180, 74, 255, 0.35); }
.badge-basic { background: rgba(255, 145, 0, 0.15); color: var(--neon-orange); border: 1px solid rgba(255, 145, 0, 0.35); }

.skill-bar-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.skill-bar-fill {
  height: 100%;
  background: var(--gradient-btn);
  border-radius: 99px;
  width: 0%;
  transition: width 1.2s var(--ease-out);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* ---------- Languages ---------- */
.language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.language-card {
  padding: var(--space-xl);
}

.language-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.language-flag { font-size: 1.8rem; }

.language-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 2px;
}

.language-level-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 1px;
  font-weight: 600;
}

.level-excellent { background: rgba(0,255,136,0.15); color: var(--neon-green); border: 1px solid rgba(0,255,136,0.3); }
.level-good { background: rgba(0,229,255,0.15); color: var(--neon-cyan); border: 1px solid rgba(0,229,255,0.3); }
.level-basic { background: rgba(255,145,0,0.15); color: var(--neon-orange); border: 1px solid rgba(255,145,0,0.3); }

.lang-skill-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  font-size: 0.8rem;
}

.lang-skill-type {
  width: 80px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.lang-dots {
  display: flex;
  gap: 6px;
}

.lang-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all var(--transition-fast);
}

.lang-dot.filled {
  background: var(--neon-green);
  border-color: var(--neon-green);
  box-shadow: 0 0 6px rgba(0,255,136,0.4);
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--border-glass);
  margin-top: var(--space-3xl);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-xl);
  align-items: center;
  margin-bottom: var(--space-xl);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-lg);
  }
}

.footer-left p { font-size: 0.85rem; color: var(--text-secondary); }
.footer-tagline { color: var(--text-muted) !important; font-size: 0.8rem !important; margin-top: var(--space-xs); }

/* ---------- RHA Interactive Kinetic Logo ---------- */
.footer-logo {
  display: flex;
  gap: 10px;
  perspective: 800px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.footer-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(15, 17, 42, 0.75);
  border: 1px solid rgba(0, 255, 136, 0.2);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.35rem;
  color: #e2e8f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 12px rgba(0, 255, 136, 0.08);
  transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  user-select: none;
  overflow: hidden;
}

.footer-initial::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 255, 136, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Staggered wave animation when container is hovered */
.footer-logo:hover .footer-initial:nth-child(1) {
  transform: translateY(-8px) rotate(-6deg) scale(1.08);
  color: var(--neon-cyan);
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.8);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.3);
}

.footer-logo:hover .footer-initial:nth-child(2) {
  transform: translateY(-12px) scale(1.12);
  color: var(--neon-green);
  text-shadow: 0 0 16px rgba(0, 255, 136, 0.8);
  border-color: rgba(0, 255, 136, 0.5);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 136, 0.3);
  transition-delay: 0.05s;
}

.footer-logo:hover .footer-initial:nth-child(3) {
  transform: translateY(-8px) rotate(6deg) scale(1.08);
  color: var(--neon-purple);
  text-shadow: 0 0 16px rgba(180, 74, 255, 0.8);
  border-color: rgba(180, 74, 255, 0.5);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(180, 74, 255, 0.3);
  transition-delay: 0.1s;
}

/* Direct hover on individual letter creates dramatic pop effect */
.footer-initial:hover {
  transform: translateY(-14px) scale(1.22) rotate(0deg) !important;
  background: rgba(22, 28, 68, 0.95) !important;
  border-color: #fff !important;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7), 0 0 30px currentColor !important;
  z-index: 10;
}

.footer-initial:hover::before {
  opacity: 1;
}

.footer-right { 
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

@media (max-width: 768px) { 
  .footer-right { 
    align-items: center; 
  } 
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.footer-link:hover {
  color: var(--neon-cyan);
  transform: translateX(-4px);
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
  background: rgba(0, 229, 255, 0.06);
}

.footer-link svg {
  transition: transform var(--transition-fast);
}

.footer-link:hover svg {
  transform: scale(1.15);
}

.footer-telegram-link:hover {
  color: #229ed9;
  text-shadow: 0 0 12px rgba(34, 158, 217, 0.6);
  background: rgba(34, 158, 217, 0.08);
}

@media (max-width: 768px) {
  .footer-link:hover {
    transform: translateY(-2px);
  }
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Page Header (Sub-pages) ---------- */
.page-hero {
  padding: calc(var(--nav-height) + var(--space-3xl)) 0 var(--space-2xl);
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
}

.page-hero .subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: var(--space-lg);
}

.page-hero .back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-green);
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.page-hero .back-link:hover {
  background: rgba(0,255,136,0.06);
  border-color: var(--neon-green);
}

/* ---------- Projects ---------- */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  justify-content: center;
}

.filter-btn {
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  color: var(--neon-green);
  border-color: var(--neon-green);
  background: rgba(0,255,136,0.06);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--space-xl);
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.project-card .project-icon,
.award-card .award-icon,
.hobby-card .hobby-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-green);
  margin-bottom: var(--space-md);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.12);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.project-card:hover .project-icon,
.award-card:hover .award-icon,
.hobby-card:hover .hobby-icon {
  transform: scale(1.1) rotate(3deg);
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.3);
}

.project-card .project-icon svg,
.award-card .award-icon svg,
.hobby-card .hobby-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.project-card .project-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.project-card .tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.tech-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(0,229,255,0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(0,229,255,0.15);
}

.project-card .project-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.feature-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(180,74,255,0.08);
  color: var(--neon-purple);
  border: 1px solid rgba(180,74,255,0.15);
}

.project-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-completed { background: rgba(0,255,136,0.1); color: var(--neon-green); border: 1px solid rgba(0,255,136,0.2); }
.status-active { background: rgba(0,229,255,0.1); color: var(--neon-cyan); border: 1px solid rgba(0,229,255,0.2); }

/* ---------- Timeline (Academic/Professional) ---------- */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--neon-green), var(--neon-purple), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-xl);
  padding-left: var(--space-xl);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-xl) - 5px);
  top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
}

.timeline-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.timeline-item .org {
  color: var(--neon-cyan);
  font-weight: 500;
  font-size: 0.9rem;
}

.timeline-item .period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: var(--space-xs) 0 var(--space-sm);
}

.timeline-item ul {
  margin-top: var(--space-sm);
}

.timeline-item li {
  position: relative;
  padding-left: var(--space-lg);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.timeline-item li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--neon-green);
}

/* ---------- Education Courses Toggle ---------- */
.courses-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: rgba(0,255,136,0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--neon-green);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: var(--space-md);
}

.courses-toggle:hover {
  background: rgba(0,255,136,0.1);
  border-color: var(--neon-green);
}

.courses-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out);
}

.courses-content.open { max-height: 2000px; }

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
}

.course-category h4 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-cyan);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-glass);
}

.course-category li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: var(--space-md);
  position: relative;
}

.course-category li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--neon-green);
}

.course-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ---------- Hobbies / Collections ---------- */
.hobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.hobby-card {
  padding: var(--space-xl);
}

.hobby-card .hobby-icon {
  margin-bottom: var(--space-md);
}

.hobby-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.hobby-card li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 4px 0 4px var(--space-lg);
  position: relative;
}

.hobby-card li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--neon-green);
}

/* ---------- Gamer ---------- */
.gamer-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.gamer-card {
  padding: var(--space-xl);
}

.gamer-card h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--neon-cyan);
  margin-bottom: var(--space-md);
  letter-spacing: 1px;
}

.gamer-tag {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.genre-tag {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(180,74,255,0.1);
  color: var(--neon-purple);
  border: 1px solid rgba(180,74,255,0.2);
}

.achievement-list li {
  padding: var(--space-sm) 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding-left: var(--space-lg);
  position: relative;
}

.achievement-list li::before {
  content: '🏆';
  position: absolute;
  left: 0;
}

.game-list li {
  padding: var(--space-sm) 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: var(--space-lg);
  position: relative;
}

.game-list li::before {
  content: '🎮';
  position: absolute;
  left: 0;
}

/* ---------- Rubik's Cube ---------- */
.cube-station {
  padding: var(--space-xl);
  text-align: center;
}

.scramble-display {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: var(--neon-orange);
  padding: var(--space-lg);
  background: rgba(0,0,0,0.4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  letter-spacing: 1px;
  word-spacing: 6px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-display {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  color: var(--text-primary);
  padding: var(--space-xl) 0;
  transition: color var(--transition-fast);
}

.timer-display.inspecting { color: var(--neon-orange); }
.timer-display.running { color: var(--neon-green); }

.timer-stats {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.cube-btn {
  padding: var(--space-sm) var(--space-xl);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.cube-btn:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: var(--shadow-btn);
}

.cube-btn-group {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.cube-instruction {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cube-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.record-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.record-item .event { color: var(--text-secondary); }
.record-item .time { color: var(--neon-green); font-weight: 700; }

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.12s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.24s; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.28s; }
.stagger.visible > *:nth-child(8) { transition-delay: 0.32s; }
.stagger.visible > *:nth-child(9) { transition-delay: 0.36s; }
.stagger.visible > *:nth-child(10) { transition-delay: 0.4s; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Utility ---------- */
.text-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mono { font-family: var(--font-mono); }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.hidden { display: none !important; }

/* ---------- Awards ---------- */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.award-card {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
}

.award-icon { flex-shrink: 0; }
.award-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.award-issuer { color: var(--neon-cyan); font-size: 0.85rem; }
.award-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); margin-bottom: var(--space-sm); }
.award-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* ---------- Certification ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.cert-card {
  padding: var(--space-xl);
}

.cert-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.cert-issuer { color: var(--neon-cyan); font-size: 0.85rem; }
.cert-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

/* ---------- Education ---------- */
.edu-card {
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.edu-header {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.edu-logo {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: rgba(0,255,136,0.1);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--neon-green);
  flex-shrink: 0;
}

.edu-info h3 { font-size: 1.05rem; font-weight: 700; }
.edu-info h3 a { color: var(--text-primary); }
.edu-info h3 a:hover { color: var(--neon-green); }
.edu-school { color: var(--neon-cyan); font-size: 0.9rem; }
.edu-school a { color: var(--neon-cyan); }
.edu-school a:hover { color: var(--neon-green); }
.edu-period { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

.edu-majors {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.major-badge, .minor-badge {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.major-badge { background: rgba(0,255,136,0.1); color: var(--neon-green); border: 1px solid rgba(0,255,136,0.2); }
.minor-badge { background: rgba(0,229,255,0.1); color: var(--neon-cyan); border: 1px solid rgba(0,229,255,0.2); }

@media (max-width: 500px) {
  .edu-header { flex-direction: column; }
}

/* ---------- Color Palette (Rubik) ---------- */
.color-palette {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.color-swatch {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,0.1);
  transition: transform var(--transition-fast);
}

.color-swatch:hover { transform: scale(1.2); }

/* ---------- WCA Profile Link ---------- */
.wca-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.wca-link:hover {
  border-color: var(--neon-green);
  transform: translateY(-2px);
  color: var(--neon-green);
}

.wca-link svg { width: 24px; height: 24px; }

/* ---------- Game Collection & Library ---------- */
.game-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 250px;
  max-width: 440px;
}

#game-search {
  width: 100%;
  padding: 12px 38px 12px 20px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 255, 136, 0.2);
  background: rgba(15, 15, 40, 0.7);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#game-search:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.25);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-fast);
}

.search-clear-btn:hover {
  color: var(--neon-pink);
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sort-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

#game-sort {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 255, 136, 0.2);
  background: rgba(15, 15, 40, 0.7);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#game-sort:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.2);
}

.collection-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.22);
  color: var(--neon-green);
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--space-lg);
  padding-top: var(--space-xs);
  min-height: 300px;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 136, 0.15);
  border-color: rgba(0, 255, 136, 0.35);
}

.game-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 460 / 215;
  background: #080918;
  overflow: hidden;
  border-bottom: 1px solid var(--border-glass);
}

.game-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  background-color: #0c0e24;
}

.game-card:hover .game-cover {
  transform: scale(1.06);
}

.game-info {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-sm);
}

.game-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.game-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  margin-top: auto;
}

.game-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.game-platform svg {
  flex-shrink: 0;
}

/* Platform-specific badge colors */
.platform-steam {
  background: rgba(0, 173, 238, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.platform-epic {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border: 1px solid rgba(241, 245, 249, 0.3);
}

.platform-ubisoft {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.platform-minecraft {
  background: rgba(0, 255, 136, 0.12);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 136, 0.35);
}

.platform-default {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

@media (max-width: 600px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
  }
  
  .game-title {
    font-size: 0.8rem;
  }
  
  .game-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-wrapper {
    max-width: 100%;
  }
  
  .sort-wrapper {
    justify-content: space-between;
  }
}

/* ---------- Modern Subpage Icon Enhancements & Gallery ---------- */
.cube-badge-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cube-card:hover .cube-badge-wrap {
  transform: scale(1.12) rotate(4deg);
  box-shadow: 0 0 25px currentColor;
}

.cube-badge-wrap svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
}

.record-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  margin-right: 8px;
  flex-shrink: 0;
  vertical-align: middle;
}

.record-icon-badge svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.timeline-tag {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.timeline-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 10px currentColor;
}

/* ---------- Custom Sleek Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 11, 26, 0.95);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 136, 0.25);
  border-radius: 4px;
  border: 2px solid rgba(10, 11, 26, 0.95);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 136, 0.5);
}

/* ---------- Universal Cyber Neon Pagination ---------- */
.pagination-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin: 2.5rem auto 1rem;
  font-family: var(--font-mono);
  width: 100%;
}

.pagination-info {
  font-size: 0.76rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-align: center;
}

.pagination-info strong {
  color: var(--neon-cyan);
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.page-btn:hover:not(:disabled) {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
  transform: translateY(-2px);
}

.page-btn.active {
  background: rgba(0, 255, 136, 0.22);
  border-color: var(--neon-green);
  color: var(--neon-green);
  font-weight: 700;
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.35);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
}

.page-ellipsis {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0 4px;
}

/* ============================================================
   MOBILE FLOATING GLASS DOCK NAVIGATION
   - Strictly isolated to screens <= 768px
   - Web view / Desktop (> 768px) is 100% strictly protected
   ============================================================ */

/* 1. Desktop Protection: Strictly hide mobile floating dock on web view */
@media (min-width: 769px) {
  .mobile-floating-dock {
    display: none !important;
  }
}

/* 2. Mobile Floating Glass Dock (max-width: 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: 85px !important;
  }

  .mobile-floating-dock {
    position: fixed;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 24px);
    max-width: 420px;
    height: 56px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }

  .dock-inner {
    width: 100%;
    height: 100%;
    background: rgba(6, 10, 24, 0.78);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(0, 255, 136, 0.25);
    border-radius: 9999px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), 0 0 25px rgba(0, 255, 136, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    pointer-events: auto;
    position: relative;
  }

  .dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 44px;
    padding: 2px 4px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    border: none;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    position: relative;
  }

  .dock-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease, color 0.2s ease;
  }

  .dock-icon svg {
    width: 19px;
    height: 19px;
    stroke-width: 2;
  }

  .dock-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    color: inherit;
    transition: color 0.2s ease;
  }

  .dock-item:active {
    transform: scale(0.9);
  }

  .dock-item:hover {
    color: var(--neon-cyan);
  }

  .dock-item.active {
    color: var(--neon-green);
    background: rgba(0, 255, 136, 0.14);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.25);
  }

  .dock-item.active .dock-icon {
    transform: translateY(-1px);
    color: var(--neon-green);
  }

  .dock-item.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--neon-green);
  }

  /* Dock Flyout Tray (More menu) */
  .dock-flyout-tray {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(12px) scale(0.95);
    width: 290px;
    background: rgba(8, 12, 28, 0.92);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 255, 136, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.12);
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
  }

  .dock-flyout-tray.open {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .flyout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--neon-green);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .flyout-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
  }

  .flyout-close-btn:hover {
    color: var(--neon-pink);
  }

  .flyout-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .flyout-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .flyout-item:hover,
  .flyout-item:active {
    background: rgba(0, 255, 136, 0.12);
    border-color: rgba(0, 255, 136, 0.3);
    color: var(--neon-green);
    transform: translateX(3px);
  }

  .flyout-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
  }

  .flyout-item-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .flyout-item-info strong {
    font-size: 0.85rem;
    color: var(--text-primary);
  }

  .flyout-item-info small {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
  }

  /* ---------- General Mobile Viewport Optimizations ---------- */
  /* Prevent horizontal overflow blowout */
  html, body {
    overflow-x: hidden !important;
    position: relative;
    width: 100%;
  }

  /* Safe interactive touch sizing */
  button, input, select, a {
    touch-action: manipulation;
  }

  /* Section padding on mobile */
  .section {
    padding: 2.25rem 0 !important;
  }

  .page-hero {
    padding: calc(var(--nav-height) + 0.75rem) 0 1.25rem !important;
  }

  /* Canvas responsive scaling */
  canvas {
    max-width: 100% !important;
  }

  /* Grids */
  .games-grid,
  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)) !important;
    gap: 12px !important;
  }

  .game-card .game-info {
    padding: 0.75rem !important;
  }

  .game-card .game-title {
    font-size: 0.82rem !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.1rem !important;
  }

  .page-hero h1 {
    font-size: 1.85rem !important;
  }

  .games-grid,
  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 10px !important;
  }

  .filter-pills-row,
  .project-filters {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    padding-bottom: 6px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
  }

  .filter-pills-row::-webkit-scrollbar,
  .project-filters::-webkit-scrollbar {
    display: none !important;
  }

  .filter-btn,
  .inventory-filter-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 5px 10px !important;
    font-size: 0.72rem !important;
  }

  .mobile-floating-dock {
    width: calc(100vw - 16px);
    height: 54px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .dock-label {
    font-size: 0.6rem;
  }

  .dock-icon svg {
    width: 17px;
    height: 17px;
  }
}



