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

:root {
  --ps2-black: #0f0f0f;
  --ps2-blue: #5865f2;
  --ps2-cyan: #57f287;
  --ps2-purple: #7289da;
  --ps2-pink: #eb459e;
  --ps2-white: #f0f0f0;
  --ps2-gray: #1e1e1e;
  --ps2-light-gray: #b0b0b0;
  --ps2-accent: #ffa500;
  --scanline-opacity: 0.05;
}

:root[data-theme="light"] {
  --ps2-black: #fafafa;
  --ps2-blue: #5865f2;
  --ps2-cyan: #57f287;
  --ps2-purple: #7289da;
  --ps2-pink: #eb459e;
  --ps2-white: #1a1a1a;
  --ps2-gray: #e8e8e8;
  --ps2-light-gray: #606060;
  --ps2-accent: #ff8c00;
  --scanline-opacity: 0.02;
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100vh);
  }
}

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

@keyframes glitch {
  0%, 100% {
    transform: translate(0);
  }
  33% {
    transform: translate(-2px, 2px);
  }
  66% {
    transform: translate(2px, -2px);
  }
}

body {
  font-family: 'VT323', monospace;
  background-color: var(--ps2-black);
  color: var(--ps2-white);
  line-height: 1.6;
  scroll-behavior: smooth;
  position: relative;
  overflow-x: hidden;
  animation: flicker 0.15s infinite;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 9999;
  opacity: var(--scanline-opacity);
  animation: scanline 8s linear infinite;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
  z-index: 9998;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--ps2-black);
  border-bottom: 3px solid var(--ps2-blue);
  box-shadow: 0 0 20px var(--ps2-blue);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem;
  color: var(--ps2-accent);
  background: none;
  border: none;
  cursor: pointer;
  text-shadow: 0 0 10px var(--ps2-accent), 0 0 20px var(--ps2-accent);
  transition: all 0.3s ease;
}

.logo:hover {
  color: var(--ps2-cyan);
  text-shadow: 0 0 10px var(--ps2-cyan), 0 0 20px var(--ps2-cyan);
  animation: glitch 0.3s ease;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--ps2-white);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.nav-link:hover {
  color: var(--ps2-accent);
  text-shadow: 0 0 10px var(--ps2-accent);
}

.theme-switch {
  background: transparent;
  border: 2px solid var(--ps2-accent);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ps2-accent);
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.theme-switch:hover {
  background: var(--ps2-accent);
  color: var(--ps2-black);
  box-shadow: 0 0 15px var(--ps2-accent);
  transform: scale(1.1);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 2px solid var(--ps2-accent);
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--ps2-accent);
  position: relative;
  box-shadow: 0 0 5px var(--ps2-accent);
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 3px;
  background: var(--ps2-accent);
  box-shadow: 0 0 5px var(--ps2-accent);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.mobile-menu {
  display: none;
  background: var(--ps2-black);
  border-bottom: 3px solid var(--ps2-blue);
  padding: 1.5rem;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu.active {
  display: flex;
}

.mobile-nav-link {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--ps2-white);
  cursor: pointer;
  padding: 0.5rem 0;
  text-align: center;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.mobile-nav-link:hover {
  color: var(--ps2-accent);
  text-shadow: 0 0 10px var(--ps2-accent);
}

/* HERO */
.hero {
  display: flex;
  align-items: center;
  padding: 8rem 0 3rem;
  background: linear-gradient(180deg, var(--ps2-black) 0%, var(--ps2-gray) 100%);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(90deg, transparent, transparent 2px, var(--ps2-blue) 2px, var(--ps2-blue) 4px),
    repeating-linear-gradient(0deg, transparent, transparent 2px, var(--ps2-blue) 2px, var(--ps2-blue) 4px);
  opacity: 0.03;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-content .imgDiv img {
  border: 4px solid var(--ps2-accent);
  box-shadow: 0 0 20px var(--ps2-accent), inset 0 0 20px rgba(0, 255, 136, 0.2);
  image-rendering: pixelated;
  margin-bottom: 2rem;
}

.hero-title {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(1.2rem, 4vw, 2rem);
  line-height: 1.6;
  margin-bottom: 2rem;
  color: var(--ps2-white);
}

.gradient-text {
  color: var(--ps2-accent);
  text-shadow: 0 0 10px var(--ps2-accent), 0 0 20px var(--ps2-cyan);
  animation: glitch 3s infinite;
}

.hero-subtitle {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  color: var(--ps2-light-gray);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: 'Press Start 2P', cursive;
  background: var(--ps2-gray);
  color: var(--ps2-white);
  padding: 1rem 2rem;
  border: 3px solid var(--ps2-accent);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  box-shadow: 0 0 20px var(--ps2-accent);
  position: relative;
}

.btn-primary:hover {
  background: var(--ps2-accent);
  color: var(--ps2-black);
  box-shadow: 0 0 30px var(--ps2-accent);
  transform: translateY(-3px);
}

.btn-primary::before {
  content: '▶';
  position: absolute;
  top: 12px;
  left: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

/* SECTIONS */
.about,
.portfolio,
.skills,
.experience,
.education,
.connect {
  padding: 3rem 0;
  position: relative;
}

.section-header {
  margin-bottom: 3rem;
}

.section-header.center {
  text-align: center;
}

.section-title {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  color: var(--ps2-accent);
  text-shadow: 0 0 10px var(--ps2-accent);
  line-height: 1.6;
}

.accent-line {
  width: 100px;
  height: 4px;
  background: var(--ps2-accent);
  box-shadow: 0 0 10px var(--ps2-accent);
  margin-bottom: 2rem;
}

.accent-line.center {
  margin-left: auto;
  margin-right: auto;
}

/* PROJECTS */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--ps2-gray);
  border: 3px solid var(--ps2-blue);
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.3);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(90deg, transparent, transparent 10px, var(--ps2-blue) 10px, var(--ps2-blue) 11px),
    repeating-linear-gradient(0deg, transparent, transparent 10px, var(--ps2-blue) 10px, var(--ps2-blue) 11px);
  opacity: 0.05;
  pointer-events: none;
}

