/* ═══════════════════════════════════════════════
   STRANGER THINGS / RETRO 80s PORTFOLIO THEME
   ═══════════════════════════════════════════════ */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(18, 5, 5, 0.88);
  --text-primary: #e8d4b8;
  --text-secondary: #9a8570;
  --text-dim: #665544;
  --accent-red: #e50914;
  --accent-red-bright: #ff1a1a;
  --accent-red-dark: #8b0000;
  --glow-red: rgba(229, 9, 20, 0.6);
  --glow-red-soft: rgba(229, 9, 20, 0.15);
  --border-color: rgba(229, 9, 20, 0.25);
  --border-hover: rgba(229, 9, 20, 0.6);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-red-dark) var(--bg-primary);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

::selection {
  background: rgba(229, 9, 20, 0.4);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-red-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-red);
}

/* ── Scanline CRT overlay ── */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.015) 0px,
    rgba(0, 0, 0, 0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: scanlineShift 8s linear infinite;
}

@keyframes scanlineShift {
  0% { background-position: 0 0; }
  100% { background-position: 0 6px; }
}

/* ── Vignette ── */
.vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.65) 100%);
}

/* ── Floating particles (Upside Down atmosphere) ── */
.floating-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.floating-particles span {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(229, 9, 20, 0.3);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(229, 9, 20, 0.2);
  animation: float linear infinite;
}

.floating-particles span:nth-child(1)  { left: 5%;  animation-duration: 18s; animation-delay: 0s;   top: 100%; }
.floating-particles span:nth-child(2)  { left: 15%; animation-duration: 22s; animation-delay: -3s;  top: 100%; }
.floating-particles span:nth-child(3)  { left: 25%; animation-duration: 16s; animation-delay: -7s;  top: 100%; }
.floating-particles span:nth-child(4)  { left: 35%; animation-duration: 25s; animation-delay: -2s;  top: 100%; }
.floating-particles span:nth-child(5)  { left: 45%; animation-duration: 19s; animation-delay: -5s;  top: 100%; }
.floating-particles span:nth-child(6)  { left: 55%; animation-duration: 23s; animation-delay: -9s;  top: 100%; }
.floating-particles span:nth-child(7)  { left: 65%; animation-duration: 17s; animation-delay: -1s;  top: 100%; }
.floating-particles span:nth-child(8)  { left: 72%; animation-duration: 21s; animation-delay: -6s;  top: 100%; }
.floating-particles span:nth-child(9)  { left: 80%; animation-duration: 20s; animation-delay: -4s;  top: 100%; }
.floating-particles span:nth-child(10) { left: 88%; animation-duration: 24s; animation-delay: -8s;  top: 100%; }
.floating-particles span:nth-child(11) { left: 10%; animation-duration: 26s; animation-delay: -11s; top: 100%; width: 3px; height: 3px; }
.floating-particles span:nth-child(12) { left: 40%; animation-duration: 15s; animation-delay: -13s; top: 100%; }
.floating-particles span:nth-child(13) { left: 60%; animation-duration: 28s; animation-delay: -10s; top: 100%; }
.floating-particles span:nth-child(14) { left: 92%; animation-duration: 20s; animation-delay: -15s; top: 100%; }
.floating-particles span:nth-child(15) { left: 50%; animation-duration: 22s; animation-delay: -12s; top: 100%; width: 3px; height: 3px; }

@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(30px);
    opacity: 0;
  }
}

/* ── Container ── */
.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 30px;
}

/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  padding: 18px 0;
  transition: all 0.4s ease;
}

nav.nav-scrolled {
  border-bottom-color: var(--border-color);
  padding: 12px 0;
  background: rgba(10, 10, 10, 0.97);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--accent-red);
  text-decoration: none;
  text-shadow: 0 0 10px var(--glow-red), 0 0 25px var(--glow-red);
  letter-spacing: 4px;
  transition: text-shadow 0.3s ease;
}

.nav-logo:hover {
  text-shadow: 0 0 15px var(--glow-red), 0 0 35px var(--glow-red), 0 0 55px rgba(229, 9, 20, 0.3);
}

.nav-links {
  display: flex;
  gap: 35px;
}

.nav-links a {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-red);
  box-shadow: 0 0 6px var(--glow-red);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-red);
  text-shadow: 0 0 8px var(--glow-red);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ═══════════════════════════════════════
   HEADER / HERO
   ═══════════════════════════════════════ */
header {
  padding: 180px 0 120px;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(229, 9, 20, 0.06) 0%, transparent 55%),
    var(--bg-primary);
}

