/* ═══════════════════════════════════════════════════════════════════════════
   main.css — Ashim Poudel Portfolio
   "Universe" theme: deep-space background, aurora gradients, floating glass
   panels drifting through a live Three.js galaxy.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg-deep:     #030014;
  --bg-panel:    rgba(20, 16, 48, 0.42);
  --bg-panel-2:  rgba(28, 22, 64, 0.55);

  --violet:      #7C3AED;
  --violet-lt:   #A78BFA;
  --cyan:        #22D3EE;
  --blue:        #60A5FA;
  --magenta:     #F472B6;
  --green:       #34D399;
  --amber:       #FBBF24;

  --text:        #EDEBFF;
  --text-dim:    #B9B4E0;
  --text-muted:  #8B87B8;

  --glass-border: rgba(167, 139, 250, 0.22);
  --glass-border-bright: rgba(167, 139, 250, 0.45);

  --grad-aurora: linear-gradient(100deg, #A78BFA 0%, #22D3EE 50%, #F472B6 100%);
  --grad-btn:    linear-gradient(135deg, #7C3AED 0%, #4F46E5 55%, #0891B2 100%);

  --font-head: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 10px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-deep);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(124, 58, 237, 0.45); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; }

/* Everything floats above the fixed universe canvas */
section, header#navbar, footer { position: relative; z-index: 1; }

.container {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

section { padding: 7rem 0; }
#hero    { padding: 0; }

/* ── Text gradient ─────────────────────────────────────────────────────────── */
.text-gradient {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Depth parallax (driven by animations.js via the --py custom property) ── */
[data-parallax] {
  --py: 0px;
  transform: translateY(var(--py));
  will-change: transform;
}

/* ── Glass card (shared) ───────────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-panel);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow:
    0 8px 40px rgba(3, 0, 30, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ═══ BUTTONS ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.8rem 1.9rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.45), 0 2px 8px rgba(8, 145, 178, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(124, 58, 237, 0.6), 0 4px 14px rgba(8, 145, 178, 0.4);
}

.btn-ghost {
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid var(--glass-border-bright);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: rgba(167, 139, 250, 0.16);
  border-color: var(--violet-lt);
  transform: translateY(-2px);
}

/* ═══ NAVBAR ════════════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(6, 2, 26, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: rgba(167, 139, 250, 0.14);
  box-shadow: 0 8px 32px rgba(3, 0, 30, 0.5);
}

.nav-inner {
  width: min(1240px, 94vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 0;
}

.nav-links { display: flex; gap: 0.4rem; }
.nav-link {
  position: relative;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: rgba(167, 139, 250, 0.10); }
.nav-link.active {
  color: #fff;
  background: rgba(124, 58, 237, 0.28);
}

.nav-cta { display: flex; align-items: center; gap: 0.9rem; }
.btn-hire { padding: 0.6rem 1.4rem; font-size: 0.88rem; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  border: 1px solid var(--glass-border-bright);
  border-radius: 12px;
  background: rgba(167, 139, 250, 0.08);
  cursor: pointer;
  align-items: center;
}
.nav-hamburger span {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  background: rgba(4, 1, 20, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-mobile-overlay.open { opacity: 1; pointer-events: auto; }
.nav-mobile-overlay .nav-link { font-size: 1.35rem; font-family: var(--font-head); }

/* ═══ HERO ══════════════════════════════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.hero-content {
  width: min(1180px, 92vw);
  margin: 0 auto;
  padding-top: 4rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border-bright);
  background: rgba(20, 16, 48, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 1.6rem;
}

.hero-h1 {
  font-size: clamp(3rem, 9vw, 6.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
  text-shadow: 0 0 80px rgba(124, 58, 237, 0.5);
}

.hero-h2 {
  font-size: clamp(1.25rem, 3.4vw, 2rem);
  font-weight: 500;
  color: var(--text-dim);
  min-height: 1.4em;
  margin-bottom: 1.4rem;
}
#typed-text { color: var(--cyan); }
#typed-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--cyan);
  animation: cursor-blink 1s steps(2) infinite;
}
@keyframes cursor-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.hero-body {
  max-width: 560px;
  font-size: 1.06rem;
  color: var(--text-dim);
  margin-bottom: 2.2rem;
}

.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.4rem; }

.hero-badges { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.badge-blue   { background: rgba(96, 165, 250, 0.14);  border: 1px solid rgba(96, 165, 250, 0.4);  color: #A8CDFF; }
.badge-cyan   { background: rgba(34, 211, 238, 0.12);  border: 1px solid rgba(34, 211, 238, 0.4);  color: #A0EEFC; }
.badge-purple { background: rgba(167, 139, 250, 0.14); border: 1px solid rgba(167, 139, 250, 0.45); color: #CFC2FF; }
.badge-green  { background: rgba(52, 211, 153, 0.13);  border: 1px solid rgba(52, 211, 153, 0.4);  color: #A3F0D3; }

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.65;
}
.scroll-mouse {
  width: 24px; height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 14px;
  position: relative;
}
.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--cyan);
  animation: scroll-wheel 1.8s ease-in-out infinite;
}
@keyframes scroll-wheel {
  0%   { transform: translateY(0);   opacity: 1; }
  70%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0);   opacity: 0; }
}
.scroll-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

/* ═══ SECTION HEADERS ═══════════════════════════════════════════════════════ */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}
.section-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}
.section-header p { color: var(--text-muted); font-size: 1rem; }

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.9rem;
}

