.container {
    width: 100%;
    max-width: 1200px; /* maximum width for large screens */
    margin: 0 auto;    /* center horizontally */
    padding: 0 1rem;  /* small horizontal padding for small screens */
}

@media (min-width: 768px) {
  .container {
    padding: 0 8rem;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  background: #fff;
  color: #111;
  transition: background 0.3s, color 0.3s;
}

body.dark {
  background: #111;
  color: #eee;
}

h2 {
  margin-bottom: 1rem;
}

.project-img {
  width: 100%;
  height: auto;
  max-height: 10rem;
  object-fit: cover;
  border: gray;
  border-radius: 5%;
}

/* Navbar */
/* Navbar layout */

/* Default navbar style */
#navbar {
  background-color: #ffffff; /* light mode background */
  color: #000000; /* light mode text */
  transition: background-color 0.3s, color 0.3s;
  padding: 1rem;
}

/* Dark mode navbar style */
body.dark #navbar {
  background-color: #1a1a1a; /* dark mode background */
  color: #f0f0f0; /* dark mode text */
}

/* Nav links dark mode */
body.dark .nav-links a {
  color: #f0f0f0;
}

/* Nav links hover effect in dark mode */
body.dark .nav-links a:hover {
  color: #ffd700;
}

/* Logo color in dark mode */
body.dark .logo {
  color: #f0f0f0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Left side */
.nav-left .logo {
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  font-size: 1rem;
}

/* Right side (everything inline) */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Links inline */
.nav-links {
  display: flex;
  list-style: none;
  gap: 1.2rem;
}

/* Remove default list spacing */
.nav-links li {
  display: inline;
}

/* Links style */
.nav-links a {
  text-decoration: none;
  color: inherit;
  font-size: 0.95rem;
  opacity: 0.8;
}

.nav-links a:hover {
  opacity: 1;
}

/* Theme button */
#themeToggle {
  cursor: pointer;
  font-size: 1rem;
  background: none;
  border: none;
}


/* Mobile toggle hidden on desktop */
.nav-toggle {
  display: none;
  font-size: 1.3rem;
  background: none;
  border: none;
  cursor: pointer;
}

body.dark .nav-toggle {
  background-color: inherit; /* dark mode background */
  color: #fff; /* icon color in dark mode */
}

/* Sections */
.section {
  padding: 80px 20px;
}

.bg-light {
  background: #f7f7f7;
}

body.dark .bg-light {
  background: #1c1c1c;
}

/* Contact */

.contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

h2 a {
  color: black;           /* Default link color */
  text-decoration: none;  /* Remove underline */
  margin: 0 8px;          /* Space between icons */
  transition: color 0.3s; /* Smooth color change */
}

/* Optional: hover effect */
h2 a:hover {
  color: gray;
}


/* Dark mode support */

body.dark h2 a {
    color: white;
  }



/* Hero */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  align-items: stretch;

}

.project-card {
  padding: 1.5rem 1.5rem 3rem 1.5rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
  width: 95%;
  margin-bottom: 2rem;
}

body.dark .project-card {
  background: #222;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card a {
  display: inline-block;
  margin-top: 0.5rem;
  color: lightslategray;
}

/* Footer */
footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid #ddd;
}

body.dark footer {
  border-top-color: #444;
}


@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px;
    flex-direction: column;
    background: #ffffff; /* light mode background */;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
  }

  body.dark .nav-links {
    background: #1a1a1a; /* light mode background */;
    border-color: #444;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}


#scrollTopBtn {
  display: none; 
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 99;
  font-size: 1.5rem;
  border: none;
  outline: none;
  background-color: lightgray;
  color: black;
  cursor: pointer;
  padding: 0.5rem 0.8rem;
  border-radius: 10%;
  transition: background 0.3s, transform 0.3s;
}

#scrollTopBtn:hover {
  background-color: slategray;

  transform: scale(1.1);
}

body.dark #scrollTopBtn {
  background-color: #555;
  color: #eee;
}

body.dark #scrollTopBtn:hover {
  background-color: #888;
}

/* Sticky Header Logic */
#navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: white; /* Match your site's background */
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

section {
  scroll-margin-top: 70px;
}

.nav-right {
  position: relative;
}

.nav-indicator {
  position: absolute;
  bottom: -5px;
  height: 3px;
  background-color: #007bff; /* Change to your brand color */
  transition: all 0.3s ease-in-out;
}

.nav-links a.active {
  color: #007bff;
}