:root {
  color-scheme: light;
  --background: #f6f6f3;
  --foreground: #171715;
  --secondary: #484844;
  --rule: #a8a8a1;
  --measure: 34rem;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--background);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1.25rem;
  background: var(--foreground);
  color: var(--background);
  font-size: 0.875rem;
  text-decoration: none;
  z-index: 10;
}

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

:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 3px;
}

.shell {
  width: min(100%, 62rem);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 6vw, 4rem);
}

.site-header { padding-block: clamp(1.75rem, 4vw, 2.75rem); }

.site-header nav ul {
  display: flex;
  gap: clamp(1.25rem, 4vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header a {
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-header a:hover,
.site-header a[aria-current="page"] { color: var(--foreground); }

.site-header a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.4em;
  text-decoration-thickness: 1px;
}

main {
  flex: 1;
  padding-block: clamp(2rem, 7vw, 5rem) clamp(3rem, 9vw, 7rem);
}

.eyebrow, .label, .status {
  color: var(--secondary);
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 clamp(1rem, 3vw, 1.5rem);
  font-size: 0.75rem;
}

.label {
  margin: 0 0 clamp(0.75rem, 2vw, 1rem);
  font-size: 0.75rem;
}

.status {
  display: inline-block;
  margin: 0;
  font-size: 0.6875rem;
}

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.25rem, 7.5vw, 4.25rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  max-width: var(--measure);
  margin: clamp(1.25rem, 3vw, 1.75rem) 0 0;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--secondary);
  text-wrap: pretty;
}

section {
  margin-top: clamp(3rem, 8vw, 5.5rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--rule);
}

section h2 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

section p {
  max-width: var(--measure);
  margin: clamp(0.875rem, 2vw, 1.25rem) 0 0;
  color: var(--secondary);
  text-wrap: pretty;
}

.projects {
  margin: 0;
  padding: 0;
  list-style: none;
}

.projects > li + li {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-top: clamp(2.5rem, 6vw, 3.5rem);
  border-top: 1px solid var(--rule);
}

.projects h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.projects p {
  max-width: var(--measure);
  margin: clamp(0.875rem, 2vw, 1.25rem) 0 0;
  color: var(--secondary);
  text-wrap: pretty;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem clamp(1.25rem, 3vw, 2rem);
  margin: clamp(1rem, 2.5vw, 1.5rem) 0 0;
  padding: 0;
  list-style: none;
}

.links a, .cta {
  display: inline-block;
  color: var(--foreground);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.125rem;
}

.links a:hover, .cta:hover { border-bottom-color: var(--foreground); }

.cta {
  margin-top: clamp(1.5rem, 4vw, 2rem);
  font-size: 1rem;
}

.site-footer {
  padding-block: 0 clamp(2.5rem, 6vw, 3.5rem);
  color: var(--secondary);
  font-size: 0.8125rem;
}

.site-footer .rows {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem 2rem;
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--rule);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  color: var(--foreground);
  border-bottom-color: var(--rule);
}

.site-footer .name {
  margin: 0;
  font-weight: 650;
  color: var(--foreground);
  letter-spacing: -0.01em;
}

.centered {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 60vh;
}

.centered h1 { max-width: none; }

@media (forced-colors: active) {
  section, .projects > li + li, .site-footer .rows { border-color: CanvasText; }
}

/* Project cards inside a pillar section use h3 under the section h2. */
.projects h3 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.note {
  font-size: 0.9375rem;
}

/* Timeline */
.timeline {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.timeline > li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0 clamp(1.25rem, 3vw, 2.5rem);
  padding-block: clamp(1.5rem, 3.5vw, 2rem);
  border-top: 1px solid var(--rule);
}

.timeline > li:first-child { border-top: 0; padding-top: 0; }

.timeline .year {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin: 0;
  max-width: none;
  color: var(--secondary);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  padding-top: 0.35rem;
}

.timeline h3 {
  grid-column: 2;
  margin: 0;
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.timeline p:not(.year) {
  grid-column: 2;
  max-width: var(--measure);
  margin: 0.5rem 0 0;
  color: var(--secondary);
  text-wrap: pretty;
}

@media (max-width: 34rem) {
  .timeline > li { grid-template-columns: minmax(0, 1fr); }
  .timeline .year { grid-column: 1; grid-row: auto; padding-top: 0; }
  .timeline h3, .timeline p:not(.year) { grid-column: 1; }
  .timeline h3 { margin-top: 0.35rem; }
}

/* Review mode: fact-id badges, hidden until the page URL ends with #review.
   Pure CSS, because the site ships a Content-Security-Policy with no script-src. */
.review-anchor { display: block; height: 0; }

.fact-badge { display: none; }

#review:target ~ main .fact-badge {
  display: block;
  max-width: none;
  margin: 0.75rem 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--secondary);
  word-break: break-word;
}

#review:target ~ main .fact-badge span {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--foreground);
}
