* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Poppins, sans-serif;
}

body {
  background: #f0f4f8;
  color: #1f2937;
  transition: background 0.3s, color 0.3s;
}

body.dark-mode {
  background: #1f2937;
  color: #f0f4f8;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: background 0.3s;
}

body.dark-mode .navbar {
  background: rgba(31, 41, 55, 0.95);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-size: 1.5rem;
  color: #10b981;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: #1f2937;
  font-weight: 500;
  transition: color 0.3s;
}

body.dark-mode nav a {
  color: #f0f4f8;
}

nav a:hover {
  color: #10b981;
}

.dark-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #10b981;
}

.section {
  padding: 100px 0;
  text-align: center;
}

h2 {
  margin-bottom: 40px;
  color: #10b981;
  font-size: 2.5rem;
}

/* HERO */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding-top: 80px; /* Account for fixed navbar */
}

.hero-title {
  font-size: 4rem;
  background: linear-gradient(270deg,#10b981,#059669,#10b981);
  background-size: 400% 400%;
  animation: gradient 6s infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes gradient {
  0% {background-position:0%}
  50% {background-position:100%}
  100% {background-position:0%}
}

.hero-subtitle {
  margin: 20px 0;
  font-size: 1.2rem;
  color: #4b5563;
}

body.dark-mode .hero-subtitle {
  color: #9ca3af;
}

.btn {
  background: #10b981;
  color: white;
  padding: 16px 32px;
  border-radius: 50px;
  text-decoration: none;
  display: inline-block;
  transition: 0.3s;
  font-weight: 500;
}

.btn:hover {
  transform: scale(1.05);
  background: #059669;
  box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.resume-btn {
  margin-top: 20px;
}

/* CIRCLES */
.hero-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(16,185,129,0.2);
  filter: blur(60px);
  transition: transform 0.3s;
}

.c1 {width:300px;height:300px; top: 10%; left: 20%;}
.c2 {width:200px;height:200px; bottom: 15%; right: 25%;}
.c3 {width:250px;height:250px; top: 50%; right: 10%;}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.skill {
  display: flex;
  align-items: center;
  gap: 15px;
  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

body.dark-mode .skill {
  background: #374151;
}

.skill:hover {
  transform: translateY(-5px);
}

.skill i {
  font-size: 2rem;
  color: #10b981;
}

.bar {
  flex: 1;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

body.dark-mode .bar {
  background: #4b5563;
}

.bar div {
  height: 12px;
  width: 0;
  background: linear-gradient(to right, #10b981, #059669);
  transition: width 1.5s ease;
}

.percent {
  width: 40px;
  font-weight: 500;
  color: #10b981;
}

/* TIMELINE */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: #10b981;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 20px 40px;
  position: relative;
  background: inherit;
  width: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-content {
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body.dark-mode .timeline-content {
  background: #374151;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background: #10b981;
  border-radius: 50%;
  top: 40px;
}

.timeline-item:nth-child(even)::after {
  left: -8px;
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: left;
  overflow: hidden;
}

body.dark-mode .project-card {
  background: #374151;
}

.project-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
  transition: transform 0.3s;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(16,185,129,0.2);
}

.project-card h3 {
  margin-bottom: 10px;
  color: #10b981;
}

.tech-stack {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 10px;
}

body.dark-mode .tech-stack {
  color: #9ca3af;
}

.project-link {
  display: inline-block;
  margin-right: 10px;
  margin-top: 5px;
  color: #10b981;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.project-link:hover {
  color: #059669;
}

/* BLOG */
#blog p {
  font-size: 1.1rem;
  color: #4b5563;
}

body.dark-mode #blog p {
  color: #9ca3af;
}

/* FUN FACTS */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.fact {
  position: relative;
  padding: 40px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(16,185,129,0.12),
    rgba(16,185,129,0.04)
  );
  border: 1px solid rgba(16,185,129,0.25);
  backdrop-filter: blur(6px);
  transition: transform .35s ease, box-shadow .35s ease;
}

.fact:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(16,185,129,.25);
}

.fact p {
  font-size: 3rem;
  font-weight: 600;
  color: #059669;
  margin-bottom: 10px;
}

.fact span {
  font-size: 1rem;
  color: #374151;
  letter-spacing: .4px;
}

body.dark-mode .fact span {
  color: #9ca3af;
}

/* CONTACT */
.contact-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.contact-item {
  background: white;
  padding: 20px 30px;
  border-radius: 16px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body.dark-mode .contact-item {
  background: #374151;
}

.contact-item:hover {
  box-shadow: 0 8px 20px rgba(16,185,129,.4);
  transform: translateY(-5px);
}

.contact-item i {
  font-size: 1.5rem;
  color: #10b981;
}

/* TOAST */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  font-weight: 500;
}

#toast.show {
  opacity: 1;
}

/* ANIMATIONS */
.fade-in,
.slide-up,
.slide-left,
.slide-right {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.slide-left {transform: translateX(-40px);}
.slide-right {transform: translateX(40px);}

.visible {
  opacity: 1;
  transform: translate(0);
}

canvas {
  position: absolute;
  inset: 0;
}

/* FOOTER */
footer {
  background: #1f2937;
  color: white;
  padding: 40px 0;
  text-align: center;
  transition: background 0.3s;
}

body.dark-mode footer {
  background: #111827;
}

footer p {
  margin-bottom: 10px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-links a {
  color: white;
  font-size: 1.5rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: #10b981;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section {
    padding: 80px 0;
  }

  .navbar .container {
    flex-direction: column;
    gap: 10px;
  }

  nav ul {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .timeline::after {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 60px;
    padding-right: 20px;
    text-align: left;
  }

  .timeline-item:nth-child(even) {
    left: 0;
  }

  .timeline-item::after {
    left: 12px;
  }
}