/* =========================
   Ben Dixon – Vaporwave Theme (CLEAN + MOBILE FIXED)
   - single theme system
   - neon animated gradient name
   - floating particles (CSS)
   - CRT curvature + scanlines + vignette
   - mobile-friendly header/nav (no “menu to the right”)
========================= */

:root{
  --bg0: #070515;
  --bg1: #0b0830;
  --fg: #f6f1ff;
  --muted: rgba(246,241,255,0.72);

  --pink: #ff4fd8;
  --cyan: #33f6ff;
  --purple: #7c5cff;
  --yellow: #ffe66d;

  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.14);
  --shadow: 0 30px 80px rgba(0,0,0,0.55);

  --radius: 18px;
}

*{ box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--fg);
  overflow-x: clip;

  background:
    radial-gradient(1200px 900px at 20% 10%, rgba(255,79,216,0.28), transparent 60%),
    radial-gradient(900px 700px at 80% 15%, rgba(51,246,255,0.22), transparent 55%),
    radial-gradient(900px 700px at 55% 85%, rgba(124,92,255,0.18), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg0));

  /* subtle chromatic aberration */
  text-shadow: 0 0 0.5px rgba(51,246,255,0.12), 0 0 0.5px rgba(255,79,216,0.10);
}

/* subtle animated “neon haze” */
body::before{
  content:"";
  position: fixed;
  inset: -20%;
  background:
    conic-gradient(from 180deg at 50% 50%,
      rgba(255,79,216,0.12),
      rgba(51,246,255,0.12),
      rgba(124,92,255,0.12),
      rgba(255,230,109,0.10),
      rgba(255,79,216,0.12)
    );
  filter: blur(70px);
  opacity: 0.55;
  animation: haze 14s linear infinite;
  pointer-events: none;
  z-index: -4;
}
@keyframes haze{
  0%{ transform: rotate(0deg) scale(1.05); }
  100%{ transform: rotate(360deg) scale(1.05); }
}

/* scanlines + slight bloom overlay */
body::after{
  content:"";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 120% at 50% 45%, rgba(255,255,255,0.04), rgba(0,0,0,0.20) 70%, rgba(0,0,0,0.40) 100%),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.035),
      rgba(255,255,255,0.035) 1px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 6px
    );
  opacity: 0.18;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: -2;
}

/* CRT curvature lens (add <div class="crt-lens"></div> in HTML) */
.crt-lens{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 50%,
      rgba(255,255,255,0.05),
      rgba(0,0,0,0.30) 70%,
      rgba(0,0,0,0.55) 100%);
  opacity: 0.35;
  filter: blur(0.2px);
}
.crt-lens::before{
  content:"";
  position:absolute;
  inset:-2%;
  border-radius: 26px;
  transform: perspective(900px) translateZ(0) scale(1.02);
  box-shadow:
    inset 0 0 120px rgba(0,0,0,0.35),
    inset 0 0 40px rgba(0,0,0,0.25);
  opacity: 0.55;
}

