:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #1a1f2b;
  --muted: #5b6372;
  --rule: #d9dde3;
  --accent: #1d5c3f;
  --accent-ink: #ffffff;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161d;
    --surface: #1a2029;
    --ink: #e6e9ee;
    --muted: #a3abb8;
    --rule: #2e3644;
    --accent: #6cc59a;
    --accent-ink: #12161d;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}

.wrap {
  max-width: calc(var(--measure) + 2rem);
  margin: 0 auto;
  padding: 0 1rem;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .skip:focus { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--surface); padding: 0.5rem 0.75rem; }
.skip:focus { left: 0.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.topbar { border-top: 4px solid var(--accent); }

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.6rem;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 1.6rem/1 var(--display);
  letter-spacing: 0.01em;
  text-decoration: none;
}
.mark:hover { text-decoration: none; filter: brightness(1.1); }

.topbar .links { font-size: 0.9375rem; }
.topbar .links a { color: var(--ink); text-decoration: none; }
.topbar .links a:hover { color: var(--accent); text-decoration: underline; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
section[id] { scroll-margin-top: 1rem; }

/* Intro */
.intro { padding: 3rem 0 3rem; border-bottom: 1px solid var(--rule); }

.name {
  margin: 0;
  font: 700 clamp(3.5rem, 15vw, 7rem)/0.88 var(--display);
  letter-spacing: -0.01em;
}

.role {
  margin: 0.75rem 0 1.5rem;
  font: 500 1.5rem/1.2 var(--display);
  color: var(--muted);
}

.lede { margin: 0 0 1.25rem; font-size: 1.1875rem; max-width: 36rem; }

.links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; font-weight: 500; }

/* Sections */
.section-title {
  margin: 3rem 0 0;
  font: 500 1.125rem/1.2 var(--body);
  color: var(--muted);
}

.project { padding: 2rem 0 2.5rem; border-bottom: 1px solid var(--rule); }

.project-name {
  margin: 0;
  font: 700 2.75rem/1 var(--display);
}

.project-summary { margin: 0.5rem 0 0.75rem; font-size: 1.1875rem; }

.project-head.has-logo { display: flex; align-items: flex-start; gap: 1.25rem; }

.project-logo {
  flex: none;
  width: 5rem;
  height: 5rem;
  border-radius: 1.1rem;
  box-shadow: 0 0 0 1px var(--rule);
}

@media (max-width: 26rem) {
  .project-head.has-logo { gap: 1rem; }
  .project-logo { width: 4rem; height: 4rem; border-radius: 0.9rem; }
}

.project-links { margin-bottom: 1.5rem; }

.project h4 {
  margin: 1.75rem 0 0.5rem;
  font: 600 1.0625rem/1.3 var(--body);
}

.project p { margin: 0 0 1rem; }

/* The stat sheet: a box score for each project */
.stats {
  width: 100%;
  margin: 0 0 1.5rem;
  border-collapse: collapse;
  background: var(--surface);
  border-top: 3px solid var(--accent);
}

.stats th, .stats td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

.stats th { text-align: left; font-weight: 400; color: var(--muted); }

.stats td {
  text-align: right;
  font: 700 1.625rem/1 var(--display);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}

.built { margin: 0; padding-left: 1.15rem; }
.built li { margin-bottom: 0.6rem; padding-left: 0.25rem; }
.built li::marker { color: var(--accent); }

.stack { color: var(--muted); }

/* How I work */
.about { padding-bottom: 2rem; }
.about .section-title { margin-bottom: 1rem; }
.about p { margin: 0 0 1rem; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}
.site-footer p { margin: 0; }

@media (min-width: 40rem) {
  .stats tbody { display: grid; grid-template-columns: 1fr 1fr; }
  .stats tr { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--rule); }
  .stats tr:nth-child(odd) { border-right: 1px solid var(--rule); }
  .stats th, .stats td { border-bottom: 0; }
  .stats tr:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
}
