:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --on-accent: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120;
    --surface: #111827;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --border: #1f2937;
    --accent: #60a5fa;
    --accent-soft: #1e3a5f;
    --on-accent: #0b1120;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: #1f2937;
  --accent: #60a5fa;
  --accent-soft: #1e3a5f;
  --on-accent: #0b1120;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.logo {
  font-family: ui-monospace, monospace; font-size: 13px;
  background: var(--accent); color: var(--on-accent);
  padding: 3px 6px; border-radius: 6px;
}
.nav nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--text); }
.icon-btn {
  background: none; border: 1px solid var(--border); color: var(--text);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 16px;
}

/* hero */
.hero { padding: 88px 16px 56px; }
.eyebrow {
  margin: 0 0 12px; font-size: 13px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
}
h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.15; margin: 0 0 20px; letter-spacing: -.02em; }
.lead { font-size: 18px; color: var(--muted); max-width: 680px; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 10px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface);
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.stack { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stack li {
  font-size: 13px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted);
}

/* sections */
.section { padding: 48px 16px; }
h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -.01em; }
.section > h2 { margin-bottom: 24px; }
.section > .muted { margin: -16px 0 24px; }
h3 { margin: 0 0 8px; font-size: 18px; }
.sub { margin: 40px 0 12px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
}
.card p { margin: 0; color: var(--muted); }
.ic { font-size: 26px; margin-bottom: 10px; }
.project { display: flex; flex-direction: column; gap: 4px; }
.project p { flex: 1; margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tags span {
  font-size: 12px; padding: 2px 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.link { font-weight: 600; color: var(--accent); font-size: 15px; }
.exp { margin: 0; padding-left: 20px; color: var(--muted); }
.exp li { margin-bottom: 8px; }
.exp strong { color: var(--text); }

.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; padding: 32px; }
.contact h2 { font-size: 24px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.form input, .form textarea {
  font: inherit; font-weight: 400; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; resize: vertical;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.form button { align-self: flex-start; cursor: pointer; font: inherit; font-weight: 600; }
.form button:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; font-size: 14px; min-height: 1.4em; color: var(--muted); }
.form-status.ok { color: #16a34a; }
.form-status.err { color: #dc2626; }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 32px 16px 48px; border-top: 1px solid var(--border); font-size: 14px;
}

@media (max-width: 760px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; padding: 24px; }
  .hero { padding-top: 56px; }
  .nav nav a:not(:last-of-type) { display: none; }
  .nav nav a:last-of-type { display: inline; }
}
