:root {
  --bg: #0a0e14;
  --bg-elevated: #121820;
  --surface: #161d27;
  --text: #e8edf4;
  --text-muted: #8b98a8;
  --accent: #3db8e8;
  --accent-dim: #2a8fb5;
  --accent-glow: rgba(61, 184, 232, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Instrument Sans", var(--font-sans);
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 4rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

.wrap.narrow {
  width: min(820px, 100% - 2.5rem);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav {
  display: none;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(52rem, 72vw);
}

.nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--accent);
}

.nav-panel a[aria-current="page"] {
  color: var(--accent);
}

.nav-toggle {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
}

.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s, top 0.2s;
}

.nav-toggle::before {
  top: 0.85rem;
}

.nav-toggle::after {
  top: 1.35rem;
}

.nav-toggle[aria-expanded="true"]::before {
  top: 1.1rem;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"]::after {
  top: 1.1rem;
  transform: rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 150;
  margin: 0;
  padding: 0;
  border: none;
  appearance: none;
  background: rgba(10, 14, 20, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-backdrop[hidden] {
  display: none !important;
}

/* Author .nav-panel { display: grid } must not beat the native [hidden] behaviour — without this,
   the menu stays visible and “doesn’t collapse” when JS sets hidden. */
.nav-panel[hidden] {
  display: none !important;
}

body.nav-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.nav-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  z-index: 160;
  max-height: min(75dvh, calc(100dvh - var(--header-h) - 0.5rem));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 0.2rem max(0.75rem, env(safe-area-inset-right, 0px)) 0.45rem
    max(0.75rem, env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.35rem;
  row-gap: 0;
  align-content: start;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.nav-panel-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 2rem;
  padding: 0 0 0.3rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--border);
}

.nav-panel-close {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: none;
  padding: 0.45rem 0.6rem;
  margin: 0 -0.35rem 0 0;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(61, 184, 232, 0.25);
  touch-action: manipulation;
}

.nav-panel-close:hover {
  text-decoration: underline;
}

.nav-panel-close:active {
  opacity: 0.88;
}

.nav-panel a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.42rem 0.3rem;
  margin: 0;
  border-radius: 8px;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.06);
  touch-action: manipulation;
}

.nav-panel a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-panel a:active {
  background: rgba(255, 255, 255, 0.06);
}

@media (min-width: 960px) {
  .nav {
    gap: 1.25rem;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 1rem;
  }

  .wrap {
    width: min(1120px, 100% - 1.5rem);
  }

  .wrap.narrow {
    width: min(820px, 100% - 1.5rem);
  }

  .header-inner {
    padding-inline: max(0px, env(safe-area-inset-left, 0px)) max(0px, env(safe-area-inset-right, 0px));
  }

  .hero {
    padding-block: 2.25rem 3rem;
    min-height: calc(100dvh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
  }

  .hero-lead {
    font-size: 1.05rem;
  }

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

  .hero-actions .btn {
    min-height: 2.75rem;
  }

  .section {
    padding-block: 3rem;
  }

  .page-head {
    padding-top: 1.75rem;
  }

  .page-head .wrap {
    padding-bottom: 1.5rem;
  }

  .person {
    padding: 1.5rem;
  }

  .card {
    padding: 1.25rem 1.35rem;
  }
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .nav-backdrop {
    display: none !important;
  }

  body.nav-open {
    overflow: unset;
    overscroll-behavior: unset;
  }

  .nav-panel {
    display: none !important;
  }
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: center;
  padding-block: 4rem 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, var(--accent-glow), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(61, 184, 232, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, #0d1219 100%);
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M60 0H0v60' fill='none' stroke='%23ffffff' stroke-opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.9;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.hero-lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn.primary {
  background: var(--accent);
  color: var(--bg);
}

.btn.primary:hover {
  background: #5cc8f0;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.page-head {
  padding: 2.5rem 0 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
}

.page-head h1 {
  margin-bottom: 0.5rem;
}

.page-head .wrap {
  padding-bottom: 2rem;
}

.page-subtitle {
  margin: 0.75rem 0 0;
  font-size: 1rem;
}

.page-head .case-meta {
  margin-bottom: 0;
}

.section-tight-top {
  padding-top: 2.5rem;
}

.h3-sized {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.person-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.case-study-body .case-meta {
  margin-bottom: 0;
}

.contact-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.contact-card:hover {
  border-color: var(--accent-dim);
  background: rgba(61, 184, 232, 0.06);
  text-decoration: none;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.contact-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  word-break: break-all;
}

.contact-card-address {
  grid-column: 1 / -1;
}

.contact-address {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  font-style: normal;
  color: var(--text);
  line-height: 1.55;
  max-width: 40rem;
}

.contact-note {
  margin-top: 2rem;
  text-align: center;
}

.section {
  padding-block: 4.5rem;
}

.section-alt {
  background: var(--bg-elevated);
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.cards-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cards-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.cards-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
}

.card h3,
.card .h3-sized {
  color: var(--accent);
}

.block-note {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(61, 184, 232, 0.06);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent-dim);
}

.leadership {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .leadership {
    grid-template-columns: 1fr 1fr;
  }
}

.person {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.person h3,
.person .person-name {
  font-size: 1.35rem;
}

.role {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.section-intro {
  color: var(--text-muted);
  max-width: 52rem;
  margin-bottom: 1.75rem;
}

.feature-list {
  margin: 0;
  padding-left: 1.25rem;
  max-width: 52rem;
}

.feature-list li {
  margin-bottom: 0.85rem;
  color: var(--text);
}

.feature-list li::marker {
  color: var(--accent);
}

.muted {
  color: var(--text-muted);
  font-size: 0.975rem;
}

.section-foot {
  margin-top: 2rem;
  max-width: 48rem;
}

.case-meta {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2rem;
}

.case-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .case-grid {
    grid-template-columns: 1fr 1fr;
  }

  .case-block.solution {
    grid-column: 1 / -1;
  }
}

.case-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.case-block.problem {
  border-color: rgba(232, 120, 90, 0.25);
}

.case-block.solution {
  border-color: rgba(61, 184, 232, 0.35);
  background: linear-gradient(145deg, var(--surface) 0%, rgba(61, 184, 232, 0.06) 100%);
}

.case-block ul {
  margin: 0;
  padding-left: 1.2rem;
}

.case-block li {
  margin-bottom: 0.5rem;
}

.outcome {
  margin-top: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem 2rem;
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
}

.footer-version {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
  opacity: 0.85;
  letter-spacing: 0.02em;
}

.footer-loc,
.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}
