/* =========================================================
   Design tokens
   ========================================================= */
:root {
  color-scheme: light;

  /* Color */
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-hover: #f1f2f4;
  --color-text: #111418;
  --color-text-muted: #5b6470;
  --color-border: #e5e7eb;
  --color-border-strong: #d1d5db;
  --color-accent: #1d4ed8;
  --color-accent-hover: #1e40af;
  --color-accent-soft: #eef3ff;
  --color-on-accent: #ffffff;
  --color-logo-bg: #ffffff;
  --shadow-hover: 0 1px 2px rgb(16 24 40 / 0.04), 0 8px 24px rgb(16 24 40 / 0.08);

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-small: 0.875rem;
  --text-body: 1rem;
  --text-lead: 1.125rem;
  --text-h3: 1.125rem;
  --text-h2: 1.5rem;
  --text-h1: clamp(2rem, 1.6rem + 1.6vw, 2.5rem);
  --leading-tight: 1.25;
  --leading-body: 1.7;

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Layout */
  --width-text: 720px;
  --width-wide: 1040px;
  --gutter: var(--space-4);
  --nav-height: 60px;

  /* Shape */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-full: 999px;
}

/* Dark tokens: follow the OS unless the visitor picked light, or picked dark explicitly. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg: #0e1013;
    --color-surface: #16191e;
    --color-hover: #1e2228;
    --color-text: #e8eaed;
    --color-text-muted: #9ba3af;
    --color-border: #262a31;
    --color-border-strong: #363b44;
    --color-accent: #7ea6ff;
    --color-accent-hover: #a5c1ff;
    --color-accent-soft: rgb(126 166 255 / 0.12);
    --color-on-accent: #0e1013;
    --color-logo-bg: #e4e6ea;
    --shadow-hover: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #0e1013;
  --color-surface: #16191e;
  --color-hover: #1e2228;
  --color-text: #e8eaed;
  --color-text-muted: #9ba3af;
  --color-border: #262a31;
  --color-border-strong: #363b44;
  --color-accent: #7ea6ff;
  --color-accent-hover: #a5c1ff;
  --color-accent-soft: rgb(126 166 255 / 0.12);
  --color-on-accent: #0e1013;
  --color-logo-bg: #e4e6ea;
  --shadow-hover: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
}

@media (min-width: 640px) {
  :root {
    --gutter: var(--space-5);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-height) + var(--space-4));
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-3);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 {
  font-size: var(--text-h1);
  font-weight: 700;
}

h2 {
  font-size: var(--text-h2);
  margin-top: var(--space-7);
}

h3 {
  font-size: var(--text-h3);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--space-4);
}

small {
  font-size: var(--text-small);
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

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

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

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

img {
  height: auto;
}

ul,
ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.25rem;
}

li + li {
  margin-top: var(--space-1);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-7) 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
}

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

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-on-accent);
}

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

/* =========================================================
   Layout
   ========================================================= */
.container {
  width: 100%;
  max-width: calc(var(--width-text) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: calc(var(--width-wide) + 2 * var(--gutter));
}

.site-main {
  flex: 1;
  padding-block: var(--space-6) var(--space-8);
}

@media (min-width: 640px) {
  .site-main {
    padding-block: var(--space-8);
  }
}

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

.section > h2:first-child {
  margin-top: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-5);
}

.section-head h2 {
  margin: 0;
}

.stack {
  display: grid;
  gap: var(--space-5);
}

.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

/* Featured cards: 1 column, then 2 (an odd last card spans the row), then 3. */
.grid--featured {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
  .grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--featured > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .grid--featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid--featured > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}

.page-header {
  margin-bottom: var(--space-7);
}

.lead,
.hero {
  max-width: 62ch;
  font-size: var(--text-lead);
  color: var(--color-text-muted);
}

.page-header .lead:last-child {
  margin-bottom: 0;
}

/* =========================================================
   Navigation
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--color-bg);
  background-color: color-mix(in srgb, var(--color-bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--nav-height);
}

.site-brand {
  margin-right: auto;
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

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

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

.site-menu li + li {
  margin-top: 0;
}

.site-menu a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-menu a:hover {
  color: var(--color-text);
  background: var(--color-hover);
}

.site-menu a[aria-current] {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.icon-button:hover {
  color: var(--color-text);
  background: var(--color-hover);
  border-color: var(--color-border-strong);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Theme toggle shows the theme you would switch to. */
