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

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #eef2ff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --border: #e2e8f0;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

body.dark {
  --bg: #020617;
  --surface: #0f172a;
  --surface-2: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --border: #1e293b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: min(1140px, 92%);
  margin: auto;
}

.section {
  padding: 110px 0;
}

.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.loader {
  width: 52px;
  height: 52px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  transition: 0.3s;
}

.site-header.scrolled {
  background: rgba(255,255,255,0.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15,23,42,0.08);
}

body.dark .site-header.scrolled {
  background: rgba(2,6,23,0.84);
}

.navbar {
  width: min(1140px, 92%);
  margin: auto;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.65rem;
  font-weight: 800;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  color: var(--muted);
  transition: 0.3s;
}

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

.theme-btn,
.menu-toggle {
  border: 0;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
}

.theme-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--text);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(37,99,235,0.20), transparent 35%),
    radial-gradient(circle at 85% 70%, rgba(96,165,250,0.24), transparent 32%);
  pointer-events: none;
}

.hero-grid,
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 70px;
  align-items: center;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--primary);
  font-weight: 700;
  background: var(--surface);
  margin-bottom: 18px;
  font-size: 0.88rem;
}

h1 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
  margin-bottom: 24px;
}

h1 span,
h2 span {
  color: var(--primary);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

.hero-text,
.section-content p,
.section-title p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin: 34px 0;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.3s;
}

.btn.primary {
  background: var(--primary);
  color: white;
}

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

.btn.secondary {
  border-color: var(--border);
  background: var(--surface);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 800;
  transition: 0.3s;
}

.social-links a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  justify-content: center;
}

.profile-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 34px;
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  text-align: center;
  transform: rotate(2deg);
}

.profile-img {
  width: 220px;
  height: 220px;
  margin: 0 auto 24px;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--primary), #93c5fd);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 4rem;
  font-weight: 900;
}

.availability {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(34,197,94,0.12);
  color: #16a34a;
  font-weight: 800;
}

.availability span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
}

.stats {
  padding: 45px 0;
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  gap: 24px;
}

.stats h2 {
  color: var(--primary);
  margin-bottom: 0;
}

.stats p {
  color: var(--muted);
  font-weight: 600;
}

.image-box {
  min-height: 440px;
  border-radius: 34px;
  background: linear-gradient(135deg, var(--primary), #0f172a);
  display: grid;
  place-items: center;
  color: white;
  text-align: center;
  font-size: 2.1rem;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 30px 0;
}

.info-grid div {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.section-title {
  max-width: 720px;
  margin: 0 auto 54px;
  text-align: center;
}

.cards-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card,
.project-card,
.timeline-item,
.contact-form,
.testimonial-slider,
.skills-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(15,23,42,0.06);
}

.service-card {
  padding: 30px;
  transition: 0.3s;
}

.service-card:hover,
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--surface-2);
  font-size: 1.7rem;
  margin-bottom: 22px;
}

.service-card h3,
.project-card h3,
.timeline-item h3 {
  margin-bottom: 10px;
}

.service-card p,
.project-card p,
.timeline-item p {
  color: var(--muted);
}

.skills-box {
  padding: 32px;
}

.skill {
  margin-bottom: 22px;
}

.skill span {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}

.skill div {
  height: 12px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.skill i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.filter {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.filter.active {
  background: var(--primary);
  color: white;
}

.project-grid {
  grid-template-columns: repeat(2, 1fr);
}

.project-card {
  overflow: hidden;
  transition: 0.3s;
}

.project-img {
  min-height: 240px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  display: grid;
  place-items: center;
  color: #1e3a8a;
  font-size: 1.6rem;
  font-weight: 900;
}

body.dark .project-img {
  background: linear-gradient(135deg, #1e3a8a, #020617);
  color: #dbeafe;
}

.project-body {
  padding: 26px;
}

.project-body a {
  display: inline-block;
  margin-top: 14px;
  color: var(--primary);
  font-weight: 900;
}

.timeline {
  max-width: 850px;
  margin: auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  margin-left: 70px;
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -58px;
  top: 32px;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  border: 5px solid var(--bg);
}

.timeline-item span {
  color: var(--primary);
  font-weight: 900;
}

.testimonial-slider {
  max-width: 800px;
  margin: auto;
  padding: 38px;
  text-align: center;
}

.testimonial {
  display: none;
}

.testimonial.active {
  display: block;
}

.testimonial p {
  font-size: 1.3rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: var(--border);
  cursor: pointer;
}

.slider-dots button.active {
  background: var(--primary);
}

.contact-info {
  margin-top: 25px;
}

.contact-form {
  padding: 32px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}

.form-message {
  margin-top: 14px;
  font-weight: 800;
}

.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--primary);
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.8s ease;
}

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

@media (max-width: 980px) {
  .hero-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links {
    position: fixed;
    top: 82px;
    right: -100%;
    width: min(320px, 90%);
    height: calc(100vh - 82px);
    background: var(--surface);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 30px;
    transition: 0.35s;
  }

  .nav-links.open {
    right: 0;
  }

  .menu-toggle {
    display: block;
  }
}

@media (max-width: 680px) {
  .section {
    padding: 80px 0;
  }

  .project-grid,
  .cards-grid,
  .stats-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    transform: none;
  }

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

  .timeline-item {
    margin-left: 42px;
  }

  .timeline::before {
    left: 12px;
  }

  .timeline-item::before {
    left: -39px;
  }
}
