root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --primary: #00ff9d;
  --accent: #ff00aa;
  --text: #e0e0ff;
  --text-muted: #aab;
  --border: #333355;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ADD THIS: Respect mobile safe areas */
@supports (padding-top: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
  }
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* Preloader & Cursor */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.loader { width: 60px; height: 60px; border: 4px solid var(--surface); border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cursor {
  position: fixed; width: 20px; height: 20px; background: var(--primary); border-radius: 50%;
  pointer-events: none; left: 0; top: 0; transform: translate(-50%, -50%); z-index: 9998;
  mix-blend-mode: difference; transition: transform 0.1s;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  background: rgba(15,15,26,0.9);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);

  /* ADD THIS BLOCK: Mobile-safe positioning */
  top: env(safe-area-inset-top);
  padding-top: calc(env(safe-area-inset-top) + 1rem);
  padding-bottom: 1rem;
}

.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo-link { display: flex; align-items: center; gap: 1rem; color: white; text-decoration: none; font-weight: 700; font-size: 1.5rem; }
.logo { height: 50px; border-radius: 8px; }
.nav-links li { display: inline; margin-left: 2rem; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary); }

/* Hero */
.hero {
  min-height: 100vh;
  min-height: calc(100vh - env(safe-area-inset-top)); /* CHANGE height TO min-height AND ADD THIS LINE */
  display: flex;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #0f0f1a 0%, #16213e 100%);

  /* ADD THIS: Extra top padding on mobile to clear navbar fully */
  padding-top: calc(env(safe-area-inset-top) + 80px);
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 5rem; font-weight: 700; background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem;
}
.subtitle { font-size: 1.5rem; color: var(--primary); letter-spacing: 3px; margin-bottom: 1rem; }
.tagline { font-size: 1.3rem; max-width: 800px; margin: 1.5rem auto; opacity: 0.9; }
.cta-buttons { margin-top: 3rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  padding: 1rem 2rem; border-radius: 50px; font-weight: 600; text-decoration: none; transition: all 0.3s;
}
.btn.primary { background: var(--primary); color: black; }
.btn.primary:hover { background: #00cc7a; transform: translateY(-3px); }
.btn.secondary { border: 2px solid var(--primary); color: var(--primary); }
.btn.secondary:hover { background: var(--primary); color: black; }

/* Projects */
/* ... (rest of your CSS remains unchanged) ... */

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 3.5rem; }

  /* OPTIONAL: Wrap the new mobile fixes in @supports so they only apply where needed */
  .navbar {
    top: env(safe-area-inset-top);
    padding-top: calc(env(safe-area-inset-top) + 1rem);
  }
  .hero {
    padding-top: calc(env(safe-area-inset-top) + 100px); /* Slightly more space if needed */
  }

  .row { grid-template-columns: 1fr; text-align: center; }
}
/* Footer Enhancement – Card Style */
.footer {
  background: linear-gradient(to top, #0a0a14, var(--surface));
  padding: 4rem 0 2rem;
  margin-top: 6rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  text-align: center;
}

.footer-card {
  background: rgba(26, 26, 46, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  transition: all 0.3s ease;
}

.footer-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 255, 157, 0.15);
}

.footer-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.footer-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* Responsive footer */
@media (max-width: 768px) {
  .footer {
    padding: 3rem 0 1.5rem;
  }

  .footer-card {
    padding: 1.5rem 1rem;
  }
}