.project-card:hover {
  border-color: var(--ps2-accent);
  transform: translateY(-5px);
  box-shadow: 0 0 30px var(--ps2-accent);
}

.project-number {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  color: var(--ps2-pink);
  text-shadow: 0 0 10px var(--ps2-pink);
}

.project-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem;
  color: var(--ps2-accent);
  margin: 0;
  line-height: 1.6;
}

.project-description {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--ps2-light-gray);
  line-height: 1.4;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tech-tag {
  font-family: 'VT323', monospace;
  background: var(--ps2-black);
  color: var(--ps2-accent);
  padding: 0.3rem 0.8rem;
  font-size: 1.1rem;
  border: 2px solid var(--ps2-accent);
  text-transform: uppercase;
}

.project-footer {
  padding-top: 1rem;
  border-top: 2px solid var(--ps2-blue);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-link {
  font-family: 'VT323', monospace;
  color: var(--ps2-white);
  text-decoration: none;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  text-decoration: underline;
}

.project-link:hover {
  color: var(--ps2-accent);
  text-shadow: 0 0 10px var(--ps2-accent);
  gap: 1rem;
}

.show-more-container {
  text-align: center;
  margin-top: 3rem;
}

.show-more-link {
  font-family: 'Press Start 2P', cursive;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ps2-white);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 1rem 2rem;
  border: 3px solid var(--ps2-blue);
  background: var(--ps2-gray);
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.3);
}

.show-more-link:hover {
  border-color: var(--ps2-accent);
  color: var(--ps2-accent);
  box-shadow: 0 0 30px var(--ps2-accent);
  transform: translateY(-3px);
}

/* SKILLS */
.skills-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.skills-badges img {
  padding: 8px;
  border: 2px solid var(--ps2-blue);
  background: var(--ps2-gray);
  transition: all 0.3s ease;
  image-rendering: pixelated;
}

.skills-badges img:hover {
  border-color: var(--ps2-accent);
  box-shadow: 0 0 20px var(--ps2-accent);
  transform: scale(1.1);
}

/* EXPERIENCE & EDUCATION */
.btech {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.btech .row {
  padding: 1.5rem;
  display: flex;
  gap: 50px;
  justify-content: space-between;
  border: 3px solid var(--ps2-blue);
  background: var(--ps2-gray);
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.3);
}

.btech .left {
  display: flex;
  gap: 20px;
  align-items: center;
}

.btech .row:hover {
  border-color: var(--ps2-accent);
  box-shadow: 0 0 30px var(--ps2-accent);
  transform: translateX(5px);
}

.btech .btech-info {
  text-align: left;
}

.btech .btech-info h3 {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  color: var(--ps2-accent);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.btech .btech-info p {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--ps2-light-gray);
}

.btech .right .period {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--ps2-pink);
  text-shadow: 0 0 5px var(--ps2-pink);
}

.btech .btech-logo img {
  border: 3px solid var(--ps2-accent);
  box-shadow: 0 0 15px var(--ps2-accent);
  image-rendering: pixelated;
}

/* CONNECT */
.connect {
  padding: 3rem 0;
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  margin-top: 2rem;
}

.social-icons a {
  transition: all 0.3s ease;
  display: inline-block;
  border: 3px solid var(--ps2-blue);
  padding: 1rem;
  background: var(--ps2-gray);
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.3);
}

.social-icons a:hover {
  transform: translateY(-8px) scale(1.1);
  border-color: var(--ps2-accent);
  box-shadow: 0 0 30px var(--ps2-accent);
}

.social-icons img {
  display: block;
  image-rendering: pixelated;
}

/* FOOTER */
.footer {
  background: var(--ps2-black);
  padding: 2rem 0;
  border-top: 3px solid var(--ps2-blue);
  box-shadow: 0 0 20px var(--ps2-blue);
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-text {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--ps2-light-gray);
}

.footer_link {
  color: var(--ps2-accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer_link:hover {
  text-shadow: 0 0 10px var(--ps2-accent);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .mobile-nav-link {
    text-align: center;
  }
  
  .hero {
    padding: 6rem 0 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .project-card {
    padding: 1.5rem;
  }
  
  .project-title {
    font-size: 1rem;
  }
  
  .social-icons {
    gap: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-primary {
    width: 100%;
    max-width: 300px;
  }
  
  .skills-badges img {
    padding: 4px;
  }
  
  .btech .row,
  .btech .left {
    flex-direction: column;
    gap: 15px;
  }
  
  .btech .row {
    padding: 1rem;
  }
  
  .btech .btech-info {
    text-align: center;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .section-title {
    font-size: 1.2rem;
  }
}

@media screen and (min-width: 768px) {
  .btech .row {
    min-width: 657px;
  }
}
