/* ====== Base Reset ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {/* ====== Base Reset ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  background: linear-gradient(135deg, #c8b3ee, #9bc6b0);
  color: #1a1a1a;
  min-height: 100vh;
  padding: 1rem;
}

footer {
  text-align: center;
}

/* ====== Glassmorphism Utility ====== */
.card, .projects.card, header, footer, nav, section {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
}

/* ====== Typography ====== */
h1 {
  font-size: 2.5rem;
  color: #333;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  text-align: center;
}

h2, h3 {
  color: #4b5563;
  margin-bottom: 0.5rem;
  text-shadow: 1px 2px 4px rgba(0,0,0,0.1);
}

p {
  margin-bottom: 1rem;
  color: #333;
  text-align: left;
}

.card p {
  text-align: center;
}

/* ====== Navigation ====== */
.desktop-nav {
  display: flex;
  justify-content: center;
}

nav.desktop-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
}

nav.desktop-nav ul li {
  margin-bottom: 0.75rem;
}

nav.desktop-nav ul li a {
  text-decoration: none;
  color: #fff;
  background: rgba(107, 33, 168, 0.8);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  transition: all 0.3s ease-in-out;
  display: inline-block;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
	
/* ====== Active Link Styling ====== */
nav.desktop-nav ul li a.active,
nav.mobile-only ul li a.active {
  background:#9bc6b0; 
  color: black;
  font-weight: 600;
  box-shadow: inset 0 0 0 2px #9bc6b0;
}


nav.desktop-nav ul li a:hover,
nav.desktop-nav ul li a:focus {
  background: #9f7aea;
  color: #fff;
  outline: none;
}

nav.mobile-only {
  display: none;
}

@media screen and (max-width: 768px) {
  nav.mobile-only {
    display: block;
  }
}

nav.mobile-only ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

nav.mobile-only ul li a {
  text-decoration: none;
  color: #fff;
  background: rgba(107, 33, 168, 0.8);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  display: block;
  transition: background 0.3s ease-in-out;
}

nav.mobile-only ul li a:hover,
nav.mobile-only ul li a:focus {
  background: #9f7aea;
  outline: none;
}

.hidden {
  display: none !important;
}

/* ====== Buttons ====== */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  background: rgba(155, 198, 176, 0.8);
  color: #1a1a1a;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease-in-out;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn:hover,
.btn:focus {
  background: #c8b3ee;
  color: #000;
  transform: translateY(-2px);
  outline: 2px solid #c8b3ee;
}

/* ====== Layouts ====== */
main {
  max-width: 1200px;
  margin: 0 auto;
}

section.projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  align-items: stretch;
}

section.projects > .card {
  flex: 1 1 45%;
  max-width: 45%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

section.intro {
  text-align: center;
  padding: 2rem 1rem;
}

.modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ====== Mobile Nav Button ====== */
#menu-toggle,
#mobile-menu-btn {
  display: none;
  background: #9bc6b0;
  color: #000;
  font-size: 1.5rem;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

/* ====== Responsive ====== */
@media screen and (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  #menu-toggle,
  #mobile-menu-btn {
    display: inline-block;
  }

  #nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
  }

  #nav-links.hidden {
    display: none !important;
  }

  .projects {
    flex-direction: column;
    align-items: stretch;
  }

  section.projects > .card {
    max-width: 100%;
    width: 100%;
  }

  nav.mobile-only ul {
    margin: 0;
    padding: 0;
  }

  nav.mobile-only ul li {
    list-style: none;
  }

  /* Accessibility polish */
  nav a {
    display: block;
    margin: 0.5rem 0;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

@media (orientation: landscape) and (max-width: 768px) {
  body {
    font-size: 0.95rem;
  }
}

/* ====== Footer ====== */
footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
}

/* ====== Accessibility Improvements ====== */
a:focus, button:focus, .btn:focus {
  outline: 2px dashed #c8b3ee;
  outline-offset: 4px;
}
