:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --accent: #2d5a4a;
  --accent-soft: rgba(45, 90, 74, 0.12);
  --border: #e8e6e1;
  --radius: 12px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
}

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

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #1d3d32;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
}

.skip-link:focus {
  left: 0;
}

.wrap {
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 5vw, 4rem)
    clamp(2rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
}

header.site-header {
  width: 100%;
  margin-bottom: clamp(1.5rem, 3vw, 3rem);
  padding-bottom: clamp(1.25rem, 2.5vw, 2rem);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.25rem, 5vw + 1rem, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.tagline {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: none;
}

.contact {
  margin: 0;
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: none;
}

.contact a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(92, 92, 92, 0.45);
  text-underline-offset: 3px;
}

.contact a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.contact-sep {
  color: var(--border);
  user-select: none;
}

main#main {
  flex: 1 1 auto;
  width: 100%;
}

nav.toc {
  width: 100%;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

nav.toc ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem clamp(0.75rem, 2vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

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

nav.toc a:hover {
  color: var(--accent);
}

section {
  width: 100%;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

section:last-of-type {
  margin-bottom: 0;
}

#experience,
#projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-content: start;
}

#experience > h2,
#projects > h2 {
  margin-bottom: 0.25rem;
}

#experience > .card,
#projects > .card {
  margin-bottom: 0;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-soft);
  color: var(--ink);
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.card:last-child {
  margin-bottom: 0;
}

.card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.card .meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.card p {
  margin: 0;
  color: var(--ink);
  font-size: 0.9375rem;
}

.card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  color: var(--ink);
  font-size: 0.9375rem;
}

.card li {
  margin-bottom: 0.35rem;
}

.card li:last-child {
  margin-bottom: 0;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
}

footer.site-footer {
  width: 100%;
  margin-top: auto;
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}

@media (min-width: 1024px) {
  #experience,
  #projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
  }

  #experience > h2,
  #projects > h2 {
    grid-column: 1 / -1;
  }

  h2 {
    font-size: 1.5rem;
  }
}
