/* richardsondaniel.com v3 */

/* ---------- Tokens ---------- */
:root,
:root[data-scheme="levn"] {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --page: #ffffff;
  --surface: #ffffff;
  --card-hover: #fafbfc;
  --ink: #101828;
  --slate: #475467;
  --muted: #667085;
  --faint: #667085;
  --steel: #d0d5dd;
  --edge: #e5e7eb;
  --line: #eaecf0;
  --hairline: #f0f1f4;
  --chip: #f2f4f7;
  --cloud: #f4f5f7;
  --mist: #f7f8fa;
  --wash: #fafbfc;
  --brand: #2f5bd7;
  --brand-deep: #1e3fa0;
  --iris: #3538cd;
  --iris-bg: #eef2ff;
  --primary: #101828;
  --on-primary: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.92);
  --selection: #dfe6ff;
  --photo-bg: #f2f3f5;
  --shadow-rgb: 16, 24, 40;

  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
}

:root[data-scheme="gohesive"] {
  --progress: #2a2a2a;
  --page: #f5f0eb;
  --surface: #fffdfa;
  --card-hover: #faf6f0;
  --ink: #1a1a1a;
  --slate: #4f4a45;
  --muted: #6b655e;
  --faint: #6b655e;
  --steel: #cdc2b4;
  --edge: #e2d9cd;
  --line: #e2d9cd;
  --hairline: #ebe4da;
  --chip: #ebe3d8;
  --cloud: #ebe3d8;
  --mist: #f0e9e1;
  --wash: #ede6dd;
  --brand: #1d4ed8;
  --brand-deep: #1e40af;
  --iris: #2d6a4f;
  --iris-bg: #e4efe8;
  --primary: #2a2a2a;
  --on-primary: #ffffff;
  --header-bg: rgba(245, 240, 235, 0.92);
  --selection: #dbe4fb;
  --photo-bg: #ebe3d8;
  --shadow-rgb: 26, 26, 26;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid var(--line); }
html {
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--page);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}
body {
  min-width: 320px;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; vertical-align: middle; }
img { max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; background: transparent; border-radius: 0; }
button, summary, a[href] { cursor: pointer; }
input::placeholder { color: var(--faint); opacity: 1; }
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
[hidden] { display: none !important; }
::selection { color: var(--ink); background: var(--selection); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 8px 14px; border-radius: 9px;
  background: var(--primary); color: var(--on-primary); font-size: 13px; font-weight: 500;
}
.skip-link:focus { top: 12px; }

.page { min-height: 100vh; background: var(--page); }
.shell { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 1.25rem; }
.anchor, #main { scroll-margin-top: 4rem; }
#main:focus { outline: none; }

