/* ============================================================
   CSS CUSTOM PROPERTIES & BASE SETUP
   ============================================================ */
:root {
  --violet:      #7b2ff7;
  --dark-blue:   #0a0e2a;
  --mid-blue:    #1a1f5e;
  --glow-violet: rgba(123, 47, 247, 0.6);
  --glow-blue:   rgba(10, 14, 42, 0.8);
  --accent:      #a855f7;
  --accent2:     #38bdf8;
  --card-bg:     rgba(15, 20, 60, 0.55);
  --card-border: rgba(168, 85, 247, 0.35);
  --text-muted-custom: rgba(255, 255, 255, 0.65);
}

/* ============================================================
   GLOBAL RESET & TYPOGRAPHY
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: #fff;
  min-height: 100vh;
  background: linear-gradient(135deg, #7b2ff7 0%, #1a1f7e 40%, #0a0e2a 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ============================================================
   ANIMATED STARFIELD BACKGROUND (canvas)
   ============================================================ */
#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* All content sits above the starfield */
.page-content { position: relative; z-index: 1; }

/* ============================================================
   FLOATING PARTICLES OVERLAY
   ============================================================ */
.particle {
  position: fixed;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,0.9), transparent);
  animation: floatParticle linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes floatParticle {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ============================================================
   HERO / HEADER SECTION
   ============================================================ */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
}

/* Glowing avatar / logo ring */
.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  font-size: 3.5rem;
  box-shadow:
    0 0 0 4px rgba(168, 85, 247, 0.4),
    0 0 30px 10px rgba(123, 47, 247, 0.5),
    0 0 80px 20px rgba(56, 189, 248, 0.2);
  animation: avatarPulse 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes avatarPulse {
  0%, 100% {
    box-shadow:
      0 0 0 4px rgba(168, 85, 247, 0.4),
      0 0 30px 10px rgba(123, 47, 247, 0.5),
      0 0 80px 20px rgba(56, 189, 248, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(168, 85, 247, 0.6),
      0 0 50px 20px rgba(123, 47, 247, 0.7),
      0 0 120px 40px rgba(56, 189, 248, 0.35);
  }
}

/* Spinning ring around avatar */
.hero-avatar::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent2);
  animation: spinRing 3s linear infinite;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

/* Hero title with multi-stop text gradient */
.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(90deg, #fff 0%, var(--accent) 50%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.6));
  animation: titleShimmer 4s ease-in-out infinite;
  background-size: 200% auto;
}

@keyframes titleShimmer {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-muted-custom);
  letter-spacing: 0.05em;
}

/* Blinking cursor effect after subtitle */
.hero-subtitle::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--accent);
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Animated badge / chip */
.badge-chip {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(123, 47, 247, 0.2);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  backdrop-filter: blur(8px);
  margin: 6px 4px;
  transition: all 0.3s ease;
  animation: badgeFadeIn 0.6s ease both;
}

.badge-chip:hover {
  background: rgba(123, 47, 247, 0.5);
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

@keyframes badgeFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrolling technology ticker */
.ticker-wrap {
  overflow: hidden;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  background: rgba(10, 14, 42, 0.4);
  backdrop-filter: blur(12px);
  padding: 12px 0;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  gap: 0;
}

.ticker-track span {
  display: inline-block;
  padding: 0 40px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent2);
  text-transform: uppercase;
}

.ticker-track span::before {
  content: '◆ ';
  color: var(--accent);
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--violet), var(--accent2));
  border-radius: 2px;
  margin: 12px auto 0;
  animation: lineGrow 0.8s ease both;
}

@keyframes lineGrow {
  from { width: 0; opacity: 0; }
  to   { width: 60px; opacity: 1; }
}

/* ============================================================
   GAME CARDS  — GLASSMORPHISM + MANY CSS EFFECTS
   ============================================================ */
.game-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  overflow: hidden;
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  position: relative;
  animation: cardSlideIn 0.7s ease both;
}

/* Staggered card entrance animations */
.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }
.game-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Animated scan-line overlay on card */
.game-card::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(168, 85, 247, 0.06) 50%,
    transparent
  );
  animation: scanLine 4s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes scanLine {
  0%   { top: -100%; }
  100% { top: 200%; }
}

/* Hover glow effect */
.game-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow:
    0 20px 60px rgba(123, 47, 247, 0.4),
    0 0 0 1px var(--accent),
    inset 0 0 40px rgba(123, 47, 247, 0.05);
  border-color: var(--accent);
}

/* Shiny corner accent on card */
.game-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle at top left, rgba(168,85,247,0.3), transparent 70%);
  pointer-events: none;
  z-index: 1;
  border-radius: 20px 0 0 0;
}

/* Card image wrapper with overlay effects */
.card-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: brightness(0.85) saturate(1.2);
}

.game-card:hover .card-img-wrapper img {
  transform: scale(1.08);
  filter: brightness(1) saturate(1.4);
}

/* Gradient overlay on image */
.card-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(10, 14, 42, 0.9) 100%
  );
  pointer-events: none;
}

/* WIP badge on image */
.wip-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(251, 191, 36, 0.7);
  color: #fbbf24;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  animation: wipPulse 2s ease-in-out infinite;
}

