/* Yannis Tevissen — research lab style (see /DESIGN.md) */

:root {
  /* Base + pastels */
  --color-bg: #f0eef6;
  --color-bg-gradient: linear-gradient(165deg, #ebe8f4 0%, #f2eef0 40%, #e8f0f0 100%);
  --color-surface: #fffcfd;
  --color-text: #1a1a1f;
  --color-muted: #5e5a66;
  --color-border: #d4cfe0;
  --color-border-soft: #e5e0ed;
  --color-accent: #2a4a6e;
  --color-accent-muted: #4a6688;
  /* Pastel accents (pillars, chips) */
  --pastel-lilac: #e8e2f4;
  --pastel-sage: #dcebe5;
  --pastel-dusty-rose: #f0e0e6;
  --pastel-sky: #d9e8f2;
  --hero-fill: linear-gradient(145deg, #f4f1fa 0%, #eef5f3 55%, #f7f2f4 100%);
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-display: "IBM Plex Serif", Georgia, serif;
  --shadow-sm: 0 1px 2px rgba(42, 35, 60, 0.06);
  --radius: 6px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  /* One column for header, main, footer — aligned and centered */
  --layout-max: 56rem;
  --layout-gutter: 1.25rem;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Homepage: section snapping (disabled when user prefers reduced motion). */
html.page-home-html {
  scroll-snap-type: y proximity;
  /* Keeps snap / in-page targets clear of the fixed nav once revealed. */
  scroll-padding-top: 4rem;
}

@media (prefers-reduced-motion: reduce) {
  html.page-home-html {
    scroll-snap-type: none;
    scroll-padding-top: 0;
  }
}

.skip-link {
  position: fixed;
  top: 0;
  left: 1rem;
  z-index: 100;
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--color-accent);
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0.75rem);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.site-shell,
.site-shell--wide {
  width: min(var(--layout-max), 100% - 2 * var(--layout-gutter));
  margin-inline: auto;
  box-sizing: border-box;
}

/* Header */
.site-header {
  background: color-mix(in srgb, var(--pastel-lilac) 35%, var(--color-surface));
  border-bottom: 1px solid var(--color-border-soft);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.site-header .site-shell--wide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-block: 0.85rem 0.75rem;
}

.site-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: min(100%, 12rem);
}

.site-nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

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

.site-nav a[aria-current="page"] {
  font-weight: 600;
}

.site-main {
  padding-block: 2rem 3.5rem;
  flex: 1;
}

.site-footer {
  border-top: 1px solid var(--color-border-soft);
  background: color-mix(in srgb, var(--pastel-lilac) 25%, transparent);
  padding-block: 1.75rem 2.5rem;
  margin-top: auto;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.site-footer a {
  color: var(--color-accent-muted);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 0.5rem;
}

.footer-secondary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
}

/* Hero */
.hero {
  padding: 1.35rem 1.25rem 1.75rem;
  background: var(--hero-fill);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.hero-layout {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  align-items: flex-start;
}

@media (min-width: 560px) {
  .hero-layout {
    flex-direction: row;
    gap: 1.5rem;
    align-items: flex-start;
  }
}

.hero-photo-wrap {
  flex-shrink: 0;
}

.hero-photo {
  display: block;
  width: 7.5rem;
  height: 7.5rem;
  object-fit: cover;
  border-radius: var(--radius-pill);
  border: 3px solid color-mix(in srgb, var(--pastel-sky) 80%, white);
  box-shadow: 0 4px 14px rgba(42, 74, 110, 0.12);
}

@media (min-width: 560px) {
  .hero-photo {
    width: 8.5rem;
    height: 8.5rem;
  }
}

.hero-copy {
  min-width: 0;
  flex: 1;
}

.hero-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-muted);
  margin: 0 0 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  line-height: 1.28;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 100%;
  color: var(--color-text);
}

.hero-lead {
  font-size: 1.02rem;
  color: var(--color-muted);
  margin: 0 0 1.5rem;
  max-width: min(70ch, 100%);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.25rem;
  align-items: center;
}

.hero-actions a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
  border: 1px solid color-mix(in srgb, var(--pastel-sky) 65%, var(--color-border));
  background: color-mix(in srgb, var(--color-surface) 92%, var(--pastel-sage));
  border-radius: var(--radius);
  text-decoration: none;
}

.hero-actions a:hover {
  border-color: var(--color-accent-muted);
  background: color-mix(in srgb, var(--pastel-lilac) 40%, var(--color-surface));
}

.hero-actions span {
  color: var(--color-muted);
  font-size: 0.75rem;
  margin: 0 0.15rem;
}

/* Sections */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 0.75rem;
}

section[id] {
  scroll-margin-top: 4rem;
}

h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.75rem;
  color: var(--color-text);
}

h2:first-of-type {
  margin-top: 0;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.page-lede {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-muted);
  margin: 0 0 1.75rem;
  max-width: min(70ch, 100%);
}

h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--color-text);
}

p {
  margin: 0 0 1rem;
  max-width: min(68ch, 100%);
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

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

code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 0.88em;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.1em 0.35em;
  border-radius: var(--radius);
}

/* Pillars */
.pillars {
  display: grid;
  width: 100%;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem 1.25rem;
  }
}

.pillar {
  padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.pillar:nth-child(1) {
  background: color-mix(in srgb, var(--pastel-lilac) 55%, var(--color-surface));
}

.pillar:nth-child(2) {
  background: color-mix(in srgb, var(--pastel-sage) 50%, var(--color-surface));
}

.pillar:nth-child(3) {
  background: color-mix(in srgb, var(--pastel-dusty-rose) 45%, var(--color-surface));
}

.pillar h3 {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
}

.pillar p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
  max-width: none;
}