/* Floating particles (add <div class="particles"></div> in HTML) */
.particles{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  opacity: 0.7;
}
.particles::before{
  content:"";
  position:absolute;
  inset: 0;
  background:
    radial-gradient(2px 2px at 8% 20%, rgba(51,246,255,0.9), transparent 60%),
    radial-gradient(2px 2px at 18% 70%, rgba(255,79,216,0.85), transparent 60%),
    radial-gradient(1.5px 1.5px at 30% 40%, rgba(255,230,109,0.85), transparent 60%),
    radial-gradient(2px 2px at 45% 15%, rgba(124,92,255,0.9), transparent 60%),
    radial-gradient(1.5px 1.5px at 60% 55%, rgba(51,246,255,0.8), transparent 60%),
    radial-gradient(2px 2px at 72% 25%, rgba(255,79,216,0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 84% 75%, rgba(124,92,255,0.85), transparent 60%),
    radial-gradient(2px 2px at 92% 35%, rgba(255,230,109,0.75), transparent 60%);
  filter: drop-shadow(0 0 10px rgba(51,246,255,0.10));
  animation: drift 18s linear infinite;
}
.particles::after{
  content:"";
  position:absolute;
  inset: 0;
  background:
    radial-gradient(1.5px 1.5px at 12% 45%, rgba(255,79,216,0.65), transparent 60%),
    radial-gradient(2px 2px at 26% 18%, rgba(51,246,255,0.65), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 78%, rgba(255,230,109,0.55), transparent 60%),
    radial-gradient(2px 2px at 52% 32%, rgba(124,92,255,0.65), transparent 60%),
    radial-gradient(1.5px 1.5px at 66% 86%, rgba(51,246,255,0.55), transparent 60%),
    radial-gradient(2px 2px at 78% 58%, rgba(255,79,216,0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 12%, rgba(124,92,255,0.55), transparent 60%);
  animation: drift2 24s linear infinite;
  opacity: 0.6;
}
@keyframes drift{ 0%{transform:translate(0,0)} 100%{transform:translate(20px,-40px)} }
@keyframes drift2{ 0%{transform:translate(0,0)} 100%{transform:translate(-30px,-70px)} }

/* Links */
a{ color: var(--cyan); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* Container */
.container{
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
}

/* Header */
.site-header{
  padding: 34px 0 18px;
  position: relative;
  overflow-x: clip;
}

/* Vapor grid floor */
.site-header::after{
  content:"";
  position: absolute;
  left: 0; right: 0;
  bottom: -120px;
  height: 260px;
  background:
    linear-gradient(to top, rgba(7,5,21,1), rgba(7,5,21,0)),
    repeating-linear-gradient(to right, rgba(51,246,255,0.22), rgba(51,246,255,0.22) 1px, transparent 1px, transparent 38px),
    repeating-linear-gradient(to bottom, rgba(255,79,216,0.18), rgba(255,79,216,0.18) 1px, transparent 1px, transparent 38px);
  transform: perspective(700px) rotateX(62deg);
  transform-origin: bottom;
  opacity: 0.40;
  pointer-events: none;
  z-index: -1;
}

/* Topbar layout */
.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,79,216,0.95), rgba(51,246,255,0.85));
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 0 25px rgba(51,246,255,0.22),
    0 0 40px rgba(255,79,216,0.16);
}

h1{
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.1;
}

.subtitle{
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Neon animated gradient name (add class="neon-name" to h1) */
.neon-name{
  display: inline-block;
  background: linear-gradient(90deg, var(--pink), var(--cyan), var(--purple), var(--yellow), var(--pink));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 18px rgba(255,79,216,0.18),
    0 0 28px rgba(51,246,255,0.10);
  animation: neonShift 6s ease-in-out infinite;
}
@keyframes neonShift{
  0%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}

/* Nav (stable, no movement) */
.nav{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.nav a{
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--fg);
  transition: background .15s ease, box-shadow .15s ease, color .15s ease;
}
.nav a:hover{
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 10px 30px rgba(255,79,216,0.12);
  text-decoration: none;
}

/* Hero */
.hero{
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(circle at 30% 20%,
      rgba(255,79,216,0.22),
      rgba(51,246,255,0.08) 45%,
      transparent 70%);
  pointer-events:none;
  filter: blur(12px);
  opacity: 0.75;
  z-index: 0;
}
.hero > *{ position: relative; z-index: 1; }

.hero h2{
  margin: 0 0 10px;
  font-size: 1.6rem;
  line-height: 1.25;
  text-shadow:
    0 0 18px rgba(255,79,216,0.16),
    0 0 22px rgba(51,246,255,0.10);
}
.hero p{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 72ch;
}

/* Buttons */
.cta-row{
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(135deg, rgba(255,79,216,0.35), rgba(124,92,255,0.22));
  color: var(--fg);
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255,79,216,0.10), 0 18px 55px rgba(124,92,255,0.18);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover{
  text-decoration: none;
  transform: translateY(-1px);
  filter: saturate(1.2);
  box-shadow: 0 0 0 1px rgba(51,246,255,0.22), 0 24px 70px rgba(255,79,216,0.16);
}
.btn-ghost{ background: rgba(255,255,255,0.06); }

/* Badges */
.badges{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.badge{
  font-size: 0.9rem;
  color: var(--fg);
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 1px rgba(255,79,216,0.10);
}
.badge:nth-child(3n+1){ box-shadow: inset 0 0 0 1px rgba(255,79,216,0.22); }
.badge:nth-child(3n+2){ box-shadow: inset 0 0 0 1px rgba(51,246,255,0.22); }
.badge:nth-child(3n+3){ box-shadow: inset 0 0 0 1px rgba(124,92,255,0.22); }

/* Main content */
.content{ padding: 18px 0 60px; }

.card{
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,79,216,0.20), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(51,246,255,0.18), transparent 50%),
    radial-gradient(circle at 60% 90%, rgba(124,92,255,0.14), transparent 60%);
  opacity: 0.60;
  pointer-events:none;
  z-index: 0;
}
.card > *{ position: relative; z-index: 1; }

