/* ============================================
   void256 — Game dev studio (heavy effects)
   ============================================ */

:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --neon-cyan: #00f5ff;
  --neon-magenta: #ff00aa;
  --neon-amber: #ffb800;
  --text: #e8e8ec;
  --text-dim: #8888a0;
  --glow-cyan: 0 0 20px rgba(0, 245, 255, 0.5), 0 0 40px rgba(0, 245, 255, 0.3);
  --glow-magenta: 0 0 20px rgba(255, 0, 170, 0.5), 0 0 40px rgba(255, 0, 170, 0.3);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ---- Overlay effects ---- */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 1000;
  opacity: 0.6;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 999;
}

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---- Layout ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
  transition: background 0.3s;
}

.header.scrolled {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
}

.logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--neon-cyan);
  text-decoration: none;
  letter-spacing: 0.1em;
  position: relative;
  text-shadow: var(--glow-cyan);
  transition: text-shadow 0.3s, transform 0.3s;
}

.logo:hover {
  text-shadow: 0 0 30px rgba(0, 245, 255, 0.8), 0 0 60px rgba(0, 245, 255, 0.4);
  transform: scale(1.02);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s, text-shadow 0.3s;
}

.nav a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 15px rgba(0, 245, 255, 0.5);
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 80% 50% at 50% 50%, rgba(0, 245, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(255, 0, 170, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(255, 184, 0, 0.05) 0%, transparent 50%);
  pointer-events: none;
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-tag {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--neon-magenta);
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(255, 0, 170, 0.5);
  animation: fadeInUp 0.8s ease-out;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  color: #fff;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

/* Glitch effect */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 2s infinite linear alternate-reverse;
  color: var(--neon-cyan);
  z-index: -2;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translate(-2px, 2px);
}

.glitch::after {
  animation: glitch-2 3s infinite linear alternate-reverse;
  color: var(--neon-magenta);
  z-index: -1;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translate(2px, -2px);
}

@keyframes glitch-1 {
  0% { transform: translate(-2px, 2px); opacity: 0.8; }
  20% { transform: translate(2px, -2px); opacity: 0.9; }
  40% { transform: translate(-2px, 2px); opacity: 0.7; }
  60% { transform: translate(2px, 2px); opacity: 0.9; }
  80% { transform: translate(-2px, -2px); opacity: 0.8; }
  100% { transform: translate(-2px, 2px); opacity: 0.8; }
}

@keyframes glitch-2 {
  0% { transform: translate(2px, -2px); opacity: 0.8; }
  20% { transform: translate(-2px, 2px); opacity: 0.7; }
  40% { transform: translate(2px, -2px); opacity: 0.9; }
  60% { transform: translate(-2px, -2px); opacity: 0.8; }
  80% { transform: translate(2px, 2px); opacity: 0.9; }
  100% { transform: translate(2px, -2px); opacity: 0.8; }
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

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

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2rem;
  border: 2px solid;
  transition: all 0.3s;
  animation: fadeInUp 0.8s ease-out 0.45s both;
}

.btn-primary {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: transparent;
}

.btn-primary:hover {
  background: var(--neon-cyan);
  color: var(--bg);
  box-shadow: var(--glow-cyan);
}

.btn-secondary {
  color: var(--neon-magenta);
  border-color: var(--neon-magenta);
  background: transparent;
}

.btn-secondary:hover {
  background: var(--neon-magenta);
  color: var(--bg);
  box-shadow: var(--glow-magenta);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--neon-cyan), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ---- Sections ---- */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 3rem;
  letter-spacing: 0.05em;
}

.section-title .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--neon-cyan);
  text-stroke: 2px var(--neon-cyan);
}

/* ---- Work / Projects ---- */
.work {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 245, 255, 0.02) 50%, transparent 100%);
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project {
  background: var(--bg-elevated);
  border: 1px solid rgba(0, 245, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.project:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.15);
}

.project-image {
  aspect-ratio: 16/10;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, rgba(255, 0, 170, 0.05) 100%);
}

.project-placeholder {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.08);
}

.project-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 245, 255, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.project:hover .project-glow {
  opacity: 1;
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--neon-cyan);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
}

.project-info p {
  color: var(--text-dim);
  font-size: 1rem;
}

/* ---- About ---- */
.about {
  background: linear-gradient(180deg, transparent 0%, rgba(255, 0, 170, 0.02) 50%, transparent 100%);
}

.about-lead {
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--text);
  max-width: 600px;
  margin-bottom: 3rem;
}

.about-stats {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
}

.stat {
  text-align: left;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3rem;
  color: var(--neon-amber);
  text-shadow: 0 0 30px rgba(255, 184, 0, 0.4);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

/* ---- Contact ---- */
.contact {
  text-align: center;
  padding-bottom: 8rem;
}

.contact-text {
  font-size: 1.2rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid rgba(0, 245, 255, 0.1);
}

.footer p {
  font-size: 0.9rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ---- Card tilt (JS will set transform) ---- */
.card {
  transform-style: preserve-3d;
}

.card .project-image,
.card .project-info {
  transform: translateZ(20px);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .header {
    padding: 1rem;
  }

  .nav {
    gap: 1rem;
  }

  .nav a {
    font-size: 0.75rem;
  }

  .hero {
    padding: 5rem 1.5rem 3rem;
  }

  .section {
    padding: 4rem 1.5rem;
  }

  .about-stats {
    gap: 2rem;
  }

  .stat-value {
    font-size: 2.5rem;
  }
}