.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

.menu-toggle,
.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* Mobile: collapse links into a menu (only when JS is available to open it). */
@media (max-width: 719.98px) {
  .site-nav {
    padding-block: var(--space-2);
  }

  .theme-toggle {
    order: 1;
  }

  .js .menu-toggle {
    display: inline-flex;
    order: 2;
  }

  /* Without JS the links simply wrap onto their own row. */
  .site-menu {
    order: 3;
    width: 100%;
  }

  .js .site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: var(--space-2) var(--gutter) var(--space-4);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-hover);
  }

  .js .site-nav.is-open .site-menu {
    display: flex;
  }

  .js .site-menu a {
    padding: var(--space-3);
    font-size: var(--text-body);
  }
}

@media (min-width: 720px) {
  .site-menu {
    margin-right: var(--space-2);
  }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-small);
}

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

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

.footer-links li + li {
  margin-top: 0;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  text-decoration: none;
}

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

.footer-copy {
  margin: 0;
}

/* Inline icons from _includes/icon.html */
.icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* =========================================================
   Components
   ========================================================= */

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

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

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

.button--secondary {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.button--secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

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

.actions li + li {
  margin-top: 0;
}

/* Cards */
.card {
  --card-pad: var(--space-5);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--card-pad);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

@media (min-width: 640px) {
  .card--roomy {
    --card-pad: var(--space-6);
  }
}

.card-media {
  display: block;
  width: calc(100% + 2 * var(--card-pad));
  max-width: none;
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) var(--card-pad);
  border-bottom: 1px solid var(--color-border);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}

.card-eyebrow {
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-small);
}

.card-title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-h3);
}

.card-title a {
  color: var(--color-text);
  text-decoration: none;
}

/* Whole card is clickable through its title link. */
.card--link .card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

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

.card--link:focus-within {
  border-color: var(--color-accent);
}

