/* buur.org — hand-rolled, no framework */

:root {
  color-scheme: light dark;

  --bg:        light-dark(#fbfaf8, #0e1116);
  --bg-raised: light-dark(#ffffff, #161b22);
  --text:      light-dark(#1a1d21, #e6e2dc);
  --muted:     light-dark(#5b6069, #969ba3);
  --line:      light-dark(#e4e0da, #262c35);
  --accent:    light-dark(#0b6a5a, #4ecfae);
  --accent-bg: light-dark(#0b6a5a14, #4ecfae1a);

  --measure: 34rem;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --radius: 12px;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color .15s ease;
}
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: .6rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  z-index: 10;
}
.skip:focus { left: var(--pad); top: var(--pad); }

.wrap {
  max-width: 46rem;
  margin-inline: auto;
  padding: var(--pad);
  padding-block: clamp(2.5rem, 8vw, 5rem);
}

/* ---------- header ---------- */

.hero {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: clamp(1.25rem, 4vw, 2rem);
  align-items: center;
}

.hero img {
  width: 128px;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 .35rem;
  font-weight: 650;
}

.role {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  text-wrap: balance;
}
.role a { text-decoration-color: var(--accent); }

.lede {
  margin-block: clamp(2rem, 6vw, 3rem) 0;
  font-size: 1.15em;
  max-width: var(--measure);
  text-wrap: pretty;
}

h2 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
  color: var(--muted);
  margin: clamp(2.75rem, 7vw, 4rem) 0 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
}

h3 {
  font-size: 1.05rem;
  font-weight: 620;
  margin: 0 0 .2rem;
  letter-spacing: -0.01em;
}

p { text-wrap: pretty; }

/* ---------- timeline ---------- */

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

.timeline > li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0 1.5rem;
  padding-block: 1.35rem;
  border-top: 1px solid var(--line);
}
.timeline > li:first-child { border-top: 0; padding-top: 0; }

.when {
  color: var(--muted);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  padding-top: .22rem;
  white-space: nowrap;
}

.what p { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }
.what p:only-of-type { margin-top: .3rem; }

.org { color: var(--muted); font-weight: 400; }

/* ---------- chips ---------- */

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
}
.chips li {
  font-size: .85rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--muted);
}

/* ---------- contact ---------- */

.contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: .85rem;
}
.contact a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.contact a:hover { border-color: var(--accent); transform: translateY(-1px); }
.contact svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.contact b { font-weight: 550; }
.contact span { color: var(--muted); font-size: .9rem; }

footer {
  margin-top: clamp(3rem, 8vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  justify-content: space-between;
}

/* ---------- theme toggle ---------- */

.theme {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease;
}
.theme:hover { border-color: var(--accent); }
.theme svg { width: 17px; height: 17px; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
:root[data-theme="dark"] .theme .sun  { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme .moon { display: block; }
  :root:not([data-theme]) .theme .sun  { display: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 34rem) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero img { width: 96px; }
  .timeline > li { grid-template-columns: 1fr; gap: .3rem; }
  .when { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .theme, .contact a { border: 0; }
  body { background: #fff; color: #000; }
}
