/* davidecasuccio.com */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;

  --bg: oklch(0.985 0.004 190);
  --surface: oklch(0.965 0.006 190);
  --ink: oklch(0.22 0.016 225);
  --ink-2: oklch(0.43 0.016 225);
  --ink-3: oklch(0.52 0.014 225);
  --rule: oklch(0.9 0.007 200);
  --rule-strong: oklch(0.8 0.01 200);
  --accent: oklch(0.47 0.095 165);
  --accent-ink: oklch(0.985 0.004 190);
  --accent-wash: oklch(0.91 0.05 165);

  /* The pine field: hero and CV head bands */
  --field: oklch(0.31 0.058 168);
  --field-ink: oklch(0.97 0.012 165);
  --field-ink-2: oklch(0.84 0.03 165);
  --mint: oklch(0.86 0.11 165);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-h3: 1.34rem;
  --step-h2: 1.6875rem;

  --gutter: clamp(1rem, 0.4rem + 3vw, 3rem);
  --page: 68rem;
  --section-gap: clamp(4rem, 2.5rem + 6vw, 7.5rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.17 0.012 225);
    --surface: oklch(0.21 0.013 225);
    --ink: oklch(0.94 0.006 200);
    --ink-2: oklch(0.76 0.012 210);
    --ink-3: oklch(0.67 0.012 210);
    --rule: oklch(0.28 0.012 225);
    --rule-strong: oklch(0.38 0.014 225);
    --accent: oklch(0.8 0.1 165);
    --accent-ink: oklch(0.17 0.012 225);
    --accent-wash: oklch(0.34 0.06 165);
    --field: oklch(0.25 0.05 168);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  scrollbar-color: var(--rule-strong) var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "ss01" 0;
  overflow-wrap: break-word;   /* long URLs and emails never force a horizontal scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--accent);
}

::selection { background: var(--accent-wash); color: var(--ink); }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
a:hover { text-decoration-color: currentColor; }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 20;
  padding: 0.5rem 0.875rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border-radius: 6px;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;            /* large text: the nav drops to a second row instead of overflowing */
  align-items: center;
  justify-content: space-between;
  gap: 0 1.5rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark { width: 1.5rem; height: 1.5rem; flex: none; }
.brand-mark rect { fill: var(--ink); }
.brand-mark .m-dots { fill: var(--bg); opacity: 0.5; }
.brand-mark .m-core { fill: var(--accent); }
.on-band .brand-mark rect { fill: oklch(1 0 0 / 0.08); }
.on-band .brand-mark .m-dots { fill: var(--ink); }
/* The full name joins the mark only once the page's own heading has scrolled away.
   While hidden it takes no width, so narrow headers never overflow. */
.brand-name {
  display: inline-block;
  max-width: 14rem;
  overflow: hidden;
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out), max-width 260ms var(--ease-out);
}
.on-band .brand-name {
  max-width: 0;
  opacity: 0;
  transform: translateX(-0.375rem);
  pointer-events: none;
}
.on-band .brand { gap: 0; }
@media (max-width: 26rem) {
  .brand-name { display: none; }
  .brand { gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-name { transition: opacity 160ms linear; }
  .on-band .brand-name { transform: none; }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(1rem, 0.5rem + 2vw, 2rem);
  font-size: var(--step--1);
}
/* 44px-tall hit areas; the horizontal padding is cancelled by margin so the layout is unchanged. */
.site-nav > a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.4375rem;
  margin-inline: -0.4375rem;
  color: var(--ink-2);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.lang {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding-left: clamp(1rem, 0.5rem + 2vw, 2rem);
  border-left: 1px solid var(--rule);
}
.lang a, .lang span {
  padding: 0.25rem 0.375rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.lang span[aria-current] { color: var(--ink); background: var(--surface); }
.lang a { position: relative; color: var(--ink-3); }
.lang a::after { content: ""; position: absolute; inset: -0.5rem 0; }  /* taller hit area, same pill */
.lang a:hover { color: var(--ink); }

/* ---------- pine band (hero, CV head, header while over them) ---------- */

.band,
.site-header.on-band {
  --bg: var(--field);
  --surface: oklch(1 0 0 / 0.1);
  --ink: var(--field-ink);
  --ink-2: var(--field-ink-2);
  --ink-3: var(--field-ink-2);
  --rule: oklch(1 0 0 / 0.14);
  --rule-strong: oklch(1 0 0 / 0.34);
  --accent: var(--mint);
  --accent-ink: var(--field);
  --accent-wash: oklch(0.86 0.11 165 / 0.35);
  color: var(--ink);
}
.band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg);
}
.site-header.on-band {
  background: var(--bg);
  border-bottom-color: transparent;
}