/* Selected work cards */
.work-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.work-card {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.work-card:last-child {
  border-bottom: none;
}

.work-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.type-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid color-mix(in srgb, var(--pastel-sky) 70%, var(--color-border));
  background: color-mix(in srgb, var(--pastel-sky) 35%, transparent);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius);
  white-space: nowrap;
}

.work-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
  min-width: 12rem;
}

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

.work-card-title a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.work-card p {
  font-size: 0.88rem;
  color: var(--color-muted);
  margin: 0;
  max-width: 100%;
}

.section-foot {
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* Bio */
.bio-compact p {
  font-size: 0.95rem;
}

/* Publication snapshot */
.pub-snapshot .pub-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
}

.pub-snapshot .pub-item:last-child {
  border-bottom: none;
}

.pub-snapshot .pub-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.pub-snapshot .pub-meta {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: 0;
}

/* Subtle / secondary sections */
.section-muted {
  margin-top: 2.5rem;
  padding: 1.6rem 1.25rem 1.35rem;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--pastel-dusty-rose) 20%, var(--color-surface));
}

.section-muted h2 {
  font-size: 1.05rem;
  color: var(--color-text);
  margin-top: 0;
}

.section-muted p,
.section-muted li {
  font-size: 0.92rem;
  color: var(--color-muted);
}

.section-muted .pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.section-muted .pub-item {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--color-border-soft);
}

.section-muted .pub-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Full publication list (publications page) */
.pub-year {
  margin-top: 2rem;
}

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

.pub-item {
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--color-border);
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-title {
  font-weight: 600;
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.pub-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0;
}

.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent-muted);
  margin-bottom: 0.35rem;
}

/* Item thumbnails — used as visual anchors next to blog posts, press, talks
   and publications. Each .thumb is either an empty span styled with a soft
   pastel gradient (.thumb-1..6) or contains a real <img>. */
.has-thumb {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.has-thumb > .thumb {
  flex: 0 0 auto;
}

.has-thumb > .item-body {
  flex: 1 1 auto;
  min-width: 0;
}

.thumb {
  display: block;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* The inner soft sheen is only applied to the gradient placeholders so that
   real photos and figures stay crisp. */
.thumb-1::after,
.thumb-2::after,
.thumb-3::after,
.thumb-4::after,
.thumb-5::after,
.thumb-6::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6) 0, rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.35) 0, rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}

.thumb-1 {
  background: linear-gradient(140deg, var(--pastel-lilac) 0%, var(--pastel-sky) 100%);
}
.thumb-2 {
  background: linear-gradient(140deg, var(--pastel-sage) 0%, var(--pastel-sky) 100%);
}
.thumb-3 {
  background: linear-gradient(140deg, var(--pastel-dusty-rose) 0%, var(--pastel-lilac) 100%);
}
.thumb-4 {
  background: linear-gradient(140deg, var(--pastel-sky) 0%, var(--pastel-sage) 100%);
}
.thumb-5 {
  background: linear-gradient(140deg, var(--pastel-lilac) 0%, var(--pastel-dusty-rose) 100%);
}
.thumb-6 {
  background: linear-gradient(140deg, var(--pastel-sage) 0%, var(--pastel-dusty-rose) 100%);
}

@media (max-width: 560px) {
  .thumb {
    width: 4rem;
    height: 4rem;
  }
  .has-thumb {
    gap: 0.75rem;
  }
}

/* Legacy / blog — comfortable reading width inside the main column */
.prose {
  max-width: min(68ch, 100%);
}

.prose figure {
  margin: 1.5rem 0;
}

.prose figcaption {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.5rem;
  text-align: center;
}

.post-video-wrapper {
  text-align: center;
  margin: 1.5rem 0;
}

.post-video-wrapper figure {
  display: inline-block;
  margin: 0;
}

.post-video-wrapper video {
  max-height: 70vh;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}

.post-video-wrapper.portrait video {
  max-height: min(60vh, 560px);
}

.post-figure-wrapper {
  text-align: center;
  margin: 1.5rem 0;
}

.post-figure-wrapper figure {
  display: inline-block;
  margin: 0;
}

.post-figure-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.post-header {
  margin-bottom: 2rem;
}

.post-date {
  color: var(--color-muted);
  font-size: 0.9rem;
}

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

.post-list li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.post-list a {
  font-weight: 600;
  font-size: 1rem;
}

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

.lede {
  font-size: 1rem;
  color: var(--color-muted);
  margin: 0 0 1.5rem;
  max-width: min(70ch, 100%);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 1.5rem 0;
}

@media (max-width: 720px) {
  .site-header .site-shell--wide {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-nav {
    justify-content: center;
  }
}

/* News timeline */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border-soft);
  align-items: baseline;
}

.news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.news-item time {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-accent-muted);
  white-space: nowrap;
  padding-top: 0.12rem;
}

.news-item p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--color-muted);
  max-width: none;
}

.news-item p a {
  color: var(--color-accent);
}

@media (max-width: 560px) {
  .news-item {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.page-home .site-main--home {
  position: relative;
  z-index: 4;
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
  --home-first-screen-offset: 0;
}

.page-home .site-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page-home .home-hero-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: auto;
  padding-block: 0.35rem 0.2rem;
}

.page-home .home-hero-screen .hero--video {
  margin: 0;
  flex-shrink: 0;
  max-width: min(var(--layout-max), 100%);
  margin-inline: auto;
}

.page-home .hero--video {
  margin-bottom: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--color-border-soft);
  box-shadow: 0 18px 48px rgba(19, 24, 33, 0.08);
  padding: clamp(1.35rem, 3vw, 1.85rem) clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2rem);
}

