/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Theme Variables */
:root {
  --bg-color: #f9f9f9;
  --text-color: #333;
  --accent-color: #007acc;
  --link-hover: #005b99;
  --card-bg: #ffffff;
  --footer-bg: #eaeaea;
}

/* Body Styling */
body {
  font-family: "Segoe UI", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  padding-top: 80px;
}

/* Dark Theme Overrides */
body.dark-mode {
  --bg-color: #1e1e1e;
  --text-color: #eaeaea;
  --accent-color: #4da3ff;
  --link-hover: #74c0ff;
  --card-bg: #2a2a2a;
  --footer-bg: #111;
}

/* Sticky Transparent Navbar */
.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  background-color: transparent;
}

.navbar.scrolled {
  background-color: var(--card-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-color);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent-color);
}

/* Responsive Menu */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    right: 2rem;
    top: 70px;
    background-color: var(--card-bg);
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  .nav-links.show {
    display: flex;
  }
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: var(--accent-color);
}

/* Responsive Navigation */
@media (max-width: 600px) {
  .nav-links {
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 2rem;
    background-color: var(--card-bg);
    padding: 1rem;
    display: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  .nav-links.show {
    display: flex;
  }
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background-color: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: relative;
}

#theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.2rem;
  background: none;
  border: none;
  cursor: pointer;
}

.hero-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero h1 span {
  color: var(--accent-color);
}

.hero p {
  font-size: 1.2rem;
}

.social-links {
  margin-top: 1rem;
}

.social-links a {
  margin: 0 10px;
  text-decoration: none;
  color: var(--accent-color);
  font-weight: bold;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--link-hover);
}

/* About Section */
.about {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.about h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about p {
  font-size: 1.1rem;
}

/* Portfolio Section */
.portfolio {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.project-list {
  display: grid;
  gap: 1.5rem;
}

.project {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.project h3 {
  margin-bottom: 0.5rem;
}

.project p {
  color: var(--text-color);
}

.project a {
  display: inline-block;
  margin-top: 0.5rem;
  text-decoration: none;
  color: var(--accent-color);
  font-weight: bold;
}

/* Contact Section */
.contact {
  max-width: 700px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.contact form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact input,
.contact textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: var(--card-bg);
  color: var(--text-color);
}

.contact button {
  padding: 0.8rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.contact button:hover {
  background-color: var(--link-hover);
}

#form-response {
  margin-top: 1rem;
  color: green;
  font-weight: bold;
}

/* Gallery */
.gallery {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background-color: var(--footer-bg);
  font-size: 0.9rem;
}