.field {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, rgb(0 0 0 / 0.72) 100%);
  mask-image: linear-gradient(to bottom, #000 50%, rgb(0 0 0 / 0.72) 100%);
}

/* ---------- hero ---------- */

.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(86svh - 4rem);
  padding-top: clamp(4rem, 10vh, 8rem);
  padding-bottom: clamp(3rem, 2rem + 4vw, 6rem);
}

.status {
  max-width: 60ch;
  position: relative;
  margin-bottom: clamp(1.25rem, 1rem + 2vw, 2.25rem);
  color: var(--ink-2);
  font-size: var(--step--1);
  line-height: 1.55;
  text-wrap: pretty;
}
.status:not([data-ready]) { visibility: hidden; }
.status-dot {
  position: relative;
  display: inline-block;
  vertical-align: 0.06em;
  margin-right: 0.55rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  animation: breathe 2.8s var(--ease-out) infinite;
}
.status[data-mode="night"] .status-dot,
.status[data-mode="night"] .status-dot::after { background: var(--ink-3); }
.status time {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.status a { color: inherit; }

@keyframes breathe {
  0% { transform: scale(1); opacity: 0.5; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot::after { animation: none; opacity: 0; }
}

.hero h1 {
  /* Capped by the viewport too, so the longest word ("Davide.") fits even with 200% text. */
  font-size: min(clamp(3.75rem, 1.2rem + 15vw, 9.5rem), 19.5vw);
  font-weight: 620;
  line-height: 0.86;
  letter-spacing: -0.04em;
  margin-left: -0.04em;
}
.hero h1 .line { display: block; }
.hero h1 .word { white-space: nowrap; }
.hero h1 .ch { transition: none; }
.hero h1[data-wave] { cursor: default; -webkit-tap-highlight-color: transparent; }

.lede {
  max-width: 40ch;
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem);
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: var(--ink-2);
  text-wrap: pretty;
}
.lede strong { color: var(--ink); font-weight: 560; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 3rem;
  padding: 0 1.25rem 0 1.375rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 550;
  text-decoration: none;
  transition: background-color 180ms var(--ease-out), transform 180ms var(--ease-out);
}
.button:hover { background: var(--accent); color: var(--accent-ink); }
.button:active { transform: translateY(1px); }
.button svg { transition: transform 220ms var(--ease-out); }
.button:hover svg { transform: translateX(3px); }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.links a {
  overflow-wrap: anywhere;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2.75rem;
  font-weight: 500;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.links .icon { width: 0.85em; height: 0.85em; color: var(--ink-3); }

/* ---------- shared text ---------- */

.prose {
  max-width: 62ch;
  color: var(--ink-2);
}
.prose p + p { margin-top: 1em; }
.prose strong { color: var(--ink); font-weight: 560; }

.more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1.25rem;
  font-weight: 550;
  text-decoration-color: var(--accent);
}
.more .icon { color: var(--accent); }

/* ---------- home: one statement, then off hours ---------- */

.intro {
  display: grid;
  gap: 1.5rem 4rem;
  padding-block: var(--section-gap) 0;
}
.statement {
  max-width: 18ch;
  font-size: clamp(1.875rem, 1.1rem + 3.2vw, 3.5rem);
  font-weight: 580;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.intro-body { max-width: 50ch; color: var(--ink-2); }
@media (min-width: 60rem) {
  .intro { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; }
}

.offhours-block { padding-block: var(--section-gap) 0; }
.offhours-block > h2 {
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  font-size: var(--step-h2);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.offhours li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  align-items: center;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 6rem;
}
.glyph {
  grid-row: span 2;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--ink);
}
.offhours h3 {
  font-size: var(--step-h3);
  font-weight: 580;
  letter-spacing: -0.012em;
  line-height: 1.3;
}
.offhours li:last-child { border-bottom: 1px solid var(--rule); }
.offhours p { overflow-wrap: anywhere; max-width: 58ch; color: var(--ink-2); text-wrap: pretty; }
@media (min-width: 48rem) {
  .offhours li { grid-template-columns: 3.5rem 11rem minmax(0, 1fr); gap: 2rem; }
  .glyph { grid-row: auto; }
}
.offhours li:target h3 { text-decoration: underline 2px var(--accent); text-underline-offset: 0.35em; }

/* contact close */

.contact {
  padding-block: var(--section-gap);
}
.contact-line {
  font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
  max-width: 22ch;
}
.contact-mail {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: clamp(1.125rem, 0.95rem + 0.9vw, 1.5rem);
  font-weight: 500;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  overflow-wrap: anywhere;
}
.contact .links { margin-top: 1.25rem; }

/* footer */

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: var(--step--1);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.75rem 2.25rem;
}

