/*
 * site.css — layout only. Every colour, size, spacing and radius comes from a custom property
 * declared in tokens.css. If you find a literal colour or a magic pixel value in here, it is a
 * bug: it would survive a design swap and quietly contradict the new palette.
 *
 * Two breakpoints, and only two:
 *   860px — the home hero stops being two columns
 *   720px — the nav collapses behind the menu button, and card/section padding tightens
 */

/* ------------------------------------------------------------------ reset */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--color-accent-hover);
}

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

/* --------------------------------------------------------------- utilities */

.wrap {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: calc(var(--space-2) * -10);
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: top 0.1s ease-in;
}

.skip-link:focus {
  top: var(--space-2);
}

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

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

.site-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-decoration: none;
  /* The name and the nav are one group on the left; the theme toggle sits alone on the right.
     margin-right: auto here (rather than on .site-nav) is what keeps that grouping when the nav
     collapses behind the menu button below 720px. */
  margin-right: var(--space-6);
}

.site-nav {
  margin-right: auto;
}

.site-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
}

.site-nav-link:hover {
  color: var(--color-text);
}

.site-nav-link.active {
  color: var(--color-text);
  font-weight: 600;
}

/*
 * Mobile nav: a visually hidden checkbox, a label, and a sibling selector. No script involved,
 * so it works before anything parses. theme.js only adds aria-expanded on top.
 */
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.nav-toggle-label {
  display: none;
  align-items: center;
  gap: var(--space-2);
  height: var(--tap-target);
  padding-inline: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.nav-toggle-bars {
  width: var(--space-4);
  height: 1px;
  background: currentColor;
  box-shadow: 0 -4px 0 currentColor, 0 4px 0 currentColor;
}

.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

.theme-toggle {
  display: flex;
  gap: var(--space-1);
  padding-left: var(--space-3);
  border-left: 1px solid var(--color-border);
}

.theme-toggle[hidden] {
  display: none;
}

.theme-option {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
}

.theme-option:hover {
  color: var(--color-text);
}

.theme-option[aria-pressed="true"] {
  background: var(--color-surface);
  color: var(--color-text);
}

@media (max-width: 720px) {
  .nav-toggle-label {
    display: inline-flex;
    order: 2;
  }

  .theme-toggle {
    order: 3;
  }

  .site-nav {
    display: none;
    order: 4;
    flex-basis: 100%;
  }

  .nav-toggle:checked ~ .site-nav {
    display: block;
  }

  .site-nav-list {
    flex-direction: column;
    gap: 0;
    padding-block: var(--space-2);
  }

  .site-nav-list li {
    border-top: 1px solid var(--color-border);
  }

  .site-nav-link {
    display: flex;
    align-items: center;
    min-height: var(--tap-target);
    font-size: var(--text-base);
  }

  .theme-toggle {
    border-left: 0;
    padding-left: 0;
  }

  .theme-option {
    width: var(--tap-target);
    height: var(--tap-target);
  }
}

/* -------------------------------------------------------------------- main */

.site-main {
  flex: 1 0 auto;
  padding-bottom: var(--space-12);
}

.page-header {
  padding-top: var(--space-12);
  margin-bottom: var(--space-8);
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: var(--line-height-heading);
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0;
}

.page-meta,
.page-summary {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: var(--measure);
  margin: var(--space-3) 0 0;
  text-wrap: pretty;
}

/* The repo/live link row, on a project page and on a project card. Two hooks rather than one,
   so they can size differently — the card one gets a divider because it closes a boxed card,
   the page one does not because it is already the last thing before a change of section. */
.page-links {
  display: flex;
  gap: var(--space-4);
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

/* .prose-section h2 plays the same role as .section-title, just without a separate .section-head
   wrapper to hang the divider on — see .prose-section h2 below for the divider it adds. */
.section-title,
.prose-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: var(--line-height-heading);
  font-weight: 600;
  margin: 0;
}

.section-link {
  margin-left: auto;
  font-size: var(--text-sm);
}

.home-section {
  margin-top: var(--space-12);
}

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

/*
 * Home only. Three areas, two columns: the body spans both rows so the portrait sits top-right
 * with the facts directly beneath it; on a narrow screen the areas restack with the portrait
 * leading. .page-header is reused for the name/role rather than a bespoke element, restyled
 * bigger only inside .hero — every other page keeps the normal page-title size.
 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside-width);
  grid-template-areas:
    "body photo"
    "body facts";
  grid-template-rows: auto 1fr;
  column-gap: var(--space-14);
  row-gap: var(--space-5);
  padding-top: var(--space-12);
}

.hero-body {
  grid-area: body;
  display: flex;
  flex-direction: column;
}

.hero-body .page-header {
  padding-top: 0;
  margin-bottom: 0;
}

.hero-body .page-title {
  font-size: var(--text-hero);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-body .page-meta {
  font-size: var(--text-xl);
}

/* Anchors the buttons to the bottom of the text column, so it finishes level with the portrait
   column beside it instead of stopping short. Only works because .hero-actions is the last flex
   child of .hero-body. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-8);
}

.hero-photo {
  grid-area: photo;
}

.hero-photo img {
  display: block;
  width: var(--aside-width);
  height: var(--aside-width);
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.facts {
  grid-area: facts;
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.fact-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.fact-value {
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: right;
}

.facts-links {
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-4);
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "photo"
      "body"
      "facts";
    grid-template-rows: none;
    row-gap: var(--space-6);
  }

  /* The portrait leads on a narrow screen, so it comes down to a size that does not eat the
     whole first screenful. */
  .hero-photo img {
    width: 120px;
    height: 120px;
  }

  .hero-actions {
    margin-top: 0;
    padding-top: var(--space-6);
  }

  .hero-actions .btn {
    flex-grow: 1;
  }
}

