:root {
  --bg: #0f1117;
  --bg-soft: #151824;
  --card: rgba(255, 255, 255, 0.06);
  --card-strong: rgba(255, 255, 255, 0.1);
  --text: #f5f7fb;
  --muted: #a8b0c3;
  --line: rgba(255, 255, 255, 0.12);
  --primary: #17f5b1;
  --primary-dark: #0dbb85;
  --blue: #4da3ff;
  --yellow: #ffd166;
  --danger: #ff5f56;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(23, 245, 177, 0.14), transparent 32%),
    radial-gradient(circle at 85% 20%, rgba(77, 163, 255, 0.12), transparent 34%),
    linear-gradient(135deg, #0f1117, #11131c 55%, #0b0d13);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: 0;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

/* Loader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: #0f1117;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-card {
  text-align: center;
}

.loader-logo {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #06100d;
  font-weight: 800;
  font-size: 1.35rem;
  box-shadow: 0 0 45px rgba(23, 245, 177, 0.25);
}

.loader-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Development Alert */
.development-alert {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(5, 7, 12, 0.76);
  backdrop-filter: blur(18px);
}

.development-alert.show {
  display: grid;
}

.alert-box {
  position: relative;
  width: min(560px, 100%);
  padding: 34px;
  border: 1px solid rgba(23, 245, 177, 0.3);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
    #11141d;
  box-shadow: var(--shadow);
}

.alert-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.alert-label,
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 8px 13px;
  border: 1px solid rgba(23, 245, 177, 0.22);
  border-radius: 999px;
  background: rgba(23, 245, 177, 0.08);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.alert-box h2 {
  margin: 20px 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.alert-box p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: 0.25s ease;
}

.site-header.scrolled {
  background: rgba(15, 17, 23, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #06100d;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--card-strong);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #07110e;
  box-shadow: 0 12px 28px rgba(23, 245, 177, 0.18);
}

.btn-outline {
  border: 1px solid rgba(23, 245, 177, 0.24);
  background: rgba(23, 245, 177, 0.07);
  color: var(--primary);
}

.btn-light {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
}

/* Hero */
.hero-section {
  min-height: calc(100vh - 82px);
  display: flex;
  align-items: center;
  padding-top: 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 54px;
}

.hero-content h1 {
  max-width: 720px;
  margin: 18px 0;
  font-size: clamp(2.5rem, 5vw, 4.9rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-content h1 span {
  display: block;
  color: var(--primary);
}

.hero-content p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 620px;
  margin-top: 34px;
}

.hero-stats div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.hero-stats strong {
  display: block;
  font-size: 1.15rem;
  color: var(--text);
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.88rem;
}

/* Code Window */
.hero-visual {
  position: relative;
}

.code-window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(15, 17, 23, 0.9);
  box-shadow: var(--shadow);
}

.window-header {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.window-header span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--danger);
}

.window-header span:nth-child(2) {
  background: var(--yellow);
}

.window-header span:nth-child(3) {
  background: var(--primary);
}

.code-body {
  padding: 30px;
  min-height: 360px;
  direction: ltr;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.98rem;
}

.code-body p {
  margin-bottom: 16px;
  color: #dce5f5;
}

.code-body em {
  color: var(--blue);
  font-style: normal;
}

.code-body b {
  color: var(--primary);
  font-weight: 600;
}

.indent {
  padding-left: 24px;
}

.typing-line::after {
  content: "|";
  color: var(--primary);
  animation: blink 0.8s infinite;
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(20, 24, 35, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  font-size: 0.88rem;
  font-weight: 700;
}

.floating-card i {
  color: var(--primary);
}

.card-one {
  top: 26px;
  right: -18px;
}

.card-two {
  bottom: 38px;
  left: -18px;
}

/* Section Heading */
.section-heading {
  max-width: 720px;
  margin-bottom: 38px;
}

.section-heading h2 {
  margin: 16px 0 10px;
  font-size: clamp(1.9rem, 3vw, 3.1rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.section-heading p {
  color: var(--muted);
  line-height: 1.8;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card,
.process-card,
.project-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
  transition: 0.25s ease;
}

.service-card::before,
.process-card::before,
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(23, 245, 177, 0.13), transparent 38%);
  opacity: 0;
  transition: 0.25s ease;
}

.service-card:hover,
.process-card:hover,
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(23, 245, 177, 0.28);
}

.service-card:hover::before,
.process-card:hover::before,
.project-card:hover::before {
  opacity: 1;
}

.card-icon {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 17px;
  background: rgba(23, 245, 177, 0.09);
  color: var(--primary);
  font-size: 1.25rem;
}

.service-card h3,
.process-card h3,
.project-card h3 {
  position: relative;
  margin-bottom: 10px;
  font-size: 1.12rem;
}

.service-card p,
.process-card p,
.project-card p {
  position: relative;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.94rem;
}

.service-more {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  background: transparent;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.service-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
  padding: 28px;
  border: 1px solid rgba(23, 245, 177, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(23, 245, 177, 0.1), rgba(77, 163, 255, 0.07)),
    rgba(255, 255, 255, 0.045);
}

.service-preview span {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.service-preview h3 {
  margin: 6px 0 8px;
  font-size: 1.45rem;
}

.service-preview p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.75;
}

.service-preview > i {
  font-size: 2.6rem;
  color: var(--primary);
}

/* Technologies */
.tech-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tech-tab {
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.tech-tab.active,
.tech-tab:hover {
  background: rgba(23, 245, 177, 0.1);
  color: var(--primary);
}

.tech-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.tech-item i {
  font-size: 1.5rem;
  color: var(--primary);
}

.tech-item span {
  font-weight: 700;
}

/* Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.process-card span {
  position: relative;
  display: block;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 18px;
}

.process-card i {
  position: relative;
  color: var(--blue);
  font-size: 1.5rem;
  margin-bottom: 18px;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.project-card i {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 16px;
  background: rgba(77, 163, 255, 0.09);
  color: var(--blue);
  font-size: 1.2rem;
}

/* Contact */
.contact-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 38px;
  border: 1px solid rgba(23, 245, 177, 0.22);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(23, 245, 177, 0.12), rgba(77, 163, 255, 0.08)),
    rgba(255, 255, 255, 0.05);
}

.contact-content {
  max-width: 660px;
}

.contact-content h2 {
  margin: 16px 0 10px;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.contact-content p {
  color: var(--muted);
  line-height: 1.8;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 250px;
}

/* Scroll Top */
.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #06100d;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: 0.25s ease;
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animations */
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid,
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .process-grid,
  .projects-grid,
  .tech-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-visual {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .main-nav {
    position: fixed;
    top: 82px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: rgba(15, 17, 23, 0.96);
    backdrop-filter: blur(18px);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 13px 15px;
  }

  .header-actions .btn {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .hero-section {
    padding-top: 44px;
  }

  .hero-grid,
  .services-grid,
  .hero-stats,
  .process-grid,
  .projects-grid,
  .tech-content {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: clamp(2.25rem, 12vw, 3.8rem);
  }

  .floating-card {
    display: none;
  }

  .service-preview,
  .contact-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-actions {
    width: 100%;
  }

  .contact-actions .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .section {
    padding: 72px 0;
  }

  .container {
    width: min(100% - 24px, 1180px);
  }

  .alert-box,
  .contact-wrapper {
    padding: 24px;
  }

  .brand small {
    display: none;
  }

  .code-body {
    min-height: 300px;
    padding: 22px;
    font-size: 0.86rem;
  }

  .hero-actions .btn {
    width: 100%;
  }
}