/* ---------- Design tokens ---------- */
:root {
  --bg: #f7f6f3;
  --bg-alt: #ffffff;
  --text: #1b1b1d;
  --text-muted: #5a5a5f;
  --accent: #7a1f2b;       /* deep maroon */
  --accent-strong: #5c1620;
  --border: #e3e0da;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05);
  --radius: 14px;
  --max-width: 960px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14141a;
    --bg-alt: #1c1c24;
    --text: #f2f0eb;
    --text-muted: #a8a6b3;
    --accent: #c9505f;
    --accent-strong: #e0798a;
    --border: #2c2c36;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

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

/* ---------- Header / nav ---------- */
header.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(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

nav.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}

nav.tabs a {
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

nav.tabs a:hover {
  color: var(--text);
}

nav.tabs a.active {
  background: var(--accent);
  color: #fff;
}

/* ---------- Layout shell ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- Hero (home page) ---------- */
.hero {
  padding-bottom: 40px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.hero p.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 62ch;
  line-height: 1.6;
  margin: 0 0 28px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid transparent;
}

.btn:hover { transform: translateY(-1px); }

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

.btn-primary:hover { box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 40%, transparent); }

.btn-secondary {
  background: var(--bg-alt);
  border-color: var(--border);
  color: var(--text);
}

.btn-disabled {
  color: var(--text-muted);
  border-style: dashed;
  cursor: default;
  pointer-events: none;
}

.btn-disabled:hover { transform: none; }

/* ---------- Section blocks ---------- */
section { margin-top: 64px; }

section h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

section .section-sub {
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 60ch;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.highlight-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.highlight-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.highlight-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ---------- Projects grid ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.card-cover {
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-cover svg {
  width: 40px;
  height: 40px;
  stroke: rgba(255, 255, 255, 0.92);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cover-ces { background: linear-gradient(135deg, #2b6f6b, #17403e); }
.cover-armory { background: linear-gradient(135deg, #7a1f2b, #3d0f16); }
.cover-companyc { background: linear-gradient(135deg, #3a4a7a, #1c2440); }
.cover-planner { background: linear-gradient(135deg, #6b5b2e, #362d13); }

.project-card .card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card .status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.live { background: #3fb867; }
.status-dot.gated { background: #d99a2b; }
.status-dot.local { background: #8a8a94; }

.status-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.project-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.project-card p.desc {
  margin: 0 0 20px;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  flex: 1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.project-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
}

.project-card .card-link:hover { text-decoration: underline; }

.project-card .card-link.disabled {
  color: var(--text-muted);
  cursor: default;
  pointer-events: none;
}

@media (max-width: 560px) {
  .nav-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  nav.tabs { width: 100%; }
  nav.tabs a { flex: 1; text-align: center; }
}