@keyframes wipPulse {
  0%, 100% { border-color: rgba(251, 191, 36, 0.7); color: #fbbf24; }
  50%       { border-color: rgba(251, 191, 36, 1);   color: #fff;    }
}

/* Card body */
.game-card .card-body {
  padding: 24px 28px 28px;
  position: relative;
  z-index: 2;
}

.card-game-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  /* Neon text glow effect */
  text-shadow:
    0 0 8px rgba(168, 85, 247, 0.8),
    0 0 20px rgba(168, 85, 247, 0.4);
  transition: text-shadow 0.3s ease;
}

.game-card:hover .card-game-title {
  text-shadow:
    0 0 12px rgba(168, 85, 247, 1),
    0 0 30px rgba(56, 189, 248, 0.6);
}

.card-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 16px;
}

.tech-tag {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent2);
  transition: all 0.25s ease;
  font-family: 'Orbitron', sans-serif;
}

.tech-tag:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--accent2);
  transform: scale(1.05);
}

.card-description {
  color: var(--text-muted-custom);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Progress bar "Dev Status" */
.dev-progress-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted-custom);
  margin-bottom: 6px;
  text-transform: uppercase;
  font-family: 'Orbitron', sans-serif;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: visible;
  margin-bottom: 20px;
}

.progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--accent2));
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
  position: relative;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Animated shimmer on progress bar */
.progress-bar::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2.5s infinite;
  border-radius: 999px;
}

@keyframes shimmer {
  0%   { left: -60%; }
  100% { left: 120%; }
}

/* CTA pill button on cards */
.btn-game {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(123, 47, 247, 0.2);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: all 0.3s ease;
  cursor: default;
}

.btn-game:hover {
  background: rgba(123, 47, 247, 0.5);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
  transform: scale(1.04);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
  padding: 80px 0;
}

.about-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Animated corner lines on about box */
.about-box::before,
.about-box::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-color: var(--accent);
  border-style: solid;
}

.about-box::before {
  top: 12px; left: 12px;
  border-width: 2px 0 0 2px;
  border-radius: 6px 0 0 0;
}

.about-box::after {
  bottom: 12px; right: 12px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 6px 0;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-number {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  display: block;
  /* Counter animation via CSS only */
  animation: countUp 2s ease both;
}

@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted-custom);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: 'Orbitron', sans-serif;
  margin-top: 6px;
}

/* Divider between stats with vertical line */
.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -30px;
  top: 10%;
  height: 80%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--card-border), transparent);
}

/* ============================================================
   SKILLS / TECH GRID
   ============================================================ */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.tech-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px 10px;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  animation: techFadeIn 0.5s ease both;
  cursor: default;
}

.tech-item:hover {
  border-color: var(--accent);
  background: rgba(123, 47, 247, 0.2);
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.3);
}

.tech-item i {
  font-size: 1.8rem;
  color: var(--accent2);
  display: block;
  margin-bottom: 8px;
}

.tech-item span {
  font-size: 0.75rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
  color: var(--text-muted-custom);
}

@keyframes techFadeIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================================
   LEGAL / IMPRESSUM SECTION
   ============================================================ */
.legal-section {
  padding: 60px 0 80px;
}

.legal-box {
  background: rgba(10, 14, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 40px;
  backdrop-filter: blur(12px);
}

.legal-box h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-box p, .legal-box address {
  font-style: normal;
  color: var(--text-muted-custom);
  font-size: 0.9rem;
  line-height: 1.8;
}

.legal-box a {
  color: var(--accent2);
  text-decoration: none;
}

.legal-box a:hover {
  text-decoration: underline;
  color: #fff;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 30px 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
  border-top: 1px solid rgba(255,255,255,0.05);
}

footer a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--accent2); }

/* ============================================================
   GLITCH TEXT EFFECT (on section titles on hover)
   ============================================================ */
.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text:hover {
  animation: glitch 0.4s linear;
}

@keyframes glitch {
  0%   { transform: skew(0deg); }
  10%  { transform: skew(-2deg); text-shadow: -3px 0 #f0f, 3px 0 #0ff; }
  20%  { transform: skew(0deg); }
  30%  { transform: skew(1deg); text-shadow: 3px 0 #f0f, -3px 0 #0ff; }
  40%  { transform: skew(0deg); }
  50%  { transform: skew(-1deg); text-shadow: -2px 0 var(--accent2); }
  60%  { transform: skew(0deg); }
  100% { transform: skew(0deg); text-shadow: none; }
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--accent2));
  z-index: 9999;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.8);
  transition: width 0.1s;
}

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.navbar-custom {
  background: rgba(10, 14, 42, 0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
}

.navbar-brand-logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link-custom {
  color: rgba(255,255,255,0.7) !important;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.25s;
  text-decoration: none;
  padding: 6px 14px !important;
}

.nav-link-custom:hover {
  color: #fff !important;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.8);
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 768px) {
  .about-box { padding: 28px 20px; }
  .stats-row { gap: 30px; }
  .stat-item:not(:last-child)::after { display: none; }
  .legal-box { padding: 24px 16px; }
}

/* ============================================================
   MISC: hover on links
   ============================================================ */
::selection {
  background: rgba(123, 47, 247, 0.5);
  color: #fff;
}