.card-text {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.card > :last-child {
  margin-bottom: 0;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li + li {
  margin-top: 0;
}

.tag {
  padding: 2px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.6;
}

/* =========================================================
   Home
   ========================================================= */
.home-hero {
  max-width: var(--width-text);
}

.home-hero-photo {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: var(--space-5);
  object-fit: cover;
  border: 1px solid var(--color-border);
  border-radius: 50%;
}

.home-hero-title {
  margin: 0 0 var(--space-4);
}

.home-hero-name {
  display: block;
  margin-bottom: var(--space-3);
  font-size: var(--text-lead);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.home-hero-headline {
  display: block;
  max-width: 22ch;
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.home-hero-sub {
  max-width: 58ch;
  margin-bottom: var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-lead);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: var(--text-small);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

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

.home-section--narrow {
  max-width: var(--width-text);
}

.home-section > h2 {
  margin: 0 0 var(--space-5);
}

.section-more {
  margin: var(--space-5) 0 0;
  font-weight: 500;
}

/* Logo strip: grayscale until hovered. Light tiles keep dark logos readable in dark mode. */
.logo-strip-label {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-small);
  font-weight: 500;
}

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

/* Three per row on phones (a short last row stretches), one row from 720px. */
.logo-strip-list li {
  flex: 1 1 calc((100% - 2 * var(--space-3)) / 3);
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  margin: 0;
  padding: var(--space-3);
  background: var(--color-logo-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.logo-strip-list img {
  width: auto;
  max-width: 100%;
  max-height: 30px;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.logo-strip-list img[width="80"] {
  max-height: 44px;
}

.logo-strip-list li:hover img {
  filter: none;
  opacity: 1;
}

@media (min-width: 720px) {
  .logo-strip-list li {
    flex-basis: 0;
  }
}

/* Scroll reveal (site.js adds .is-pending only to sections below the fold) */
.reveal {
  transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Hide instantly; only the reveal itself is animated. */
.reveal.is-pending {
  opacity: 0;
  transform: translateY(16px);
  transition: none;
}

@media print {
  .reveal.is-pending {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   Timeline (Experience page and Home snapshot)
   ========================================================= */
.logo {
  width: 44px;
  height: 44px;
  padding: 6px;
  object-fit: contain;
  background: var(--color-logo-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.logo--sm {
  width: 32px;
  height: 32px;
  padding: 4px;
  border-radius: 8px;
}

.timeline {
  --timeline-pad: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline--detailed {
  --timeline-pad: var(--space-5);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  column-gap: var(--space-4);
  margin: 0;
  padding-block: var(--timeline-pad);
}

/* Connector from each logo down to the next one. */
.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: calc(var(--timeline-pad) + 44px + 6px);
  bottom: calc(6px - var(--timeline-pad));
  left: 21px;
  width: 2px;
  border-radius: 1px;
  background: var(--color-border);
}

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

.timeline-title {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.timeline--detailed .timeline-title {
  font-size: 1.0625rem;
}

.timeline-date {
  color: var(--color-text-muted);
  font-size: var(--text-small);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-sub {
  margin: 2px 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-small);
}

.timeline-desc,
.timeline-impact {
  margin: var(--space-2) 0 0;
}

.timeline-impact {
  font-weight: 500;
}

/* =========================================================
   Experience page
   ========================================================= */
.compact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: var(--space-4);
  margin: 0;
  padding-block: var(--space-3);
}

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

.compact-list--logos li {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
}

.compact-title {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

.compact-meta {
  margin: 2px 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-small);
}

.compact-date {
  color: var(--color-text-muted);
  font-size: var(--text-small);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.skill-row {
  display: grid;
  gap: var(--space-2) var(--space-5);
  padding-block: var(--space-3);
}

.skill-row + .skill-row {
  border-top: 1px solid var(--color-border);
}

.skill-label {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.skill-row .tag {
  padding: 3px 12px;
  color: var(--color-text);
  font-size: 0.8125rem;
}

@media (min-width: 640px) {
  .skill-row {
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: baseline;
  }
}

/* =========================================================
   Projects (Home cards and Projects page)
   ========================================================= */
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
}

.metrics li + li {
  margin-top: 0;
}

.metric {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.6;
}

.card-footer {
  margin-top: auto;
}

.card-footer .tags {
  margin-bottom: var(--space-4);
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-small);
  font-weight: 500;
}

.card-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.card-links a:hover {
  text-decoration: underline;
}

/* Large format on the Projects page */
.project-card--large .card-title {
  margin-bottom: var(--space-3);
  font-size: 1.375rem;
}

.project-card--large .card-text {
  color: var(--color-text);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.project-details ul {
  color: var(--color-text-muted);
}

.project-details > :last-child {
  margin-bottom: var(--space-4);
}

.project-role {
  margin: 0 0 var(--space-4);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.project-role strong {
  color: var(--color-text);
}

.project-card--large .actions {
  margin: 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

/* Research notes: compact rows, not cards */
.research-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.research-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding-block: var(--space-4);
}

.research-item + .research-item {
  border-top: 1px solid var(--color-border);
}

.research-title {
  margin: 0 0 var(--space-1);
  font-size: var(--text-body);
}

.research-desc {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.research-meta {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.research-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-small);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.research-link:hover {
  text-decoration: underline;
}

@media (max-width: 639.98px) {
  .research-item {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* =========================================================
   Writing list (technical-writing.md markup)
   ========================================================= */
.post {
  margin-top: var(--space-6);
}

.post h2 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: 1.375rem;
}

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

/* =========================================================
   Long-form posts
   ========================================================= */
.prose {
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose h1 {
  margin-bottom: var(--space-5);
}

.prose h2 {
  font-size: 1.25rem;
}

.prose h2,
.prose h3 {
  margin-top: var(--space-7);
}

.prose hr {
  margin: var(--space-6) 0;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-small);
}

.post-meta a {
  text-decoration: none;
}

.video-container {
  margin: var(--space-6) 0;
}

.video-container iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius);
  background: #000;
}

/* =========================================================
   Motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .card:hover {
    transform: none;
  }

  .reveal.is-pending {
    opacity: 1;
    transform: none;
  }
}
