/* Font setup */
body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #f6f8fa;
  color: #222;
  transition: background 0.3s, color 0.3s;
}
:root {
  --primary: #0052D4;
  --secondary: #65C7F7;
  --light: #fff;
  --gray: #f6f8fa;
  --dark: #222;
  --card-radius: 16px;
}

/* Dark mode */
body.dark-mode {
  background: #181c24;
  color: #e3e6ea;
}
body.dark-mode .bg-light {
  background: #23272f !important;
}
body.dark-mode .card {
  background: #23272f;
  color: #e3e6ea;
}
body.dark-mode .navbar,
body.dark-mode .bg-dark {
  background: #181c24 !important;
}
body.dark-mode .btn-outline-light {
  border-color: #65C7F7;
  color: #65C7F7;
}
body.dark-mode .btn-outline-light:hover {
  background: #65C7F7;
  color: #181c24;
}

/* Navbar */
.navbar {
  font-family: 'Poppins', 'Inter', sans-serif;
  background: var(--primary) !important;
}
.navbar-brand {
  font-size: 1.3rem;
}
.nav-link {
  font-size: 1rem;
  transition: color 0.2s;
}
.nav-link:hover {
  color: var(--secondary) !important;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(120deg, #0052D4 0%, #65C7F7 100%), url('../images/bg-hero.jpg') center/cover no-repeat;
  color: var(--light);
  position: relative;
  box-shadow: 0 8px 32px rgba(0,82,212,0.13);
  padding-top: 80px;
  padding-bottom: 40px;
  overflow: hidden;
}
.hero-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,82,212,0.25);
  z-index: 0;
}
.hero-section > * {
  position: relative;
  z-index: 1;
}
.hero-section .rounded-circle {
  border: 4px solid var(--secondary);
  box-shadow: 0 4px 24px rgba(0,82,212,0.18);
}

/* Typewriter effect */
#typewriter {
  border-right: 2px solid var(--light);
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  min-width: 220px;
}

/* Timeline Horizontal */
.timeline-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  align-items: flex-start;
  margin-top: 32px;
  background: linear-gradient(90deg, #e3e6ea 0%, #f6f8fa 100%);
  border-radius: 24px;
  box-shadow: 0 2px 16px rgba(0,82,212,0.07);
  padding: 32px 16px;
}
.timeline-step {
  position: relative;
  min-width: 180px;
  max-width: 220px;
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: 0 2px 12px rgba(0,82,212,0.09);
  padding: 18px 16px 16px 16px;
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
}
.timeline-step:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 8px 32px rgba(0,82,212,0.13);
}
.timeline-dot {
  position: absolute;
  left: -14px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  background: var(--secondary);
}
.timeline-content h5 {
  font-family: 'Inter', 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--primary);
}

/* Skill Card */
.skill-card {
  border-radius: var(--card-radius);
  transition: transform 0.2s, box-shadow 0.2s;
  background: linear-gradient(120deg, #f6f8fa 0%, #e3e6ea 100%);
  box-shadow: 0 2px 12px rgba(0,82,212,0.09);
  border: none;
}
.skill-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(0,82,212,0.13);
}
.progress {
  background: #e3e6ea;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,82,212,0.07);
}
.progress-bar {
  border-radius: 8px;
}

/* Project Grid */
.project-card {
  transition: transform 0.2s, box-shadow 0.2s;
  background: linear-gradient(120deg, #e3e6ea 0%, #f6f8fa 100%);
  border-radius: var(--card-radius);
  box-shadow: 0 2px 12px rgba(0,82,212,0.09);
  border: none;
}
.project-card:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(0,82,212,0.13);
}
.badge {
  font-size: 0.85em;
  margin-bottom: 2px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,82,212,0.07);
}

/* Ripple Button */
.ripple {
  position: relative;
  overflow: hidden;
}
.ripple:after {
  content: "";
  display: block;
  position: absolute;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  left: 50%;
  top: 50%;
  pointer-events: none;
  background: rgba(101,199,247,0.3);
  transform: scale(0);
  transition: transform 0.4s, opacity 0.8s;
  opacity: 0;
}
.ripple:active:after {
  transform: scale(1.2);
  opacity: 1;
  left: 50%;
  top: 50%;
}

/* Contact Form */
#contactForm {
  border-radius: var(--card-radius);
  background: linear-gradient(120deg, #f6f8fa 0%, #e3e6ea 100%);
  box-shadow: 0 2px 12px rgba(0,82,212,0.09);
  border: none;
}
#contactForm .form-label {
  font-weight: 500;
}
#contactForm .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--secondary);
}

/* Back to top */
#backToTop {
  z-index: 10;
  transition: opacity 0.3s;
}
#backToTop.hide {
  opacity: 0;
  pointer-events: none;
}

/* Footer */
footer {
  font-size: 0.95em;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #0052D4 0%, #65C7F7 100%);
  box-shadow: 0 -2px 16px rgba(0,82,212,0.07);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 0.7s, transform 0.7s;
}
.reveal.active {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 991px) {
  .timeline-horizontal {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
    padding: 16px 4px;
  }
  .timeline-step {
    max-width: 100%;
    margin-left: 18px;
  }
  .col-md-3, .col-md-4, .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .hero-section {
    padding-top: 60px;
    padding-bottom: 20px;
  }
}
@media (max-width: 575px) {
  .hero-section h1 {
    font-size: 1.5rem !important;
  }
  .timeline-step {
    padding: 12px 8px 10px 8px;
  }
  .hero-section {
    padding-top: 40px;
    padding-bottom: 10px;
  }
}

/* Section backgrounds */
#about {
  background: linear-gradient(90deg, #e3e6ea 0%, #f6f8fa 100%);
  border-radius: 24px;
  margin-top: 32px;
  box-shadow: 0 2px 16px rgba(0,82,212,0.07);
}
#skills {
  background: linear-gradient(120deg, #f6f8fa 0%, #e3e6ea 100%);
  border-radius: 24px;
  margin-top: 32px;
  box-shadow: 0 2px 16px rgba(0,82,212,0.07);
}
#portfolio {
  background: linear-gradient(120deg, #e3e6ea 0%, #f6f8fa 100%);
  border-radius: 24px;
  margin-top: 32px;
  box-shadow: 0 2px 16px rgba(0,82,212,0.07);
}
#contact {
  background: linear-gradient(120deg, #f6f8fa 0%, #e3e6ea 100%);
  border-radius: 24px;
  margin-top: 32px;
  box-shadow: 0 2px 16px rgba(0,82,212,0.07);
}