/* ── Christmas lights ── */
.christmas-lights {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 50px;
  flex-wrap: wrap;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.christmas-lights span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.christmas-lights span:nth-child(4n+1) {
  background: #ff1a1a;
  box-shadow: 0 0 6px #ff1a1a, 0 0 12px #ff1a1a;
  animation: twinkle-red 3s ease-in-out infinite;
}
.christmas-lights span:nth-child(4n+2) {
  background: #ffcc00;
  box-shadow: 0 0 6px #ffcc00, 0 0 12px #ffcc00;
  animation: twinkle-yellow 3s ease-in-out infinite;
  animation-delay: 0.7s;
}
.christmas-lights span:nth-child(4n+3) {
  background: #22cc55;
  box-shadow: 0 0 6px #22cc55, 0 0 12px #22cc55;
  animation: twinkle-green 3s ease-in-out infinite;
  animation-delay: 1.4s;
}
.christmas-lights span:nth-child(4n) {
  background: #3399ff;
  box-shadow: 0 0 6px #3399ff, 0 0 12px #3399ff;
  animation: twinkle-blue 3s ease-in-out infinite;
  animation-delay: 2.1s;
}

@keyframes twinkle-red {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #ff1a1a, 0 0 15px #ff1a1a; }
  50% { opacity: 0.25; box-shadow: 0 0 2px #ff1a1a; }
}
@keyframes twinkle-yellow {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #ffcc00, 0 0 15px #ffcc00; }
  50% { opacity: 0.25; box-shadow: 0 0 2px #ffcc00; }
}
@keyframes twinkle-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #22cc55, 0 0 15px #22cc55; }
  50% { opacity: 0.25; box-shadow: 0 0 2px #22cc55; }
}
@keyframes twinkle-blue {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #3399ff, 0 0 15px #3399ff; }
  50% { opacity: 0.25; box-shadow: 0 0 2px #3399ff; }
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: 56px;
  font-weight: 900;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 10px;
  text-shadow:
    0 0 7px var(--glow-red),
    0 0 15px var(--glow-red),
    0 0 30px var(--glow-red),
    0 0 60px rgba(229, 9, 20, 0.25);
  margin-bottom: 25px;
  line-height: 1.15;
  transition: opacity 0.08s ease;
  animation: titleBreath 5s ease-in-out infinite;
}

@keyframes titleBreath {
  0%, 100% {
    text-shadow:
      0 0 7px var(--glow-red),
      0 0 15px var(--glow-red),
      0 0 30px var(--glow-red),
      0 0 60px rgba(229, 9, 20, 0.25);
  }
  50% {
    text-shadow:
      0 0 4px var(--glow-red),
      0 0 8px var(--glow-red),
      0 0 18px var(--glow-red),
      0 0 35px rgba(229, 9, 20, 0.12);
  }
}

.hero-subtitle {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 40px;
  line-height: 2;
}

.btn-retro {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--accent-red);
  text-decoration: none;
  padding: 14px 35px;
  border: 1px solid var(--accent-red);
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: all 0.35s ease;
}

.btn-retro:hover {
  background: var(--accent-red);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--glow-red), 0 0 45px rgba(229, 9, 20, 0.25);
}

/* ═══════════════════════════════════════
   SECTIONS (common)
   ═══════════════════════════════════════ */
section {
  padding: 90px 0;
  position: relative;
  z-index: 2;
}

section:nth-child(even) {
  background: rgba(15, 5, 5, 0.3);
}

section h2 {
  font-family: 'Cinzel', serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 6px;
  margin-bottom: 50px;
  text-align: center;
  text-shadow: 0 0 10px var(--glow-red), 0 0 25px rgba(229, 9, 20, 0.2);
}

section h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: var(--accent-red);
  margin: 18px auto 0;
  box-shadow: 0 0 8px var(--glow-red);
}

/* ═══════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════ */
.about p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-primary);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  opacity: 0.9;
}

.about strong {
  color: var(--accent-red-bright);
  text-shadow: 0 0 5px rgba(229, 9, 20, 0.25);
}

/* ═══════════════════════════════════════
   EXPERIENCE
   ═══════════════════════════════════════ */
.experience-timeline {
  margin-top: 20px;
  position: relative;
  padding-left: 35px;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-red), var(--accent-red-dark), transparent);
  box-shadow: 0 0 8px var(--glow-red);
}

.experience-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 28px;
  margin-bottom: 28px;
  position: relative;
  transition: all 0.4s ease;
}

.experience-card::before {
  content: '';
  position: absolute;
  left: -41px;
  top: 32px;
  width: 10px;
  height: 10px;
  background: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--glow-red), 0 0 18px var(--glow-red);
}

.experience-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.1), inset 0 0 30px rgba(229, 9, 20, 0.03);
}

.experience-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(229, 9, 20, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.experience-title h3 {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.project-name {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.company {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--accent-red);
  text-shadow: 0 0 5px rgba(229, 9, 20, 0.25);
}

.experience-meta {
  text-align: right;
  flex-shrink: 0;
}

.duration {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 4px;
}

.location {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  display: block;
}

.achievements {
  margin-top: 15px;
}

.achievement-item {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.achievement-icon {
  display: block;
  font-size: 15px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  filter: saturate(0.7);
}

.achievement-text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-primary);
  opacity: 0.88;
}

.achievement-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.highlight {
  color: var(--accent-red-bright);
  font-weight: 600;
  text-shadow: 0 0 5px rgba(229, 9, 20, 0.25);
  background: none;
}

/* ═══════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════ */
.project-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 28px;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 30px rgba(229, 9, 20, 0.12), inset 0 0 30px rgba(229, 9, 20, 0.03);
  transform: translateY(-4px);
}

