:root {
  --primary-color: #2c3e50;
  --accent-color: #f1c40f;
  --text-color: #333;
  --background-color: #fff;
  --section-padding: 5rem 0;
  --border-radius: 14px;
}

/* Dark mode variables (when body.dark-mode is set) */
body.dark-mode {
  --background-color: #121212;
  --text-color: #e0e0e0;
  /* Adjust other variables as needed */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Rubik', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--background-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 1000;
  height: 60px;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 100%;
}

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

.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);
}

/* Logo Section */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0;
}

.navlogo {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius);
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  margin: 0;
  padding: 0;
}

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

/* Nav Actions (Theme & Menu Toggle) */
.nav-actions {
  display: flex;
  align-items: center;
}

/* Theme Toggle - Animated Slider */
.theme-toggle-wrapper {
  position: relative;
  width: 50px;
  height: 25px;
  margin-right: 1rem;
}

.theme-toggle-wrapper input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-toggle {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: background-color 0.4s;
  border-radius: var(--border-radius);
}

.theme-toggle::before {
  position: absolute;
  content: "";
  height: 19px;
  width: 19px;
  left: 3px;
  bottom: 3px;
  background-color: var(--background-color);
  transition: transform 0.4s;
  border-radius: 50%;
}

.theme-toggle-wrapper input:checked + .theme-toggle {
  background-color: var(--accent-color);
}

.theme-toggle-wrapper input:checked + .theme-toggle::before {
  transform: translateX(25px);
}

/* Hide theme toggle on mobile */
@media (max-width: 768px) {
  .theme-toggle-wrapper {
    display: none;
  }
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

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

/* Hero Section */
.hero {
  padding-top: 90px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: var(--border-radius);
  margin-bottom: 0.5rem;
  object-fit: cover;
}

/* Wave Background for Hero */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23f9f9f9" fill-opacity="1" d="M0,256L60,240C120,224,240,192,360,202.7C480,213,600,267,720,277.3C840,288,960,256,1080,234.7C1200,213,1320,203,1380,197.3L1440,192L1440,320L1380,320C1320,320,1200,320,1080,320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
  z-index: -1;
}

/* Hero Content */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Decorative container behind the profile image */
.profile-design {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: var(--border-radius);
  background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

/* Adjust the profile image within the decorative container */
.profile-design .profile-image {
  width: 200px;
  height: 200px;
  border-radius: var(--border-radius);
  border: 4px solid var(--background-color);
  object-fit: cover;
}

/* Contact buttons below the profile image */
.contact-buttons-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* Base button style for the new buttons */
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.3s;
}

/* Smaller contact buttons (Email & LinkedIn) */
.btn-contact {
  background: var(--accent-color);
  color: var(--primary-color);
}

.btn-contact:hover {
  background-color: #e1b70f;
}

/* Larger Resume button */
.btn-resume {
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
}

.btn-resume:hover {
  background-color: #1a2b3c;
}

/* Card Layouts */
.projects, .experience, .education, .extracurriculars {
  padding: var(--section-padding);
  background: #f9f9f9;
}

.project-grid, .timeline, .activities-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.project-grid {
  grid-template-columns: repeat(2, 1fr);
}

.timeline {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.activities-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.project-card, .timeline-item, .activity-card, .education-card {
  background: var(--background-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  padding: 1.5rem !important;
}

.project-card:hover, .timeline-item:hover, .activity-card:hover, .education-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content, .timeline-content {
  padding: 1.5rem;
}

.activity-card {
  padding: 1.5rem;
  text-align: center;
}

.activity-card i {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.metrics {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.metric {
  background: var(--accent-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 500;
}

/* Education Grid & Cards */
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(350px, 1fr)); /* Two cards per row */
  gap: 2rem;
  margin: 2rem 0;
  padding: 0 1rem;
}

.education-card {
  background: var(--background-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 1.5rem;
  border: 1px solid #ddd;
  transition: transform 0.3s, box-shadow 0.3s;
}

.education-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

/* Contact Section */
.contact {
  padding-top: 2rem;
}

.contact .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding-top: 1rem;
}

.contact-form {
  width: 100%;
}

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

.contact-button {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--background-color);
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.contact-button i {
  font-size: 1.5rem;
  color: var(--accent-color);
}

/* Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    /* Initially hide nav links on mobile */
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--background-color);
    width: 200px;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
  .nav-links.active {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .container {
    padding: 0 1rem;
  }
  .hero {
    padding: 80px 1rem 2rem;
  }
  .profile-image {
    width: 150px;
    height: 150px;
  }
  .project-grid, .timeline {
    grid-template-columns: 1fr;
  }
  .activities-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .project-card, .timeline-item, .activity-card, .education-card {
    margin: 0 1rem;
    padding: 1rem !important;
  }
  .timeline::before {
    left: 0;
  }
  .timeline-content {
    width: calc(100% - 1rem);
    margin-left: 1rem !important;
  }
  .contact .container {
    padding: 0 1rem;
  }
  .contact-form-container,
  .contact-buttons {
    padding: 0;
  }
  input, textarea {
    padding: 0.7rem;
  }
  .footer {
    padding: 2rem 0;
  }
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
  }
  .footer-about, 
  .footer-links, 
  .footer-social {
    flex: 1 1 100%;
    text-align: center;
  }
  .footer-logo {
    justify-content: center;
  }
  .footer-navlogo {
    width: 80px;
    height: 80px;
  }
  .education-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.2rem;
  }
  .metrics {
    justify-content: center;
  }
  .metric {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  .contact-button {
    padding: 0.8rem;
  }
  .contact-button i {
    font-size: 1.2rem;
  }
}

/* Footer */
.footer {
  background-color: #000;
  color: #fff;
  padding: 3rem 0;
  margin-top: 2rem;
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 100%;
  margin-bottom: 1rem;
}

.footer-navlogo {
  width: 100px;
  height: 100px;
  object-fit: cover;
}

.footer-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-color);
}

.footer-about, .footer-links, .footer-social {
  flex: 1 1 calc(33.333% - 2rem);
  margin-bottom: 1rem;
}

.footer-about h3, .footer-links h3, .footer-social h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.footer-links ul, .footer-social ul {
  list-style: none;
  padding: 0;
}

.footer-links li, .footer-social li {
  margin-bottom: 0.5rem;
}

.footer-links a, .footer-social a {
  text-decoration: none;
  color: #fff;
  transition: color 0.3s;
}

.footer-links a:hover, .footer-social a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}
