:root {
  --ink: #14181C;
  --paper: #F5F3EE;
  --ochre: #C98A2C;
  --teal: #3D6B66;
  --line: #DAD5C8;
  --ink-soft: #4A4F55;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, .serif {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 { font-size: 2.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.2em; max-width: 68ch; }

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ochre); }
a:hover { color: var(--ochre); }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem 1.5rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.site-header .name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  border: none;
}

nav { display: flex; gap: 1.5rem; }

nav a {
  border: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 2px;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ochre);
  transition: right 0.2s ease;
}

nav a:hover { color: var(--ink); }
nav a:hover::after { right: 0; }

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.hero-thesis {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  max-width: 34ch;
  margin-bottom: 1.5rem;
}

.bio { max-width: 62ch; color: var(--ink-soft); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.nav-card {
  border: 1px solid var(--line);
  padding: 1.5rem;
  display: block;
}

.nav-card:hover { border-color: var(--ochre); }

.nav-card h3 { margin-bottom: 0.4em; border: none; }
.nav-card p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

.case-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 3rem;
}

@media (max-width: 700px) {
  .case-layout { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
}

.case-stats {
  border-left: 2px solid var(--teal);
  padding-left: 1.2rem;
  align-self: start;
}

.stat { margin-bottom: 1.4rem; }
.stat .value {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.5rem;
  color: var(--teal);
  display: block;
}
.stat .label { font-size: 0.85rem; color: var(--ink-soft); }

.section-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 0.3em;
}

.gap-flag {
  border: 1px dashed var(--ochre);
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 1.2rem 0;
  background: rgba(201, 138, 44, 0.06);
}

.case-index-list { margin-top: 2rem; }
.case-index-item {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.case-index-item h3 { margin-bottom: 0.3em; }
.case-index-item p { color: var(--ink-soft); font-size: 0.95rem; }

.contact-list { list-style: none; padding: 0; margin-top: 1.5rem; }
.contact-list li { margin-bottom: 0.8rem; font-size: 1.05rem; }

footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  nav a::after { transition: none; }
}

a:focus-visible, .nav-card:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 2px;
}
