*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:      #0d0910;
  --bg2:     #171016;
  --bg3:     #241921;
  --border:  #473241;
  --text:    #fcf5fa;
  --muted:   #b59caf;
  --muted2:  #d1bed0;
  --accent:  #e1ccdb;
  --accent2: #f2e3ed;
  --font:    'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-menu: 'Barlow Condensed', sans-serif;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background Video & Canvas */
.bg-video-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.85) saturate(1.15);
  transform: scale(1.02);
}

.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 65% 50%, rgba(13, 9, 16, 0.2) 0%, rgba(13, 9, 16, 0.72) 100%),
              linear-gradient(180deg, rgba(13, 9, 16, 0.25) 0%, rgba(13, 9, 16, 0.6) 100%);
  pointer-events: none;
}

#bgCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* Minimal reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Video Game Title Screen & Menu (Inspired by akryst.moe) */
.hero-game-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 60px 0 40px;
  perspective: 1200px;
}

.hero-game-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  width: 100%;
}

.hero-game-main {
  flex: 1;
  max-width: 580px;
}

.hero-topleft {
  margin-bottom: 24px;
  transform: rotateX(-6deg);
  transform-origin: bottom left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-topleft:hover {
  transform: rotateX(0deg);
}

.hero-game-title {
  font-family: 'Space Grotesk', var(--font);
  font-size: clamp(52px, 7.5vw, 82px);
  font-weight: 800;
  letter-spacing: -2px;
  text-transform: none;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 12px;
  text-shadow: 0 0 24px rgba(225, 204, 219, 0.2);
}

.hero-game-tagline {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Video Game Menu List */
.hero-menu {
  width: 100%;
  max-width: 380px;
  margin: 26px 0 28px;
  display: flex;
  flex-direction: column;
}

.hero-menu-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--border) 0%, rgba(71, 50, 65, 0.1) 100%);
  margin: 3px 0;
}

.hero-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 18px;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  transition: background 0.15s ease, transform 0.15s ease;
  border-radius: 4px;
  overflow: hidden;
}

.hero-menu-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transform: scaleY(0);
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 0 10px var(--accent);
}

.hero-menu-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  opacity: 0.5;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.hero-menu-label {
  font-family: var(--font-menu), var(--font);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(252, 245, 250, 0.45);
  line-height: 1;
  flex: 1;
  transition: color 0.15s ease, transform 0.15s ease, text-shadow 0.15s ease;
}

.hero-menu-arrow {
  font-size: 11px;
  color: rgba(252, 245, 250, 0.25);
  transition: color 0.15s ease, transform 0.15s ease;
}

/* Hover & Active/Selected states */
.hero-menu-item:hover,
.hero-menu-item.active,
.hero-menu-item:focus-visible {
  background: rgba(225, 204, 219, 0.05);
  transform: translateX(4px);
  outline: none;
}

.hero-menu-item:hover .hero-menu-bar,
.hero-menu-item.active .hero-menu-bar,
.hero-menu-item:focus-visible .hero-menu-bar {
  opacity: 1;
  transform: scaleY(1);
}

.hero-menu-item:hover .hero-menu-num,
.hero-menu-item.active .hero-menu-num,
.hero-menu-item:focus-visible .hero-menu-num {
  color: var(--accent2);
  opacity: 1;
}

.hero-menu-item:hover .hero-menu-label,
.hero-menu-item.active .hero-menu-label,
.hero-menu-item:focus-visible .hero-menu-label {
  color: var(--text);
  text-shadow: 0 0 12px rgba(225, 204, 219, 0.4);
}

.hero-menu-item:hover .hero-menu-arrow,
.hero-menu-item.active .hero-menu-arrow,
.hero-menu-item:focus-visible .hero-menu-arrow {
  color: var(--accent2);
  transform: translateX(4px);
}

/* CTA Scroll Button */
.hero-cta-wrapper {
  margin-top: 6px;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
}