.page-home .hero--video .hero-layout {
  width: 100%;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.page-home .hero--video .hero-copy {
  max-width: min(52rem, 100%);
  margin-inline: auto;
}

.page-home .hero--video .hero-kicker {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-accent-muted);
  margin: 0 0 1.1rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--pastel-sky) 36%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--pastel-sky) 50%, var(--color-border-soft));
}

.page-home .hero--video .hero-kicker a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

.page-home .hero--video .hero-kicker a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.page-home .hero--video .hero-title {
  font-weight: 600;
  font-size: clamp(1.7rem, 1rem + 3.4vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin: 0 0 1.1rem;
}

.page-home .hero--video .hero-lead {
  font-size: clamp(0.98rem, 0.35vw + 0.92rem, 1.08rem);
  line-height: 1.62;
  margin: 0 0 1.65rem;
  color: color-mix(in srgb, var(--color-muted) 92%, var(--color-text));
}

.page-home .hero--video .hero-actions {
  justify-content: center;
  gap: 0.45rem 0.5rem;
}

.page-home .hero--video .hero-actions span[aria-hidden="true"] {
  color: color-mix(in srgb, var(--color-muted) 55%, var(--color-border));
  font-size: 0.7rem;
}

.page-home .hero--video .hero-actions a:first-of-type {
  padding: 0.52rem 1.15rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(
    165deg,
    var(--color-accent) 0%,
    color-mix(in srgb, var(--color-accent) 78%, #152a42) 100%
  );
  box-shadow: 0 2px 10px rgba(42, 74, 110, 0.28);
}

.page-home .hero--video .hero-actions a:first-of-type:hover {
  filter: brightness(1.07);
  border-color: transparent;
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--color-accent) 95%, white) 0%,
    color-mix(in srgb, var(--color-accent) 72%, #152a42) 100%
  );
}

.page-home .hero--video .hero-actions a:not(:first-of-type) {
  padding: 0.48rem 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
}

.page-home .hero--video .hero-actions a:not(:first-of-type):hover {
  background: color-mix(in srgb, var(--pastel-lilac) 35%, var(--color-surface));
  border-color: color-mix(in srgb, var(--pastel-sky) 55%, var(--color-border));
}

.page-home .hero--video .hero-actions a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.page-home .hero--video .hero-actions a:first-of-type:focus-visible {
  outline-color: color-mix(in srgb, var(--color-accent) 85%, white);
}

@media (prefers-reduced-motion: no-preference) {
  .page-home .hero--video .hero-actions a {
    transition:
      filter 0.15s ease,
      background 0.15s ease,
      border-color 0.15s ease;
  }
}

.page-home .hero--video .hero-photo {
  width: 8.25rem;
  height: 8.25rem;
  border-width: 2px;
  border-color: color-mix(in srgb, var(--pastel-sky) 70%, white);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--color-surface) 75%, transparent),
    0 14px 36px rgba(42, 35, 60, 0.14);
}

@media (min-width: 560px) {
  .page-home .hero--video .hero-layout {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1.75rem 2rem;
  }

  .page-home .hero--video .hero-copy {
    margin-inline: 0;
  }

  .page-home .hero--video .hero-kicker {
    justify-content: flex-start;
  }

  .page-home .hero--video .hero-actions {
    justify-content: flex-start;
  }

  .page-home .hero-figure {
    align-items: flex-start;
  }

  .page-home .hero-caption {
    text-align: left;
  }
}

@media (min-width: 720px) {
  .page-home .hero--video .hero-layout {
    gap: 2rem 2.5rem;
  }

  .page-home .hero--video .hero-photo {
    width: 9.25rem;
    height: 9.25rem;
  }
}

.page-home .hero-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-home .hero-caption {
  margin: 0.65rem 0 0;
  max-width: 11rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--color-muted);
  text-align: center;
}

