:root {
  color-scheme: light;
  --bg: #f5eee0;
  --bg-soft: #fdf8ef;
  --text: #12212a;
  --muted: #4a5b65;
  --line: #d8d1bf;
  --brand: #0c8a8e;
  --brand-dark: #0b6d71;
  --highlight: #e66b2c;
  --spot-1: rgba(12, 138, 142, 0.14);
  --spot-2: rgba(230, 107, 44, 0.16);
  --topbar-border: rgba(216, 209, 191, 0.9);
  --topbar-bg: rgba(253, 248, 239, 0.84);
  --hero-grad-a: rgba(12, 138, 142, 0.12);
  --hero-grad-b: rgba(253, 248, 239, 0.92);
  --section-bg: rgba(253, 248, 239, 0.78);
  --card-bg: rgba(255, 255, 255, 0.74);
  --project-bg: rgba(255, 255, 255, 0.7);
  --step-bg: rgba(255, 255, 255, 0.72);
  --tag-bg: rgba(230, 107, 44, 0.12);
  --noise-dot: #12212a;
  --mobile-nav-bg: rgba(253, 248, 239, 0.98);
  --shadow: 0 18px 42px rgba(18, 33, 42, 0.14);
  --radius-xl: 28px;
  --radius-lg: 18px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f161b;
  --bg-soft: #152028;
  --text: #e9f1f5;
  --muted: #a8bbc6;
  --line: #2e424e;
  --brand: #42c4c7;
  --brand-dark: #2f9ea1;
  --highlight: #ff9b6a;
  --spot-1: rgba(66, 196, 199, 0.2);
  --spot-2: rgba(255, 155, 106, 0.2);
  --topbar-border: rgba(46, 66, 78, 0.94);
  --topbar-bg: rgba(15, 22, 27, 0.84);
  --hero-grad-a: rgba(66, 196, 199, 0.12);
  --hero-grad-b: rgba(21, 32, 40, 0.92);
  --section-bg: rgba(19, 29, 36, 0.78);
  --card-bg: rgba(255, 255, 255, 0.03);
  --project-bg: rgba(255, 255, 255, 0.04);
  --step-bg: rgba(255, 255, 255, 0.05);
  --tag-bg: rgba(255, 155, 106, 0.18);
  --noise-dot: #e9f1f5;
  --mobile-nav-bg: rgba(15, 22, 27, 0.98);
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, var(--spot-1), transparent 36%),
    radial-gradient(circle at 86% 90%, var(--spot-2), transparent 42%),
    var(--bg);
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.08;
  background-image: radial-gradient(var(--noise-dot) 0.45px, transparent 0.45px);
  background-size: 3px 3px;
}

.wrapper {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: min(1120px, 92vw);
  margin: 14px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--topbar-border);
  border-radius: 16px;
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-family: "Syne", sans-serif;
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--highlight));
  transition: width 0.24s ease;
}

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

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-btn {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-btn:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 22px;
  align-items: stretch;
  margin-top: 34px;
}

.eyebrow {
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--brand);
  background: rgba(12, 138, 142, 0.12);
}

:root[data-theme="dark"] .eyebrow {
  background: rgba(66, 196, 199, 0.16);
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: "Syne", sans-serif;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 4.4rem);
  line-height: 0.98;
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(1.4rem, 3.5vw, 2.5rem);
  margin-bottom: 8px;
}

.lead,
.card p,
.project-item p,
.step p {
  color: var(--muted);
  line-height: 1.72;
}

.hero-panel {
  border: 1px solid var(--topbar-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  background: linear-gradient(140deg, var(--hero-grad-a), var(--hero-grad-b));
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.hero-panel ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 24px rgba(12, 138, 142, 0.3);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.section {
  margin-top: 22px;
  border: 1px solid var(--topbar-border);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 4vw, 36px);
  background: var(--section-bg);
  box-shadow: var(--shadow);
}

.section-head {
  margin-bottom: 16px;
}

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

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 16px;
  background: var(--card-bg);
}

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

.project-item {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 16px;
  background: var(--project-bg);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.project-item:hover {
  transform: translateY(-4px);
  border-color: rgba(12, 138, 142, 0.6);
}

.tag {
  margin: 0 0 10px;
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--highlight);
  background: var(--tag-bg);
}

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

.step {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--step-bg);
}

.step span {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--brand);
}

.step h3 {
  margin: 6px 0;
}

.section-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 26px 16px 34px;
}

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

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

@media (max-width: 980px) {
  .hero,
  .cards-grid,
  .project-list,
  .process-row {
    grid-template-columns: 1fr;
  }

  .section-contact {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .topbar {
    margin-top: 10px;
    padding: 10px 12px;
  }

  .theme-btn {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .menu-btn {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: var(--mobile-nav-bg);
    box-shadow: var(--shadow);
    margin-left: 0;
  }

  .nav-links.open {
    display: flex;
  }
}
