:root {
  --canvas: #f6f5f1;
  --surface: #ffffff;
  --ink: #1e2526;
  --muted: #5d6966;
  --accent: #215b58;
  --accent-light: #dcebe7;
  --dark: #152422;
  --dark-muted: #d8e2dd;
  --line: #d8ddda;
  --shadow: 0 0.65rem 1.75rem rgb(24 36 34 / 10%);
  --shell: min(68rem, calc(100% - 2rem));
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

img, picture, video { display: block; max-width: 100%; }

a { color: var(--accent); text-underline-offset: 0.16em; }
a:hover { color: #113d3b; }

h1, h2, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 7vw, 4.8rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -0.022em; }

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

.site-header { position: relative; z-index: 2; background: var(--dark); color: white; }
.site-header__inner { min-height: 4.35rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-brand { color: white; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.025em; text-decoration: none; }
.site-menu { position: relative; }
.site-menu summary { cursor: pointer; color: var(--dark-muted); font-size: 0.95rem; }
.site-menu summary:hover { color: white; }
.site-menu__panel { position: absolute; right: 0; top: calc(100% + 0.85rem); width: min(24rem, calc(100vw - 2rem)); padding: 1.25rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 0.4rem; box-shadow: var(--shadow); }
.site-menu__panel p { font-size: 0.94rem; line-height: 1.5; }
.site-menu__panel ul { margin: 0; padding-left: 1.15rem; }

.homepage-intro, .page-intro { padding: clamp(4.5rem, 11vw, 8rem) 0 clamp(3.5rem, 8vw, 5.5rem); background: linear-gradient(120deg, #ecf2ed, #f7f4ec); }
.homepage-intro p:last-child, .page-intro p:last-child { max-width: 46rem; color: var(--muted); font-size: clamp(1.15rem, 2vw, 1.4rem); }
.eyebrow { margin-bottom: 0.9rem; color: var(--accent); font-size: 0.78rem; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; }

.project-grid-section { padding: clamp(3rem, 7vw, 5rem) 0; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.5rem; }
.project-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 0.55rem; box-shadow: 0 0.3rem 1rem rgb(24 36 34 / 5%); }
.project-card__image { display: block; overflow: hidden; background: var(--accent-light); }
.project-card__image picture, .project-card__image img { aspect-ratio: 4 / 3; width: 100%; height: 100%; object-fit: cover; }
.project-card__image img { transition: transform 220ms ease; }
.project-card__image:hover img { transform: scale(1.025); }
.project-card__body { display: flex; flex: 1; flex-direction: column; padding: 1.3rem; }
.project-card h2 { margin-bottom: 0.55rem; font-size: 1.65rem; }
.project-card h2 a { color: inherit; text-decoration: none; }
.project-card p { color: var(--muted); font-size: 0.96rem; }
.project-card__links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: auto 0 0; padding: 1.15rem 0 0; list-style: none; }
.button { display: inline-flex; align-items: center; min-height: 2.45rem; padding: 0.45rem 0.75rem; border: 1px solid currentColor; border-radius: 0.3rem; font-size: 0.9rem; font-weight: 650; text-decoration: none; }
.button--secondary { color: var(--accent); }
.button:hover { background: var(--accent); color: white; }

.project-article { background: var(--surface); }
.project-section { padding: clamp(3.25rem, 7vw, 5.75rem) 0; }
.project-section--light { background: var(--surface); }
.project-section--dark { background: var(--dark); color: white; }
.project-section__inner { width: var(--shell); margin-inline: auto; }
.project-section__inner > * { max-width: 68rem; }
.project-section__inner > p { max-width: 46rem; font-size: clamp(1.05rem, 1.4vw, 1.2rem); }
.project-section--dark p { color: var(--dark-muted); }
.project-section--dark a { color: #b7e6d8; }
.project-section img, .project-section video { margin: 1.8rem auto; border-radius: 0.35rem; box-shadow: var(--shadow); }
.project-section picture > img { width: 100%; height: auto; }
.project-section .caption { margin-top: -1.1rem; color: var(--muted); font-size: 0.93rem; font-style: italic; }
.project-section--dark .caption { color: var(--dark-muted); }
.animation { width: min(100%, 40rem); background: #0c1715; }
code { padding: 0.08em 0.28em; background: #e9eeea; border-radius: 0.18rem; color: #273a35; font-size: 0.86em; }
.project-section--dark code { background: #283b37; color: white; }

.video-embed { width: min(100%, 60rem); margin: 1.8rem auto 0; }
.video-embed iframe { display: block; width: 100%; border: 0; aspect-ratio: 16 / 9; }

@media (max-width: 38rem) {
  .site-menu__panel { right: -0.25rem; }
  .project-section__inner > p { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .animation + p::before { content: "Animation paused because your device prefers reduced motion. "; font-style: italic; }
}