.page-home .site-shell > section:not(.hero) {
  margin-top: 0;
  padding: 1.35rem 1.15rem;
  background: color-mix(in srgb, var(--color-surface) 95%, var(--pastel-lilac));
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.page-home .site-shell > section:not(.hero) + section:not(.hero) {
  margin-top: 1.75rem;
}

.page-home .site-footer {
  position: relative;
  z-index: 4;
}

@media (max-width: 720px) {
  .page-home .site-header--solid .site-nav {
    justify-content: center;
  }
}

/* Editorial refresh */
:root {
  --color-bg: #f5f3ee;
  --color-bg-gradient: linear-gradient(180deg, #f7f6f2 0%, #f3f0ea 100%);
  --color-surface: rgba(255, 255, 255, 0.82);
  --color-surface-strong: rgba(255, 255, 255, 0.94);
  --color-text: #17191d;
  --color-muted: #5e636d;
  --color-border: rgba(37, 45, 58, 0.12);
  --color-border-soft: rgba(37, 45, 58, 0.08);
  --color-accent: #1e4f7a;
  --color-accent-muted: #567392;
  --pastel-lilac: #ebe6f6;
  --pastel-sage: #e4eee8;
  --pastel-dusty-rose: #f1e7e4;
  --pastel-sky: #dceaf5;
  --hero-fill: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(239, 245, 250, 0.88) 100%);
  --shadow-sm: 0 10px 30px rgba(19, 24, 33, 0.06);
  --shadow-lg: 0 24px 70px rgba(19, 24, 33, 0.1);
  --radius: 16px;
  --radius-lg: 28px;
  --layout-max: 70rem;
  --layout-gutter: 1.35rem;
}

body {
  background: radial-gradient(circle at top left, rgba(220, 234, 245, 0.7) 0%, rgba(220, 234, 245, 0) 28%),
    radial-gradient(circle at top right, rgba(235, 230, 246, 0.75) 0%, rgba(235, 230, 246, 0) 24%),
    linear-gradient(180deg, #faf8f4 0%, #f5f2ed 100%);
  color: var(--color-text);
}

.site-shell,
.site-shell--wide {
  width: min(var(--layout-max), 100% - 2 * var(--layout-gutter));
}

.site-header {
  background: color-mix(in srgb, var(--color-surface-strong) 78%, transparent);
  border-bottom: 1px solid var(--color-border-soft);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  padding-top: 0;
}

.site-header .site-shell--wide {
  position: relative;
  padding: 0.9rem 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-title {
  font-size: 0.98rem;
  letter-spacing: -0.03em;
}

.site-nav {
  gap: 0.3rem 0.45rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.3rem 0.65rem;
  border-radius: 10px;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: color-mix(in srgb, var(--pastel-sky) 55%, white);
  color: var(--color-accent);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pastel-sky) 65%, var(--color-border));
}

.site-main {
  padding-block: 2.6rem 4.75rem;
}

.site-footer {
  background: transparent;
  border-top: 0;
  padding-block: 0 3rem;
}

.site-footer .site-shell {
  padding-top: 1.85rem;
  border-top: 1px solid var(--color-border-soft);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0 0 1.1rem;
  padding: 0;
}

.footer-contact-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-muted);
}

.footer-contact-email {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 0.85rem + 0.6vw, 1.25rem);
  line-height: 1.3;
  letter-spacing: -0.018em;
}

.footer-contact-email a {
  color: var(--color-text);
  text-decoration: none;
  word-break: break-word;
}

.footer-contact-email a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-contact-links {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  margin: 0;
}

.footer-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1.25rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-soft);
  font-size: 0.78rem;
  color: var(--color-muted);
}

.footer-secondary p {
  margin: 0;
  max-width: none;
}

.page-title {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin-bottom: 0.7rem;
}

.page-lede,
.lede {
  font-size: 1.02rem;
  line-height: 1.72;
  color: color-mix(in srgb, var(--color-muted) 95%, var(--color-text));
  max-width: 44rem;
}

h2 {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 1.32rem;
  margin: 2.6rem 0 0.9rem;
}

h2::after {
  content: "";
  flex: 1 1 auto;
  min-width: 2rem;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--color-border) 80%, white) 0%, transparent 100%);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--color-accent-muted);
}

.section-label::after {
  content: "";
  width: 3rem;
  height: 1px;
  background: color-mix(in srgb, var(--color-accent-muted) 45%, transparent);
}

p {
  max-width: 44rem;
}

body:not(.page-home) .site-main > .site-shell {
  padding: clamp(1.35rem, 2vw, 2.3rem);
  background: color-mix(in srgb, var(--color-surface-strong) 88%, white);
  border: 1px solid var(--color-border-soft);
  border-radius: calc(var(--radius-lg) + 2px);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

body:not(.page-home) .site-main > .site-shell > section {
  position: relative;
}

body:not(.page-home) .site-main > .site-shell > section + section {
  margin-top: 2.1rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--color-border-soft);
}

body:not(.page-home) .site-main > .site-shell p {
  max-width: none;
}

.pillars {
  gap: 1.15rem;
}

.pillar {
  position: relative;
  min-height: 100%;
  padding: 1.35rem 1.25rem 1.25rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.pillar::before {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  border-radius: 999px;
  margin-bottom: 1rem;
  background: color-mix(in srgb, var(--color-accent) 68%, white);
}

.pillar h3 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
}

.pillar p {
  font-size: 0.95rem;
  line-height: 1.65;
}

.work-list {
  display: grid;
  gap: 1rem;
}

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

.work-card {
  padding: 1.2rem 1.15rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 20px;
  background: color-mix(in srgb, var(--color-surface-strong) 92%, white);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.work-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(19, 24, 33, 0.08);
  border-color: color-mix(in srgb, var(--pastel-sky) 60%, var(--color-border));
}

.work-card:last-child {
  border-bottom: 1px solid var(--color-border-soft);
}

.work-card-title {
  font-size: 1rem;
}

.work-card p {
  font-size: 0.92rem;
  line-height: 1.65;
}

.pub-list {
  display: grid;
  gap: 0.95rem;
}

.pub-item {
  margin: 0;
  padding: 0 0 0.95rem 1rem;
  border-bottom: 1px solid var(--color-border-soft);
  border-left: 2px solid color-mix(in srgb, var(--pastel-sky) 70%, var(--color-border-soft));
}

.pub-title {
  font-size: 0.98rem;
  line-height: 1.45;
}

.pub-meta {
  font-size: 0.86rem;
  line-height: 1.6;
}

.section-muted {
  background: color-mix(in srgb, var(--color-surface-strong) 90%, white);
  border-color: var(--color-border-soft);
}

.section-muted h2 {
  font-size: 1.18rem;
}

.section-muted p,
.section-muted li {
  font-size: 0.93rem;
}

