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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition:
    background-color 0.3s ease,
    color 0.2s ease;
  scroll-behavior: smooth;
  line-height: 1.5;
}

/* CSS VARIABLES (Light) */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.2);
  --card-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.08);
  --border-light: #e2e8f0;
  --hero-gradient: linear-gradient(135deg, #f5f7ff 0%, #eef2ff 100%);
  --badge-bg: #eef2ff;
}

/* DARK MODE */
body.dark {
  --bg-primary: #0a0c10;
  --bg-secondary: #11151c;
  --surface: #1a1f2a;
  --surface-alt: #0f1219;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --accent: #818cf8;
  --accent-dark: #6366f1;
  --accent-glow: rgba(129, 140, 248, 0.25);
  --card-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.5);
  --border-light: #2d3a4a;
  --hero-gradient: linear-gradient(135deg, #0f1722 0%, #0a0f1a 100%);
  --badge-bg: #1e293b;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background-color: rgba(var(--bg-primary-rgb), 0.82);
  border-bottom: 1px solid var(--border-light);
  transition: 0.2s;
}

:root {
  --bg-primary-rgb: 255, 255, 255;
}

body.dark {
  --bg-primary-rgb: 10, 12, 16;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.logo a {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(130deg, var(--accent), #a855f7);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.nav-links li a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text-primary);
  transition: 0.2s;
  font-size: 1rem;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.theme-toggle,
.mobile-toggle {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: transform 0.2s;
}

.mobile-toggle {
  display: none;
}

/* Hero */
.hero {
  background: var(--hero-gradient);
  padding: 6rem 0 7rem 0;
  border-bottom: 1px solid var(--border-light);
}

.hero-content {
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  background: var(--badge-bg);
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: 40px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.hero-highlight {
  color: var(--accent);
  border-bottom: 3px solid var(--accent);
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem auto;
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-outline {
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 6px 14px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
}

.btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-3px);
}

/* section */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 70px;
  height: 4px;
  background: var(--accent);
  border-radius: 4px;
}

.title-center {
  text-align: center;
  display: block;
}

.title-center:after {
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.3rem;
  font-size: 1.05rem;
}

.stats-grid {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item h3 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
}

.about-icon-card {
  background: var(--surface);
  border-radius: 32px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-light);
}

.about-icon-card i {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* Skills marquee style grid */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 60px;
  padding: 0.75rem 1.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: var(--card-shadow);
}

.skill-card i {
  font-size: 1.3rem;
  color: var(--accent);
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.service-card {
  background: var(--surface);
  border-radius: 28px;
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--border-light);
  transition: 0.25s;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
}

.service-icon {
  font-size: 2.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--surface);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: 0.3s;
  border: 1px solid var(--border-light);
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
}

/* Image Container */
.project-img {
  width: 100%;
  height: 230px;   /* same height for all cards */
  overflow: hidden;
  position: relative;
  background: #111;
}

/* Image Fit */
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;  
  display: block;
  transition: 0.5s ease;
}

/* Hover Zoom Effect */
.project-card:hover .project-img img {
  transform: scale(1.08);
}

.project-info {
  padding: 1.6rem;
}
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.tech-stack span {
  background: var(--badge-bg);
  padding: 0.2rem 1rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Testimonials Swiper */
.testimonial-slider {
  background: var(--surface);
  border-radius: 32px;
  padding: 2rem 1rem;
  border: 1px solid var(--border-light);
}

.swiper-slide {
  padding: 1rem;
  text-align: center;
}

.testimonial-card {
  background: var(--surface-alt);
  border-radius: 28px;
  padding: 2rem;
  margin: 0.5rem;
}

.testimonial-card i.fa-quote-left {
  font-size: 2rem;
  color: var(--accent);
  opacity: 0.5;
  margin-bottom: 1rem;
  display: block;
}

.testimonial-card p {
  font-style: italic;
  margin: 1rem 0;
  color: var(--text-secondary);
}

.client-name {
  font-weight: 800;
  margin-top: 1rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form,
.contact-info {
  background: var(--surface);
  padding: 2rem;
  border-radius: 28px;
  border: 1px solid var(--border-light);
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-family: inherit;
  color: var(--text-primary);
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.social-links {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.social-links a {
  background: var(--bg-secondary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: 0.2s;
  color: var(--text-primary);
}

.social-links a:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-4px);
}

/* back to top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  z-index: 99;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

footer {
  border-top: 1px solid var(--border-light);
  padding: 2rem 0;
  text-align: center;
}

/* Responsive */
@media (max-width: 880px) {
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 28px;
    margin-top: 1rem;
    gap: 1rem;
  }

  .nav-links.show {
    display: flex;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 550px) {
  .hero h1 {
    font-size: 2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}