.hero-cta-btn:hover {
  color: var(--text);
  background: rgba(225, 204, 219, 0.05);
}

.hero-cta-btn .cta-arrow {
  font-size: 10px;
  animation: bounce-arrow 1.8s infinite ease-in-out;
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Character HUD & Player Profile Card */
.hero-game-hud {
  flex-shrink: 0;
  width: 360px;
}

.hud-frame {
  background: rgba(23, 16, 22, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(225, 204, 219, 0.15);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.hud-frame::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.hud-title {
  color: var(--accent);
  letter-spacing: 0.12em;
}

.hud-level {
  background: rgba(225, 204, 219, 0.1);
  color: var(--text);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  letter-spacing: 0.05em;
  font-weight: 600;
}

.hud-character-view {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.skin-wrapper-game {
  flex-shrink: 0;
  width: 110px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 60%, rgba(225, 204, 219, 0.12) 0%, transparent 70%);
  border-radius: 12px;
  border: 1px dashed rgba(225, 204, 219, 0.2);
}

.skin-img-game {
  width: 100px;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 24px rgba(108, 92, 231, 0.45));
  animation: skin-breathe 4s ease-in-out infinite;
}

@keyframes skin-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hud-bio {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(36, 25, 33, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(225, 204, 219, 0.12);
}

.hud-bio-text {
  font-family: var(--font);
  font-size: 13px;
  color: var(--muted2);
  line-height: 1.6;
}

.hud-stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hud-stat-item {
  display: flex;
  flex-direction: column;
  background: rgba(36, 25, 33, 0.55);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(225, 204, 219, 0.12);
}

.hud-stat-item .stat-name {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.hud-stat-item .stat-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.hud-socials {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.hud-social-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(36, 25, 33, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(225, 204, 219, 0.12);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.hud-social-link:hover {
  border-color: var(--accent);
  background: rgba(225, 204, 219, 0.15);
}

.hud-social-link img {
  width: 14px;
  height: 14px;
}

.hud-discord .discord-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
  transition: transform 0.2s, border-color 0.2s;
}

.hud-discord .discord-img:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Game HUD Section Labels */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-label-rule {
  width: 24px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.section-label-text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Backward compatibility & Shared Components */
.social-btn {
  display: flex; align-items: center; gap: 8px; padding: 10px 20px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); text-decoration: none; font-family: var(--font-mono);
  font-size: 13px; transition: background 0.2s, border-color 0.2s;
}
.social-btn:hover { background: var(--bg3); border-color: var(--accent2); }
.social-btn img { width: 16px; height: 16px; }

/* Timeline */
.timeline { position: relative; margin-left: 10px; }
.timeline::before { 
  content: ''; 
  position: absolute; 
  top: 0; 
  bottom: 0; 
  left: 16px; 
  width: 2px; 
  background: var(--border); 
}
.timeline-progress {
  position: absolute;
  top: 0;
  left: 16px;
  width: 2px;
  height: 0%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent2) 100%);
  box-shadow: 0 0 10px rgba(225, 204, 219, 0.7);
  transition: height 0.15s ease-out;
  pointer-events: none;
  z-index: 1;
}
.timeline-item { position: relative; padding-left: 56px; margin-bottom: 40px; }
.timeline-dot { 
  position: absolute; 
  left: 11px; 
  top: 6px; 
  width: 12px; 
  height: 12px; 
  border-radius: 50%; 
  background: var(--border); 
  border: 2px solid var(--bg); 
  box-shadow: 0 0 0 4px var(--bg2); 
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  z-index: 2;
}
.timeline-dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg2), 0 0 12px var(--accent);
  transform: scale(1.15);
}
.timeline-content { display: flex; gap: 20px; align-items: flex-start; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 24px; transition: border-color 0.2s; }
.timeline-content:hover { border-color: var(--accent2); }
.timeline-date { font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 8px; font-weight: 500; }
.project-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--border); }
.project-name { font-size: 17px; font-weight: 700; }
.project-desc { font-family: var(--font-mono); font-size: 12px; color: var(--muted); line-height: 1.7; }
.tag {
  font-family: var(--font-mono); font-size: 10px; padding: 3px 9px; border-radius: 5px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  display: inline-block; margin-right: 4px; margin-bottom: 4px;
}