.project-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 12px;
  text-shadow: 0 0 8px rgba(229, 9, 20, 0.25);
}

.project-card p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-primary);
  opacity: 0.82;
  margin-bottom: 18px;
  flex-grow: 1;
}

.tech-stack {
  margin-top: auto;
  margin-bottom: 16px;
}

.tech-stack h4 {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-item {
  display: inline-flex;
  align-items: center;
}

.tech-item img {
  display: none;
}

.tech-item span {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent-red);
  padding: 4px 12px;
  border: 1px solid rgba(229, 9, 20, 0.25);
  background: rgba(229, 9, 20, 0.04);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.tech-item span:hover {
  border-color: var(--accent-red);
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.25);
  background: rgba(229, 9, 20, 0.08);
}

.project-links {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(229, 9, 20, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.project-link-item {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-link-item::before {
  content: '>';
  color: var(--accent-red);
  font-weight: 700;
}

.project-link-item img {
  display: none;
}

.project-link-item:hover {
  color: var(--accent-red);
  text-shadow: 0 0 8px var(--glow-red);
}

/* ═══════════════════════════════════════
   SKILLS
   ═══════════════════════════════════════ */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 25px;
  transition: all 0.4s ease;
}

.skill-category:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.08);
}

.skill-category h3 {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(229, 9, 20, 0.15);
  text-shadow: 0 0 5px rgba(229, 9, 20, 0.2);
}

.skill-category ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-category li {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-primary);
  padding: 5px 14px;
  border: 1px solid rgba(229, 9, 20, 0.18);
  background: rgba(229, 9, 20, 0.03);
  transition: all 0.3s ease;
  cursor: default;
}

.skill-category li:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.2);
  text-shadow: 0 0 5px rgba(229, 9, 20, 0.3);
  background: rgba(229, 9, 20, 0.06);
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border-color);
  padding: 50px 0;
  text-align: center;
  position: relative;
  z-index: 2;
}

.footer-glow {
  width: 120px;
  height: 2px;
  background: var(--accent-red);
  margin: 0 auto 25px;
  box-shadow: 0 0 10px var(--glow-red), 0 0 25px rgba(229, 9, 20, 0.2);
}

.footer-tagline {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  font-style: italic;
}

footer p {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

footer a {
  color: var(--accent-red);
  text-decoration: none;
  transition: all 0.3s ease;
}

footer a:hover {
  text-shadow: 0 0 8px var(--glow-red);
}

/* ═══════════════════════════════════════
   SCROLL REVEAL ANIMATION
   ═══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.experience-card.reveal { transition-delay: 0.1s; }
.experience-card.reveal:nth-child(2) { transition-delay: 0.2s; }
.experience-card.reveal:nth-child(3) { transition-delay: 0.3s; }

.project-card.reveal { transition-delay: 0.1s; }
.project-card.reveal:nth-child(2) { transition-delay: 0.15s; }
.project-card.reveal:nth-child(3) { transition-delay: 0.2s; }
.project-card.reveal:nth-child(4) { transition-delay: 0.25s; }

.skill-category.reveal { transition-delay: 0.08s; }
.skill-category.reveal:nth-child(2) { transition-delay: 0.14s; }
.skill-category.reveal:nth-child(3) { transition-delay: 0.2s; }
.skill-category.reveal:nth-child(4) { transition-delay: 0.26s; }
.skill-category.reveal:nth-child(5) { transition-delay: 0.32s; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  header {
    padding: 140px 0 80px;
  }

  .hero-title {
    font-size: 34px;
    letter-spacing: 5px;
  }

  .hero-subtitle {
    font-size: 11px;
    letter-spacing: 2px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 10px;
    letter-spacing: 1.5px;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .skills-categories {
    grid-template-columns: 1fr;
  }

  .experience-header {
    flex-direction: column;
  }

  .experience-meta {
    text-align: left;
  }

  section {
    padding: 60px 0;
  }

  section h2 {
    font-size: 24px;
    letter-spacing: 4px;
  }

  .experience-timeline {
    padding-left: 28px;
  }

  .experience-card::before {
    left: -34px;
  }
}

@media (max-width: 480px) {
  header {
    padding: 120px 0 60px;
  }

  .hero-title {
    font-size: 26px;
    letter-spacing: 3px;
  }

  .nav-links {
    display: none;
  }

  .christmas-lights {
    gap: 10px;
    max-width: 320px;
  }

  .christmas-lights span {
    width: 6px;
    height: 6px;
  }

  .container {
    padding: 0 18px;
  }

  section h2 {
    font-size: 20px;
    letter-spacing: 3px;
    margin-bottom: 35px;
  }

  .experience-card,
  .project-card,
  .skill-category {
    padding: 20px;
  }
}