/* ═══ ABOUT ═════════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-profile-card {
  position: sticky;
  top: 110px;
  padding: 2.6rem 2rem;
  text-align: center;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s;
}
.about-profile-card:hover {
  transform: translateY(-6px) rotateX(2deg);
  box-shadow: 0 24px 70px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.about-avatar {
  width: 110px; height: 110px;
  margin: 0 auto 1.4rem;
  border-radius: 32px;
  display: grid; place-items: center;
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-btn);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.55);
}
.about-name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.about-role {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.about-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.10);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #A3F0D3;
  font-size: 0.82rem;
  font-weight: 600;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: status-pulse 2s infinite;
}
@keyframes status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.about-text h2 {
  font-size: clamp(1.9rem, 4.4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.6rem;
}
.about-text p {
  color: var(--text-dim);
  margin-bottom: 1.2rem;
  font-size: 1.02rem;
}
.about-text strong { color: var(--text); font-weight: 600; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.4rem;
}
.stat-card {
  padding: 1.4rem 1rem;
  text-align: center;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s;
}
.stat-card:hover { transform: translateY(-5px); border-color: var(--glass-border-bright); }
.stat-number {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ═══ SKILLS SPHERE ═════════════════════════════════════════════════════════ */
#skills-sphere-container {
  position: relative;
  height: 480px;
  margin-bottom: 2.5rem;
}

.skill-card-3d {
  padding: 0.55rem 1rem 0.65rem;
  border-radius: 14px;
  background: rgba(20, 16, 48, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  min-width: 130px;
  text-align: center;
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.25s, box-shadow 0.25s;
  cursor: default;
  user-select: none;
}
.skill-card-3d:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}
.skill-card-3d .skill-name {
  display: block;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  margin-bottom: 6px;
}
.skill-bar-bg {
  height: 4px;
  border-radius: 2px;
  background: rgba(167, 139, 250, 0.18);
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--grad-aurora);
}

/* Filter tabs (skills + projects) */
.skills-filter-tabs {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(20, 16, 48, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-dim);
  font-family: var(--font-head);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
}
.filter-tab:hover { border-color: var(--glass-border-bright); color: var(--text); }
.filter-tab.active {
  background: var(--grad-btn);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.45);
}

