/* Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ✅ Ensure background covers entire screen */
html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #121212; /* match body background */
  color: #e0e0e0;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
}

strong {
  color: var(--accent);
}

/* Accent Colors */
:root {
  --accent: #00aaff;
  --neon-glow: 0 0 8px #00aaff, 0 0 16px #00aaff, 0 0 24px #00aaff;
}

/* Header */
header {
  width: 100%; /* ✅ ensures header spans full width */
  background: #1c1c1c;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.brand {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

nav ul li a {
  color: #bbb;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.3s ease-in-out;
}

nav ul li a:hover,
nav ul li a.active {
  background: #2a2a2a;
  border: 1px solid var(--accent);
  color: var(--accent);
  box-shadow: 0px 0px 8px #00aaff, 0px 0px 16px #00aaff;
}

/* Footer */
.footer {
  background: #181818;
  color: #aaa;
  text-align: center;
  padding: 20px;
  margin-top: 50px;
  border-top: 1px solid #333;
  font-size: 0.9rem;
  transition: color 0.3s, text-shadow 0.3s;
}

/* ==============================
   Animations
============================== */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 6px #00aaff, 0 0 12px #00aaff, 0 0 18px #00aaff;
  }
  50% {
    box-shadow: 0 0 12px #00aaff, 0 0 24px #00aaff, 0 0 36px #00aaff;
  }
  100% {
    box-shadow: 0 0 6px #00aaff, 0 0 12px #00aaff, 0 0 18px #00aaff;
  }
}

/* ==============================
   Responsive Styles
============================== */

/* Tablet and below (≤768px) */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  nav ul {
    display: flex !important;
    flex-direction: row;
    width: 100%;
    background: #1c1c1c;
    margin-top: 10px;
    padding: 10px 0;
    gap: 12px;
    overflow-x: auto;
    white-space: nowrap;
  }

  nav ul li a {
    display: block;
    padding: 12px 20px;
    border-bottom: none;
    text-align: center;
    color: #ccc;
  }

  nav ul li a:hover {
    background: #2a2a2a;
    color: var(--accent);
  }

  nav li {
    width: auto;
    text-align: center;
    margin: 0;
  }

  nav ul:not(.show) {
    display: flex !important;
  }
}

/* Mobile phones (≤480px) */
@media (max-width: 480px) {
  h2 {
    font-size: 1.5rem;
  }

  body {
    font-size: 0.9rem;
  }

  nav ul {
    padding: 10px;
    gap: 0px;
    overflow-x: auto;
    white-space: nowrap;
  }

  nav ul li a {
    padding: 10px 10px;
    font-size: 1rem;
  }

  .profile-card {
    max-width: 100%;
    padding: 15px;
  }

  .profile-img {
    width: 120px;
    height: 120px;
  }

  .skills-container {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .project-item {
    display: flex;
    flex-direction: column !important; /* ✅ force override */
    align-items: center;
    text-align: center;
    padding: 15px;
    gap: 15px;
    width: 100%; /* ✅ take full width */
    box-sizing: border-box;
  }

  .project-image {
    max-width: 100%; /* ✅ let image resize */
    height: auto;
    display: block;
    margin: 0 auto;
    margin-bottom: 10px;
  }

  .project-text {
    width: 100%; /* ✅ text fits container */
    max-width: 100%; /* ✅ prevents cutoff */
    padding: 10px 0;
    text-align: center;
  }

  .project-text h3 {
    font-size: 1.2rem;
  }

  .project-text p {
    font-size: 0.9rem;
  }

  .achievement-item {
    gap: 20px;
  }
}
