/* ===== Design tokens ===== */
:root {
  --bg: #0a0b0f;
  --bg-alt: #0e1015;
  --surface: #14161d;
  --surface-2: #1a1d26;
  --border: #262a36;
  --text: #eceef3;
  --text-muted: #9296a6;
  --text-dim: #6b6f7f;
  --accent: #d8dbe3;
  --accent-2: #aeb4c2;
  --accent-soft: rgba(216, 219, 227, 0.10);
  --accent-text: #14161d;
  --green: #3ddc84;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 0 0 0 rgba(216, 219, 227, 0.35);
}
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(216, 219, 227, 0.3); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-sm { padding: 9px 16px; font-size: 0.875rem; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(10, 11, 15, 0.75);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
}
.logo-mark { color: var(--accent); }
.logo-word { color: var(--text); }
.logo .cursor {
  width: 8px;
  height: 1.1em;
  background: var(--green);
  display: inline-block;
  animation: blink 1.1s steps(1) infinite;
}

.nav {
  display: flex;
  gap: 32px;
}
.nav a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 7px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--border);
}
.mobile-nav a:not(.btn) {
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
}
.mobile-nav .btn { margin-top: 12px; }
.mobile-nav.open { display: flex; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 128px 0 96px;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(216,219,227,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(216,219,227,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 40%, transparent 100%);
}
.hero-inner {
  position: relative;
  max-width: 780px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--green);
  margin-bottom: 20px;
}
.eyebrow .prompt { color: var(--text-dim); margin-right: 6px; }
.blink { animation: blink 1.1s steps(1) infinite; }

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #fff 0%, #c9cbe0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Stats ===== */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 48px 24px;
}
.stat { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.stat-num {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
}
.stat-unit { color: var(--accent-2); }
.stat-label { color: var(--text-muted); font-size: 0.875rem; }

/* ===== Sections ===== */
.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); }
.section-eyebrow {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 0.85rem;
  margin-bottom: 14px;
}
.section h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 640px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 14px;
  max-width: 560px;
}

/* ===== Capability cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

/* ===== Timeline ===== */
#approach { padding: 80px 0; }
.timeline {
  list-style: none;
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 28px;
}
.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt);
}
.timeline-num {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.85rem;
}
.timeline-body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 2px; }
.timeline-body p { color: var(--text-muted); font-size: 0.9rem; }

/* ===== Portfolio ===== */
.portfolio-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 56px;
}
.portfolio-panel {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.portfolio-panel:hover { border-color: var(--accent); }
.portfolio-info {
  flex: 0 0 38%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.portfolio-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.portfolio-info h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.portfolio-info p { color: var(--text-muted); font-size: 0.925rem; max-width: 38ch; margin-bottom: 18px; }
.portfolio-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-2);
}
.portfolio-link:hover { color: var(--accent); }
.portfolio-tag {
  font-size: 0.8rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
}
.portfolio-shots {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 28px 28px 0;
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  overflow: hidden;
}
.shot-frame {
  flex: 1;
  max-width: 190px;
  aspect-ratio: 9 / 17;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 -16px 36px -18px rgba(0, 0, 0, 0.7);
}
.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ===== CTA ===== */
.cta { padding: 128px 0; text-align: center; }
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta h2 { max-width: 100%; }
.cta-tagline {
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 16px;
  font-size: 1rem;
}
.cta-actions { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; justify-content: center; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-inner p { color: var(--text-dim); font-size: 0.875rem; }
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { color: var(--text-muted); font-size: 0.875rem; }
.footer-nav a:hover { color: var(--text); }

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .blink, .logo .cursor { animation: none; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .portfolio-panel { flex-direction: column; }
  .portfolio-info { flex: none; padding: 32px; }
  .portfolio-shots { border-left: none; border-top: 1px solid var(--border); padding: 24px 24px 0; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .header-actions .btn-sm { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { background: var(--bg); }
  .hero { padding: 96px 0 64px; }
  .card-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .shot-frame { max-width: 110px; }
  .stats-grid { grid-template-columns: 1fr 1fr; padding: 40px 24px; }
  .section { padding: 80px 0; }
  .cta { padding: 88px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
