/* ============================================================= */
/*  General Styles                                               */
/* ============================================================= */
body {
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #0f2027, #192022, #142329);
  background-attachment: fixed;
  color: #e0e0e0;
  transition: background 0.5s ease, color 0.5s ease;
  min-height: 100vh;
}

/* Light Mode */
body.light-mode {
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  background-attachment: fixed;
  color: #1c1c1c;
}

/* Light mode navbar & cards */
body.light-mode .navbar {
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .nav-links {
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .profile-card,
body.light-mode .skill-card,
body.light-mode .timeline-content,
body.light-mode .hackathon-card {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode .timeline-dot {
  border: 3px solid #f5f7fa;
}

/* ============================================================= */
/*  Navbar – Desktop & Mobile                                    */
/* ============================================================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 1001;
}

/* Desktop Nav Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: #3498db;
  transform: scaleX(0);
  transition: transform 0.3s;
}

.nav-links a:hover {
  color: #4aa3ff;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* Mode Toggle */
.mode-toggle {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #3498db;
  transition: color 0.2s;
  z-index: 1001;
}

.mode-toggle:hover {
  color: #217dbb;
}

/* Hamburger Icon (hidden by default) */
.menu-icon {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #e0e0e0;
  z-index: 1001;
}

.menu-icon:hover {
  color: #4aa3ff;
}

body.light-mode .menu-icon {
  color: #1c1c1c;
}

body.light-mode .menu-icon:hover {
  color: #217dbb;
}

/* Checkbox (hidden) */
.menu-toggle {
  display: none;
}

/* ============================================================= */
/*  Mobile Navbar (≤768px)                                       */
/* ============================================================= */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    padding: 1rem;
  }

  .logo {
    order: 1;
  }

  .menu-icon {
    display: block;
    order: 2;
    margin-left: auto;
  }

  .mode-toggle {
    order: 3;
    margin-left: 1rem;
  }

  .nav-links {
    order: 4;
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease;
    padding: 0;
  }

  .nav-links a {
    padding: 1rem;
    text-align: center;
    width: 100%;
    display: block;
  }

  /* Open menu when checkbox is checked */
  .menu-toggle:checked ~ .nav-links {
    max-height: 400px;
    padding: 1rem 0;
  }

  /* Light mode mobile menu */
  body.light-mode .nav-links {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }
}

/* ============================================================= */
/*  Rest of your sections (Hero, Skills, etc.)                   */
/* ============================================================= */
.hero {
  display: flex;
  gap: 2.5rem;
  padding: 3rem;
  flex-wrap: wrap;
  align-items: center;
  animation: fadeUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.profile-card {
  flex: 1;
  max-width: 320px;
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 2rem 1rem;
}

.profile-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  margin-bottom: 1rem;
}

.name {
  font-size: 1.5rem;
  margin: 0.5rem 0;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.role,
.company {
  margin: 0.2rem 0;
  font-weight: 400;
  font-size: 1.05rem;
}

.social-icons {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-icons img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s, transform 0.2s;
}

.social-icons img:hover {
  transform: scale(1.15);
  filter: brightness(0.7) invert(0.7) sepia(1) hue-rotate(180deg);
}

body.light-mode .social-icons img {
  filter: brightness(0);
}

.bio {
  flex: 2;
  padding: 1rem 0;
}

.bio h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.bio p {
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 1.08rem;
}

.skills {
  padding: 3rem 1rem;
  text-align: center;
}

.section-title {
  font-size: 2.1rem;
  margin-bottom: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.skills-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.skill-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 1.7rem 1.2rem;
  border-radius: 20px;
  max-width: 250px;
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), background 0.3s;
  animation: fadeUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.skill-card:hover {
  transform: translateY(-8px) scale(1.03);
  background: rgba(255, 255, 255, 0.18);
}

.skill-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 1rem;
}

.skill-card h3 {
  margin: 0.5rem 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.skill-card p {
  font-size: 0.98rem;
  line-height: 1.5;
  opacity: 0.95;
}

.experience {
  padding: 3rem 1rem;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: auto;
  padding-left: 40px;
  border-left: 3px solid #3498db;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-dot {
  position: absolute;
  left: -12px;
  top: 25px;
  width: 20px;
  height: 20px;
  background-color: #3498db;
  border-radius: 50%;
  border: 3px solid #1e1e1e;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.25);
}

.timeline-content {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 1.7rem 1.2rem;
  border-radius: 20px;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), background 0.3s;
  animation: fadeUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.timeline-content:hover {
  transform: translateY(-8px) scale(1.03);
  background: rgba(255, 255, 255, 0.18);
}

.company-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(52, 152, 219, 0.08);
}

.text-content {
  flex: 1;
}

.position {
  font-size: 1.15rem;
  font-weight: bold;
  margin: 0;
  letter-spacing: 0.5px;
}

.company {
  color: #4aa3ff;
  font-weight: 600;
  margin: 0.2rem 0;
}

.duration {
  font-size: 0.98rem;
  opacity: 0.8;
  margin-bottom: 0.6rem;
}

.description {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.95;
}

.hackathons {
  padding: 3rem 1rem;
}

.hackathon-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 900px;
  margin: auto;
}

.hackathon-card {
  display: flex;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 1.7rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  align-items: flex-start;
  transition: transform 0.3s ease, background 0.3s;
  animation: fadeUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.hackathon-card:hover {
  transform: translateY(-8px) scale(1.03);
  background: rgba(255, 255, 255, 0.18);
}

.hackathon-img {
  width: 220px;
  height: 150px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.hackathon-content {
  flex: 1;
}

.hackathon-name {
  font-size: 1.3rem;
  font-weight: bold;
  margin: 0 0 0.5rem;
  color: #4aa3ff;
}

.venue,
.prize,
.description {
  margin: 0.3rem 0;
  font-size: 1rem;
  line-height: 1.5;
}

.prize {
  font-weight: bold;
  color: #3498db;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================= */
/*  Responsive Adjustments                                       */
/* ============================================================= */
@media (max-width: 900px) {
  .hero,
  .skills-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .profile-card {
    max-width: 100%;
    margin-bottom: 2rem;
  }
  .timeline {
    padding-left: 20px;
  }
}

@media (max-width: 700px) {
  .hackathon-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .hackathon-img {
    width: 100%;
    max-width: 300px;
    height: 180px;
  }
}

@media (max-width: 600px) {
  .hero,
  .skills,
  .experience,
  .hackathons {
    padding: 1.2rem;
  }

  .profile-img {
    width: 110px;
    height: 110px;
  }

  .company-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
  }

  .timeline-content {
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem;
    align-items: center;
    text-align: center;
  }

  .timeline-dot {
    top: 15px;
  }

  .text-content {
    text-align: center;
  }
}

@media (max-width: 400px) {
  .profile-img {
    width: 90px;
    height: 90px;
  }
  .logo {
    font-size: 1.5rem;
  }
  .nav-links a {
    font-size: 0.9rem;
  }
  .timeline {
    padding-left: 15px;
  }
  .timeline-dot {
    left: -10px;
  }
}
