:root {
  color-scheme: dark;
  --bg: #0e1116;
  --surface: #171d26;
  --surface-strong: #202936;
  --text: #f4f7fb;
  --muted: #aab5c4;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #21c997;
  --accent-2: #ffb86b;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

:root.light {
  color-scheme: light;
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-strong: #ede8df;
  --text: #17202b;
  --muted: #5e6977;
  --line: rgba(23, 32, 43, 0.14);
  --shadow: 0 22px 60px rgba(42, 33, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: fixed;
  z-index: 10;
  top: 18px;
  left: 50%;
  display: flex;
  width: min(1120px, calc(100% - 32px));
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  min-width: 166px;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, var(--accent), transparent 58%),
    linear-gradient(315deg, var(--accent-2), #4c6fff);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav a {
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.94rem;
  padding: 9px 12px;
}

.nav a:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
}

.sun {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow:
    0 -10px 0 -7px currentColor,
    0 10px 0 -7px currentColor,
    10px 0 0 -7px currentColor,
    -10px 0 0 -7px currentColor;
}

.hero {
  position: relative;
  display: grid;
  min-height: 92vh;
  align-items: end;
  padding: 136px 24px 72px;
  overflow: hidden;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(14, 17, 22, 0.88), rgba(14, 17, 22, 0.38)),
    linear-gradient(0deg, var(--bg), transparent 34%);
}

:root.light .hero::after {
  background:
    linear-gradient(90deg, rgba(246, 243, 238, 0.9), rgba(246, 243, 238, 0.34)),
    linear-gradient(0deg, var(--bg), transparent 34%);
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1800&q=82");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  margin: 0 auto;
}

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

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

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(3.1rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

.lead {
  max-width: 590px;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  font-size: clamp(1.04rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
  padding: 0 18px;
}

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

.button.secondary {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

:root.light .button.secondary {
  border-color: rgba(23, 32, 43, 0.2);
  background: rgba(255, 255, 255, 0.62);
}

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

.toolbar-section {
  padding: 40px 0 8px;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segment {
  min-width: 62px;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.segment.active {
  background: var(--accent);
  color: #07120f;
}

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

.project-card {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.project-card[hidden] {
  display: none;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card img {
  width: 100%;
  height: 255px;
  object-fit: cover;
}

.card-content {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.card-content p {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-content h3 {
  margin: 0;
  font-size: 1.35rem;
}

.card-content span {
  color: var(--muted);
  line-height: 1.55;
}

.stats-band {
  padding: 34px 0;
  background: var(--surface-strong);
}

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

.stat {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stat strong {
  display: block;
  font-size: clamp(2rem, 6vw, 4.4rem);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  gap: 40px;
  padding: 82px 0;
}

.contact p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.65;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
  padding: 12px 13px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--accent);
}

@media (max-width: 820px) {
  .topbar {
    align-items: center;
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: 88vh;
    padding-top: 118px;
  }

  .toolbar,
  .contact {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .segment {
    flex: 1;
  }

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

  .project-card {
    min-height: auto;
  }
}

@media (max-width: 460px) {
  .topbar {
    top: 10px;
    width: calc(100% - 20px);
  }

  .brand {
    min-width: 0;
  }

  .brand span:last-child {
    display: none;
  }

  .hero {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }
}
