/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: #1a1f2e;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: rgba(20, 38, 80, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
}
.container.narrow { max-width: 760px; }
.container.center { text-align: center; }

.section {
  padding: 110px 0;
  border-top: 1px solid rgba(20, 38, 80, 0.06);
}
.section-alt { background: #f7f8fb; }
.section-cta { background: linear-gradient(135deg, #0f1a36 0%, #1c2a5b 100%); color: #f3f5fb; }
.section-cta .section-eyebrow { color: #a4b3d6; }
.section-cta h2 { color: #ffffff; }
.section-cta p { color: #d4dbef; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: #0f1a36;
}
h1 { font-size: clamp(2.2rem, 4vw + 1rem, 3.6rem); line-height: 1.15; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 2vw + 1rem, 2.4rem); line-height: 1.2; }
h3 { font-size: 1.15rem; line-height: 1.4; }
h4 { font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.08em; color: #5b6789; margin-bottom: 1em; }

p { margin: 0 0 1em; }
.lead { font-size: 1.12rem; color: #3d4866; max-width: 680px; }
.section-lead { font-size: 1.08rem; color: #4a5573; max-width: 760px; margin-bottom: 56px; }
.section-eyebrow,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a78d6;
  margin: 0 0 18px;
}
.accent { color: #2f5dc4; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(20, 38, 80, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: #0f1a36;
}
.nav { display: flex; gap: 32px; align-items: center; }
.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #4a5573;
  transition: color 160ms ease;
}
.nav a:hover { color: #0f1a36; }
.nav-cta {
  border: 1px solid rgba(20, 38, 80, 0.18);
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.nav-cta:hover {
  background: #0f1a36;
  color: #ffffff !important;
  border-color: #0f1a36;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #0f1a36;
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* ---------- Hero ---------- */
.hero {
  padding: 110px 0 80px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(74, 120, 214, 0.10), transparent 45%),
    radial-gradient(circle at 90% 30%, rgba(15, 26, 54, 0.06), transparent 50%),
    #ffffff;
}
.hero h1 { max-width: 920px; }
.hero .lead { margin-top: 18px; }
.hero-cta {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.96rem;
  font-weight: 500;
  padding: 13px 26px;
  border-radius: 8px;
  transition: transform 120ms ease, background 200ms ease, color 200ms ease, box-shadow 200ms ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: #0f1a36;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(15, 26, 54, 0.18);
}
.btn-primary:hover { background: #1c2a5b; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: #0f1a36;
  border-color: rgba(20, 38, 80, 0.22);
}
.btn-ghost:hover { background: rgba(20, 38, 80, 0.06); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 70px;
  padding-top: 36px;
  border-top: 1px solid rgba(20, 38, 80, 0.08);
  max-width: 720px;
}
.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-stats strong {
  font-size: 1.7rem;
  font-weight: 700;
  color: #0f1a36;
  font-feature-settings: 'tnum';
}
.hero-stats span {
  font-size: 0.83rem;
  color: #5b6789;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- About ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}
.profile-card {
  background: #ffffff;
  border: 1px solid rgba(20, 38, 80, 0.10);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 8px 30px rgba(15, 26, 54, 0.05);
}
.profile-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(20, 38, 80, 0.07);
}
.profile-row:last-child { border-bottom: none; padding-bottom: 0; }
.profile-row:first-child { padding-top: 0; }
.profile-row span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5b6789;
}
.profile-row strong {
  font-weight: 500;
  color: #1a1f2e;
}

/* ---------- Project cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.card {
  background: #ffffff;
  border: 1px solid rgba(20, 38, 80, 0.08);
  border-radius: 14px;
  padding: 30px;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 44px rgba(15, 26, 54, 0.08);
  border-color: rgba(74, 120, 214, 0.30);
}

/* ---------- Pipeline ---------- */
.pipeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  counter-reset: pipe;
}
.pipeline li {
  display: flex;
  gap: 22px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid rgba(20, 38, 80, 0.08);
  border-radius: 14px;
}
.pipeline-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  color: #4a78d6;
  background: rgba(74, 120, 214, 0.10);
  padding: 6px 10px;
  border-radius: 6px;
  height: fit-content;
}
.pipeline h3 { color: #0f1a36; }
.pipeline-tag {
  font-size: 0.85rem;
  color: #5b6789;
  margin-top: 6px;
}
.pipeline-tag code { background: transparent; padding: 0; color: #2f5dc4; }

/* ---------- Engineering practices ---------- */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.practice {
  background: #ffffff;
  border: 1px solid rgba(20, 38, 80, 0.10);
  border-radius: 14px;
  padding: 30px;
}
.practice h3 {
  color: #0f1a36;
  font-size: 1.08rem;
}
.practice p {
  font-size: 0.97rem;
  color: #3d4866;
  margin-bottom: 0;
}

/* ---------- Stack ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 40px;
}
.stack-block ul li {
  padding: 7px 0;
  border-bottom: 1px solid rgba(20, 38, 80, 0.06);
  font-size: 0.96rem;
  color: #3d4866;
}
.stack-block ul li:last-child { border-bottom: none; }
.stack-block code {
  background: transparent;
  padding: 0;
  color: #2f5dc4;
  font-size: 0.96em;
}

/* ---------- CTA ---------- */
.section-cta { padding: 100px 0; text-align: center; }
.section-cta h2 { max-width: 760px; margin-left: auto; margin-right: auto; }
.section-cta p { max-width: 720px; margin: 18px auto 0; font-size: 1.08rem; }

/* ---------- Contact ---------- */
.contact-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(20, 38, 80, 0.06);
  padding: 28px 0;
  background: #ffffff;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: #5b6789;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .card-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .practice-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav { display: none; position: absolute; top: 72px; right: 0; flex-direction: column; gap: 0; background: #ffffff; padding: 12px 28px; min-width: 220px; border: 1px solid rgba(20, 38, 80, 0.08); border-radius: 12px; box-shadow: 0 12px 36px rgba(15, 26, 54, 0.10); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; }
  .nav-toggle { display: flex; }
  .section { padding: 80px 0; }
  .hero { padding: 80px 0 60px; }
  .stack-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
}