.page-home .site-header {
  background: color-mix(in srgb, rgba(255, 255, 255, 0.18) 72%, transparent);
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.page-home .site-header .site-shell--wide {
  padding-block: 0.95rem 0.8rem;
}

.page-home .site-header.site-header--concealed,
.page-home .site-header.site-header--concealed:not(:focus-within),
.page-home .site-header.site-header--concealed:focus-within,
.page-home .site-header--solid {
  transform: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.page-home .site-main--home {
  padding-top: 1.5rem;
  padding-bottom: 4.5rem;
  --home-first-screen-offset: 0;
}

.page-home .site-shell {
  gap: 1.35rem;
}

.page-home .home-hero-screen {
  min-height: auto;
  padding-block: 0.35rem 0.2rem;
}

.page-home .hero--video {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 28px 90px rgba(19, 24, 33, 0.16);
  padding: clamp(1.5rem, 3vw, 2.35rem) clamp(1.35rem, 3vw, 2.35rem) clamp(1.7rem, 3vw, 2.35rem);
}

.page-home .hero--video::before {
  content: "";
  position: absolute;
  inset: auto auto -10% -8%;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 234, 245, 0.55) 0%, rgba(220, 234, 245, 0) 72%);
  pointer-events: none;
}

.page-home .hero--video::after {
  content: "";
  position: absolute;
  top: -4rem;
  right: -4rem;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 230, 246, 0.6) 0%, rgba(235, 230, 246, 0) 72%);
  pointer-events: none;
}

.page-home .hero--video .hero-layout,
.page-home .hero--video .hero-copy,
.page-home .hero--video .hero-figure {
  position: relative;
  z-index: 1;
}

.page-home .hero--video .hero-title {
  max-width: none;
}

.page-home .hero--video .hero-lead {
  max-width: 44rem;
}

.page-home .hero--video .hero-actions span[aria-hidden="true"] {
  display: none;
}

.page-home .hero--video .hero-actions {
  gap: 0.65rem;
}

.page-home .hero--video .hero-actions a {
  min-height: 2.5rem;
}

.page-home .hero-caption {
  max-width: 12rem;
  color: color-mix(in srgb, var(--color-muted) 92%, var(--color-text));
}

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 0.45rem;
  max-width: 12rem;
  margin: 0.75rem 0 0;
  padding: 0;
}

.hero-quick-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-accent);
  text-decoration: none;
  background: color-mix(in srgb, var(--pastel-sky) 32%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--pastel-sky) 55%, var(--color-border-soft));
  border-radius: var(--radius-pill);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.hero-quick-links a:hover {
  background: color-mix(in srgb, var(--pastel-lilac) 45%, var(--color-surface));
  border-color: var(--color-accent-muted);
  text-decoration: none;
}

.hero-quick-links a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.hero-quick-links--icons {
  gap: 0.4rem;
  max-width: none;
}

.hero-quick-links--icons a {
  width: 2.05rem;
  height: 2.05rem;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pastel-sky) 22%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--pastel-sky) 50%, var(--color-border-soft));
  color: var(--color-accent);
}

.hero-quick-links--icons a:hover {
  background: color-mix(in srgb, var(--pastel-lilac) 50%, var(--color-surface));
  color: var(--color-accent);
}

