:root {
  --bg: #070914;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #a7b0c2;
  --brand: #ff3d5a;
  --brand-2: #7c3aed;
  --cyan: #22d3ee;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 61, 90, 0.3), transparent 30rem),
    radial-gradient(circle at 82% 0%, rgba(34, 211, 238, 0.22), transparent 30rem),
    linear-gradient(135deg, #070914 0%, #111827 48%, #09090f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto 8% 8% auto;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.22);
  filter: blur(70px);
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 20, 0.72);
  backdrop-filter: blur(18px);
}

.logo {
  position: relative;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.logo::before {
  content: "</>";
  margin-right: 10px;
  color: var(--cyan);
}

.nav-links {
  display: flex;
  gap: clamp(12px, 2vw, 28px);
}

.nav-links a {
  position: relative;
  color: #dbeafe;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
  transition: width 0.25s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* HERO */
.hero {
  position: relative;
  display: grid;
  min-height: 92vh;
  place-items: center;
  padding: 130px 20px 90px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 12% 9%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
}

.hero-content {
  position: relative;
  max-width: 980px;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 7.6rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
  text-wrap: balance;
}

.hero h1::first-line {
  color: transparent;
  background: linear-gradient(90deg, #fff, #93c5fd 45%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero p {
  max-width: 700px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.28rem);
}

/* BUTTONS */
.cta {
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  margin: 8px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.red {
  background: linear-gradient(135deg, var(--brand), #f97316);
  box-shadow: 0 16px 40px rgba(255, 61, 90, 0.28);
}

.red:hover {
  box-shadow: 0 20px 50px rgba(249, 115, 22, 0.34);
}

.ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.ghost:hover {
  border-color: rgba(34, 211, 238, 0.65);
}

/* STATS */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 16px;
  max-width: 680px;
  margin: 56px auto 0;
}

.stats > div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.stats h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.stats p {
  margin: 5px 0 0;
  font-size: 0.88rem;
}

/* SECTION */
.section,
.dark-section,
.cta-section {
  padding: 105px 20px;
  text-align: center;
}

.section h2,
.dark-section h2,
.cta-section h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.subtitle {
  max-width: 640px;
  margin: 18px auto 42px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* GLASS CARDS */
.glass-grid,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  max-width: 1120px;
  margin: 0 auto;
}

.glass-card,
.card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.glass-card::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.2), transparent 55%);
  transition: opacity 0.25s ease;
}

.glass-card:hover,
.card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.42);
  background: var(--panel-strong);
}

.glass-card:hover::before,
.card:hover::before {
  opacity: 1;
}

.glass-card h3,
.card h3 {
  position: relative;
  margin-bottom: 12px;
  font-size: 1.28rem;
}

.glass-card p,
.card p {
  position: relative;
  color: var(--muted);
}

/* DARK SECTION */
.dark-section {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.55);
}

.timeline {
  max-width: 760px;
  margin: 44px auto 0;
  text-align: left;
  counter-reset: steps;
}

.timeline div {
  position: relative;
  margin: 18px 0;
  padding: 22px 24px 22px 72px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: #d9e4f5;
  background: rgba(255, 255, 255, 0.055);
}

.timeline div::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  left: 22px;
  top: 50%;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  color: #020617;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), #a7f3d0);
  transform: translateY(-50%);
}

/* GRID PROJECTS */
.grid {
  margin-top: 42px;
}

.card {
  min-height: 180px;
  text-align: left;
}

.card h3::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
}

/* CTA SECTION */
.cta-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 30%, rgba(255, 255, 255, 0.22), transparent 18rem),
    linear-gradient(100deg, #ff3d5a, #7c3aed 55%, #0891b2);
}

.cta-section p {
  max-width: 560px;
  margin: 16px auto 20px;
  color: rgba(255, 255, 255, 0.84);
}

/* FOOTER */
footer {
  padding: 34px 20px;
  border-top: 1px solid var(--line);
  color: #94a3b8;
  background: rgba(2, 6, 23, 0.86);
  text-align: center;
}

@media (max-width: 720px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero {
    padding-top: 100px;
  }

  .hero::before {
    inset: 8% 4%;
    border-radius: 28px;
  }

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