/* Skills */
.skills-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.skill-tag {
  font-family: var(--font-mono); font-size: 12px; padding: 6px 14px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  transition: border-color 0.2s;
}
.skill-tag:hover { border-color: var(--accent2); }

/* Music Controls */
.music-controls { position: fixed; bottom: 24px; right: 24px; z-index: 100; display: flex; align-items: center; gap: 10px; }
.music-toggle {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 50%;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); transition: border-color 0.2s;
}
.music-toggle:hover { border-color: var(--accent2); background: var(--bg3); }
.music-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.music-toggle.playing { border-color: var(--accent2); color: var(--accent2); }

.volume-slider { width: 0; opacity: 0; transition: all 0.25s; cursor: pointer; -webkit-appearance: none; height: 4px; background: var(--border); border-radius: 2px; outline: none; }
.music-controls:hover .volume-slider { width: 70px; opacity: 1; }
.volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; background: var(--accent2); border-radius: 50%; }
.volume-slider::-moz-range-thumb { width: 11px; height: 11px; background: var(--accent2); border: none; border-radius: 50%; }

/* Footer */
.footer { padding: 48px 0; border-top: 1px solid var(--border); text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.footer-links { display: flex; gap: 12px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.footer-links a,
.footer-links button { 
  color: var(--muted2); 
  text-decoration: none; 
  padding: 6px 14px; 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s; 
}
.footer-links a:hover,
.footer-links button:hover { 
  border-color: var(--accent2); 
  color: var(--text); 
  background: rgba(225, 204, 219, 0.05);
}

/* Credits Modal Popup */
.credits-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.credits-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.credits-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 9, 16, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.credits-card {
  position: relative;
  background: rgba(23, 16, 22, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(225, 204, 219, 0.2);
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(225, 204, 219, 0.08);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.credits-modal.open .credits-card {
  transform: scale(1) translateY(0);
}

.credits-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.credits-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 4px;
}

.credits-title {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.credits-close-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.credits-close-btn:hover {
  border-color: var(--accent2);
  color: var(--text);
  background: rgba(225, 204, 219, 0.15);
}

.credits-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.credit-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(36, 25, 33, 0.55);
  border: 1px solid rgba(225, 204, 219, 0.1);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.credit-item:hover {
  background: rgba(36, 25, 33, 0.95);
  border-color: var(--accent);
  transform: translateX(4px);
}

.credit-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.credit-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.credit-info {
  flex: 1;
  min-width: 0;
}

.credit-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.credit-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.credit-arrow {
  color: var(--muted);
  font-size: 14px;
  font-family: var(--font-mono);
  transition: transform 0.2s, color 0.2s;
}

.credit-item:hover .credit-arrow {
  color: var(--accent2);
  transform: translate(2px, -2px);
}

.credits-footer {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-game-section {
    padding: 80px 0 60px;
    min-height: auto;
  }
  .hero-game-container {
    flex-direction: column;
    text-align: center;
    gap: 48px;
  }
  .hero-game-main {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-topleft {
    transform: none !important;
  }
  .hero-menu {
    max-width: 320px;
  }
  .hero-game-hud {
    width: 100%;
    max-width: 420px;
  }
}

@media (max-width: 600px) {
  .section { padding: 48px 0; }
  .hero-game-title { font-size: clamp(40px, 11vw, 56px); }
  .hero-game-tagline { font-size: 11px; }
  .hud-character-view { flex-direction: column; text-align: center; }
  .hud-stats { width: 100%; }
  .music-controls { bottom: 16px; right: 16px; }
}