.hero-quick-links--icons svg,
.hero-quick-links--icons img {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.hero-quick-links--icons img {
  object-fit: contain;
}

.hero-quick-links--brand a.brand-icon {
  background: #ffffff;
  border: 1px solid var(--color-border-soft);
  color: inherit;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.hero-quick-links--brand a.brand-icon:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  border-color: color-mix(in srgb, var(--color-border-soft) 55%, #94a3b8);
}

.hero-quick-links--brand .brand-icon--x {
  border-color: color-mix(in srgb, #000 18%, var(--color-border-soft));
}

.page-home .home-card,
.page-home .home-grid > .home-card {
  padding: 1.5rem 1.35rem;
  background: color-mix(in srgb, var(--color-surface-strong) 90%, white);
  border: 1px solid var(--color-border-soft);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}

.page-home .site-shell > section:not(.hero) {
  margin-top: 0;
  padding: 1.5rem 1.35rem;
  background: color-mix(in srgb, var(--color-surface-strong) 90%, white);
  border: 1px solid var(--color-border-soft);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}

.home-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 920px) {
  .home-grid--primary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .home-grid--secondary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.home-card--bio p:last-child,
.home-card--publications .section-foot,
.home-card--media .section-foot {
  margin-bottom: 0;
}

.page-home .home-card p,
.page-home .home-card .pub-title,
.page-home .home-card .pub-meta,
.page-home .home-card .work-card p,
.page-home .home-card .page-lede,
.page-home .site-shell > section:not(.hero) p,
.page-home .site-shell > section:not(.hero) .pub-title,
.page-home .site-shell > section:not(.hero) .pub-meta {
  max-width: none;
}

.page-home .section-muted {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(245, 249, 252, 0.92) 100%);
}

@media (max-width: 919px) {
  .home-grid--primary,
  .home-grid--secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 759px) {
  .work-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-top: 0;
  }

  .site-header .site-shell--wide {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 0.8rem 0;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 0.4rem 0.3rem;
    min-width: 0;
  }

  .site-nav a {
    padding-inline: 0.72rem;
  }

  body:not(.page-home) .site-main > .site-shell {
    padding: 1.2rem 1rem 1.4rem;
    border-radius: 24px;
  }
}

@media (max-width: 560px) {
  .page-home .site-main--home {
    padding-top: 1rem;
    --home-first-screen-offset: 0;
  }

  .page-home .hero--video {
    padding: 1.2rem 1rem 1.35rem;
    border-radius: 26px;
  }

  .page-home .hero--video .hero-layout {
    gap: 1rem;
  }

  .page-home .hero--video .hero-photo {
    width: 6.6rem;
    height: 6.6rem;
  }

  .page-home .hero-caption:not(.hero-quick-links) {
    display: none;
  }

  .page-home .hero-quick-links {
    margin-top: 0.6rem;
    max-width: 16rem;
    gap: 0.3rem 0.4rem;
  }

  .page-home .hero-quick-links a {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
  }

  .page-home .hero--video .hero-kicker {
    font-size: 0.64rem;
    padding: 0.35rem 0.72rem;
    margin-bottom: 0.8rem;
  }

  .page-home .hero--video .hero-title {
    font-size: 1.18rem;
    line-height: 1.12;
    margin-bottom: 0.8rem;
  }

  .page-home .hero--video .hero-lead {
    font-size: 0.95rem;
    line-height: 1.58;
    margin-bottom: 1.15rem;
  }

  .page-home .hero--video .hero-actions {
    gap: 0.45rem;
  }

  .page-home .hero--video .hero-actions a {
    width: 100%;
    justify-content: center;
  }

  .page-home .home-card,
  .page-home .home-grid > .home-card,
  .page-home .site-shell > section:not(.hero) {
    padding: 1.2rem 1rem;
    border-radius: 22px;
  }

  .home-contact-email a {
    font-size: 1.05rem;
  }
}

/* Consolidated overrides */
html.page-home-html {
  scroll-snap-type: none;
  scroll-padding-top: 5.25rem;
}

.page-home .hero--video,
.page-home .home-card,
.page-home .home-grid > .home-card,
.page-home .site-shell > section:not(.hero),
body:not(.page-home) .site-main > .site-shell,
.section-muted,
.work-card {
  background: #fff;
}

/* Minimal professional pass */
:root {
  --color-bg: #f7f6f2;
  --color-bg-gradient: linear-gradient(180deg, #fbfaf8 0%, #f5f2ed 58%, #efede7 100%);
  --color-surface: #ffffff;
  --color-surface-strong: #ffffff;
  --color-text: #17191d;
  --color-muted: #535d69;
  --color-border: rgba(35, 43, 56, 0.14);
  --color-border-soft: rgba(35, 43, 56, 0.09);
  --color-accent: #244f72;
  --color-accent-muted: #60758a;
  --pastel-lilac: #edeaf4;
  --pastel-sage: #e7efeb;
  --pastel-dusty-rose: #f1e8e2;
  --pastel-sky: #e3eef6;
  --shadow-sm: 0 1px 2px rgba(19, 24, 33, 0.04), 0 8px 22px rgba(19, 24, 33, 0.035);
  --shadow-lg: 0 18px 48px rgba(19, 24, 33, 0.075);
  --radius: 12px;
  --radius-lg: 22px;
  --layout-max: 66rem;
  --layout-gutter: clamp(1rem, 4vw, 1.75rem);
}

body {
  background: radial-gradient(circle at 8% 0%, rgba(227, 238, 246, 0.7) 0%, rgba(227, 238, 246, 0) 30%),
    radial-gradient(circle at 92% 2%, rgba(237, 234, 244, 0.58) 0%, rgba(237, 234, 244, 0) 26%),
    var(--color-bg-gradient);
}

.site-header,
.page-home .site-header {
  background: rgba(250, 249, 245, 0.9);
  border-bottom-color: rgba(35, 43, 56, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

.site-header .site-shell--wide {
  gap: 0.7rem 1.25rem;
}

.site-title {
  letter-spacing: -0.035em;
}

.site-nav {
  flex: 0 1 auto;
  gap: 0.2rem 0.3rem;
}

.site-nav a {
  min-height: 2.05rem;
  padding: 0.22rem 0.52rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: color-mix(in srgb, var(--pastel-sky) 46%, white);
}

.site-main {
  padding-block: 2.35rem 4.25rem;
}

body:not(.page-home) .site-main > .site-shell {
  padding: clamp(1.6rem, 3vw, 3rem);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

body:not(.page-home) .site-main > .site-shell > section + section {
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
  padding-top: clamp(1.35rem, 3vw, 2rem);
}

body:not(.page-home) .site-main > .site-shell p:not(.pub-title):not(.pub-meta):not(.section-foot) {
  max-width: 68ch;
}

.page-title {
  font-size: clamp(1.8rem, 1.35rem + 1.8vw, 2.55rem);
}

h2 {
  font-size: clamp(1.18rem, 1rem + 0.65vw, 1.32rem);
}

.page-home .site-shell {
  gap: clamp(1.6rem, 5vh, 3.4rem);
}

.page-home .site-main--home {
  padding-top: clamp(1.5rem, 4vh, 3rem);
  padding-bottom: clamp(4rem, 8vh, 6.5rem);
}

.page-home .home-hero-screen {
  min-height: clamp(34rem, 78svh, 46rem);
  padding-block: clamp(1.6rem, 5vh, 3.5rem);
  scroll-margin-top: 5.25rem;
}

.page-home .hero--video {
  border-radius: calc(var(--radius-lg) + 4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    var(--shadow-lg);
}

.page-home .hero--video::before,
.page-home .hero--video::after {
  opacity: 0.72;
}

.page-home .hero--video .hero-title {
  font-size: clamp(1.55rem, 1rem + 2.9vw, 2.65rem);
}

.page-home .hero--video .hero-lead {
  max-width: 45rem;
}

.page-home .home-card,
.page-home .home-grid > .home-card,
.page-home .site-shell > section:not(.hero) {
  padding: clamp(1.6rem, 3vw, 2.35rem);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(19, 24, 33, 0.055);
}

.pillar,
.work-card {
  border-radius: 18px;
  box-shadow: none;
}

.work-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(19, 24, 33, 0.055);
}

@media (prefers-reduced-motion: no-preference) {
  html.page-home-html {
    scroll-snap-type: y proximity;
  }

  .page-home .home-hero-screen,
  .page-home .site-shell > section:not(.hero) {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
  }

  .page-home .hero--video {
    animation: hero-settle 0.42s ease both;
  }

  .page-home .site-shell > section:not(.hero) {
    transition:
      border-color 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.2s ease;
  }

  .page-home .site-shell > section:not(.hero):hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--pastel-sky) 64%, var(--color-border));
  }

  @supports (animation-timeline: view()) {
    .page-home .site-shell > section:not(.hero) {
      animation: section-rise both ease-out;
      animation-timeline: view();
      animation-range: entry 8% cover 28%;
    }
  }

  @keyframes hero-settle {
    from {
      opacity: 0.94;
      transform: translateY(4px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes section-rise {
    from {
      opacity: 0.88;
      transform: translateY(14px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (min-width: 760px) {
  .page-home .site-shell > section:not(.hero) {
    min-height: clamp(30rem, calc(100svh - 8rem), 42rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-margin-top: 5.25rem;
  }
}

@media (max-width: 720px) {
  .site-header .site-shell--wide {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.45rem;
    padding-block: 0.72rem;
  }

  .site-nav {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  html.page-home-html {
    scroll-snap-type: none;
    scroll-padding-top: 6rem;
  }

  .page-home .home-hero-screen {
    min-height: auto;
    padding-block: 1rem 0.5rem;
  }
}

@media (max-width: 560px) {
  .page-home .hero--video {
    border-radius: var(--radius-lg);
  }

  .page-home .hero--video .hero-title {
    font-size: 1.38rem;
    line-height: 1.16;
  }

  .page-home .hero--video .hero-actions {
    justify-content: center;
  }

  .page-home .hero--video .hero-actions a {
    width: auto;
    min-height: 2.25rem;
    padding: 0.36rem 0.7rem;
  }

  .page-home .hero--video .hero-actions a:first-of-type {
    width: 100%;
  }
}

.cv-embed {
  position: relative;
  width: 100%;
  margin-top: 1rem;
  aspect-ratio: 8.5 / 11;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}

.cv-embed > object,
.cv-embed > object > iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 720px) {
  .cv-embed {
    aspect-ratio: 8.5 / 13;
  }
}

/* ---------------------------------------------------------------------------
   Tighter spacing + mouse-reactive background
   --------------------------------------------------------------------------- */

/* Trim vertical whitespace on the home page and inside cards. */
.page-home .site-shell {
  gap: clamp(0.8rem, 1.8vh, 1.4rem);
}

.page-home .site-main--home {
  padding-top: clamp(0.85rem, 1.8vh, 1.6rem);
  padding-bottom: clamp(2rem, 4vh, 3.25rem);
}

.page-home .home-hero-screen {
  min-height: auto;
  padding-block: clamp(0.4rem, 1vh, 0.9rem);
  scroll-margin-top: 4.5rem;
}

.page-home .home-card,
.page-home .home-grid > .home-card,
.page-home .site-shell > section:not(.hero) {
  padding: clamp(0.95rem, 1.7vw, 1.35rem) clamp(1rem, 1.9vw, 1.55rem);
}

/* Earlier rules force each home section to fill the viewport and vertically
   center its content, which produces large empty bands above/below short
   content. Let cards size to their content instead. */
@media (min-width: 760px) {
  .page-home .site-shell > section:not(.hero) {
    min-height: 0;
    display: block;
  }
}

/* Disable scroll-snap on the homepage — combined with the new compact cards it
   was causing awkward jumps and reinforced the perception of empty space. */
html.page-home-html {
  scroll-snap-type: none;
}

@media (prefers-reduced-motion: no-preference) {
  html.page-home-html {
    scroll-snap-type: none;
  }

  .page-home .home-hero-screen,
  .page-home .site-shell > section:not(.hero) {
    scroll-snap-align: none;
  }
}

/* Hero card: tighter padding with centered mobile stacking. */
.page-home .hero--video {
  padding: clamp(1rem, 2vw, 1.55rem) clamp(1.05rem, 2.2vw, 1.7rem);
}

.page-home .hero--video .hero-layout {
  align-items: center;
  gap: 1rem 1.5rem;
}

.page-home .hero--video .hero-copy {
  width: 100%;
}

.page-home .hero--video .hero-title {
  margin-bottom: 0.65rem;
}

.page-home .hero--video .hero-lead {
  margin-bottom: 1rem;
}

@media (min-width: 720px) {
  .page-home .hero--video .hero-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem 1.75rem;
  }

  .page-home .hero--video .hero-figure {
    flex: 0 0 auto;
  }

  .page-home .hero--video .hero-copy {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.home-grid {
  gap: 0.85rem;
}

/* Section headings: pull the rule line closer to the title and to the body. */
h2 {
  margin-top: 1.4rem;
  margin-bottom: 0.5rem;
}

.page-home .home-card > h2:first-child,
.page-home .site-shell > section:not(.hero) > h2:first-child,
body:not(.page-home) .site-main > .site-shell > section > h2:first-child {
  margin-top: 0;
}

p {
  margin-bottom: 0.65rem;
}

.page-lede {
  margin-bottom: 1.1rem;
}

/* Tighten list spacing inside home cards. */
.page-home .pub-list {
  gap: 0.7rem;
}

.page-home .section-muted .pub-item {
  margin-bottom: 0.6rem;
  padding-bottom: 0.6rem;
}

.page-home .section-foot {
  margin-top: 0.85rem;
  margin-bottom: 0;
}

body:not(.page-home) .site-main > .site-shell > section + section {
  margin-top: clamp(1.1rem, 2vw, 1.6rem);
  padding-top: clamp(0.85rem, 1.6vw, 1.2rem);
}

body:not(.page-home) .site-main > .site-shell {
  padding: clamp(1.2rem, 2.3vw, 2rem);
}

/* Scroll-aware card transitions for the about/home page. */
@media (prefers-reduced-motion: no-preference) {
  .page-home.home-card-motion .site-shell > section.home-card {
    position: relative;
    overflow: hidden;
    opacity: 0.52;
    transform: translate3d(0, 18px, 0) scale(0.975);
    transform-origin: center top;
    filter: saturate(0.86) blur(0.45px);
    transition:
      opacity 0.52s cubic-bezier(0.2, 0.7, 0.2, 1),
      transform 0.68s cubic-bezier(0.2, 0.7, 0.15, 1),
      filter 0.52s ease,
      border-color 0.52s ease,
      box-shadow 0.52s ease;
    will-change: transform, opacity, filter;
  }

  .page-home.home-card-motion .site-shell > section.home-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background:
      radial-gradient(circle at 14% 18%, rgba(227, 238, 246, 0.72), rgba(227, 238, 246, 0) 32%),
      linear-gradient(120deg, rgba(255, 255, 255, 0) 10%, rgba(255, 255, 255, 0.5) 48%, rgba(255, 255, 255, 0) 72%);
    transform: translate3d(-8%, 0, 0);
    transition:
      opacity 0.58s ease,
      transform 0.8s cubic-bezier(0.2, 0.7, 0.15, 1);
  }

  .page-home.home-card-motion .site-shell > section.home-card.is-visible {
    opacity: 0.76;
    transform: translate3d(0, 8px, 0) scale(0.99);
    filter: saturate(0.94) blur(0);
  }

  .page-home.home-card-motion .site-shell > section.home-card.is-before-active {
    transform: translate3d(0, -6px, 0) scale(0.985);
  }

  .page-home.home-card-motion .site-shell > section.home-card.is-after-active {
    transform: translate3d(0, 14px, 0) scale(0.985);
  }

  .page-home.home-card-motion .site-shell > section.home-card.is-active {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: saturate(1) blur(0);
    border-color: color-mix(in srgb, var(--pastel-sky) 70%, var(--color-border));
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.84) inset,
      0 18px 48px rgba(19, 24, 33, 0.09);
  }

  .page-home.home-card-motion .site-shell > section.home-card.is-active::after {
    opacity: 0.78;
    transform: translate3d(0, 0, 0);
  }

  .page-home.home-card-motion .site-shell > section.home-card > * {
    position: relative;
    z-index: 1;
  }

  .page-home.home-card-motion .site-shell > section.home-card.is-active .pillar,
  .page-home.home-card-motion .site-shell > section.home-card.is-active .work-card,
  .page-home.home-card-motion .site-shell > section.home-card.is-active .pub-item {
    transition:
      transform 0.42s cubic-bezier(0.2, 0.7, 0.2, 1),
      border-color 0.42s ease,
      background-color 0.42s ease;
  }

  .page-home.home-card-motion .site-shell > section.home-card.is-active .pillar,
  .page-home.home-card-motion .site-shell > section.home-card.is-active .work-card,
  .page-home.home-card-motion .site-shell > section.home-card.is-active .pub-item {
    transform: translateY(-1px);
  }

  @supports (animation-timeline: view()) {
    .page-home.home-card-motion .site-shell > section:not(.hero) {
      animation: none;
    }
  }
}

/* Artifact links */
.artifact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem 0.5rem;
  margin-top: 0.7rem;
}

.artifact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.18rem 0.58rem;
  border: 1px solid color-mix(in srgb, var(--pastel-sky) 78%, var(--color-border));
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--pastel-sky) 32%, white);
  color: var(--color-accent);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.artifact-links a:hover {
  border-color: color-mix(in srgb, var(--color-accent) 30%, var(--color-border));
  background: color-mix(in srgb, var(--pastel-sage) 45%, white);
  color: var(--color-text);
  text-decoration: none;
}

.pub-item .artifact-links,
.post-list .artifact-links {
  margin-top: 0.55rem;
}

@media (max-width: 420px) {
  .artifact-links a {
    white-space: normal;
  }
}

/* Mouse-reactive background.
   `--mx` / `--my` are set on <body> by a small inline script in BaseLayout.
   They default to the top-center so first paint is unaffected. */
body {
  --mx: 50%;
  --my: 0%;
  background:
    radial-gradient(
      820px circle at var(--mx) var(--my),
      rgba(227, 238, 246, 0.55) 0%,
      rgba(227, 238, 246, 0) 55%
    ),
    radial-gradient(
      640px circle at calc(100% - var(--mx)) calc(var(--my) + 18%),
      rgba(237, 234, 244, 0.5) 0%,
      rgba(237, 234, 244, 0) 60%
    ),
    var(--color-bg-gradient);
  background-attachment: fixed;
  transition: background-position 0.4s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  body {
    --mx: 50%;
    --my: 0%;
  }
}
