@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Design tokens ───────────────────────── */

:root {
  --navy:        #1b2c4b;
  --navy-dark:   #101e34;
  --navy-mid:    #243563;
  --accent:      #3171b5;
  --accent-h:    #255d9e;
  --text:        #1e293b;
  --text-2:      #475569;
  --text-muted:  #94a3b8;
  --bg:          #ffffff;
  --bg-alt:      #f4f7fb;
  --border:      #e1e7ef;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:      0 4px 6px rgba(0,0,0,.05), 0 10px 20px rgba(0,0,0,.06);
  --shadow-h:    0 8px 16px rgba(0,0,0,.08), 0 20px 40px rgba(0,0,0,.08);
  --max-w:       1080px;
  --font:        'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-h:       64px;
}

/* ─── Reset ───────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

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

/* ─── Layout ──────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Navigation ──────────────────────────── */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(16, 30, 52, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  transition: opacity .15s;
}
.nav-logo:hover { color: #fff; opacity: .8; }

.nav-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  transition: color .15s;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; }

.nav-links .nav-gh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Hero ────────────────────────────────── */

.hero {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: calc(var(--nav-h) + 88px) 24px 100px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: clamp(.975rem, 2vw, 1.15rem);
  color: rgba(255,255,255,.58);
  max-width: 600px;
  margin: 0 auto 44px;
  font-weight: 400;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ─────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-h);
  color: #fff;
  box-shadow: 0 4px 16px rgba(49,113,181,.38);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.22);
}
.btn-outline:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
  border-color: rgba(255,255,255,.42);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--accent-h);
}

/* ─── Sections ────────────────────────────── */

.section { padding: 84px 24px; }
.section-alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.25;
}

.section-header p {
  font-size: .975rem;
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Capability cards ────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}

.card:hover {
  box-shadow: var(--shadow-h);
  transform: translateY(-2px);
}

.card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.card h3 {
  font-size: .975rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.card p {
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* ─── About blurb ─────────────────────────── */

.about-prose {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
}

.about-prose p {
  font-size: .975rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-prose p:last-child { margin-bottom: 0; }

/* ─── GitHub CTA ──────────────────────────── */

.github-cta {
  background: var(--navy);
  padding: 80px 24px;
  text-align: center;
}

.github-cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.025em;
  margin-bottom: 14px;
}

.github-cta p {
  color: rgba(255,255,255,.55);
  max-width: 480px;
  margin: 0 auto 36px;
  font-size: .975rem;
  line-height: 1.7;
}

/* ─── Page header (inner pages) ───────────── */

.page-header {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: calc(var(--nav-h) + 56px) 24px 68px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.03em;
  margin-bottom: 12px;
  line-height: 1.2;
}

.page-header p {
  color: rgba(255,255,255,.55);
  font-size: .975rem;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Services detail layout ──────────────── */

.services-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.service-block {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.service-block:first-child { padding-top: 80px; }
.service-block:last-child { border-bottom: none; padding-bottom: 80px; }

.service-label-col {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
}

.service-number {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.service-label-col h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--text);
  line-height: 1.3;
}

.service-body p {
  font-size: .975rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 18px;
}
.service-body p:last-of-type { margin-bottom: 28px; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag {
  font-size: .75rem;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: border-color .15s, color .15s;
}

/* ─── Privacy / long-form ─────────────────── */

.long-form {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 80px;
}

.long-form .meta {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.long-form h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 40px 0 12px;
}
.long-form h2:first-of-type { margin-top: 0; }

.long-form p, .long-form li {
  font-size: .94rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 14px;
}

.long-form ul {
  padding-left: 22px;
  margin-bottom: 18px;
}

.long-form a { color: var(--accent); }
.long-form a:hover { color: var(--accent-h); }

/* ─── Footer ──────────────────────────────── */

footer {
  background: var(--navy-dark);
  padding: 48px 24px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-size: .9rem;
  font-weight: 600;
  color: rgba(255,255,255,.82);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  transition: color .15s;
}
.footer-links a:hover { color: rgba(255,255,255,.78); }

.footer-copy {
  width: 100%;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .75rem;
  color: rgba(255,255,255,.25);
}

/* ─── Responsive ──────────────────────────── */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(16, 30, 52, .98);
    padding: 16px 24px 24px;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: flex;
    align-items: center;
    padding: 13px 0;
    font-size: .95rem;
    border-bottom: 1px solid rgba(255,255,255,.05);
  }
  .nav-toggle { display: flex; }

  .service-block {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 52px 0;
  }
  .service-block:first-child { padding-top: 56px; }
  .service-block:last-child { padding-bottom: 56px; }
  .service-label-col { position: static; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .section { padding: 60px 20px; }
  .card-grid { grid-template-columns: 1fr; }
  .hero { padding: calc(var(--nav-h) + 56px) 20px 72px; }
}
