:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2330;
  --border: #2a3240;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #f5a623;
  --accent-2: #2dd4a7;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 16px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: -0.02em;
}
.logo .dot { color: var(--accent); }
.nav { display: flex; gap: 28px; align-items: center; font-size: 15px; }
.nav a { color: var(--muted); transition: color 0.15s; }
.nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--bg) !important;
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
}
.nav-cta:hover { background: #ffb84d; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 88px 24px 96px;
}
.eyebrow {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.02em;
}
.lede { color: var(--muted); font-size: 17px; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 15px;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #0d1117; }
.btn-primary:hover { background: #ffb84d; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-2); }

/* ---------- Terminal signature element ---------- */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}
.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.tdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tdot-r { background: #ff5f57; }
.tdot-y { background: #febc2e; }
.tdot-g { background: #28c840; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-left: 6px;
}
.terminal-body {
  margin: 0;
  padding: 22px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  overflow-x: auto;
}
.tk-kw { color: #ff7b72; }
.tk-var { color: #79c0ff; }
.tk-op { color: var(--muted); }
.tk-fn { color: #d2a8ff; }
.tk-str { color: var(--accent-2); }
.tk-com { color: var(--muted); font-style: italic; }

/* ---------- Sections ---------- */
.section { padding: 72px 24px; border-top: 1px solid var(--border); }
.section-title {
  font-size: 24px;
  margin-bottom: 32px;
}

/* ---------- Project grid ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.project-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: border-color 0.15s, transform 0.15s;
}
.project-card:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.project-card h3 { font-size: 18px; margin-bottom: 8px; }
.project-card p { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.tag-list li {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-2);
  background: rgba(45, 212, 167, 0.1);
  border: 1px solid rgba(45, 212, 167, 0.25);
  padding: 4px 10px;
  border-radius: 100px;
}

/* ---------- Stack list ---------- */
.stack-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}
.stack-list li {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* ---------- Project detail / contact / 404 ---------- */
.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.back-link:hover { color: var(--accent-2); }
.project-detail h1, .contact h1, .not-found h1 { font-size: 32px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 480px;
  margin-top: 28px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-2);
}
.contact-form button { align-self: flex-start; border: none; cursor: pointer; }

.not-found { text-align: center; padding: 120px 24px; }
.not-found h1 { font-size: 64px; color: var(--accent); }

/* ---------- Status bar footer ---------- */
.statusbar {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.statusbar-row {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 10px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.dot-live {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  margin-right: 6px;
}
.status-right { margin-left: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .nav { gap: 18px; }
}
@media (max-width: 520px) {
  .header-row { flex-wrap: wrap; gap: 12px; }
  .status-right { margin-left: 0; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
