/* ---------------------------------------------------------------
   Florian Tassy — personal site
   One stylesheet, no dependencies, no JavaScript.
   --------------------------------------------------------------- */

:root {
  --bg: #fafaf8;
  --fg: #1b1b1b;
  --muted: #74726d;
  --rule: #dcdad5;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Charter, "Bitstream Charter", Georgia, serif;
  --mono:  ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
           "Liberation Mono", monospace;

  --measure: 34rem;   /* text column width */
  --meta-w: 5.5rem;   /* left column for dates / labels, same on every page */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151515;
    --fg: #e6e4df;
    --muted: #8e8b85;
    --rule: #3a3936;
  }
}

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

html {
  font-size: 112.5%; /* 18px */
  -webkit-text-size-adjust: 100%;
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--fg); color: var(--bg); }

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3rem;
}

/* Header ------------------------------------------------------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem 2rem;
  margin-bottom: 4.5rem;
}

.site-name {
  color: var(--fg);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  font-family: var(--mono);
  font-size: .72rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

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

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

/* Type --------------------------------------------------------- */

h1, h2, h3 {
  font-weight: normal;
  line-height: 1.3;
  margin: 0;
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 3.5rem 0 1rem;
}

p { margin: 0 0 1.1rem; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  text-decoration-color: var(--muted);
}

a:hover { text-decoration-color: currentColor; }

a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

cite { font-style: italic; }

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

.meta {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  font-style: normal;
}

.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;
}

/* Entries: the one list pattern used everywhere ----------------- */
/* <ul class="entries"><li><span class="meta">2026</span><div>…</div></li></ul> */

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

.entries > * {
  display: grid;
  grid-template-columns: var(--meta-w) 1fr;
  gap: 0 1.25rem;
  align-items: baseline;
  margin: 0 0 1rem;
}

.entries dd { margin: 0; }

.entries .note {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
  margin: .1rem 0 0;
}

.entries .note + .meta,
.entries .stack {
  display: block;
  margin-top: .25rem;
}

[hidden] { display: none !important; }

/* Section heading with a right-hand value (count, month) */
h2.split {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

/* Takes -------------------------------------------------------- */

.entries.takes .take { margin: 0; }

.more { margin: .25rem 0 0; }

/* Year / month filter ------------------------------------------ */

.filter {
  display: grid;
  gap: .4rem;
  margin: 2.5rem 0 0;
  font-family: var(--mono);
  font-size: .72rem;
}

.filter:empty { display: none; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .9rem;
}

.chip {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  padding: .1rem 0;
  cursor: pointer;
}

.chip:not(:disabled):hover { color: var(--fg); }

.chip[aria-pressed="true"] {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .35em;
}

.chip:disabled {
  opacity: .35;
  cursor: default;
}

.chip:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

.empty { margin-top: 3.5rem; }

/* Post --------------------------------------------------------- */

.post-meta { margin: -.25rem 0 2.5rem; }

.prose p { hyphens: auto; }

.prose blockquote {
  margin: 1.75rem 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

.back { margin-top: 3rem; }

/* Footer ------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-top: 5rem;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
}

/* Small screens ------------------------------------------------ */

@media (max-width: 30rem) {
  .page { padding-top: 2.5rem; }
  .site-header { margin-bottom: 3rem; }
  .entries > * { grid-template-columns: 1fr; }
  .entries.takes > * { grid-template-columns: 1.75rem 1fr; gap: 0 .5rem; }
}

/* Print (the CV page prints cleanly to PDF) -------------------- */

@media print {
  :root { --bg: #fff; --fg: #000; --muted: #555; }
  html { font-size: 11pt; }
  .page { max-width: none; padding: 0; }
  .site-nav, .site-footer, .no-print { display: none; }
  .site-header { margin-bottom: 2rem; }
  h2 { margin-top: 1.75rem; }
  a { text-decoration: none; }
}
