/* Root theme variables */
:root {
  --bg-dark: #121212;
  --text-dark: #ffffff;
  --bg-light: #f0f0f0;
  --text-light: #000000;
  --nav-bg: #1e1e1e;
  --link-bg: #2a2a2a;
  --link-hover: #444444;
}

/* Base styles */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

body.light {
  background-color: var(--bg-light);
  color: var(--text-light);
}

/* Navbar styles */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
body.light nav {
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 180px;
}

.logo {
  max-width: 100%;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-links a,
.theme-btn {
  background-color: var(--link-bg);
  color: white;
  text-decoration: none;
  padding: 15px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  font-size: 1rem;
  border: none;
  cursor: pointer;
}
body.light .nav-links a,
.theme-btn {
  color: #0f0f0f;
  background-color: var(--link-bg);
}

.nav-links a:hover,
.theme-btn:hover {
  background-color: var(--link-hover);
}
body.light .nav-links a:hover,
.theme-btn:hover {
  background-color: var(--link-hover);
  color: #007777;
}

/* Right-aligned container for nav links and hamburger */
.nav-right {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 10px;
}
/* Hamburger base */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 101;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background-color: white;
  display: block;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Light mode lines */
body.light .hamburger span {
  background-color: black;
}

/* Animate into an "X" */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

body.light .nav-links a,
body.light .theme-btn {
  background-color: #d0d0d0;
  color: black;
}

body.light .nav-links a:hover,
body.light .theme-btn:hover {
  background-color: #c0c0c0;
}

/* Responsive layout */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100px;
    right: 0;
    background-color: var(--nav-bg);
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 300px;
    max-height: 0;
    overflow: hidden;
    padding: 1rem 2rem;
    transition: max-height 0.3s ease, padding 0.3s ease;
    display: none;
    border-radius: 5px;
  }

  .nav-links.show {
    display: flex;
    max-height: 300px; /* or whatever height fits your nav links */
    padding: 1rem 2rem;
    overflow-y: auto;
  }

  .nav-links a,
  .theme-btn {
    width: 100%;
    max-width: 250;
    text-align: center;
    padding: 12px 12px;
  }
  body.light .nav-links a,
body.light .theme-btn {
  background-color: #d0d0d0;
}

  body.light .nav-links {
    background-color: #ffffff;
  }
}

/* Add spacing for page content */
main {
  padding: 2rem;
}
/* ===== Sections ===== */
.hero,
.content,
.projects,
.contact {
  max-width: 800px;
  margin: auto;
  padding: 4rem 2rem;
  text-align: center;
}

/* ===== Project Grid ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: #1a1a1a;
  padding: 1rem;
  border-radius: 10px;
  transition: transform 0.3s, background 0.3s;
  text-align: left;
}

body.light .project-card {
  background: #ffffff;
  border: 1px solid #ddd;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* ===== Contact Form ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: auto;
}

input,
textarea {
  padding: 0.75rem;
  border: none;
  border-radius: 5px;
  background-color: #222;
  color: #f5f5f5;
}

body.light input,
body.light textarea {
  background-color: #f0f0f0;
  color: #0f0f0f;
}

button[type="submit"] {
  padding: 0.75rem;
  background-color: #00ffcc;
  border: none;
  border-radius: 5px;
  color: #0f0f0f;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
  background-color: #00ddb5;
}

/* ===== Fade In Animation ===== */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
}

.fade-in.delay {
  animation-delay: 0.5s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
