/* ── Design tokens ──────────────────────────────────── */
:root {
  --bg-base: #0a0e1a;
  --bg-card: #111827;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --border: #1e293b;
  --radius: 12px;
  --max-w: 1120px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ── Reset & base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  background: var(--bg-base) radial-gradient(ellipse 80% 40vh at 50% 0%, rgba(30, 58, 138, 0.15), transparent) no-repeat;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ────────────────────────────────────────── */
section {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Hero ──────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding-block: 2rem;
}

.hero-logo { width: 100px; }

.hero-sub {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.4vw, 0.9rem);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}

.hero-sub span { white-space: nowrap; }

/* ── Cards ─────────────────────────────────────────── */
.services {
  padding-block: 1.5rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.25s ease;
}

.card:hover { border-color: var(--accent); }

.card-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ── Bottom (approach + contact) ───────────────────── */
.bottom {
  padding-block: 1.5rem 1rem;
  max-width: 48rem;
  margin-top: auto;
  text-align: center;
}

.bottom .tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.contact-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.email-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.github-link:hover { color: var(--text); }

.github-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── Footer ────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.7;
}

footer address {
  font-style: normal;
  font-family: -apple-system, system-ui, "Segoe UI", "Helvetica Neue", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", sans-serif;
}

footer .trademark {
  margin-top: 0.5rem;
  font-size: 0.65rem;
  opacity: 0.6;
}

/* ── Fade-in animation ─────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: none;
}

.card-grid .card:nth-child(2) { transition-delay: 0.1s; }
.card-grid .card:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
}

/* ── Responsive ────────────────────────────────────── */
@media (min-width: 768px) {
  section { padding-inline: 2rem; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding-block: 4rem 2rem; }
}
