:root {
  --bg: #0b0d10;
  --bg-elev: #12161b;
  --line: #232a32;
  --fg: #e8edf2;
  --fg-dim: #9aa6b2;
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --radius: 12px;
  --max: 960px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #04110e;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 10;
}
.skip-link:focus { left: 0; }

a { color: inherit; }

/* Layout primitives */
.site-header,
.hero,
.approach,
.projects,
.closing,
.site-footer {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  font-size: 1.05rem;
}

.wordmark .mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.12);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--fg); }

/* Hero */
.hero { padding-block: clamp(3rem, 12vh, 7rem) 4rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 1.5rem;
  font-weight: 650;
}

.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--fg-dim);
  max-width: 38rem;
  margin: 0 0 2rem;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  font-weight: 550;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #04110e;
}
.btn-primary:hover { background: #7af0dd; }

.btn-ghost {
  border-color: var(--line);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--accent-dim); }

/* Sections */
section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  font-weight: 620;
}

.section-lede {
  color: var(--fg-dim);
  max-width: 38rem;
  margin: 0 0 2.5rem;
}

.approach,
.projects,
.closing { padding-block: 3.5rem; border-top: 1px solid var(--line); }

/* Fabric pipeline */
.fabric {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: repeat(4, 1fr);
}
.fabric li {
  background: var(--bg-elev);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.fabric .step {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent);
}
.fabric .desc { font-size: 0.9rem; color: var(--fg-dim); }

/* Projects */
.project-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.project {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.project:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.project h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-family: var(--mono);
  letter-spacing: -0.01em;
}
.project p { margin: 0; color: var(--fg-dim); font-size: 0.95rem; }

/* Closing */
.closing { text-align: left; }
.closing p { color: var(--fg-dim); max-width: 40rem; margin: 0 0 2rem; }

/* Footer */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 0.9rem;
}
.site-footer a { color: var(--fg-dim); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .fabric { grid-template-columns: 1fr 1fr; }
  .site-nav { gap: 1rem; }
}
@media (max-width: 420px) {
  .fabric { grid-template-columns: 1fr; }
}
