@font-face {
  font-family: "Space Grotesk";
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/space-grotesk-500.woff2) format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/space-grotesk-700.woff2) format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/jetbrains-mono-400.woff2) format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-weight: 600;
  font-display: swap;
  src: url(assets/fonts/jetbrains-mono-600.woff2) format("woff2");
}

:root {
  --bg: #f7f3e9;
  --band: #eae0c8;
  --card: #fdfcf9;
  --chrome: #efe9da;
  --ink: #292721;
  --body: #413e36;
  --muted: #6a665b;
  --line: #dfd0ac;
  --accent: #c22e0a;
  --glow: rgba(232, 58, 15, 0.07);
  --btn-bg: #292721;
  --btn-ink: #f7f3e9;
}

[data-theme="dark"] {
  --bg: #000000;
  --band: #0d0d0d;
  --card: #111111;
  --chrome: #1a1a1a;
  --ink: #ffffff;
  --body: #d4d4d4;
  --muted: #8a8a8a;
  --line: #262626;
  --accent: #ff4a1f;
  --glow: rgba(255, 255, 255, 0.05);
  --btn-bg: #ffffff;
  --btn-ink: #000000;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.65;
  transition: background 0.25s ease, color 0.25s ease;
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

a { color: inherit; }

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

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
}

.eyebrow .dot { color: var(--accent); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand .mark { width: 22px; height: 22px; display: block; }

.brand .wi { color: #ff4a1f; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--body);
  padding-bottom: 2px;
}

.site-nav a:hover { color: var(--ink); }

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  padding: 0;
}

.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.hero {
  position: relative;
  text-align: center;
  padding: 6.5rem 0 4.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 130%;
  background: radial-gradient(ellipse 55% 60% at 50% 0%, var(--glow), transparent 70%);
  pointer-events: none;
}

.hero .wrap { position: relative; }

.hero .lede {
  max-width: 36rem;
  margin: 0 auto 2.2rem;
  font-size: 1.2rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.button {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 8px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.button:hover { transform: translateY(-2px); opacity: 0.92; }

.button.ghost {
  background: none;
  color: var(--ink);
  border: 1px solid var(--line);
}

.terminal {
  max-width: 44rem;
  margin: 4rem auto 0;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.25);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--chrome);
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 1rem;
}

.window-bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line);
}

.window-bar .dot:first-child { background: var(--accent); }

.window-bar .title {
  margin-left: 0.5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

.terminal pre {
  margin: 0;
  padding: 1.4rem 1.6rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--body);
  white-space: pre-wrap;
}

.terminal .ok { color: var(--accent); font-weight: 600; }

.cursor {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

section { padding: 4.5rem 0; }

.band {
  background: var(--band);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-lead {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 34rem;
  margin-bottom: 2.75rem;
}

.svc {
  border-top: 1px solid var(--line);
}

.svc-row {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.75rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.svc-row:hover { background: color-mix(in srgb, var(--card) 70%, transparent); }

.svc-row .num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s ease;
}

.svc-row:hover .num { color: var(--accent); }

.svc-row h3 { margin-bottom: 0.3em; font-size: 1.45rem; }
.svc-row p { margin: 0; max-width: 40rem; }

.work-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.work-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

a.work-card { text-decoration: none; color: inherit; }

.work-card:hover {
  transform: translateY(-3px);
  border-color: var(--muted);
}

.work-card .shot { border-bottom: 1px solid var(--line); }

.work-card .shot img { width: 100%; }

.work-card .pad { padding: 1.5rem 1.5rem 1.6rem; }

.badge {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  margin-bottom: 0.9rem;
}

.badge.plain { color: var(--muted); border-color: var(--line); }

.tags {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1rem;
}

.go {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
}

.contact-band { text-align: center; }

.contact-band h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); }

.contact-band .mail {
  display: inline-block;
  margin-top: 1.4rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
}

.site-footer p { margin: 0; }
.site-footer a { color: var(--body); }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.7s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}

.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.24s; }
.reveal.d4 { animation-delay: 0.34s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

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

@media (min-width: 760px) {
  .work-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hero { padding: 4rem 0 3rem; }
  .svc-row { grid-template-columns: 2.6rem 1fr; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: space-between; gap: 0.75rem; font-size: 0.9rem; }
}
