/* === Base Styles === */
body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  background: #0e1116;
  color: #f5f5f5;
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  scroll-behavior: smooth;
}

.preload * {
  transition: none !important;
}

/* === Floating Navigation === */
#floating-nav {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(10px);
  border-radius: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  padding: 8px 22px;
  opacity: 0;
  animation: fadeIn 1.5s ease forwards 0.8s;
}

#floating-nav ul {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#floating-nav a {
  color: #f5f5f5;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
  position: relative;
  transition: color 0.3s ease;
}

#floating-nav a:hover {
  color: #ffd740;
}

#floating-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd740;
}

body.light #floating-nav {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.light #floating-nav a {
  color: #111;
}

body.light #floating-nav a.active::after {
  background: #0288d1;
}

@media (max-width: 768px) {
  #floating-nav {
    display: none;
  }
}

/* === Hero Section === */
.hero {
  text-align: center;
  padding: 5rem 1rem 3rem;
  background: linear-gradient(135deg, #00bcd4, #673ab7);
  color: white;
  position: relative;
  overflow: hidden;
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid #fff;
  margin-bottom: 1rem;
  object-fit: cover;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
}

/* === Links === */
.links {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.links a {
  color: white;
  font-size: 1.4rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.links a:hover {
  color: #ffd740;
  transform: scale(1.2);
}

/* === Resume Button === */
.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ffd740, #ffb300);
  color: #111;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease, box-shadow 0.3s ease;
}

.resume-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 20px rgba(255, 215, 64, 0.5);
}

/* === Sections === */
main {
  max-width: 950px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h2 {
  border-bottom: 2px solid #00bcd4;
  padding-bottom: 0.4rem;
  margin-top: 3rem;
  font-size: 1.6rem;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60px;
  height: 3px;
  background: #ffd740;
  border-radius: 2px;
}

/* === Skills === */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1rem;
}

.badges span {
  background: #1f1f1f;
  color: #00bcd4;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.badges span:hover {
  background: #00bcd4;
  color: #111;
  transform: translateY(-3px) scale(1.05);
}

/* === Timeline === */
.timeline .job {
  margin-bottom: 2rem;
  transition: transform 0.3s ease;
}

.timeline .job:hover {
  transform: translateX(5px);
}

.timeline h3 {
  color: #ffd740;
  margin: 0.4rem 0;
}

/* === Education === */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.card {
  background: #1a1a1a;
  padding: 1.2rem 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 188, 212, 0.25);
}

.card h3 {
  color: #ffd740;
  font-size: 1.05rem;
}

.card p {
  margin: 0.4rem 0 0;
  color: #ccc;
}

/* === Footer === */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background: #0a0a0a;
  color: #aaa;
  font-size: 0.9rem;
  transition: background 0.4s ease, color 0.4s ease;
  animation: fadeIn 1.5s ease;
}

/* === Light Mode === */
body.light {
  background: #f9f9f9;
  color: #111;
}

body.light .hero {
  background: linear-gradient(135deg, #03a9f4, #00bcd4);
}

body.light .resume-btn {
  background: linear-gradient(135deg, #03a9f4, #0288d1);
  color: #fff;
}

body.light .badges span {
  background: #e0f7fa;
  color: #00796b;
  border: 1px solid #b2ebf2;
}

body.light .badges span:hover {
  background: #00bcd4;
  color: #fff;
}

body.light .card {
  background: #fff;
  color: #222;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.light .card h3 {
  color: #0288d1;
}

body.light footer {
  background: #e6e6e6;
  color: #333;
}

/* === Theme Toggle === */
.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(20deg);
}

/* === Scroll Animations === */
.fade-up,
.fade-in,
.slide-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity, transform;
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Keyframes === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* === Scroll Progress Bar === */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #00bcd4, #ffd740);
  z-index: 9999;
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.6);
  transition: width 0.2s ease-out;
}

body.light #scroll-progress {
  background: linear-gradient(90deg, #03a9f4, #ff9800);
}

/* === Back to Top Button === */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #00bcd4, #673ab7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 188, 212, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 9999;
}

#back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(103, 58, 183, 0.6);
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 4px 20px rgba(0, 188, 212, 0.3);
  }

  50% {
    box-shadow: 0 6px 30px rgba(0, 188, 212, 0.5);
  }
}

/* === Responsive === */
@media (max-width: 768px) {
  .profile-pic {
    width: 110px;
    height: 110px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .resume-btn {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  .badges span {
    font-size: 0.85rem;
    padding: 5px 10px;
  }
}

@media (max-width: 480px) {
  .resume-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 25px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  footer {
    font-size: 0.8rem;
    padding: 1.5rem 1rem;
  }
}