/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

body.dark {
  background-color: #121212;
  color: #eee;
}

section {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 40px 20px;
  margin: 20px auto;
  border-radius: 10px;
  max-width: 1000px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

body.dark section {
  background-color: rgba(34, 34, 34, 0.95);
  color: #eee;
}

/* Sticky Navbar */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  z-index: 1000;
  text-align: center;
}

body.dark .navbar {
  background-color: rgba(30, 30, 30, 0.95);
  color: #eee;
}

.navbar ul {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
}

.navbar a {
  color: #007bff;
  font-weight: 500;
  text-decoration: none;
}

.navbar a:hover {
  color: #0056b3;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
  background-color: rgba(255, 255, 255, 0.95);
}

body.dark .hero {
  background-color: rgba(30, 30, 30, 0.95);
  color: #eee;
}

.highlight {
  color: #007bff;
}

/* Typing Effect */
.typing {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid #007bff;
  width: 0;
  animation: typing 3s steps(30, end) forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* About Section */
.about-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.about-image {
  flex: 0 0 120px;
}

.about-text {
  flex: 1 1 300px;
}

.profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 20px auto;
  display: block;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
  .about-container {
    flex-direction: column;
    text-align: center;
  }
  .about-image {
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .profile-pic {
    width: 80px;
    height: 80px;
  }
}

/* Card Styling */
.card {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

body.dark .card {
  background-color: rgba(34, 34, 34, 0.95);
  color: #eee;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Grid Layouts */
.grid-container {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.hero {
  text-align: center;
  padding: 60px 20px;
  background-color: transparent; /* No background here */
}

.hero-card {
  background-color: #e6f0ff; /* Light blue for default theme */
  padding: 40px 20px;
  border-radius: 12px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark .hero-card {
  background-color: #1e1e2f; /* Dark blue-ish for dark mode */
  color: #eee;
}
body.dark .hero-card .highlight {
  color: #90caf9;
}
.about-text p {
  font-size: 1.05rem;
  margin-bottom: 15px;
  color: inherit;
  line-height: 1.7;
}
.hero-card {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 40px 30px;
  border-radius: 15px;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

body.dark .hero-card {
  background-color: rgba(30, 30, 30, 0.95);
}

.hero-intro {
  margin-top: 15px;
  font-size: 1.1rem;
  color: inherit;
}

.hero-actions {
  margin-top: 20px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  background-color: #007bff;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  margin-right: 10px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn:hover {
  background-color: #0056b3;
}

.btn.secondary {
  background-color: #28a745;
}

.btn.secondary:hover {
  background-color: #1e7e34;
}


/* Theme Toggle (Positioned Below Hero Section) */
.theme-switch {
  display: block;
  margin: 20px auto 40px auto;
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background-color: #f0f0f0;
  color: #333;
  text-align: center;
  width: fit-content;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}
@media (max-width: 600px) {
  .theme-switch {
    font-size: 0.9rem;
    padding: 8px 14px;
  }
}
/* Hide native checkbox */
#theme-toggle {
  display: none;
}

/* Centered toggle theme switch below hero */
.theme-switch {
  display: block;
  margin: 20px auto 40px auto;
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background-color: #f0f0f0;
  color: #333;
  text-align: center;
  width: fit-content;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.theme-switch:hover {
  background-color: #ddd;
}

/* Dark mode style via :has() */
body:has(#theme-toggle:checked) {
  background-color: #121212;
  color: #eee;
}

body:has(#theme-toggle:checked) section,
body:has(#theme-toggle:checked) .hero,
body:has(#theme-toggle:checked) .card,
body:has(#theme-toggle:checked) .contact-card,
body:has(#theme-toggle:checked) footer {
  background-color: rgba(30, 30, 30, 0.9);
  color: #eee;
}

body:has(#theme-toggle:checked) .theme-switch {
  background-color: #444;
  color: #fff;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.2);
}


.theme-switch:hover {
  background-color: #ddd;
}

body:has(#theme-toggle:checked) .theme-switch {
  background-color: #444;
  color: #fff;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.2);
}


body.dark #toggleTheme {
  background: #444;
  color: #fff;
}

/* Contact Form Styling */
.contact-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

body.dark .contact-card {
  background-color: rgba(30, 30, 30, 0.95);
  color: #eee;
}

#contact-form label {
  display: block;
  margin-top: 15px;
  font-weight: 500;
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

body.dark #contact-form input,
body.dark #contact-form textarea {
  background-color: #2a2a2a;
  color: #fff;
  border: 1px solid #444;
}

#contact-form button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

#contact-form button:hover {
  background-color: #0056b3;
}
.contact-card {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-width: 600px;
  margin: auto;
}

body.dark .contact-card {
  background-color: rgba(30, 30, 30, 0.95);
  color: #eee;
}
/* Light mode custom color for Contact section */
#contact {
  background-color: #f0f8ff; /* Light blue shade */
  color: #333;
}

/* Dark mode override for Contact section */
body:has(#theme-toggle:checked) #contact {
  background-color: #1c1c2e; /* Deep dark bluish */
  color: #eee;
}
.theme-toggle-container {
  text-align: center;
  margin: 10px auto 30px;
}

.theme-switch {
  display: inline-block;
  cursor: pointer;
  padding: 8px 16px;
  background: #eee;
  color: #333;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}

body:has(#theme-toggle:checked) .theme-switch {
  background: #444;
  color: #fff;
}


/* Optional: contact card contrast */
body:has(#theme-toggle:checked) #contact .contact-card {
  background-color: rgba(45, 45, 70, 0.95);
}
#contact input,
#contact textarea {
  background-color: #ffffff;
  color: #000;
}

body:has(#theme-toggle:checked) #contact input,
body:has(#theme-toggle:checked) #contact textarea {
  background-color: #2e2e48;
  color: #fff;
}

/* Hide the checkbox but keep it functional */
#theme-toggle {
  display: none;
}

/* Style for the toggle button */
.theme-switch {
  display: inline-block;
  cursor: pointer;
  padding: 8px 12px;
  margin-top: 10px;
  background: #eee;
  color: #333;
  border-radius: 5px;
  font-weight: 600;
}

body:has(#theme-toggle:checked) {
  background-color: #121212;
  color: #eee;
}

body:has(#theme-toggle:checked) .hero,
body:has(#theme-toggle:checked) section,
body:has(#theme-toggle:checked) .card,
body:has(#theme-toggle:checked) .contact-card,
body:has(#theme-toggle:checked) footer {
  background-color: rgba(30, 30, 30, 0.9);
  color: #eee;
}

body:has(#theme-toggle:checked) .theme-switch {
  background-color: #444;
  color: #fff;
}


/* Footer */
footer {
  background: rgba(0, 0, 0, 0.85);
  color: #eee;
  text-align: center;
  padding: 30px 20px;
}

footer .footer-content a {
  color: #eee;
  margin: 0 10px;
}

footer .footer-content a:hover {
  color: #ffc107;
}
