:root {
  color-scheme: dark;
  --bg: #0b0f17;
  --panel: #121927;
  --panel-strong: #172033;
  --text: #eef4ff;
  --muted: #9ba8bd;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #72e4c5;
  --accent-2: #88a7ff;
  --warn: #ffd88a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 5%, rgba(114, 228, 197, 0.17), transparent 34rem),
    radial-gradient(circle at 85% 8%, rgba(136, 167, 255, 0.16), transparent 32rem),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.hero,
.section,
.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 28px 0 64px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0 48px;
}

.brand {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.nav-links,
.lang-switch,
.hero-actions,
.card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a {
  padding: 8px 10px;
}

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

.lang-switch {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.lang-switch button {
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: end;
  gap: 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: clamp(3.6rem, 9vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.hero-copy {
  max-width: 740px;
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.35rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 800;
}

.button.primary {
  background: var(--accent);
  color: #07120f;
  border-color: transparent;
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.button.tg {
  background: #2AABEE;
  color: #fff;
  border-color: transparent;
  animation: beat 2s ease-in-out infinite;
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  10% { transform: scale(1.06); }
  20% { transform: scale(1); }
  30% { transform: scale(1.04); }
  40% { transform: scale(1); }
}

.signal-card,
.project-card,
.stats article,
.stack-grid article,
.case-list article {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
}

.signal-card {
  padding: 26px;
  border-radius: 28px;
}

.signal-card span,
.metric,
.pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.signal-card span {
  margin-bottom: 18px;
  color: var(--accent);
  text-transform: uppercase;
}

.signal-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.7rem;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.signal-card p,
.section-heading p,
.project-card p,
.case-list p,
.stack-grid p,
.footer {
  color: var(--muted);
}

.section {
  padding: 54px 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 0;
}

.stats article {
  padding: 22px;
  border-radius: 24px;
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  margin-bottom: 6px;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

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

.project-card {
  min-height: 100%;
  padding: 22px;
  border-radius: 28px;
}

.project-card.featured {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(114, 228, 197, 0.18), rgba(136, 167, 255, 0.12)),
    var(--panel);
}

.card-top {
  justify-content: space-between;
  margin-bottom: 18px;
}

.pill {
  padding: 7px 10px;
  background: rgba(114, 228, 197, 0.12);
  color: var(--accent);
}

.metric {
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--warn);
}

.project-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.card-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.card-gallery img {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.card-gallery img:hover {
  opacity: 0.85;
}

.card-gallery:has(img:only-child) {
  grid-template-columns: 1fr;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.lightbox-close:hover {
  opacity: 1;
}

.contrast {
  width: 100%;
  max-width: none;
  padding: 76px max(16px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, 0.045);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.case-list article,
.stack-grid article {
  padding: 22px;
  border-radius: 24px;
}

.case-list .metric {
  margin-bottom: 18px;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
}

.footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .hero-grid,
  .stats,
  .project-grid,
  .case-list,
  .stack-grid {
    grid-template-columns: 1fr 1fr;
  }

  .signal-card,
  .project-card.featured {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .hero,
  .section,
  .footer {
    width: min(100% - 24px, 1180px);
  }

  .nav {
    align-items: flex-start;
    padding-bottom: 36px;
  }

  .nav-links {
    display: none;
  }

  .hero-grid,
  .stats,
  .project-grid,
  .case-list,
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .signal-card,
  .project-card.featured {
    grid-column: span 1;
  }

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

  .button {
    width: 100%;
  }

  h1 {
    font-size: clamp(3.4rem, 18vw, 5rem);
  }
}
