:root {
  --bg: #efefff;
  --fg: #1a1a24;
  --muted: #5b5b70;
  --accent: #7a3b2e;
  --border: #bcbce0;
  --card-bg: #ffffff;
  --max-width: 46rem;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14141f;
    --fg: #e6e6f0;
    --muted: #9a9ab0;
    --accent: #e2a084;
    --border: #2a2a3d;
    --card-bg: #1c1c2b;
  }
}

:root[data-theme="dark"] {
  --bg: #14141f;
  --fg: #e6e6f0;
  --muted: #9a9ab0;
  --accent: #e2a084;
  --border: #2a2a3d;
  --card-bg: #1c1c2b;
}

* { box-sizing: border-box; }

html { color-scheme: light dark; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5em 1em;
  z-index: 10;
}
.skip-link:focus { left: 0; }

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
}

.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
}

.nav-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

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

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  border-radius: 999px;
  width: 2.1rem;
  height: 2.1rem;
  line-height: 1;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .icon-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-light { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-dark { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-light { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-dark { display: inline; }
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.25;
}

h1 { font-size: 2rem; margin-bottom: 0.25rem; }
h2 { font-size: 1.35rem; margin-top: 2.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }

a { color: var(--accent); }

.tagline {
  color: var(--muted);
  margin-top: 0;
}

.profile {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.profile-photo {
  width: 9rem;
  height: 9rem;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.profile-text { flex: 1; min-width: 14rem; }

.profile-text h1 { margin-top: 0; }

.contact { color: var(--muted); font-size: 0.95rem; }

.callout {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.section-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.15s ease;
}

.section-card:hover { border-color: var(--accent); }

.section-card h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  color: var(--fg);
}

.section-card p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.aside-image {
  max-width: 12rem;
  width: 100%;
  height: auto;
  flex-shrink: 0;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

ul.plain, dl.section-list {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

ul.item-list { padding-left: 1.2rem; margin: 0.5rem 0 0; }
ul.item-list li { margin-bottom: 0.4rem; }

.section-list dt {
  font-weight: 600;
  margin-top: 0.25rem;
}

.meta { color: var(--muted); font-size: 0.9rem; }

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 2px solid var(--border);
}

hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