/* ═══ TIMELINE ══════════════════════════════════════════════════════════════ */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(to bottom,
    transparent,
    rgba(167, 139, 250, 0.5) 8%,
    rgba(34, 211, 238, 0.5) 92%,
    transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  margin-bottom: 2.6rem;
}
.timeline-item:nth-child(even) .timeline-content { grid-column: 3; }
.timeline-item:nth-child(even) .timeline-empty   { grid-column: 1; grid-row: 1; }
.timeline-item:nth-child(odd)  .timeline-content { grid-column: 1; grid-row: 1; }
.timeline-item:nth-child(odd)  .timeline-empty   { grid-column: 3; }
.timeline-spacer { grid-column: 2; grid-row: 1; position: relative; }

.timeline-dot {
  position: absolute;
  left: 50%; top: 26px;
  width: 14px; height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 3px solid var(--violet-lt);
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.8);
}

.timeline-content {
  background: var(--bg-panel);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 40px rgba(3, 0, 30, 0.5);
  padding: 1.6rem 1.8rem;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
}
.timeline-content:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-bright);
  box-shadow: 0 16px 50px rgba(124, 58, 237, 0.28);
}

.timeline-type-badge { margin-bottom: 0.7rem; }
.timeline-role {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.timeline-company { font-size: 0.9rem; color: var(--text-dim); }
.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  margin: 0.35rem 0 0.8rem;
  letter-spacing: 0.04em;
}
.timeline-desc { font-size: 0.92rem; color: var(--text-dim); margin-bottom: 0.8rem; }
.timeline-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.timeline-highlights li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.timeline-highlights li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--cyan);
}

/* ═══ PROJECTS — scroll "car showcase" ══════════════════════════════════════
   One project at a time takes center focus as it scrolls through view
   (see initProjectShowcase in animations.js), then dims/shrinks as the
   next one arrives — like flipping through showroom cards. ═══════════════ */
.projects-showcase {
  display: flex;
  flex-direction: column;
  gap: 7rem;
  max-width: 760px;
  margin: 0 auto;
  padding: 2vh 0;
}

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s, box-shadow 0.3s;
  will-change: transform;
}
.project-card:hover {
  border-color: var(--glass-border-bright);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.32);
}
.project-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.project-open-hint {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s, transform 0.25s;
}
.project-card:hover .project-open-hint { opacity: 1; transform: translateX(0); }

.project-thumb {
  height: 240px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 40%, rgba(124, 58, 237, 0.35), transparent 60%),
    radial-gradient(circle at 75% 70%, rgba(34, 211, 238, 0.25), transparent 55%),
    rgba(10, 6, 32, 0.6);
  flex-shrink: 0;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-thumb span { font-size: 4rem !important; }

.project-info { padding: 1.8rem 2rem 2.1rem; }
.project-category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  color: var(--cyan);
  margin-bottom: 0.6rem;
}
.project-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
}
.project-desc-short {
  font-size: 0.98rem;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.project-tags { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.tech-tag {
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.28);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--violet-lt);
  white-space: nowrap;
}

.status-live { color: var(--green); }
.status-wip  { color: var(--amber); }
.status-archived { color: var(--text-muted); }

/* ── Project detail sheet (opens on card click) ────────────────────────────── */
.proj-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 0, 20, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.proj-overlay.open { opacity: 1; pointer-events: auto; }

.proj-sheet {
  position: relative;
  width: min(640px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 0;
  transform: translateY(46px) scale(0.94) rotateX(4deg);
  transition: transform 0.45s cubic-bezier(0.2, 1.1, 0.3, 1);
}
.proj-overlay.open .proj-sheet { transform: none; }

.proj-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  width: 38px; height: 38px;
  border: 1px solid var(--glass-border-bright);
  border-radius: 50%;
  background: rgba(10, 6, 32, 0.7);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.proj-close:hover { background: rgba(244, 114, 182, 0.25); transform: rotate(90deg); }

.proj-sheet-banner {
  height: 190px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 40%, rgba(124, 58, 237, 0.4), transparent 60%),
    radial-gradient(circle at 75% 70%, rgba(34, 211, 238, 0.3), transparent 55%),
    rgba(10, 6, 32, 0.6);
  overflow: hidden;
}
.proj-sheet-banner img { width: 100%; height: 100%; object-fit: cover; }
.proj-banner-emoji { font-size: 4rem; }

