:root {
  --bg: #fbfbf9;
  --fg: #2a241e;
  --muted: #71665a;
  --accent: #7a241f;
  --accent2: #a8532c;
  --card-bg: #ffffff;
  --border: #e3e1da;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1713;
    --fg: #f2e9da;
    --muted: #ab9c89;
    --accent: #c0443a;
    --accent2: #c87845;
    --card-bg: #251f1a;
    --border: #3a3129;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-variation-settings: "WONK" 0;
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2rem;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.topbar .brand { font-weight: 700; color: var(--accent); margin-right: auto; }
.topbar nav { display: flex; gap: 1.5rem; }
.topbar nav a { color: var(--muted); font-weight: 600; }
.topbar nav a:hover { color: var(--accent); text-decoration: none; }

section {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 2.5rem;
}

.hero { text-align: left; padding-top: 2.5rem; }
.hero h1 { font-size: 2.2rem; margin-bottom: 0.3rem; }
.hero .tagline { color: var(--muted); font-size: 1.2rem; max-width: 560px; margin: 0.5rem 0 1.2rem; }

.btn-row { display: flex; gap: 0.8rem; justify-content: flex-start; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid var(--border);
  font-family: inherit;
}
.btn.primary { background: var(--accent); color: #fffdf7; border-color: var(--accent); }
.btn.primary:hover { opacity: 0.9; text-decoration: none; }
.btn.secondary { color: var(--fg); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

h2 {
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
  display: inline-block;
}

.about p { color: var(--muted); font-size: 1.05rem; }

.project-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.project-card h3 { margin: 0 0 0.4rem; color: var(--accent); }
.project-card p { color: var(--muted); margin: 0 0 0.9rem; font-size: 0.95rem; }
.project-card .tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.project-card .tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
}
.project-card .links a { margin-right: 1rem; font-weight: 600; font-size: 0.9rem; }

.placeholder-note {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  margin-top: 1.5rem;
}

.contact-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 2.5rem 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 2px solid var(--border);
}
