/* Homepage: name, one line, grouped links. Tokens match the dashboard's ink palette. */
:root {
  --bg: #ffffff;
  --text: #000000;
  --muted: #6a6a6a;
  --line: #e2e2e2;
  --line2: #bfbfbf;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #151515;
  --text: #d9d9d9;
  --muted: #8c8c8c;
  --line: #2b2b2b;
  --line2: #474747;
  color-scheme: dark;
}

/* Everything below is in rem: larger screens get 20% more of everything, phones stay at the browser default */
@media (min-width: 48em) { html { font-size: 120%; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.55 'Source Sans 3', -apple-system, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, .theme:focus-visible { outline: 0.125rem solid var(--text); outline-offset: 0.1875rem; border-radius: 0.125rem; }

.page {
  max-width: 40rem;
  min-height: 100vh;
  box-sizing: content-box;
  /* 14rem from the left at 90rem; on wider screens the same lean left of centre, on narrower ones proportional */
  padding: 7.5rem 2.5rem 3.5rem max(clamp(1.5rem, 15.5vw, 14rem), calc(50vw - 31rem));
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

h1 { margin: 0; font-size: 1.0625rem; font-weight: 600; }
h2 { margin: 0 0 0.875rem; font-size: 0.9375rem; font-weight: 400; color: var(--muted); }
p { margin: 0; }

.site-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.role { margin-top: 0.125rem; color: var(--muted); }

.theme {
  width: 2.25rem; height: 2.25rem; padding: 0;
  border: 1px solid var(--line); border-radius: 0.5rem;
  background: transparent; color: var(--muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.theme:hover { color: var(--text); }
.theme svg { width: 1rem; height: 1rem; }

.groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 2rem; }
.groups ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.125rem; }
.groups li { display: flex; flex-direction: column; gap: 0.125rem; }
.groups li a { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.25rem; }
.desc { color: var(--muted); }
.ext { width: 0.6875rem; height: 0.6875rem; color: var(--muted); }

.foot { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

@media (max-width: 48em) {
  .page { padding: 4rem 1.5rem 2.5rem; gap: 2.5rem; }
  .groups { grid-template-columns: 1fr; }
  .theme { width: 2.75rem; height: 2.75rem; }
}

/* In the document for assistants and screen readers, never painted */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Shared by the CV page */
h1 a { text-decoration: none; }
h1 a:hover { text-decoration: underline; }
.theme .sun { display: none; }
[data-theme="dark"] .theme .sun { display: block; }
[data-theme="dark"] .theme .moon { display: none; }

.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.375rem; margin: -1.25rem 0; font-size: 0.9375rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
.back svg { width: 0.875rem; height: 0.875rem; }

.stack { display: flex; flex-direction: column; gap: 2.75rem; }
.stack ul { list-style: none; margin: 0; padding: 0; }
.jobs, .devs { display: flex; flex-direction: column; gap: 1.375rem; }
.jobs li, .devs li { display: flex; flex-direction: column; gap: 0.125rem; }
.jobs li a, .devs li a { align-self: flex-start; }
.job-role { font-weight: 600; }
.pubs { display: flex; flex-direction: column; gap: 0.875rem; }
.pubs > li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0.75rem; }
.pubs ul { display: flex; flex-direction: column; gap: 0.625rem; border-left: 1px solid var(--line2); padding-left: 0.875rem; }
.pubs > li { gap: 0.5rem; }
.year { color: var(--muted); font-variant-numeric: tabular-nums; }
.rows { display: flex; flex-direction: column; gap: 0.75rem; }
.rows li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 0.75rem; }
.rows a { overflow-wrap: anywhere; }

@media (max-width: 48em) {
  .pubs > li, .rows li { grid-template-columns: 1fr; gap: 0.125rem; }
}