.proj-sheet-body { padding: 1.8rem 2rem 2.2rem; }
.proj-sheet-chips { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.proj-sheet-title {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.proj-sheet-desc {
  font-size: 0.98rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 1.3rem;
}
.proj-sheet-links { display: flex; gap: 0.9rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(100deg,
    rgba(167, 139, 250, 0.06) 30%,
    rgba(167, 139, 250, 0.14) 50%,
    rgba(167, 139, 250, 0.06) 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s infinite;
  border: 1px solid var(--glass-border);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 130% 0; }
  100% { background-position: -30% 0; }
}

/* ═══ CONTACT ═══════════════════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: start;
}

.contact-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.contact-info-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.3rem;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s;
}
.contact-info-item:hover { transform: translateX(6px); border-color: var(--glass-border-bright); }
.contact-icon {
  width: 46px; height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.3);
}
.contact-info-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.contact-info-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  word-break: break-word;
}
a.contact-info-value:hover { color: var(--cyan); }

/* Form */
.contact-form { padding: 2rem; }
.form-honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.form-group { margin-bottom: 1.15rem; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1.05rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--glass-border);
  background: rgba(10, 6, 32, 0.5);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--violet-lt);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18);
}
.form-input.error, .form-textarea.error { border-color: #F87171; }
.form-textarea { min-height: 130px; resize: vertical; }
.form-error {
  min-height: 1rem;
  font-size: 0.74rem;
  color: #F87171;
  margin-top: 0.3rem;
}
.form-submit { width: 100%; margin-top: 0.4rem; }

.contact-form.shake { animation: form-shake 0.4s ease; }
@keyframes form-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(7px); }
  75% { transform: translateX(-4px); }
}

.form-success {
  display: none;
  padding: 3rem 2rem;
  text-align: center;
}
.form-success.show { display: block; animation: success-pop 0.55s cubic-bezier(0.2, 1.2, 0.3, 1); }
@keyframes success-pop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.form-success-icon { font-size: 3rem; margin-bottom: 1rem; }
.form-success h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.form-success p  { color: var(--text-muted); }

/* ═══ FOOTER ════════════════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid rgba(167, 139, 250, 0.14);
  background: rgba(6, 2, 26, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 3.2rem 0 2.4rem;
  text-align: center;
}
.footer-inner { width: min(1180px, 92vw); margin: 0 auto; }
.footer-logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.footer-tagline { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.4rem; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  margin-bottom: 1.6rem;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--cyan); }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.7rem; }
.footer-konami {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: #454168;
}

/* ═══ ARCADE ════════════════════════════════════════════════════════════════ */
.arcade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.6rem;
}

.arcade-card {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
}
.arcade-card:hover {
  transform: translateY(-5px);
  border-color: var(--glass-border-bright);
  box-shadow: 0 18px 55px rgba(124, 58, 237, 0.3);
}

.arcade-card-head { display: flex; align-items: center; gap: 0.9rem; }
.arcade-icon {
  width: 52px; height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  border-radius: 16px;
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.arcade-title { font-size: 1.12rem; font-weight: 700; }
.arcade-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.game-hint {
  font-size: 0.9rem;
  color: var(--text-dim);
  min-height: 1.4em;
}
.game-hint.win  { color: var(--green);  font-weight: 600; }
.game-hint.lose { color: var(--magenta); font-weight: 600; }

.game-row { display: flex; gap: 0.6rem; }
.game-input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.95rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--glass-border);
  background: rgba(10, 6, 32, 0.5);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
}
.game-input:focus {
  outline: none;
  border-color: var(--violet-lt);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
.exp-amount { max-width: 92px; }
.game-btn { padding: 0.65rem 1.3rem; font-size: 0.88rem; }

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: auto;
}
.game-reset {
  border: none;
  background: none;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  transition: background 0.2s;
}
.game-reset:hover { background: rgba(34, 211, 238, 0.12); }