/* ---------- CV: a document sheet, set like the PDF ---------- */

.page-cv { background: var(--surface); }
.page-cv .brand-name { display: none; }

.sheet {
  margin-block: clamp(1.25rem, 0.75rem + 3vw, 3.5rem) clamp(2.5rem, 2rem + 4vw, 5rem);
  padding: clamp(1.5rem, 0.75rem + 3.5vw, 4rem);
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
  font-size: 1rem;
  line-height: 1.6;
}
@media (max-width: 40rem) {
  .sheet {
    margin-inline: calc(-1 * var(--gutter));
    border-inline: 0;
    border-radius: 0;
  }
}

.sheet-head {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--ink);
}
.sheet-head h1 {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  font-weight: 620;
  letter-spacing: -0.04em;
  line-height: 1;
}
.cv-role {
  margin-top: 0.5rem;
  font-size: var(--step-1);
  color: var(--ink-2);
}
.sheet-head .links { margin-top: 0.75rem; font-size: var(--step-0); }

.sheet-cols { display: grid; gap: 0 3.5rem; }
@media (min-width: 56rem) {
  .sheet-cols { grid-template-columns: minmax(0, 1fr) 16rem; }
  .sheet-side { padding-left: 2rem; border-left: 1px solid var(--rule); }
}
.sheet-main .prose, .sheet-main .job-bullets { max-width: 62ch; }
@media (min-width: 56rem) {
  .sheet-side .cv-sec > h2 { font-size: 1.1875rem; }
}

.cv-sec { padding-top: 2rem; }
.cv-sec > h2 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.sheet .prose { max-width: none; }

