:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --primary: #1d4e89;
  --primary-strong: #153a67;
  --border: #dbe3ee;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--primary);
}

a:hover,
a:focus-visible {
  color: var(--primary-strong);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
}

.section-muted {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.84rem;
}

.brand-text {
  letter-spacing: 0.2px;
}

.primary-nav ul,
.site-footer ul {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
  gap: 1rem;
}

.primary-nav a,
.site-footer a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

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

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-weight: 600;
  color: var(--text);
}

.hero {
  padding-top: 5.5rem;
}

.hero-content {
  max-width: 820px;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--muted);
  margin-bottom: 1rem;
}

.intro-line,
.page-intro {
  max-width: 70ch;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0.65rem 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: #fff;
  background: var(--primary-strong);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}

.card-grid,
.project-list {
  display: grid;
  gap: 1rem;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.project-card-highlight {
  border-color: #9cb8d8;
  box-shadow: var(--shadow);
}

.project-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  margin-bottom: 0.65rem;
  background: #e8f0fa;
  color: #184674;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.prose-block {
  max-width: 760px;
}

.section-cta {
  padding-top: 3.5rem;
}

.cta-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.contact-box {
  margin: 1.25rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.note {
  color: var(--muted);
  font-size: 0.98rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-content {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-block;
  }

  .primary-nav {
    position: absolute;
    inset: 72px 1rem auto 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.8rem;
    display: none;
  }

  .primary-nav.open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .section {
    padding: 3.6rem 0;
  }

  .hero {
    padding-top: 4.4rem;
  }
}