/* Tic-tac-toe */
.ttt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 240px;
  margin: 0 auto;
}
.ttt-cell {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(10, 6, 32, 0.5);
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.ttt-cell:not(.filled):not([disabled]):hover {
  background: rgba(124, 58, 237, 0.22);
  border-color: var(--violet-lt);
}
.ttt-cell:active { transform: scale(0.94); }
.ttt-cell.x { color: var(--cyan);    text-shadow: 0 0 14px rgba(34, 211, 238, 0.7); }
.ttt-cell.o { color: var(--magenta); text-shadow: 0 0 14px rgba(244, 114, 182, 0.7); }
.ttt-cell[disabled] { cursor: default; }

/* To-do / expense lists */
.todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
  padding-right: 2px;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--r-sm);
  background: rgba(10, 6, 32, 0.45);
  border: 1px solid rgba(167, 139, 250, 0.12);
  font-size: 0.88rem;
}
.todo-item.done .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}
.todo-check {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 7px;
  border: 1.5px solid var(--glass-border-bright);
  background: transparent;
  color: var(--green);
  font-size: 0.75rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.todo-item.done .todo-check {
  background: rgba(52, 211, 153, 0.18);
  border-color: var(--green);
}
.todo-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.todo-del {
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.todo-del:hover { color: #F87171; background: rgba(248, 113, 113, 0.12); }
.todo-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.8rem 0.4rem;
  text-align: center;
}
.exp-amt {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cyan);
  flex-shrink: 0;
}

/* ═══ ARCADE — GAME-SPECIFIC STYLES ═══════════════════════════════════════ */

/* Shared canvas games (Snake, Breakout) */
.game-canvas {
  display: block;
  margin: 0 auto 1rem;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(10, 6, 32, 0.6);
  touch-action: none;
}

/* D-pad (Snake) */
.dpad { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 1rem; }
.dpad-mid { display: flex; align-items: center; gap: 10px; }
.dpad button {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(167, 139, 250, 0.14);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.dpad button:hover { background: rgba(167, 139, 250, 0.26); }
.dpad button:active { transform: scale(0.9); }
.dpad-start {
  width: auto !important;
  padding: 0 16px;
  font-size: 0.8rem !important;
  font-weight: 700;
  background: var(--grad-btn) !important;
  color: #fff !important;
}

/* Memory Match */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 300px;
  margin: 0 auto 1rem;
}
.mem-card {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(124, 58, 237, 0.16);
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.mem-card:hover:not(.flip):not(.matched) { background: rgba(124, 58, 237, 0.3); transform: translateY(-2px); }
.mem-card.flip { background: rgba(34, 211, 238, 0.16); border-color: var(--cyan); }
.mem-card.matched { background: rgba(52, 211, 153, 0.18); border-color: var(--green); cursor: default; opacity: 0.85; }

/* Whack-a-Mole */
.mole-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 260px;
  margin: 0 auto 1rem;
}
.mole-hole {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  background: radial-gradient(circle at 50% 30%, rgba(20, 14, 44, 0.95), rgba(10, 6, 32, 0.7));
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 0;
}
.mole-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transform: translateY(120%);
  transition: transform 0.15s cubic-bezier(0.3, 1.5, 0.4, 1);
}
.mole-face::before { content: '🐹'; }
.mole-hole.up .mole-face { transform: translateY(0); }
.mole-hole.bonk { animation: mole-bonk 0.2s ease; }
@keyframes mole-bonk { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.85); } }