/* ---------- Type roles ---------- */
.display-title { font-size: 3.375rem; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.section-title { font-size: 2rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
.block-title { font-size: 1.375rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.card-title { font-size: 1.125rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; color: var(--ink); }
.body-copy { font-size: 0.9375rem; font-weight: 400; line-height: 1.55; }
.row-title { font-size: 0.9375rem; font-weight: 500; line-height: 1.4; color: var(--ink); }
.row-title.strong { font-weight: 600; }
.caption { font-size: 0.8125rem; line-height: 1.5; }
.small-copy { font-size: 0.75rem; line-height: 1.45; }
.mono-label { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; line-height: 1.2; letter-spacing: 0.1em; text-transform: uppercase; }
.mono-meta { font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.5; color: var(--faint); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
p, li, .row-title { text-wrap: pretty; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 9px; font-family: var(--font-sans); font-weight: 500; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-outline { border: 1px solid var(--steel); background: var(--surface); color: var(--ink); }
.btn-lg { padding: 11px 18px; font-size: 0.875rem; line-height: 1.25rem; }
.btn-md { padding: 10px 16px; font-size: 0.875rem; line-height: 1.25rem; }
.btn-sm { padding: 8px 14px; font-size: 13px; line-height: 1.5; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.icon-btn {
  display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--slate);
}
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (hover: hover) {
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 7px 18px rgba(var(--shadow-rgb), 0.2); }
  .btn-outline:hover { transform: translateY(-2px); background: var(--mist); }
  .icon-btn:hover { transform: translateY(-2px); border-color: var(--steel); background: var(--mist); color: var(--ink); }
}
.btn:active { transform: translateY(0); }

/* ---------- Tags and chips ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; border-radius: 999px;
  background: var(--chip); color: var(--slate);
  padding: 4px 10px; font-size: 0.75rem; line-height: 1.45;
}
.tag--accent { background: var(--iris-bg); color: var(--iris); }
.mini-tag {
  display: inline-flex; align-items: center; border-radius: 999px;
  background: var(--cloud); color: var(--muted);
  padding: 3px 8px; font-size: 11px; line-height: 1.2;
}
.badge {
  display: inline-flex; align-items: center; border-radius: 999px; white-space: nowrap;
  background: var(--chip); color: var(--slate);
  padding: 3px 9px; font-size: 11px; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  border: 1px solid var(--edge); background: var(--surface); color: var(--slate);
  padding: 5px 11px; font-size: 0.75rem; line-height: 1rem; font-weight: 500;
}
.fchip .count {
  display: inline-flex; min-width: 20px; align-items: center; justify-content: center;
  border-radius: 999px; padding: 2px 6px; font-size: 11px; font-weight: 400; line-height: 1;
  background: var(--cloud); color: var(--muted);
}
.fchip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.fchip[aria-pressed="true"] .count { background: rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.75); }
@media (hover: hover) {
  .fchip[aria-pressed="false"]:hover { background: var(--mist); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--hairline);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.progress {
  position: absolute; left: 0; bottom: -1px; z-index: 10; height: 2px; width: 100%;
  background: var(--progress, var(--brand)); transform-origin: 0 50%; transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .progress { animation: scroll-progress linear both; animation-timeline: scroll(root); }
}
@keyframes scroll-progress { to { transform: scaleX(1); } }

.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 13px; }
.monogram {
  display: flex; flex-shrink: 0; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--primary); color: var(--on-primary);
  font-size: 12px; font-weight: 600; line-height: 1;
}
.monogram--sm { width: 22px; height: 22px; border-radius: var(--radius-md); font-family: var(--font-sans); font-size: 10px; }

.header-nav { display: none; align-items: center; gap: 2px; }
.header-nav a { border-radius: var(--radius-lg); padding: 7px 12px; color: var(--muted); }
@media (hover: hover) {
  .header-nav a:hover { background: var(--cloud); color: var(--ink); }
}
.header-actions { display: flex; align-items: center; gap: 10px; }

.scheme { position: relative; }
.scheme-pill {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px;
  border: 1px solid var(--edge); border-radius: 9px; background: var(--surface); color: var(--ink);
  padding: 6px 10px; font-size: 13px; font-weight: 500; line-height: 1.2; letter-spacing: 0.04em;
}
.scheme-chevron { width: 12px; height: 12px; color: var(--faint); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scheme-pill[aria-expanded="true"] .scheme-chevron { transform: rotate(180deg); }
@media (hover: hover) { .scheme-pill:hover { background: var(--mist); } }
.scheme-menu {
  position: absolute; right: 0; top: calc(100% + 7px); z-index: 40;
  display: flex; min-width: 230px; flex-direction: column; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface);
  padding: 5px; box-shadow: 0 12px 30px rgba(var(--shadow-rgb), 0.13);
}
.scheme-option {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border-radius: var(--radius-lg); padding: 8px 10px; text-align: left; color: var(--ink);
}
.scheme-option[aria-pressed="true"] { background: var(--cloud); }
@media (hover: hover) { .scheme-option[aria-pressed="false"]:hover { background: var(--mist); } }
.scheme-option__text { display: flex; flex-direction: column; gap: 2px; }
.scheme-option__name { font-weight: 500; }
.swatches { display: inline-flex; }
.swatches i { width: 12px; height: 12px; border-radius: 999px; border: 1px solid rgba(0, 0, 0, 0.12); margin-left: -3px; }

.menu-btn { width: 36px; height: 36px; flex-direction: column; gap: 5px; }
.menu-btn span { display: block; width: 16px; height: 1.5px; border-radius: 4px; background: var(--ink); }
.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--hairline); background: var(--surface);
  padding: 8px 20px; box-shadow: 0 12px 24px rgba(var(--shadow-rgb), 0.06);
}
.mobile-menu a { border-bottom: 1px solid var(--hairline); padding: 12px; color: var(--ink); }
.mobile-menu a:last-child { border-bottom: 0; }

/* ---------- Hero ---------- */
.hero {
  display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 28px;
  padding-top: 36px; padding-bottom: 40px;
}
.hero__text { min-width: 0; flex: 1; }
.hero__kicker { margin-bottom: 18px; letter-spacing: 0.14em; color: var(--muted); }
.hero__title { margin-bottom: 16px; color: var(--ink); }
.hero__lead { max-width: 70ch; margin-bottom: 28px; color: var(--slate); }
.hero__aside { display: flex; width: 100%; flex-shrink: 0; align-items: flex-end; gap: 16px; }
.hero__photo {
  display: block; width: 112px; height: 112px; flex-shrink: 0;
  border-radius: var(--radius-xl); background: var(--photo-bg);
  object-fit: cover; object-position: 50% 22%;
}
.hero__icons { display: flex; flex: 1; gap: 8px; }
.hero__icons .icon-btn { width: 44px; height: 44px; }

/* ---------- Bands ---------- */
.band { border-block: 1px solid var(--hairline); background: var(--wash); }
.band--top { border-bottom: 0; }

/* ---------- Featured ---------- */
.featured__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.featured__main { padding-top: 40px; padding-bottom: 32px; }
.featured__labels { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.live-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand);
}
.dot { position: relative; display: flex; width: 6px; height: 6px; }
.dot__ping, .dot__core { border-radius: 999px; background: var(--brand); }
.dot__ping { position: absolute; inset: 0; opacity: 0.7; }
.dot__core { position: relative; width: 6px; height: 6px; }
.featured__title { margin-bottom: 14px; color: var(--ink); }
.featured__text { max-width: 52ch; margin-bottom: 24px; color: var(--slate); }
.featured__side { border-top: 1px solid var(--line); padding-top: 28px; padding-bottom: 40px; }
.side-label {
  display: inline-flex; margin-bottom: 16px;
  font-size: 11px; font-weight: 600; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint);
}
.highlights { display: flex; flex-direction: column; gap: 14px; }
.highlights .row-title, .highlights .mono-meta { display: block; }
.highlights .mono-meta { margin-top: 4px; }
.featured__foot { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); }
.featured__foot a { font-weight: 500; color: var(--brand); }

/* ---------- Section heads ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.section-head--tight { margin-bottom: 8px; }
.section-head--pub { margin-bottom: 22px; }
.head-link { font-weight: 500; color: var(--ink); white-space: nowrap; }
@media (hover: hover) { .head-link:hover { color: var(--slate); } }
.section-sub { max-width: 60ch; margin-bottom: 26px; color: var(--muted); }
.section-sub--wide { max-width: 62ch; }
.section-rule { border-top: 1px solid var(--hairline); }
.section-pad { padding-top: 40px; padding-bottom: 44px; }

/* ---------- Projects ---------- */
.section-projects { padding-top: 40px; padding-bottom: 8px; }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cards--more { margin-top: 20px; }
.card {
  display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface);
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); border-color: var(--steel); background: var(--card-hover); box-shadow: 0 12px 28px rgba(var(--shadow-rgb), 0.07); }
}
.card .body-copy { color: var(--slate); }
.card__why { flex: 1; }
.card__links { display: flex; flex-wrap: wrap; column-gap: 18px; row-gap: 6px; border-top: 1px solid var(--chip); padding-top: 12px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--brand); text-underline-offset: 3px; }
@media (hover: hover) { .card-link:hover { color: var(--brand-deep); text-decoration: underline; } }
.more-row { display: flex; width: fit-content; align-items: center; gap: 14px; margin-top: 20px; }
.section-projects .more-row { margin-top: 40px; }
.section-projects .cards--more:not([hidden]) + .more-row { margin-top: 16px; }
.more-row--rule { width: auto; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- Writing ---------- */
.section-writing { padding-top: 40px; padding-bottom: 20px; }
.pub-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 16px; }
.tabs { display: flex; width: fit-content; gap: 3px; border-radius: 10px; background: var(--cloud); padding: 3px; }
.tab { border-radius: var(--radius-lg); padding: 7px 15px; font-weight: 500; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.09); }
@media (hover: hover) { .tab[aria-selected="false"]:hover { color: var(--ink); } }
.search {
  min-height: 40px; min-width: 180px; max-width: 280px; flex: 1;
  border: 1px solid var(--edge); border-radius: 9px; background: var(--surface); color: var(--ink);
  padding: 8px 12px; outline: none; -webkit-appearance: none; appearance: none;
}
.search:focus { border-color: var(--faint); }
.search:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.chips--pub { margin-bottom: 22px; }
.pub-list { display: flex; flex-direction: column; }
.pub {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 16px; row-gap: 6px;
  margin-inline: -12px; border-top: 1px solid var(--hairline); border-radius: 9px; padding: 14px 12px;
}
.pub__date { order: 2; }
.pub__main { order: 1; grid-column: span 2; }
.pub .badge { order: 3; justify-self: end; }
.pub__title { display: block; margin-bottom: 3px; }
.pub__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.pub__meta .caption { margin-right: 2px; }
a.pub { color: inherit; text-decoration: none; }
@media (hover: hover) { a.pub:hover { background: var(--mist); } }
.empty { border-top: 1px solid var(--hairline); padding-top: 24px; }
.empty .btn { margin-top: 14px; }
.pager { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--hairline); padding-top: 16px; }
.pager button { height: 32px; min-width: 32px; border-radius: var(--radius-lg); padding-inline: 8px; border: 1px solid var(--edge); background: var(--surface); color: var(--muted); }
.pager button[aria-current="page"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
/* No pager: close the list with a rule and keep levn's gap before the next band */
.section-writing:has(.pager[hidden]) { padding-bottom: 68px; }
.section-writing:has(.pager[hidden]) .pub-list:has(.pub:not([hidden])) { border-bottom: 1px solid var(--hairline); }

/* ---------- Recognition ---------- */
.section-recognition { padding-top: 40px; padding-bottom: 44px; }
.chips--talks { margin-bottom: 16px; }
.awards { display: flex; flex-direction: column; }
.award {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 16px; row-gap: 6px;
  border-top: 1px solid var(--line); padding-block: 16px;
}
.award__date { order: 2; }
.award__main { order: 1; grid-column: span 2; }
.award__main .row-title { margin-bottom: 4px; }
.award__main .row-title:last-child { margin-bottom: 0; }
.award__main .caption { line-height: 1.5rem; }
/* No show-all row: close the list with a rule and keep the gap the row would leave */
.section-recognition:has(.more-row[hidden]) .awards { border-bottom: 1px solid var(--line); }
.section-recognition:has(.more-row[hidden]) { padding-bottom: 62px; }

/* ---------- Experience ---------- */
.experience-title { margin-bottom: 30px; }
.tl-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.tl-years {
  display: flex; align-items: baseline; gap: 6px; padding-top: 2px;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; line-height: 1.6; color: var(--slate); font-variant-numeric: tabular-nums;
}
.tl-years.is-current { color: var(--ink); }
.tl-years--early { color: var(--faint); }
.tl-dur { display: block; white-space: nowrap; font-size: 11px; font-weight: 500; line-height: 1.4; color: var(--faint); }
.tl-years.is-current .tl-dur { color: var(--iris); }
.md-only { display: none; }
.tl-body { position: relative; border-left: 2px solid var(--edge); padding-left: 20px; padding-bottom: 32px; }
.tl-body.is-current { border-left-color: var(--ink); }
.tl-dot { position: absolute; left: -5px; top: 6px; width: 8px; height: 8px; border-radius: 999px; background: var(--faint); }
.tl-body.is-current .tl-dot { background: var(--ink); }
.tl-ping { position: absolute; inset: 0; border-radius: 999px; background: var(--ink); opacity: 0.5; }
.tl-head { display: grid; grid-template-columns: minmax(0, 1fr); align-items: baseline; gap: 4px; margin-bottom: 3px; }
.tl-org { margin-bottom: 12px; }
.tl-desc { max-width: 65ch; margin-bottom: 12px; color: var(--slate); }
.tl-list { display: flex; max-width: 70ch; flex-direction: column; gap: 6px; margin-bottom: 14px; margin-left: 18px; list-style: disc; }
.tl-list li { padding-left: 4px; color: var(--slate); }
.tl-list li::marker { color: var(--faint); }
.tl-prev { margin-top: 18px; border-top: 1px solid var(--hairline); padding-top: 14px; }
.tl-prev__label { margin-bottom: 8px; letter-spacing: 0.06em; }
.tl-prev__item + .tl-prev__item { margin-top: 14px; }
.tl-head--sub { margin-bottom: 6px; }
.tl-prev__text { max-width: 58ch; color: var(--slate); }
.tl-body--early { border-left-style: dashed; padding-bottom: 2px; }
.tl-early__title { margin-bottom: 6px; }
.tl-early__text { max-width: 62ch; color: var(--slate); }
.tl-early__roles { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.tl-role { display: grid; grid-template-columns: minmax(0, 1fr); align-items: baseline; gap: 4px; border-top: 1px solid var(--hairline); padding-block: 12px; }
.tl-role__title { display: block; margin-bottom: 3px; }
.tl-role__org { display: block; margin-bottom: 5px; }
.tl-role__text { display: block; max-width: 58ch; color: var(--slate); }
.tl-role__range { display: block; }
.tl-role__len { display: block; margin-top: 3px; }
.tl-early__btn { margin-top: 18px; }

/* ---------- Education ---------- */
.education-title { margin-bottom: 8px; }
.edu-list { display: flex; flex-direction: column; margin-top: 12px; }
.edu {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 16px; row-gap: 6px;
  border-top: 1px solid var(--hairline); padding-block: 16px;
}
.edu__year { order: 2; }
.edu__main { order: 1; grid-column: span 2; }
.edu__main .row-title { display: inline; }
.edu__sub { display: block; margin-top: 3px; }
.edu__meta { order: 3; white-space: nowrap; text-align: right; }

/* ---------- Contact and footer ---------- */
.contact { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 32px; padding-block: 48px; }
.contact__title { margin-bottom: 10px; }
.contact__text { max-width: 44ch; color: var(--slate); }
.site-footer { border-top: 1px solid var(--line); background: var(--wash); }
.footer { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding-block: 18px; }
.footer__brand { display: flex; align-items: center; gap: 9px; }

/* ---------- Breakpoints ---------- */
@media (min-width: 768px) {
  .shell { padding-inline: 2.5rem; }
  .hero { flex-direction: row; gap: 36px; padding-top: 64px; padding-bottom: 52px; }
  .hero__aside { display: block; width: 220px; }
  .hero__photo { width: 100%; height: auto; aspect-ratio: 4 / 5; }
  .hero__icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
  .hero__icons .icon-btn { width: auto; height: auto; aspect-ratio: 1; }
  .section-projects { padding-top: 56px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-writing { padding-top: 52px; }
  .pub { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; }
  .pub__date { order: 1; }
  .pub__main { order: 2; grid-column: auto; }
  .section-recognition { padding-top: 52px; padding-bottom: 54px; }
  .section-recognition:has(.more-row[hidden]) { padding-bottom: 72px; }
  .award { grid-template-columns: 104px minmax(0, 1fr) auto; gap: 20px; }
  .award__date { order: 1; }
  .award__main { order: 2; grid-column: auto; }
  .section-pad { padding-top: 52px; padding-bottom: 56px; }
  .tl-item { grid-template-columns: 96px minmax(0, 760px); gap: 20px; }
  .tl-years { display: block; }
  .tl-dur { margin-bottom: 5px; }
  .md-only { display: block; }
  .tl-head { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
  .tl-role { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
  .tl-role__date { text-align: right; }
  .tl-role__range, .tl-role__len { display: inline; }
  .tl-role__len { margin-left: 6px; }
  .edu { grid-template-columns: 104px minmax(0, 1fr) auto; gap: 20px; }
  .edu__year { order: 1; }
  .edu__main { order: 2; grid-column: auto; }
  .footer { flex-direction: row; gap: 20px; }
}

@media (min-width: 1024px) {
  .header-nav { display: flex; }
  .menu-btn, .mobile-menu { display: none !important; }
  .hero { gap: 48px; }
  .hero__aside { width: 260px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .featured__grid { grid-template-columns: 1.35fr 1fr; }
  .featured__main { padding-top: 44px; padding-bottom: 42px; padding-right: 44px; }
  .featured__side { border-top: 0; border-left: 1px solid var(--line); padding-top: 44px; padding-bottom: 42px; padding-left: 40px; }
}

@media (max-width: 1023px) {
  .display-title { font-size: 2.75rem; }
  .header-actions { min-height: 38.5px; }
  .scheme { position: static; }
  .scheme-menu { right: 1.25rem; top: calc(100% - 4px); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .scheme-menu { right: 2.5rem; }
}
@media (max-width: 767px) {
  .display-title { font-size: 2.125rem; }
  .section-title { font-size: 1.625rem; }
}
@media (max-width: 379px) {
  .header-actions { gap: 8px; }
  .header-bar { gap: 12px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  a, button { transition-property: background-color, border-color, color, box-shadow, transform, opacity; transition-duration: 0.15s, 0.15s, 0.15s, 0.2s, 0.18s, 0.15s; transition-timing-function: ease; }
  .scheme-chevron { transition: transform 0.15s ease; }
  .dot__ping, .tl-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
  [data-hero] { animation: reveal-up 0.65s cubic-bezier(0.22, 0.65, 0.3, 1) both; }
  [data-hero="2"] { animation-delay: 80ms; }
  [data-hero="3"] { animation-delay: 160ms; }
  [data-hero="4"] { animation-delay: 240ms; }
  [data-hero="5"] { animation-delay: 120ms; }
  .motion-ready [data-reveal].reveal-pending { opacity: 0; transform: translateY(16px); }
  .motion-ready [data-reveal] { transition: opacity 0.6s cubic-bezier(0.22, 0.65, 0.3, 1), transform 0.6s cubic-bezier(0.22, 0.65, 0.3, 1); }
  .scheme-menu:not([hidden]) { animation: pop-in 0.18s cubic-bezier(0.22, 0.65, 0.3, 1) both; }
  .mobile-menu:not([hidden]), .cards--more:not([hidden]), .tl-early__roles:not([hidden]) { animation: slide-down 0.22s cubic-bezier(0.22, 0.65, 0.3, 1) both; }
}
@keyframes reveal-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes ping { 75%, 100% { opacity: 0; transform: scale(2); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .dot__ping, .tl-ping { display: none; }
}

/* Scheme-matched portrait background */
.photo-warm { display: none; }
[data-scheme="gohesive"] .photo-warm { display: contents; }
[data-scheme="gohesive"] .photo-cool { display: none; }
