/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  scroll-behavior: smooth;
}

html {
  height: 100%;
  overflow-x: hidden;
}

body {
  line-height: 1.6;
  background: #111;
  color: #f4f4f4;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh; /* changed from 100dvh */
}

/* ================= DECORATIVE LAYER ================= */
.decor-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* changed from 100dvh */
  pointer-events: none;
  z-index: 0;

  /* GPU stabilization (improved) */
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(179,0,0,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(179,0,0,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 40s linear infinite;
}

@keyframes gridMove {
  from { background-position: 0 0; }
  to { background-position: 60px 60px; }
}

.glow-orb {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(179,0,0,0.35), transparent 70%);
  filter: blur(100px);
  animation: orbDrift 30s ease-in-out infinite;
}

.orb1 { top: -100px; left: -100px; }
.orb2 { bottom: -150px; right: -150px; animation-delay: 10s; }

@keyframes orbDrift {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(60px,40px); }
}

.ring {
  position: absolute;
  top: 20%;
  right: 15%;
  width: 220px;
  height: 220px;
  border: 2px solid rgba(179,0,0,0.6);
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(179,0,0,0.6);
  animation: rotateSlow 25s linear infinite;
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.beam {
  position: absolute;
  width: 3px;
  height: 250px;
  background: linear-gradient(to bottom, transparent, rgba(179,0,0,0.6), transparent);
  animation: driftBeam 12s ease-in-out infinite;
}

.beam1 { left: 12%; top: 10%; }
.beam2 { right: 18%; bottom: 15%; animation-delay: 4s; }

@keyframes driftBeam {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(50px); }
}

.square {
  position: absolute;
  width: 25px;
  height: 25px;
  border: 2px solid rgba(179,0,0,0.7);
  box-shadow: 0 0 15px rgba(179,0,0,0.7);
  animation: floatSquare 8s ease-in-out infinite;
}

.sq1 { top: 65%; left: 8%; }
.sq2 { bottom: 20%; right: 10%; animation-delay: 3s; }

@keyframes floatSquare {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(45deg); }
}

.triangle {
  position: absolute;
  bottom: 30%;
  left: 45%;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-bottom: 30px solid rgba(179,0,0,0.7);
  animation: floatTriangle 10s ease-in-out infinite;
}

@keyframes floatTriangle {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-25px); }
}

.star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ff4d4d;
  border-radius: 50%;
  animation: twinkle 4s ease-in-out infinite;
}

.star1 { top: 15%; left: 30%; }
.star2 { top: 40%; left: 70%; animation-delay: 1s; }
.star3 { bottom: 25%; left: 55%; animation-delay: 2s; }
.star4 { top: 60%; right: 20%; animation-delay: 3s; }

@keyframes twinkle {
  0%,100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.8); }
}

.pulse-dot {
  position: absolute;
  top: 50%;
  right: 25%;
  width: 12px;
  height: 12px;
  background: #ff0000;
  border-radius: 50%;
  box-shadow: 0 0 20px #ff0000;
  animation: pulsePop 2s ease-in-out infinite;
}

@keyframes pulsePop {
  0%,100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.8); opacity: 1; }
}

/* ================= NAVBAR & CONTENT ================= */
/* (unchanged from your original below this point) */

/* ================= NAVBAR & CONTENT ================= */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  z-index: 1000;
  border-bottom: 1px solid #222;
}

.nav-container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.profile-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #b30000;
  object-fit: cover;
}

.nav-name {
  font-weight: bold;
}

.nav-right a {
  margin-left: 1rem;
  text-decoration: none;
  color: #f4f4f4;
  font-size: 0.9rem;
  transition: 0.3s;
}

.nav-right a:hover {
  color: #b30000;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  position: relative;
  z-index: 1;
}

.hero {
  text-align: center;
  padding: 6rem 1rem 5rem;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2rem;
  animation: fadeIn 1.2s ease forwards;
}

.tagline {
  margin: 1rem 0;
  font-size: 1rem;
  opacity: 0.9;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: white;
  color: black;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: 0.3s;
}

.btn:hover {
  background: #ddd;
  transform: scale(1.05);
}

.section {
  padding: 3rem 0;
  position: relative;
  z-index: 1;
}

.section h2 {
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
  border-left: 4px solid #b30000;
  padding-left: 10px;
}

.section h3 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 1rem;
}

.skill-box {
  background: rgba(28,28,28,0.9);
  padding: 0.7rem;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #333;
  transition: 0.3s;
}

.skill-box:hover {
  background: #222;
  transform: translateY(-3px);
}

.dark-section {
  background: rgba(13,13,13,0.85);
}

.project-card {
  background: rgba(26,26,26,0.95);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #b30000;
  transition: 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.experience-card {
  margin-bottom: 2rem;
}

.date {
  display: block;
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

footer {
  text-align: center;
  padding: 1.5rem 0;
  background: #000;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

/* ================= ANIMATIONS ================= */
.fade-in {
  animation: fadeIn 1s ease forwards;
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ================= RESUME POPUP ================= */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.popup-content {
  position: relative;
  width: 100%;
  height: 100%;
}

.popup-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #111;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2.5rem;
  color: #fff;
  background: #b30000;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  text-align: center;
  line-height: 45px;
  cursor: pointer;
  z-index: 2100;
}

.close-btn:hover {
  background: #ff4d4d;
}

/* ================= RESPONSIVE ================= */
@media (min-width: 768px) {
  .hero h1 { font-size: 3rem; }
  .skills-grid { grid-template-columns: repeat(4,1fr); }
  .section h2 { font-size: 2rem; }
  .nav-right a { font-size: 1rem; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .project-card { padding: 1rem; }
  .hero h1 { font-size: 1.8rem; }
  .tagline { font-size: 0.95rem; }
}