/* Global Styles */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: white;
  background: linear-gradient(180deg, #03030a, #15002d, #2b0057);
  min-height: 100vh;
  padding-bottom: 50px;
}

html {
  scroll-behavior: smooth;
}

/* --- NAVBAR (Desktop Defaults) --- */
.navbar {
  width: 100%;
  padding: 25px 0; /* Slightly more padding for the larger text */
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  z-index: 2000;
  border-bottom: 1px solid rgba(155, 77, 255, 0.2);
}

/* Hide mobile-only elements on desktop */
#nav-check, .nav-btn, .nav-title {
  display: none;
}

.nav-links {
  display: flex;
  justify-content: center;
}

.nav-links a {
  margin: 0 30px; /* Increased margin for better spacing with larger text */
  text-decoration: none;
  color: #e8e8e8;
  font-size: 24px; /* Increased desktop text size */
  font-weight: 600; /* Slightly bolder to match the size */
  position: relative;
  transition: 0.3s ease;
}

/* Underline effect */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 3px;
  background: #9b4dff;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: #9b4dff;
}

.nav-icon {
  display: none;
}

/* --- MOBILE RESPONSIVE (768px and below) --- */
@media (max-width: 768px) {
  .navbar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    height: 64px;
    box-sizing: border-box;
    border-bottom: none;
    border-top: 1px solid rgba(155, 77, 255, 0.25);
    background: rgba(8, 0, 20, 0.92);
  }

  .nav-title, .nav-btn, #nav-check {
    display: none;
  }

  .nav-links {
    display: flex !important;
    position: static;
    width: 100%;
    height: 100%;
    background: transparent;
    flex-direction: row;
    justify-content: space-around;
    align-items: stretch;
    text-align: center;
    box-shadow: none;
    border-bottom: none;
  }

  .nav-links a {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px 4px;
    margin: 0;
    font-size: 10px;
    font-weight: 600;
    color: rgba(233, 215, 255, 0.55);
    border-bottom: none;
  }

  .nav-icon {
    display: block;
    font-size: 18px;
    line-height: 1;
    filter: grayscale(0.4) brightness(1.3);
  }

  .nav-label {
    line-height: 1;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a[href*="contact"] {
    display: none;
  }

  .nav-links a[href="research.html"]   { order: 1; }
  .nav-links a[href="experience.html"] { order: 2; }
  .nav-links a[href="index.html"]      { order: 3; color: #c08eff; font-weight: 800; }
  .nav-links a[href="index.html"] .nav-icon { font-size: 21px; filter: none; }
  .nav-links a[href="services.html"]   { order: 4; }
  .nav-links a[href="profile.html"]    { order: 5; }
  .nav-links a[href="policy.html"]     { order: 6; }

  body {
    padding-bottom: 84px;
  }

  .scroll-top-btn {
    bottom: 80px;
  }

  .two-col {
    flex-direction: column;
    text-align: center;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 60px 10%;
  }

  .hero-image img {
    width: 200px;
  }
}

/* --- HERO SECTION --- */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 120px 10%;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-content h1 {
  font-size: 46px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 480px;
}

.cta-btn {
  display: inline-block;
  background: #295CFF;
  padding: 14px 30px;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  transition: 0.3s ease;
}

.cta-btn:hover {
  background: #1b43c9;
  transform: translateY(-2px);
}

/* GLITCH FACE ICON */
.glitch-face {
  position: relative;        
  animation: glitch 1.2s infinite steps(1, end);
}

@keyframes glitch {
  0% { transform: none; filter: none; opacity: 1; }
  3% { transform: translate(-6px, 2px) skew(-6deg); filter: hue-rotate(45deg) contrast(1.4); }
  4% { transform: translate(6px, -2px) skew(6deg); filter: hue-rotate(-45deg) contrast(1.6); }
  5% { transform: none; filter: none; }
  10% { opacity: 0.3; }
  11% { opacity: 1; }
  18% { transform: translate(4px, -4px) scale(1.02); filter: hue-rotate(70deg) saturate(1.8); }
  32% { clip-path: inset(45% 0 30% 0); }
  33% { clip-path: inset(0 0 0 0); }
  100% { transform: none; filter: none; opacity: 1; }
}

.hero-image img {
  width: 150px;
  filter: drop-shadow(0 0 18px #003bff);
}

/* --- SECTIONS --- */
.section {
  padding: 80px 10%;
}

.section h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 20px;
}

.section ul {
  list-style: none;
  padding: 0;
  font-size: 20px;
}

.section ul li {
  margin: 12px 0;
  opacity: 0.9;
}

.two-col {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
}

.text-block {
  flex: 1;
}

.section-icon {
  width: 170px;
  height: auto;
  filter: drop-shadow(0 0 15px #00aaff);
}

/* --- FORM & UI --- */
.contact-form {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 14px;
  border-radius: 8px;
  border: none;
  font-size: 18px;
  outline: none;
}

.contact-form textarea {
  height: 140px;
  resize: none;
}

.success-popup, .error-popup {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  background: #111;
  padding: 15px 25px;
  border-radius: 8px;
  opacity: 0;
  transition: 0.4s ease;
  z-index: 999;
}

.success-popup { color: #2effa2; border: 2px solid #2effa2; }
.error-popup { color: #ff6363; border: 2px solid #ff6363; }

.scroll-top-btn {
  position: fixed;
  right: 22px;
  bottom: 25px;
  width: 46px;
  height: 46px;
  background: #9b4dff;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(155, 77, 255, 0.45);
  transition: 0.25s ease;
  z-index: 2001;
}

.scroll-top-btn:hover {
  background: #b270ff;
  transform: translateY(-3px);
  box-shadow: 0 6px 22px rgba(155, 77, 255, 0.6);
}

.df-link {
    color: #007bff;
    font-weight: bold;
    text-decoration: none;
}

.read-more {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 18px;
  color: #c08eff;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s ease;
}

.read-more:hover {
  transform: scale(1.08);
  text-shadow: 0 0 12px #9b4dff;
}

/* --- HOW I HELP SECTION --- */
.help-section {
  padding-top: 40px;
}

.section-heading {
  text-align: center;
  margin-bottom: 50px;
}

.section-heading h2 {
  margin-bottom: 10px;
}

.section-subhead {
  font-size: 18px;
  opacity: 0.75;
  margin: 0;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.help-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(155, 77, 255, 0.25);
  border-radius: 14px;
  padding: 32px 22px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.help-card:hover,
.help-card:focus-within {
  transform: translateY(-10px);
  border-color: #9b4dff;
  box-shadow: 0 12px 30px rgba(155, 77, 255, 0.35);
}

.help-icon {
  font-size: 42px;
  margin-bottom: 18px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.help-card:hover .help-icon {
  transform: scale(1.18) translateY(-4px);
}

.help-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
}

.help-card p {
  font-size: 16px;
  opacity: 0.85;
  margin: 0;
}

/* --- WHY CHOOSE ME SECTION --- */
.why-section {
  display: flex;
  justify-content: center;
}

.why-content {
  max-width: 700px;
  text-align: center;
}

.why-list {
  list-style: none;
  padding: 0;
  margin: 0 0 35px;
  text-align: left;
  font-size: 19px;
  display: inline-block;
}

.why-list li {
  margin: 14px 0;
  opacity: 0.9;
  line-height: 1.5;
}

.why-list li strong {
  color: #c08eff;
}

.why-cta {
  background: #9b4dff;
}

.why-cta:hover {
  background: #7d2fe0;
}

/* --- MOBILE RESPONSIVE: How I Help / Why Choose Me --- */
@media (max-width: 768px) {
  .help-grid {
    grid-template-columns: 1fr;
  }

  .why-list {
    text-align: left;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .help-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}