*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --color-bg: #fafaf8;
  --color-text: #1a1a1a;
  --color-muted: #5c5c5c;
  --color-accent: #6b4e9b;
  --color-border: #e0ddd8;
  --font-sans: system-ui, -apple-system, sans-serif;
  --max-width: 860px;
}

html {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.6;
}

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

main {
  flex: 1;
  padding: 2rem 1rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

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

a:hover {
  text-decoration: none;
}

/* Header */
header {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-name {
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--color-text);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

nav a {
  text-decoration: none;
  color: var(--color-muted);
  font-size: 0.95rem;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--color-accent);
}

nav a[aria-current="page"] {
  font-weight: 600;
}

/* Footer */
footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 1rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

footer p {
  margin: 0;
}

/* Typography */
h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
}

p {
  max-width: 65ch;
}

/* Home hero */
.hero {
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.15rem;
  color: var(--color-muted);
  max-width: 55ch;
  margin-top: 0;
}

section {
  margin-bottom: 2.5rem;
}

.quick-links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-links a {
  font-size: 1.05rem;
}

/* Area cards (projects page) */
.area-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2rem;
}

.area-card {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
}

.area-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.area-card p {
  margin-bottom: 0.5rem;
}

.area-card-note {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Mathist Consulting intro (home page) */
.mathist-intro {
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
}

.mathist-link a {
  font-size: 1.05rem;
  font-weight: 600;
}