/* Rock · Paper · Scissors */
.rps-arena {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.rps-arena em { font-size: 0.82rem; color: var(--text-muted); font-style: normal; }
.rps-buttons { display: flex; justify-content: center; gap: 0.8rem; margin-bottom: 1rem; }
.rps-btn {
  width: 54px; height: 54px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(167, 139, 250, 0.14);
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.rps-btn:hover { background: rgba(167, 139, 250, 0.28); transform: translateY(-3px); }
.rps-btn:active { transform: scale(0.92); }

/* Simon Says */
.simon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-width: 200px;
  margin: 0 auto 1rem;
}
.simon-pad {
  aspect-ratio: 1;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.12s, box-shadow 0.15s;
}
.simon-pad.lit { opacity: 1; }
.simon-0 { border-radius: 16px 4px 4px 4px; background: #22D3EE; }
.simon-1 { border-radius: 4px 16px 4px 4px; background: #A78BFA; }
.simon-2 { border-radius: 4px 4px 4px 16px; background: #F472B6; }
.simon-3 { border-radius: 4px 4px 16px 4px; background: #34D399; }
.simon-0.lit { box-shadow: 0 0 26px #22D3EE; }
.simon-1.lit { box-shadow: 0 0 26px #A78BFA; }
.simon-2.lit { box-shadow: 0 0 26px #F472B6; }
.simon-3.lit { box-shadow: 0 0 26px #34D399; }

/* 2048 */
.g2048-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 280px;
  margin: 0 auto 1rem;
  padding: 8px;
  background: rgba(10, 6, 32, 0.5);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  outline: none;
  touch-action: none;
  cursor: pointer;
}
.g2048-board:focus { border-color: var(--cyan); }
.g2048-tile {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  background: rgba(167, 139, 250, 0.08);
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
}
.g2048-tile.v2    { background: rgba(167, 139, 250, .20); color: var(--text); }
.g2048-tile.v4    { background: rgba(167, 139, 250, .32); color: var(--text); }
.g2048-tile.v8    { background: rgba(96, 165, 250, .38);  color: #fff; }
.g2048-tile.v16   { background: rgba(34, 211, 238, .42);  color: #fff; }
.g2048-tile.v32   { background: rgba(52, 211, 153, .46);  color: #fff; }
.g2048-tile.v64   { background: rgba(251, 191, 36, .5);   color: #1a1030; }
.g2048-tile.v128  { background: rgba(244, 114, 182, .55); color: #fff; font-size: 1rem; }
.g2048-tile.v256  { background: rgba(124, 58, 237, .65);  color: #fff; font-size: 1rem; }
.g2048-tile.v512  { background: rgba(124, 58, 237, .8);   color: #fff; font-size: 1rem; }
.g2048-tile.v1024 { background: linear-gradient(135deg, #7C3AED, #22D3EE); color: #fff; font-size: 0.92rem; }
.g2048-tile.v2048 { background: linear-gradient(135deg, #FBBF24, #F472B6); color: #1a1030; font-size: 0.92rem; box-shadow: 0 0 20px rgba(251, 191, 36, .7); }

/* Reaction Timer — the colour states that make the "click when green" game work */
.react-box {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0 auto 1rem;
  padding: 2.2rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(167, 139, 250, 0.14);
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.react-box:active { transform: scale(0.97); }
.react-box.wait { background: rgba(244, 63, 94, 0.24); }
.react-box.go   { background: #22D3EE; color: #04121a; box-shadow: 0 0 44px rgba(34, 211, 238, 0.75); }

/* Word Scramble */
.scr-word {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 1rem;
  word-break: break-all;
}

/* Minesweeper */
.mines-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  max-width: 280px;
  margin: 0 auto 1rem;
}
.mine-cell {
  aspect-ratio: 1;
  border: 1px solid var(--glass-border);
  border-radius: 5px;
  background: rgba(167, 139, 250, 0.16);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
  padding: 0;
}
.mine-cell:hover:not(.open) { background: rgba(167, 139, 250, 0.3); }
.mine-cell.open { background: rgba(10, 6, 32, 0.55); cursor: default; }
.mine-cell.boom { background: rgba(248, 113, 113, 0.55); }
.exp-total strong { color: var(--text); }

/* ═══ CUSTOM CURSOR — shooting-star comet with stardust trail ══════════════ */
@media (pointer: fine) {
  body.custom-cursor, body.custom-cursor a, body.custom-cursor button,
  body.custom-cursor input, body.custom-cursor textarea, body.custom-cursor select,
  body.custom-cursor [role="tab"], body.custom-cursor [role="button"] {
    cursor: none;
  }
}

#cursor-star {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  transition: opacity 0.25s ease;
}
#cursor-star svg {
  position: absolute;
  top: -13px; left: -13px;
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.9))
          drop-shadow(0 0 20px rgba(34, 211, 238, 0.5));
  animation: star-spin 5s linear infinite;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes star-spin { to { transform: rotate(360deg); } }
body.cursor-hover #cursor-star svg {
  transform: scale(1.55);
  animation-duration: 1.2s;
}
body.cursor-down #cursor-star svg { transform: scale(0.7); }

.cursor-dust {
  position: fixed;
  z-index: 9998;
  width: 5px; height: 5px;
  border-radius: 50%;
  pointer-events: none;
  animation: dust-fade 0.65s ease-out forwards;
}
@keyframes dust-fade {
  from { opacity: 0.9; transform: scale(1); }
  to   { opacity: 0;   transform: scale(0.1) translateY(8px); }
}

/* ═══ AURORA SCROLLBAR ══════════════════════════════════════════════════════ */
html {
  scrollbar-color: #7C3AED #06021A; /* Firefox */
  scrollbar-width: thin;
}
body::-webkit-scrollbar, html::-webkit-scrollbar { width: 13px; }
body::-webkit-scrollbar-track, html::-webkit-scrollbar-track {
  background: #06021A;
  border-left: 1px solid rgba(167, 139, 250, 0.12);
}
body::-webkit-scrollbar-thumb, html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #22D3EE, #7C3AED 50%, #F472B6);
  border-radius: 8px;
  border: 3px solid #06021A;
  background-clip: padding-box;
}
body::-webkit-scrollbar-thumb:hover, html::-webkit-scrollbar-thumb:hover {
  border-width: 2px;
}

/* ═══ ARCADE GATE ═══════════════════════════════════════════════════════════ */
.arcade-gate {
  max-width: 560px;
  margin: 0 auto;
  padding: 2.8rem 2.2rem;
  text-align: center;
}
.arcade-gate-glow {
  font-size: 3.4rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 24px rgba(167, 139, 250, 0.8));
  animation: gate-bob 2.6s ease-in-out infinite;
}
@keyframes gate-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-8px) rotate(4deg); }
}
.arcade-gate-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.7rem;
}
.arcade-gate-sub {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}
.arcade-gate-row {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
}
.arcade-gate-row .game-input { max-width: 280px; }
.arcade-disclaimer {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.arcade-disclaimer em { color: var(--text-dim); font-style: normal; font-weight: 600; }

.arcade-welcome {
  text-align: center;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 1.8rem;
}

/* ═══ ARCADE OVERLAY — a self-contained "cabinet" that never touches the
   page layout; opened by the gate card, closed by ✕ / backdrop / Esc ═══ */
.arcade-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 0, 20, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.arcade-overlay.open { opacity: 1; pointer-events: auto; }

.arcade-panel {
  position: relative;
  width: min(1120px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.4rem 2.2rem 2.6rem;
  transform: translateY(50px) scale(0.95);
  transition: transform 0.45s cubic-bezier(0.2, 1.1, 0.3, 1);
}
.arcade-overlay.open .arcade-panel { transform: none; }

.arcade-close {
  position: sticky;
  top: 0;
  float: right;
  margin: -0.6rem -0.4rem 0.6rem auto;
  width: 40px; height: 40px;
  border: 1px solid var(--glass-border-bright);
  border-radius: 50%;
  background: rgba(10, 6, 32, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}
.arcade-close:hover { background: rgba(244, 114, 182, 0.25); transform: rotate(90deg); }

@media (max-width: 640px) {
  .arcade-panel { padding: 1.6rem 1.1rem 2rem; }
}

/* ═══ FLOATING SKILL STARS — margin-confined so they never overlap content ══
   Only shown when the viewport is wide enough to guarantee a safe margin
   outside the ~1180px content column (see initSkillStars in main.js). ═══ */
.skill-stars {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: none;
}
@media (min-width: 1600px) {
  .skill-stars { display: block; }
}
.skill-star {
  position: absolute;
  top: var(--top);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(10, 6, 32, 0.55);
  backdrop-filter: blur(6px);
  border: 1px solid;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.78;
  animation-duration: var(--dur);
  animation-delay: var(--delay);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.skill-star.lane-left  { left: 18px;  animation-name: star-drift-left; }
.skill-star.lane-right { right: 18px; animation-name: star-drift-right; }

@keyframes star-drift-left {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(var(--offset), -28px); }
  50%  { transform: translate(calc(var(--offset) * -1), -56px); }
  75%  { transform: translate(var(--offset), -28px); }
  100% { transform: translate(0, 0); }
}
@keyframes star-drift-right {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(calc(var(--offset) * -1), -28px); }
  50%  { transform: translate(var(--offset), -56px); }
  75%  { transform: translate(calc(var(--offset) * -1), -28px); }
  100% { transform: translate(0, 0); }
}

/* ═══ BACK TO TOP ═══════════════════════════════════════════════════════════ */
#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  width: 50px; height: 50px;
  border: 1px solid var(--glass-border-bright);
  border-radius: 50%;
  background: rgba(20, 16, 48, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.25s, border-color 0.25s;
  box-shadow: 0 8px 30px rgba(3, 0, 30, 0.5);
}
#back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover {
  border-color: var(--cyan);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.35);
}

/* ═══ MATRIX EASTER EGG ═════════════════════════════════════════════════════ */
#matrix-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(2, 6, 4, 0.9);
  display: none;
}
#matrix-overlay.show { display: block; }
#matrix-canvas { width: 100%; height: 100%; }

/* ═══ RESPONSIVE ════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 300px 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  section { padding: 5rem 0; }

  .nav-links { display: none; }
  .btn-hire { display: none; }
  .nav-hamburger { display: flex; }

  .about-grid { grid-template-columns: 1fr; }
  .about-profile-card { position: static; max-width: 380px; margin: 0 auto; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }

  /* Timeline collapses to single column */
  .timeline::before { left: 18px; }
  .timeline-item { grid-template-columns: 44px 1fr; margin-bottom: 1.8rem; }
  .timeline-item:nth-child(odd)  .timeline-content,
  .timeline-item:nth-child(even) .timeline-content { grid-column: 2; grid-row: 1; }
  .timeline-spacer { grid-column: 1; grid-row: 1; }
  .timeline-empty { display: none; }
  .timeline-dot { left: 18px; margin-left: -6px; }

  #skills-sphere-container { height: 380px; }

  .hero-h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .hero-ctas .btn { flex: 1; min-width: 150px; }
}

@media (max-width: 480px) {
  .stats-row { gap: 0.7rem; }
  .stat-number { font-size: 1.45rem; }
  .contact-form { padding: 1.4rem; }
  #skills-sphere-container { height: 330px; }
  .skill-card-3d { min-width: 104px; padding: 0.45rem 0.7rem 0.55rem; }
  .skill-card-3d .skill-name { font-size: 0.72rem; }
  .projects-showcase { gap: 3rem; }
  .project-thumb { height: 170px; }
  .project-info { padding: 1.4rem 1.5rem 1.6rem; }
  .project-title { font-size: 1.2rem; }
}

/* ═══ REDUCED MOTION ════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
