:root {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --text-secondary: #666666;
  --header-bg: rgba(255, 255, 255, 0.8);
  --card-bg: #f8f8f8;
  --border-color: #e0e0e0;
  --accent-color: #2563eb;
  --tag-bg: #e5e7eb;
  --tag-text: #374151;
  --toggle-bg: #ff6b35;
  --toggle-circle: #ffffff;
  --hamburger-color: #1a1a1a;
  --hamburger-card-edges-shaddow : rgba(18, 105, 219, 0.5);
  --hamburger-card-hover: #f8f9fa;
}

[data-theme="dark"] {
  --bg-color: #0a0a0a;
  --text-color: #f0f0f0;
  --text-secondary: #a0a0a0;
  --header-bg: rgba(18, 18, 18, 0.8);
  --card-bg: #1a1a1a;
  --border-color: #2a2a2a;
  --accent-color: #3b82f6;
  --tag-bg: #2a2a2a;
  --tag-text: #d1d5db;
  --toggle-bg: #1a1a1a;
  --toggle-circle: #ffffff;
  --hamburger-color: #ecf1f4;
  --hamburger-card-edges-shaddow : rgba(22, 22, 22, 0.5);
  --hamburger-card-hover: #474747;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

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

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.2s ease;
}

nav a:hover {
  opacity: 0.7;
}

#theme-toggle {
  position: relative;
  width: 64px;
  height: 34px;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 17px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  overflow: visible;
}

[data-theme="dark"] #theme-toggle {
  background: #000000;
  border-color: #000000;
}

#theme-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #000000;
  border-radius: 50%;
  transition: transform 0.3s ease, background-color 0.3s ease;
  z-index: 2;
}

[data-theme="dark"] #theme-toggle::before {
  transform: translateX(30px);
  background: #ffffff;
}

#theme-toggle svg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sun-icon {
  left: 35px;
  opacity: 1;
  stroke: #000000;
}

.moon-icon {
  left: 7px;
  opacity: 0;
  stroke: #ffffff;
}

[data-theme="dark"] .sun-icon {
  opacity: 0;
}

[data-theme="dark"] .moon-icon {
  opacity: 1;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 2rem;
}

.intro {
  margin-bottom: 4rem;
}

.profile-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.profile-photo {
  flex-shrink: 0;
}

.profile-photo img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
}

.contact-info h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.contact-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-links a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.contact-links a:hover {
  opacity: 0.7;
}

.projects {
  margin-bottom: 4rem;
}

.projects h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.project-card {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.project-image {
  flex-shrink: 0;
  width: 280px;
}

.project-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--border-color);
}

.project-details h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.project-details p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tag {
  padding: 0.35rem 0.75rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
  display: inline-block;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
  border: none;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.btn-primary:hover,
.btn-secondary:hover {
  opacity: 0.8;
}

footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

.footer-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.footer-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.7;
}

.footer-email {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .header-content {
    padding: 1rem;
  }

  nav {
    gap: 1rem;
  }

  nav a {
    font-size: 0.85rem;
  }

  main {
    padding: 5rem 1rem 1rem;
  }

  .profile-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-links {
    justify-content: center;
  }

  .project-card {
    flex-direction: column;
    padding: 1rem;
  }

  .project-image {
    width: 100%;
  }

  .project-links {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    text-align: center;
    width: 100%;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1rem;
  }

  nav a {
    display: none;
  }

  .contact-info h2 {
    font-size: 1.5rem;
  }

  .projects h2 {
    font-size: 1.5rem;
  }

  .project-details h3 {
    font-size: 1.15rem;
  }
}

/* for toggle menu */
/* 1. Hide the raw checkbox */
.menu-toggle {
  display: none;
}

/* 2. Style the Hamburger Icon */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
  /* --hamburger-color */

}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--hamburger-color);
  border-radius: 5px;
  transition: 0.3s;
}

/* 3. Fix the Card and Text */
.menu-card {
  position: absolute;
  top: 60px;
  right: 5%;
  width: 250px;
  background-color: var(--card-bg); /* Uses #1a1a1a */
  color: var(--text-color); /* Uses #f0f0f0 */
  border-radius: 12px;
  border: 1px solid var(--border-color); /* Uses #2a2a2a */
  box-shadow: 0 5px 10px var(--hamburger-card-edges-shaddow);

  /* Animation states */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

/* Fix: Remove bullets and padding that cause text cutoff */
.nav-links {
  color: var(--text-color);
  list-style: none; /* Removes the dots */
  padding: 10px 0; /* Clean vertical padding */
  margin: 0;
}

.nav-links li a {
  display: block;
  padding: 12px 20px;
  color: var(--text-color);
  text-decoration: none;
  font-family: sans-serif;
  font-size: 16px;
}

.nav-links li a:hover {
  background-color: var(--hamburger-card-hover);
}

/* 4. The Toggle Interaction */
.menu-toggle:checked ~ .menu-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/*  */
