:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --text: #1d2427;
  --muted: #5d676b;
  --line: #e2ddd4;
  --accent: #1f6f68;
  --accent-soft: #e1eeec;
  --on-accent: #ffffff;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181a;
    --surface: #1b2124;
    --text: #e8e6e1;
    --muted: #9aa4a7;
    --line: #2b3337;
    --accent: #6cc3b8;
    --accent-soft: #1f3432;
    --on-accent: #0f1a19;
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

.wrap { width: min(100% - 2rem, 52rem); margin-inline: auto; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 3.5rem; }
.brand {
  display: flex; align-items: center; gap: .6rem;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand__mark { width: .7rem; height: .7rem; border-radius: 2px; background: var(--accent); }
.brand__name { font-weight: 600; letter-spacing: -.01em; }
.brand__role {
  padding-left: .6rem; border-left: 1px solid var(--line);
  color: var(--muted); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase;
}
.topbar nav { display: flex; gap: 1.25rem; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.topbar nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 5rem 0 3.5rem; }
.eyebrow { margin: 0 0 .75rem; color: var(--muted); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.6rem, 8vw, 4.25rem); letter-spacing: -.02em; }
.lede { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: var(--muted); max-width: 38rem; margin: 1.25rem 0 1.5rem; }
.lede em { font-style: normal; color: var(--text); }

.tags { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { font-size: .85rem; padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-block; padding: .7rem 1.25rem; border-radius: .5rem;
  border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 500;
  transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--accent); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }

/* Sections */
.section { padding: 3.5rem 0; border-top: 1px solid var(--line); }
.section h2 { font-size: 1.75rem; margin-bottom: 1.75rem; }
.prose p { margin: 0 0 1rem; max-width: 42rem; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 2.25rem; }
.job { display: grid; gap: .5rem 2rem; }
.job__meta { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); }
.job__date { color: var(--text); font-weight: 500; }
.job h3 { font-size: 1.2rem; }
.job__org { margin: .2rem 0 .6rem; color: var(--accent); font-weight: 500; }
.job p { margin-top: 0; }
.job ul { margin: 0; padding-left: 1.1rem; }
.job ul li { margin-bottom: .35rem; }
.job ul li::marker { color: var(--accent); }

/* Skills */
.skills { display: grid; gap: 2rem; }
.skills h3 { font: 600 .8rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .9rem; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { background: var(--accent-soft); color: var(--text); padding: .35rem .8rem; border-radius: .4rem; font-size: .9rem; }

/* Contact */
.contact { text-align: left; }
.contact p { color: var(--muted); margin: -1rem 0 1.5rem; }

.footer { padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer p { margin: 0; }

@media (min-width: 40rem) {
  .job { grid-template-columns: 9rem 1fr; }
  .skills { grid-template-columns: 1fr 1fr; }
  .hero { padding: 7rem 0 5rem; }
}

@media (max-width: 52rem) {
  .brand__role { display: none; }
}

@media (max-width: 34rem) {
  .topbar nav a:nth-child(3) { display: none; }
  .topbar nav { gap: .9rem; }
}