.entry-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.125rem 1.5rem;
}
.entry-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
}
.entry-title .at { color: var(--ink-3); font-weight: 450; }
.entry-meta {
  color: var(--ink-3);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.entry-sub {
  margin-top: 0.125rem;
  color: var(--ink-3);
  font-size: var(--step--1);
}

.job + .job { margin-top: 2rem; }
.job-bullets {
  max-width: 70ch;
  margin-top: 0.75rem;
  color: var(--ink-2);
}
.job-bullets li {
  position: relative;
  padding-left: 1.125rem;
}
.job-bullets li + li { margin-top: 0.5rem; }
.job-bullets li::before {
  content: "";
  position: absolute;
  left: 0.125rem;
  top: 0.78em;
  width: 0.5rem;
  border-top: 1px solid var(--ink-3);
}

.edu + .edu { margin-top: 1rem; }
/* Degree titles vary in length: dates always sit on their own line, for both. */
.edu .entry-top { display: block; }
.edu .entry-meta { display: block; margin-top: 0.125rem; }
.grade { color: var(--ink); font-weight: 560; font-variant-numeric: tabular-nums; }

.skill-list > div + div { margin-top: 0.875rem; }
.skill-list dt { color: var(--ink); font-weight: 600; }
.skill-list dd { margin: 0.125rem 0 0; color: var(--ink-2); }
.cert-list li + li { margin-top: 0.875rem; }
.cert-list a { display: block; font-weight: 560; line-height: 1.35; }
.cert-list span {
  display: block;
  margin-top: 0.125rem;
  color: var(--ink-3);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}
.side-text { color: var(--ink-2); }

.cv-updated {
  margin-top: 2.5rem;
  color: var(--ink-3);
  font-size: var(--step--1);
}

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

@media (max-width: 34rem) {
  .site-nav { gap: 0.875rem; }
  .lang { padding-left: 0.875rem; }
  .entry-meta { white-space: normal; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- greeting button ---------- */

.greet {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 200ms var(--ease-out);
}
.greet:hover { color: var(--accent); }
.greet:focus-visible { outline-offset: 0.06em; }
.greet.is-new { animation: greet-in 420ms var(--ease-out); }
@keyframes greet-in {
  from { opacity: 0.25; filter: blur(6px); }
  to { opacity: 1; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .greet.is-new { animation: none; }
}

/* ---------- my week ---------- */

.week-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.week-toggle:hover { background: var(--surface); border-color: var(--ink-2); }
.week-toggle .icon { width: 0.8em; height: 0.8em; transition: transform 220ms var(--ease-out); }
.week-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }

.status-row {
  position: relative;
  z-index: 3;
  margin-bottom: clamp(1.25rem, 1rem + 2vw, 2.25rem);
}
.status-row .status { margin-bottom: 0; }
/* A wider breakable space: generous beside the text, gone when the toggle wraps. */
.status .sp { word-spacing: 0.4rem; }

/* A popover under the toggle: it overlays the heading instead of moving it. */
.week {
  position: absolute;
  top: calc(100% + 0.625rem);
  left: 0;
  width: min(100%, 34rem);
  padding: 1rem 1rem 0.875rem;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: color-mix(in oklch, var(--field) 82%, black);
  box-shadow: 0 18px 40px -12px oklch(0 0 0 / 0.55), 0 2px 6px oklch(0 0 0 / 0.25);
}
.week:not([hidden]) { animation: week-in 280ms var(--ease-out); }
@keyframes week-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .week:not([hidden]) { animation: none; }
}

.week-grid {
  display: grid;
  grid-template-columns: 1rem repeat(24, minmax(0, 1fr));
  gap: 2px;
  align-items: center;
}
.week-day {
  color: var(--ink-2);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
}
.week-cell, .week-legend i {
  aspect-ratio: 1;
  border-radius: 2px;
  background: oklch(1 0 0 / 0.2);
}
.week-cell { position: relative; }
.week-cell[data-cat="sleep"], .week-legend i[data-cat="sleep"] { background: oklch(1 0 0 / 0.07); }
.week-cell[data-cat="offline"], .week-legend i[data-cat="offline"] { background: oklch(1 0 0 / 0.2); }
.week-cell[data-cat="work"], .week-legend i[data-cat="work"] { background: oklch(1 0 0 / 0.55); }
.week-cell[data-cat="diy"], .week-legend i[data-cat="diy"] { background: #bc8b00; }
.week-cell[data-cat="pizza"], .week-legend i[data-cat="pizza"] { background: #de4670; }
.week-cell[data-cat="golf"], .week-legend i[data-cat="golf"] { background: #4b99d7; }
.week-cell:hover { outline: 1px solid var(--ink); outline-offset: 1px; z-index: 1; }
.week-cell.is-now { outline: 2px solid var(--mint); outline-offset: 1px; z-index: 2; }

.week-axis {
  display: flex;
  justify-content: space-between;
  margin: 0.375rem 0 0 calc(1rem + 2px);
  color: var(--ink-2);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}
.week-readout {
  margin-top: 0.625rem;
  color: var(--ink);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  min-height: 1.5em;
}
.week-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.875rem;
  margin-top: 0.5rem;
  color: var(--ink-2);
  font-size: 0.75rem;
}
.week-legend li { display: inline-flex; align-items: center; gap: 0.375rem; }
.week-legend i { width: 0.625rem; box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.14); }

.lede-alt {
  max-width: 40ch;
  margin-top: 0.5rem;
  color: var(--ink-2);
  font-size: var(--step-0);
}

.notfound .hero-inner { min-height: calc(100svh - 4rem); }

/* Footer links get a comfortable hit area without changing the footer's rhythm. */
.site-footer a {
  display: inline-block;
  padding-block: 0.6875rem;
  margin-block: -0.6875rem;
}