.section-title h3{
  margin: 0;
  font-size: 1.25rem;
  text-shadow:
    0 0 18px rgba(255,79,216,0.16),
    0 0 22px rgba(51,246,255,0.10);
}
.muted{ color: var(--muted); margin-top: 6px; }

/* Projects grid */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.project{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}
.project h4{ margin: 0 0 6px; font-size: 1.05rem; }
.project p{ margin: 0 0 10px; color: var(--muted); line-height: 1.55; }

.mini{ margin: 0; padding-left: 18px; color: var(--muted); }
.mini code{ color: var(--fg); }

/* Two columns */
.two-col{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.bullets{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.bullets li{ margin: 8px 0; }

/* Contact */
.contact{
  margin-top: 14px;
  display: grid;
  gap: 10px;
}
.contact-row{
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
}
.label{ color: var(--muted); }

.footer{
  margin-top: 18px;
  text-align: center;
  padding: 10px 0;
}

/* Stats */
.stats{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.stat{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(51,246,255,0.08);
  min-width: 170px;
}
.stat-num{
  font-size: 1.9rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label{ color: var(--muted); font-size: 0.9rem; margin-top: 2px; }

/* Typewriter cursor + reveal */
.cursor{
  opacity: .85;
  text-shadow: 0 0 18px rgba(51,246,255,0.35);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

[data-reveal]{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .65s ease, transform .65s ease;
}
[data-reveal].is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Responsive
========================= */
@media (max-width: 900px){
  .two-col{ grid-template-columns: 1fr; }
}

/* Mobile header/nav fix (prevents menu pushed to the right) */
@media (max-width: 640px){
  .container{ width: min(980px, calc(100% - 28px)); }

  .topbar{
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
  }

  .brand{ width: 100%; }

  .nav{
    width: 100%;
    justify-content: flex-start;
    gap: 10px;

    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;

    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar{ display:none; }

  .nav a{
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 12px 14px;
  }

  .hero{ padding: 18px; }
  .hero h2{ font-size: 1.35rem; }

  .contact-row{ grid-template-columns: 1fr; }

  /* keep vapor grid from causing sideways scroll */
  .site-header::after{
    left: -20vw;
    right: -20vw;
    opacity: 0.28;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce){
  body::before{ animation: none; }
  .particles::before,
  .particles::after{ animation: none; }
  [data-reveal]{ transition:none; transform:none; opacity:1; }
  .cursor{ animation:none; }
  .neon-name{ animation: none; }
}
/* =========================
   MOBILE: force header + nav left-aligned (fix “menu on right”)
========================= */
@media (max-width: 640px){

  /* Stack brand + nav vertically */
  .topbar{
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100%;
  }

  .brand{
    width: 100%;
    justify-content: flex-start;
  }

  /* Make nav full width and LEFT aligned */
  .nav{
    width: 100% !important;
    display: flex;
    justify-content: flex-start !important;
    align-items: center;
    flex-wrap: wrap !important;
    gap: 10px;
    margin-top: 10px;
    padding: 0;
  }

  .nav a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 14px;
    white-space: nowrap;
  }
}

