:root {
  --bg-start: #050b1a;
  --bg-mid: #0c1830;
  --bg-end: #0f2947;
  --surface: rgba(7, 15, 32, 0.68);
  --surface-elevated: rgba(12, 24, 50, 0.86);
  --surface-border: rgba(56, 189, 248, 0.32);
  --text-main: #e7f0ff;
  --text-soft: #9db3d2;
  --teal: #2dd4bf;
  --teal-deep: #99f6e4;
  --orange: #fb923c;
  --orange-deep: #fdba74;
  --link: #fdba74;
  --chip-bg: rgba(8, 21, 43, 0.95);
  --btn-ghost-bg: rgba(15, 23, 42, 0.72);
  --mesh-a: #0891b2;
  --mesh-b: #f97316;
  --mesh-c: #14b8a6;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.5);
  --card-hover-shadow: 0 28px 56px rgba(6, 182, 212, 0.2);
  --focus-ring: #22d3ee;
  --radius-xl: 24px;
  --radius-md: 16px;
}

[data-theme="light"] {
  --bg-start: #fff7ed;
  --bg-mid: #f0fdfa;
  --bg-end: #ecfeff;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-elevated: rgba(255, 255, 255, 0.9);
  --surface-border: rgba(14, 116, 144, 0.18);
  --text-main: #1f2937;
  --text-soft: #475569;
  --teal: #0f766e;
  --teal-deep: #115e59;
  --orange: #ea580c;
  --orange-deep: #c2410c;
  --link: #c2410c;
  --chip-bg: #ffffff;
  --btn-ghost-bg: rgba(255, 255, 255, 0.85);
  --mesh-a: #67e8f9;
  --mesh-b: #fdba74;
  --mesh-c: #5eead4;
  --shadow: 0 24px 60px rgba(15, 118, 110, 0.16);
  --card-hover-shadow: 0 28px 56px rgba(15, 118, 110, 0.22);
  --focus-ring: #0891b2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text-main);
  background: linear-gradient(140deg, var(--bg-start) 0%, var(--bg-mid) 45%, var(--bg-end) 100%);
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  margin: 0;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.mesh {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
  opacity: 0.68;
  pointer-events: none;
}

.mesh-a {
  width: 340px;
  height: 340px;
  background: var(--mesh-a);
  top: -90px;
  right: -80px;
}

.mesh-b {
  width: 360px;
  height: 360px;
  background: var(--mesh-b);
  bottom: -120px;
  left: -90px;
}

.mesh-c {
  width: 260px;
  height: 260px;
  background: var(--mesh-c);
  top: 45%;
  right: 15%;
}

.topbar {
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.icon-control {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 172px;
}

.control-title {
  color: var(--text-soft);
  font-size: 0.74rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.icon-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.3rem;
  border: 1px solid var(--surface-border);
  background: color-mix(in srgb, var(--surface-elevated) 85%, transparent);
  border-radius: 12px;
  width: fit-content;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface-border) 25%, transparent);
}

.icon-btn {
  width: 42px;
  height: 38px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0;
  cursor: pointer;
  transition: transform 200ms ease, color 200ms ease, border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  color: var(--text-main);
  border-color: color-mix(in srgb, var(--surface-border) 65%, transparent);
}

.icon-btn.is-active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(130deg, var(--teal) 0%, var(--orange) 100%);
  box-shadow: 0 7px 18px rgba(20, 184, 166, 0.25);
}

[data-theme="light"] .icon-btn.is-active {
  color: #ffffff;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn svg circle {
  fill: color-mix(in srgb, currentColor 18%, transparent);
}

.icon-btn.is-active svg circle {
  fill: rgba(255, 255, 255, 0.15);
}

.icon-btn-lang {
  width: 60px;
}

.icon-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.icon-btn:focus-visible {
  border: 1px solid var(--surface-border);
  outline: none;
}

.hero {
  padding: 3.1rem 0 2.2rem;
}

.eyebrow,
.section-kicker,
.card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.74rem;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface-elevated);
  color: var(--teal-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 1rem;
  max-width: 780px;
  font-size: clamp(2.1rem, 4vw, 4.1rem);
}

.lead {
  margin-top: 1rem;
  max-width: 720px;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.7;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 0.72rem 1rem;
  font-size: 0.94rem;
  text-decoration: none;
  font-weight: 700;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease, border-color 220ms ease;
}

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

.btn-primary {
  background: linear-gradient(130deg, var(--teal) 0%, var(--orange) 100%);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(20, 184, 166, 0.25);
}

.btn-ghost {
  background: var(--btn-ghost-bg);
  border-color: var(--surface-border);
  color: var(--teal-deep);
}

.roadmap {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 1.4rem 1.35rem;
  margin: 0 0 1.6rem;
}

.section-head h2 {
  margin-top: 0.8rem;
  font-size: clamp(1.4rem, 2.7vw, 2.2rem);
}

.timeline {
  margin-top: 1.2rem;
  display: grid;
  gap: 1rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--teal), var(--orange));
  opacity: 0.44;
}

.step {
  position: relative;
  padding-left: 2.8rem;
}

.step-dot {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  background: var(--bg-mid);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--teal) 18%, transparent);
}

.step.done .step-dot {
  background: linear-gradient(145deg, var(--teal), var(--orange));
  border: none;
}

.step-content {
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.step-tag {
  color: var(--teal-deep);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.step-content h3 {
  margin-top: 0.48rem;
  font-size: 1.3rem;
}

.step-content p {
  margin-top: 0.56rem;
  color: var(--text-soft);
  line-height: 1.65;
}

.step-content a {
  margin-top: 0.72rem;
  display: inline-block;
  color: var(--link);
  text-decoration: none;
  font-weight: 700;
}

.step-content a:hover {
  text-decoration: underline;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 1.35rem;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

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

.project-card h3,
.project-card h2 {
  margin-top: 0.75rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.project-card p {
  margin-top: 0.75rem;
  color: var(--text-soft);
  line-height: 1.65;
}

.chip-wrap {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  padding: 0.36rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  border: 1px solid var(--surface-border);
  background: var(--chip-bg);
  color: var(--teal-deep);
  font-weight: 700;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.metric-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--teal-deep);
}

.metric-label {
  margin-top: 0.2rem;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.footer {
  padding: 1.4rem 0 2.4rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.single {
  margin-bottom: 1.3rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 540ms ease var(--delay, 0ms), transform 540ms ease var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .control-group {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1120px, calc(100% - 1.3rem));
  }

  .hero {
    padding-top: 2.1rem;
  }

  .hero-actions,
  .card-actions,
  .control-group {
    flex-direction: column;
    align-items: stretch;
  }

  .icon-control {
    min-width: 0;
  }

  .btn {
    width: 100%;
  }

  .icon-switch {
    width: 100%;
  }

  .icon-btn {
    flex: 1;
    width: auto;
  }

  .project-card,
  .roadmap {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