@media (max-width: 720px) {
  .hero-actions {
    flex-direction: column;
  }

  /*
   * Standalone utility links get a finger-sized hit area. Deliberately NOT applied to links
   * inside a sentence — a 44px tall word mid-paragraph would wreck the line rhythm, and the
   * guidance is about controls, not prose.
   */
  .site-footer-links a,
  .facts-links a,
  .card-links a,
  .section-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-target);
  }
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-target);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-on-accent);
}

.btn-ghost {
  background: var(--color-bg);
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-ghost:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

/* ------------------------------------------------------- long-form article */

/*
 * The container is not capped — a heading, a table, an image can all use the full column. What
 * gets capped is running text itself: a paragraph, a list item, a blockquote, each on their own
 * below. A long line is hard to read regardless of how wide the box around it is.
 */
.prose {
  max-width: none;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.prose h2 {
  font-size: var(--text-2xl);
  line-height: var(--line-height-heading);
  margin: var(--space-10) 0 var(--space-4);
}

.prose h3 {
  font-size: var(--text-xl);
  line-height: var(--line-height-heading);
  margin: var(--space-8) 0 var(--space-3);
}

.prose h4 {
  font-size: var(--text-lg);
  line-height: var(--line-height-heading);
  margin: var(--space-6) 0 var(--space-2);
}

.prose h5,
.prose h6 {
  font-size: var(--text-base);
  line-height: var(--line-height-heading);
  margin: var(--space-5) 0 var(--space-2);
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose table,
.prose .code-block {
  margin-block: var(--space-4);
}

.prose p,
.prose li,
.prose blockquote {
  max-width: var(--measure);
  text-wrap: pretty;
}

.prose li + li {
  margin-top: var(--space-2);
}

.prose ul {
  padding-left: 1.15em;
}

.prose ul li::marker {
  color: var(--color-accent);
}

.prose blockquote {
  margin-inline: 0;
  padding: var(--space-2) var(--space-5);
  border-left: 3px solid var(--color-border);
  color: var(--color-text-muted);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-10);
}

.prose img {
  border-radius: var(--radius-md);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.prose th,
.prose td {
  padding: var(--space-3) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose th {
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* A key/value pair — the common case for a table in a short prose page (Practices, Languages).
   A wider table still works; it just does not get this distinction past the first and last
   column. */
.prose tbody td:first-child {
  font-weight: 500;
}

.prose tbody td:last-child {
  color: var(--color-text-muted);
}

.project-image {
  margin: var(--space-6) 0;
}

.project-image img {
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

/*
 * A simple page written as a run of "## Heading" sections (About, Skills, Education, …) has each
 * one wrapped in <section class="prose-section"> server-side — see GroupSections in
 * MarkdownRenderer. Styled as a plain section break — an underlined heading, no box — the same
 * treatment .home-section/.section-title already give Projects/Writing on the home page, not a
 * card: a page like Skills also opens with .group-grid cards above this, and stacking a card of
 * cards read wrong. A blog post or project body is never grouped, so long-form prose there is
 * untouched. The section itself is not width-capped — .prose never is — so its table or its
 * paragraphs fill the column the same way .group-grid and .entry-list do above it.
 */
.prose-section + .prose-section {
  margin-top: var(--space-12);
}

.prose-section h2 {
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

/*
 * The card grid a page gets when its front matter declares `groups:` or `entries:` (see
 * ContentPage.razor) — a titled tag group (Skills uses this for its categories), or a titled
 * entry with an org and a date range (Education uses this for its degrees). Optional and
 * generic: any content/pages/*.md can use either, or neither.
 */
.group-grid {
  /* A flow, not a grid: on a grid every row is as tall as its tallest tile, so a short group
     leaves a hole beneath it. In a flow each tile is only as tall as its own content. */
  column-count: 2;
  column-gap: var(--space-5);
  margin-top: var(--space-8);
}

.group-card,
.entry-card {
  break-inside: avoid;
  margin-bottom: var(--space-5);
  padding: var(--space-5) var(--space-6);
}

.group-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
}

.group-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: var(--space-2) 0 0;
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  list-style: none;
  margin: var(--space-8) 0 0;
  padding: 0;
}

.entry-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.entry-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: var(--line-height-heading);
  font-weight: 600;
  margin: 0;
}

.entry-org {
  color: var(--color-text-muted);
  margin: 0;
}

.entry-when {
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-block: 0;
}

.entry-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: var(--space-2) 0 0;
}

/* The remaining markdown body, when a page has both cards and prose below them (Skills'
   Practices table, Education's Languages table and closing note). */
.group-grid + .prose,
.entry-list + .prose {
  margin-top: var(--space-12);
}

@media (max-width: 860px) {
  .group-grid {
    column-count: 1;
  }
}

@media (max-width: 720px) {
  .group-card,
  .entry-card {
    padding: var(--space-5);
  }

  .entry-when {
    margin-left: 0;
    flex-basis: 100%;
  }
}

/* ------------------------------------------------------------- code blocks */

.code-block {
  position: relative;
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-block pre {
  margin: 0;
  padding: var(--space-4);
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: none;
  border: 0;
  padding: 0;
  white-space: pre;
}

.code-copy {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.1s ease-in;
}

.code-block:hover .code-copy,
.code-copy:focus-visible,
.code-copy[data-copied="true"] {
  opacity: 1;
}

.code-copy:hover {
  color: var(--color-text);
}

.code-copy[data-copied="true"] {
  color: var(--color-accent);
}

/*
 * Syntax palette. The class names are ColorCode's scope reference names, produced server-side
 * and baked into the cached HTML — no highlighting library runs in the browser. The extras fall
 * back to one of the eight required tokens, so a design that supplies only those still works.
 */
.code-block .comment,
.code-block .htmlComment,
.code-block .xmlComment,
.code-block .xmlDocComment {
  color: var(--syntax-comment);
  font-style: italic;
}

.code-block .keyword,
.code-block .controlKeyword,
.code-block .preprocessorKeyword,
.code-block .pseudoKeyword {
  color: var(--syntax-keyword);
}

.code-block .string,
.code-block .stringCSharpVerbatim,
.code-block .jsonString,
.code-block .htmlAttributeValue,
.code-block .xmlAttributeValue {
  color: var(--syntax-string);
}

.code-block .number,
.code-block .jsonNumber {
  color: var(--syntax-number);
}

.code-block .builtinFunction,
.code-block .constructor,
.code-block .powershellCommand,
.code-block .sqlSystemFunction,
.code-block .markdownHeader {
  color: var(--syntax-function);
}

.code-block .type,
.code-block .className,
.code-block .typeVariable,
.code-block .namespace,
.code-block .predefined,
.code-block .powershellType,
.code-block .powershellVariable,
.code-block .htmlElementName,
.code-block .xmlName,
.code-block .cssSelector {
  color: var(--syntax-type);
}

.code-block .operator,
.code-block .htmlOperator,
.code-block .powershellOperator,
.code-block .specialChar,
.code-block .stringEscape {
  color: var(--syntax-operator);
}

.code-block .delimiter,
.code-block .htmlTagDelimiter,
.code-block .xmlDelimiter,
.code-block .brackets {
  color: var(--syntax-punctuation);
}

.code-block .attribute,
.code-block .jsonKey,
.code-block .htmlAttributeName,
.code-block .xmlAttribute,
.code-block .cssPropertyName,
.code-block .powershellParameter,
.code-block .powershellAttribute {
  color: var(--syntax-attribute, var(--syntax-type));
}

.code-block .builtinValue,
.code-block .jsonConst,
.code-block .htmlEntity,
.code-block .cssPropertyValue {
  color: var(--syntax-builtin, var(--syntax-keyword));
}

/* ------------------------------------------------------------------- cards */

.card-grid {
  display: grid;
  /* auto-fit, not auto-fill: empty tracks collapse, so two cards fill the row instead of
     leaving a phantom third column's worth of dead space to the right. */
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: start;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-body,
.timeline-item {
  padding: var(--space-6);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--line-height-heading);
  font-weight: 600;
  margin: 0;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover {
  color: var(--color-accent);
}

.card-date {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.card-summary {
  color: var(--color-text-muted);
  margin: var(--space-2) 0 0;
  text-wrap: pretty;
}

/* A divider above a trailing link or tag row that closes off a card-like block — shared by a
   project card, the hero facts panel, and a role's technology tags. */
.card-links,
.facts-links,
.timeline-item .tag-list {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.card-links,
.facts-links {
  display: flex;
  font-size: var(--text-sm);
}

.card-links {
  gap: var(--space-4);
  margin-top: var(--space-5);
}

/* --------------------------------------------------------------- blog list */

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

.post-list > li + li {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.post-row-date {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.post-row-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--line-height-heading);
  font-weight: 600;
  margin: var(--space-1) 0 0;
}

.post-row-title a {
  color: inherit;
  text-decoration: none;
}

.post-row-title a:hover {
  color: var(--color-accent);
}

.post-row-summary {
  max-width: var(--measure);
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.post-footer-nav {
  margin-top: var(--space-10);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

/* ------------------------------------------------------------------ roles */

/*
 * Experience is a stack of blocks, not a connected timeline — no marker dot, no rail down the
 * left edge. Each entry reuses .card for the same surface/border/shadow every other card on the
 * site gets, so it reads as one consistent card system rather than a special case.
 */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
}

.timeline-role {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--line-height-heading);
  font-weight: 600;
  margin: 0;
}

.timeline-company {
  /* Sits inline right after the role text inside the same <h2>, so the gap has to come from
     margin rather than a flex/grid gap. */
  margin-left: var(--space-3);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text-muted);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: right;
}

/*
 * A markdown body inside a role is styled as .prose everywhere else on the site, but here the
 * bullet list of highlights gets a checkmark instead of a plain bullet — matching the design's
 * "point" list without needing raw SVG in the markdown itself. Scoped to .timeline-item so a
 * list in a blog post or a Skills note is untouched.
 */
.timeline-item .prose {
  margin-top: var(--space-4);
}

.timeline-item .prose ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* The checkmark list is short runs rather than continuous prose, so it gets the slightly looser
   --measure-wide used elsewhere for those, overriding the --measure every other .prose li gets. */
.timeline-item .prose li {
  display: flex;
  gap: var(--space-3);
  max-width: var(--measure-wide);
  color: var(--color-text-muted);
}

.timeline-item .prose li + li {
  margin-top: 0;
}

.timeline-item .prose li::before {
  content: "";
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  margin-top: 0.3em;
  background-color: var(--color-accent);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.timeline-item .tag-list {
  margin-top: var(--space-5);
}

/* -------------------------------------------------------------------- tags */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
}

.tag {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  /* --color-bg, not --color-surface: a tag list nearly always sits on a card or a hero facts
     panel, which is already the surface tone — a surface-on-surface tag would barely show. */
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-6);
}

.site-footer-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--text-sm);
}

/* ------------------------------------------------------------- diagnostics */

.diagnostics-section {
  margin-top: var(--space-8);
}

.diagnostics-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: var(--line-height-heading);
  margin: 0 0 var(--space-2);
}

.diagnostics-empty {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.diagnostics-list {
  margin: 0;
  padding-left: var(--space-5);
  font-size: var(--text-sm);
}

.diagnostics-list li + li {
  margin-top: var(--space-2);
}

.diagnostics-list code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-code-bg);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.3em;
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ============================================================ 720px and down */

@media (max-width: 720px) {
  .card-body,
  .timeline-item {
    padding: var(--space-5);
  }
}
