/* ============ Design tokens ============ */
:root {
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #64748b;
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --line: #e2e8f0;
  --accent: #1d4ed8;
  --accent-soft: #eff4ff;
  --accent-ink: #1e40af;
  --radius: 14px;
  --container: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); }

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

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

/* ============ Header / nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}

.nav-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); }

/* ============ Hero ============ */
.hero {
  padding: 6.5rem 1.5rem 5.5rem;
  max-width: 880px;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-lede {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 46em;
  margin-bottom: 2rem;
}

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

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink-faint); }

.hero-note {
  font-size: 0.92rem;
  color: var(--ink-faint);
}

/* ============ Sections ============ */
.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-sub {
  color: var(--ink-soft);
  max-width: 44em;
  margin-bottom: 3rem;
}

/* ============ Work / projects ============ */
.work {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 5rem 0;
}

.project {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.25rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.project-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-ink);
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.project-tagline {
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}

.project-body {
  display: grid;
  grid-template-columns: minmax(280px, 5fr) 7fr;
  gap: 2.25rem;
  align-items: start;
}

.project-block { margin-bottom: 1.4rem; }
.project-block:last-child { margin-bottom: 0; }

.project-block h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}

.project-block p {
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin: 0;
}

.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.stat-list li {
  font-size: 0.98rem;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border: 1px solid #dbe6ff;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
}

.stat-list strong { color: var(--accent-ink); }

/* Demo embed */
.project-demo { min-width: 0; }

.demo-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-alt);
}

.demo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.demo-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.demo-activate {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(15, 23, 42, 0.42);
  color: #fff;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}
.demo-activate:hover { background: rgba(15, 23, 42, 0.55); }

.demo-activate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--accent);
  font-size: 0.85rem;
  padding-left: 0.2rem;
}

.demo-links {
  margin-top: 0.6rem;
  font-size: 0.92rem;
}

.demo-links a {
  color: var(--ink-faint);
  text-decoration: none;
  font-weight: 500;
}
.demo-links a:hover { color: var(--accent-ink); }

.work-footnote {
  font-size: 0.9rem;
  color: var(--ink-faint);
  margin: 0;
}

/* ============ Method ============ */
.method { padding: 5rem 0; }

.method-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.method-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.method-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.method-step h3 { font-size: 1.12rem; font-weight: 700; }

.method-step p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ============ About ============ */
.about {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 4.5rem 0;
}

.about-inner { max-width: 780px; }

.about-inner p {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-faint);
}

.footer-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
}
.footer-link:hover { text-decoration: underline; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .project-body { grid-template-columns: 1fr; }
  .project-demo { order: -1; }
  .method-steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero { padding: 4.5rem 1.5rem 3.5rem; }
  .project { padding: 1.5rem; }
  .nav-links { gap: 1.1rem; }
}
