@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wdth,wght@12..96,75..100,300..800&family=IBM+Plex+Mono:wght@400;500&display=swap");
@import url("./subpage-shell.css?v=20260725a");

:root {
  --font: "Bricolage Grotesque", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --black: #161616;
  --gray-100: #262626;
  --gray-80: #393939;
  --gray-30: #c6c6c6;
  --gray-20: #e0e0e0;
  --gray-10: #f4f4f4;
  --gray-5: #f8f8f8;
  --white: #ffffff;
  --blue: #0f62fe;
  --blue-hover: #0353e9;
  --focus: #0f62fe;
  --line-subtle: rgb(22 22 22 / 0.14);
  --line-faint: rgb(22 22 22 / 0.08);
  --line-on-dark: rgb(255 255 255 / 0.12);
  --site-header-height: 40px;
  --navigation-font-size: 12px;
  --body-font-size: 14px;
  --navigation-padding-inline: 6px;
  --page-padding: clamp(16px, 3vw, 48px);
  --content-max: 1440px;
  --total-columns: 12;
  --motion-productive-standard: cubic-bezier(0.2, 0, 0.38, 0.9);
  --motion-productive-entrance: cubic-bezier(0, 0, 0.38, 0.9);
  --motion-expressive-entrance: cubic-bezier(0, 0, 0.3, 1);
  --duration-fast-02: 110ms;
  --duration-moderate-01: 150ms;
  --duration-moderate-02: 240ms;
  --duration-slow-01: 400ms;
}

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

html {
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  padding-top: var(--site-header-height);
  background: var(--white);
  color: var(--black);
  font-size: var(--navigation-font-size);
}

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

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 1px solid var(--focus);
  outline-offset: -1px;
}

/* ============================================
   SITE HEADER – 12 col, each nav button spans 2
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(var(--page-padding), 1fr) minmax(0, var(--content-max)) minmax(var(--page-padding), 1fr);
  height: var(--site-header-height);
  background: var(--black);
  color: var(--gray-10);
}

.site-nav {
  grid-column: 2 / 3;
  display: grid;
  grid-template-columns: repeat(var(--total-columns), minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
}

.site-nav-link {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: var(--site-header-height);
  padding: 0 var(--navigation-padding-inline);
  border-left: 0.075px solid var(--line-subtle);
  border-right: 0.075px solid var(--line-subtle);
  color: var(--gray-30);
  font-size: var(--navigation-font-size);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--duration-fast-02) var(--motion-productive-entrance),
    color var(--duration-fast-02) var(--motion-productive-entrance);
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
  background: var(--gray-100);
  color: var(--white);
}

.site-nav-link.is-current {
  background: var(--blue);
  color: var(--white);
}

/* ============================================
   PAGE
   ============================================ */
.page {
  min-height: 100vh;
  width: min(100% - (var(--page-padding) * 2), var(--content-max));
  margin: 0 auto;
  padding: var(--page-padding) 0;
}

/* ============================================
   HELLO
   ============================================ */
#hello.photography-section {
  border-top: 0.075px solid var(--line-subtle);
}

.section-intro {
  display: grid;
  grid-template-columns: 1fr;
  min-height: clamp(360px, 56vh, 640px);
  background: var(--white);
}

.section-intro h1,
.section-copy {
  margin: 0;
  background: var(--white);
}

.section-intro h1 {
  min-height: clamp(280px, 45vh, 520px);
  padding: clamp(24px, 5vw, 64px) 16px 24px;
  font-size: clamp(3.5rem, 8vw, 9.5rem);
  font-weight: 500;
  line-height: 0.92;
}

.section-copy {
  padding: 16px 16px clamp(24px, 4vw, 48px);
  border-top: 0.075px solid var(--line-subtle);
  color: var(--gray-80);
  font-size: clamp(1.125rem, 1.5vw, 1.625rem);
  font-weight: 400;
  line-height: 1.35;
}

/* ============================================
   IMAGE HERO — shared by home and skill pages
   ============================================ */
.image-hero {
  position: relative;
  min-height: min(700px, calc(100vh - var(--site-header-height) - 96px));
  border: 0.075px solid var(--line-subtle);
  overflow: hidden;
  background: var(--black);
  color: var(--white);
}

.image-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-hero::after {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.48);
  content: "";
}

.image-hero.is-light {
  background: var(--white);
  color: var(--black);
}

.image-hero.is-light::after {
  display: none;
}

.image-hero.is-light h1,
.image-hero.is-light .image-hero-description,
.image-hero.is-light .image-hero-meta,
.image-hero.is-light .image-hero-back {
  color: var(--black);
}

.image-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: inherit;
  padding: clamp(20px, 4vw, 56px);
}

.image-hero-eyebrow,
.image-hero-meta {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 680;
  line-height: 1.2;
  text-transform: uppercase;
}

.image-hero-body {
  margin-top: auto;
}

.image-hero h1 {
  max-width: 11ch;
  margin: 0 0 24px;
  color: var(--white);
  font-size: clamp(3.5rem, 8.5vw, 8.5rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.02;
}

.skill-hero.image-hero h1 {
  min-height: 0;
  max-width: 11ch;
}

.image-hero-bottom {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.image-hero-description {
  grid-column: 1 / span 8;
  max-width: 760px;
  margin: 0;
  color: var(--white);
  font-size: clamp(1rem, 1.55vw, 1.45rem);
  font-weight: 440;
  line-height: 1.35;
}

.image-hero-meta {
  grid-column: 10 / -1;
  color: var(--white);
  text-align: right;
}

.image-hero-back {
  color: var(--white);
  text-decoration: none;
}

.image-hero-back:hover,
.image-hero-back:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ============================================
   QUIET FRAMES — filter + photo grid
   ============================================ */
#quiet-frames.photography-section {
  border-top: none;
}

.filter-panel {
  position: sticky;
  top: var(--site-header-height);
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(var(--total-columns), minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  background: var(--white);
}

.city-filter {
  grid-column: span 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  min-height: 56px;
  margin: 0 0 0 -0.075px;
  padding: 12px 16px;
  border: 0.075px solid var(--line-subtle);
  border-radius: 0;
  background: var(--gray-10);
  color: var(--black);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 520;
  line-height: 1.2;
  text-align: left;
  transition:
    background-color var(--duration-fast-02) var(--motion-productive-entrance),
    color var(--duration-fast-02) var(--motion-productive-entrance);
}

.city-filter:hover {
  background: var(--gray-20);
}

.city-filter.is-active,
.city-filter[aria-pressed="true"] {
  background: var(--blue);
  color: var(--white);
}

.city-filter.is-active:hover,
.city-filter[aria-pressed="true"]:hover {
  background: var(--blue-hover);
}

.result-status {
  margin: 0;
  padding: 16px 16px;
  background: var(--gray-5);
  color: var(--gray-80);
  font-size: 0.875rem;
  font-weight: 440;
  line-height: 1.35;
}

/* Home-only choreography. The class is added by index.html after targets exist. */
.home-motion-ready [data-home-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--duration-slow-01) var(--motion-expressive-entrance) var(--home-reveal-delay, 0ms),
    transform var(--duration-slow-01) var(--motion-expressive-entrance) var(--home-reveal-delay, 0ms);
  will-change: opacity, transform;
}

.home-motion-ready [data-home-reveal].is-home-visible {
  opacity: 1;
  transform: translateY(0);
}

.home-motion-ready #hello [data-home-reveal] {
  transition-duration: 520ms;
}

.skill-motion-ready [data-skill-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--duration-slow-01) var(--motion-expressive-entrance) var(--skill-reveal-delay, 0ms),
    transform var(--duration-slow-01) var(--motion-expressive-entrance) var(--skill-reveal-delay, 0ms);
  will-change: opacity, transform;
}

.skill-motion-ready [data-skill-reveal].is-skill-visible {
  opacity: 1;
  transform: translateY(0);
}

.skill-motion-ready [data-skill-hero] {
  transition-duration: 520ms;
}

@media (prefers-reduced-motion: reduce) {
  .home-motion-ready [data-home-reveal],
  .skill-motion-ready [data-skill-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(var(--total-columns), minmax(0, 1fr));
  gap: 0;
  background: var(--white);
}

.photo-card {
  grid-column: span 3;
  display: grid;
  grid-template-rows: auto 1fr;
  margin: 0;
  border-right: 0.075px solid var(--line-subtle);
  border-bottom: 0.075px solid var(--line-subtle);
  background: var(--white);
  transition: background-color var(--duration-fast-02) var(--motion-productive-entrance);
}

.photo-card[hidden] {
  display: none;
}

.photo-card:hover {
  background: var(--gray-10);
}

.photo-image-link {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.photo-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--gray-20);
  filter: grayscale(1) contrast(1.02);
  transition: filter var(--duration-moderate-01) var(--motion-productive-standard);
}

.photo-grid.is-reveal-ready .photo-card img {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 560ms var(--motion-expressive-entrance) var(--photo-reveal-delay, 0ms),
    transform 560ms var(--motion-expressive-entrance) var(--photo-reveal-delay, 0ms),
    filter var(--duration-moderate-01) var(--motion-productive-standard);
  will-change: opacity, transform;
}

.photo-grid.is-reveal-ready .photo-card.is-in-view img.is-loaded {
  opacity: 1;
  transform: translateY(0);
}

.photo-card:hover img {
  filter: grayscale(1) contrast(1.08);
}

.photo-card.is-filter-refresh img {
  animation: photo-filter-in var(--duration-moderate-02) var(--motion-productive-entrance) both;
}

@keyframes photo-filter-in {
  from {
    opacity: 0.35;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-grid.is-reveal-ready .photo-card img {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .photo-card.is-filter-refresh img {
    animation: none;
  }
}

.photo-caption {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 112px;
  border-top: 0.075px solid var(--line-subtle);
}

.photo-city {
  padding: 12px;
  border-right: 0.075px solid var(--line-subtle);
  color: var(--blue);
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.15;
  text-transform: uppercase;
  text-decoration: none;
}

.photo-caption p {
  margin: 0;
  padding: 12px;
  color: var(--gray-100);
  font-size: 0.9375rem;
  font-weight: 420;
  line-height: 1.35;
}

.photo-card:hover .photo-city {
  background: var(--blue);
  color: var(--white);
}

a.photo-city:hover,
a.photo-city:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================
   GATHERED QUIETLY — half height, image 4col
   ============================================ */
.gathered-section {
  margin-top: clamp(48px, 8vw, 112px);
  border-top: 0.075px solid var(--line-subtle);
}

.section-label {
  border-right: 0.075px solid var(--line-subtle);
  border-bottom: 0.075px solid var(--line-subtle);
  border-left: 0.075px solid var(--line-subtle);
  background: var(--white);
}

.section-label h2 {
  margin: 0;
  padding: 14px 16px;
  color: var(--black);
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 520;
  line-height: 1.1;
}

/* Card: image = 4col (2 top-nav buttons), landscape, half-height */
.gathered-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 16.667%) minmax(0, 1fr);
  margin: -0.075px 0 clamp(8px, 2vw, 24px);
  border: 0.075px solid var(--line-subtle);
  background: var(--white);
}

.gathered-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  align-self: stretch;
  object-fit: cover;
  border-right: 0.075px solid var(--line-subtle);
  background: var(--gray-20);
  filter: grayscale(0.08) contrast(1.02);
}

.gathered-content {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 100%;
  padding: 14px clamp(14px, 2vw, 28px);
}

.gathered-content h3 {
  max-width: 32ch;
  margin: 0;
  color: var(--black);
  font-size: clamp(1rem, 1.6vw, 2rem);
  font-weight: 500;
  line-height: 1.1;
}

.gathered-content h3 a,
.gathered-content h3 a:link,
.gathered-content h3 a:visited,
.gathered-content h3 a:hover,
.gathered-content h3 a:active {
  color: var(--black);
  text-decoration: none;
}

.gathered-content h3 a::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  cursor: pointer;
}

.gathered-content h3 a:focus-visible {
  outline: none;
}

.gathered-content h3 a:focus-visible::after {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.gathered-content p {
  max-width: 58ch;
  margin: 0;
  color: var(--gray-80);
  font-size: clamp(0.8125rem, 1vw, 1.0625rem);
  font-weight: 420;
  line-height: 1.38;
}

/* ============================================
   LITTLE LOVES — pure image grid, 12-col, varied sizes
   ============================================ */
.little-loves-section {
  margin-top: clamp(48px, 8vw, 112px);
  border-top: 0.075px solid var(--line-subtle);
  background: var(--white);
}

.little-loves-section > .section-label {
  border-left: 0.075px solid var(--line-subtle);
  border-right: 0.075px solid var(--line-subtle);
}

.loves-grid {
  display: grid;
  grid-template-columns: repeat(var(--total-columns), minmax(0, 1fr));
  gap: 0;
}

.loves-grid .love-item {
  margin: 0;
  border-right: 0.075px solid var(--line-subtle);
  border-bottom: 0.075px solid var(--line-subtle);
}

.loves-grid .love-item a {
  display: block;
  height: 100%;
}

.loves-grid .love-item a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.loves-grid .love-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--gray-20);
  filter: grayscale(0.05) contrast(1.02);
  transition: filter var(--duration-moderate-01) var(--motion-productive-standard);
}

.loves-grid .love-item:hover img {
  filter: grayscale(0) contrast(1.06);
}

.love-span-3 { grid-column: span 3; }
.love-span-4 { grid-column: span 4; }
.love-span-5 { grid-column: span 5; }
.love-span-6 { grid-column: span 6; }

.love-item.love-span-3 img { aspect-ratio: 1 / 1; }
.love-item.love-span-4 img { aspect-ratio: 4 / 3; }
.love-item.love-span-5 img { aspect-ratio: 3 / 2; }
.love-item.love-span-6 img { aspect-ratio: 16 / 9; }

/* ============================================
   SOFT NOTES — text entries, time + title + body
   ============================================ */
.soft-notes-section {
  margin-top: clamp(48px, 8vw, 112px);
  border-top: 0.075px solid var(--line-subtle);
  background: var(--white);
}

.soft-notes-section > .section-label {
  border-left: 0.075px solid var(--line-subtle);
  border-right: 0.075px solid var(--line-subtle);
}

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

.notes-list li {
  padding: 24px 16px;
  border-bottom: 0.075px solid var(--line-subtle);
  border-left: 0.075px solid var(--line-subtle);
  border-right: 0.075px solid var(--line-subtle);
  background: var(--white);
}

.notes-list li:first-child {
  border-top: 0.075px solid var(--line-subtle);
}

.note-time {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-80);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.note-title {
  margin: 0 0 8px;
  color: var(--black);
  font-size: clamp(1.125rem, 1.6vw, 1.75rem);
  font-weight: 520;
  line-height: 1.2;
}

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

.note-title a:hover,
.note-title a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.note-body {
  margin: 0;
  max-width: 72ch;
  color: var(--gray-80);
  font-size: 0.9375rem;
  font-weight: 420;
  line-height: 1.5;
}

/* ============================================
   FOOTER (Come Closer)
   ============================================ */
.site-footer {
  display: grid;
  grid-template-columns: repeat(var(--total-columns), minmax(0, 1fr));
  gap: 0;
  width: min(100% - (var(--page-padding) * 2), var(--content-max));
  margin: 0 auto var(--page-padding);
  border-top: 0.075px solid var(--line-subtle);
  border-bottom: 0.075px solid var(--line-subtle);
  background: var(--white);
}

.footer-brand,
.footer-nav,
.footer-meta {
  margin: 0;
  background: var(--gray-10);
}

.footer-brand {
  grid-column: span 6;
  min-height: 260px;
  padding: 16px;
  border-right: 0.075px solid var(--line-subtle);
}

.footer-kicker {
  margin: 0 0 80px;
  color: var(--gray-80);
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.2;
  text-transform: uppercase;
}

.footer-title {
  max-width: 12ch;
  margin: 0;
  color: var(--black);
  font-size: clamp(2rem, 4vw, 4.5rem);
  font-weight: 500;
  line-height: 0.95;
}

.footer-nav {
  grid-column: span 3;
  display: grid;
  align-content: start;
  border-right: 0.075px solid var(--line-subtle);
}

.footer-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 14px 16px;
  border-bottom: 0.075px solid var(--line-subtle);
  color: var(--black);
  font-size: 0.9375rem;
  font-weight: 520;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  background: var(--blue);
  color: var(--white);
}

.footer-meta {
  grid-column: span 3;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  color: var(--gray-80);
  font-size: 0.875rem;
  font-weight: 440;
  line-height: 1.4;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1180px) {
  .photo-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .photo-card { grid-column: span 3; }
  .loves-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .love-span-3, .love-span-4, .love-span-5, .love-span-6 { grid-column: span 3; }
}

@media (max-width: 820px) {
  body {
    padding-top: var(--site-header-height);
  }
  .site-header {
    grid-template-columns: 1fr;
    height: var(--site-header-height);
  }
  .site-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    height: var(--site-header-height);
    background: var(--black);
  }
  .site-nav-link { grid-column: span 1; }
  .page { width: min(100% - (var(--page-padding) * 2), var(--content-max)); padding: var(--page-padding) 0; }
  .filter-panel { top: var(--site-header-height); grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .city-filter { grid-column: span 2; }
  .section-intro { display: block; min-height: 0; }
  .section-intro h1, .section-copy { border-bottom: 0.075px solid var(--line-subtle); }
  .section-intro h1 { min-height: 360px; padding: 24px 16px; font-size: clamp(3.375rem, 15vw, 6rem); }
  .section-copy { padding: 16px; border-top: 0; }
  .image-hero {
    min-height: 640px;
  }
  .image-hero-description,
  .image-hero-meta {
    grid-column: 1 / -1;
    text-align: left;
  }
  .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photo-card { grid-column: span 2; }
  .photo-caption { grid-template-columns: 1fr; }
  .photo-city { border-right: 0; border-bottom: 0.075px solid var(--line-subtle); }
  .gathered-card { grid-template-columns: 1fr; }
  .gathered-card img { border-right: 0; border-bottom: 0.075px solid var(--line-subtle); aspect-ratio: 16/9; }
  .gathered-content h3 { max-width: 100%; }
  .loves-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .love-span-3, .love-span-4, .love-span-5, .love-span-6 { grid-column: span 2; }
  .section-label { grid-template-columns: 1fr; }
  .section-label span { border-right: 0; border-bottom: 0.075px solid var(--line-subtle); }
  .site-footer { grid-template-columns: 1fr; width: min(100% - (var(--page-padding) * 2), var(--content-max)); margin: 0 auto var(--page-padding); }
  .footer-brand, .footer-nav, .footer-meta { grid-column: auto; }
}

@media (max-width: 520px) {
  :root {
    --site-header-height: 54px;
  }

  .site-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: var(--site-header-height);
    height: var(--site-header-height);
  }

  .site-nav-link {
    grid-column: span 1;
    min-height: var(--site-header-height);
  }

  .page { width: 100%; padding: 0; }
  .site-footer { margin: 0; }
  #hello.photography-section { border-top: 0; }
  .image-hero {
    min-height: 620px;
    border-right: 0;
    border-left: 0;
  }
  .image-hero h1 {
    font-size: clamp(3rem, 14vw, 4rem);
    line-height: 1.06;
  }
  .filter-panel { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .city-filter { grid-column: span 2; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-card { grid-column: span 2; }
  .loves-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .love-span-3, .love-span-4, .love-span-5, .love-span-6 { grid-column: span 1; }
}

/* ============================================
   CARBON REFINEMENT — shared system for all pages
   ============================================ */
:root {
  --border-subtle: var(--line-faint);
  --border-strong: var(--line-subtle);
  --layer-01: #f4f4f4;
  --layer-02: #ffffff;
}

html {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body {
  font-weight: 400;
  line-height: 1.5;
}

.site-header {
  border-bottom: 0.5px solid var(--line-on-dark);
}

.site-nav-link {
  border-color: var(--line-on-dark);
  font-size: var(--navigation-font-size);
  font-weight: 500;
}

.page {
  padding-top: 0;
  padding-bottom: clamp(48px, 6vw, 96px);
}

.image-hero,
.running-hero,
.shoe-hero,
.diet-hero {
  border-color: var(--line-subtle) !important;
}

.image-hero-copy,
.running-hero-copy,
.shoe-hero-copy {
  padding: clamp(24px, 4vw, 64px);
}

.image-hero-eyebrow,
.image-hero-meta,
.running-eyebrow,
.running-hero-meta,
.shoe-eyebrow,
.shoe-hero-meta,
.diet-hero-eyebrow,
.diet-hero-sources {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

main h1,
main h2,
main h3 {
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

.image-hero h1,
.running-hero h1,
.shoe-hero h1,
.diet-hero h1 {
  line-height: 0.96 !important;
}

.image-hero-description,
.running-hero-bottom > p,
.shoe-hero-bottom > p,
.diet-hero-sub {
  max-width: 60ch;
  font-size: clamp(1rem, 1.3vw, 1.25rem) !important;
  line-height: 1.42 !important;
}

.image-hero-meta,
.running-hero-meta,
.shoe-hero-meta {
  color: inherit;
  font-variant-numeric: tabular-nums;
}

:where(
  .skill-meta,
  .quick-nav,
  .diet-quick-nav,
  .hermes-nav,
  .purine-nav,
  .thyroid-nav,
  .running-nav,
  .shoe-nav,
  .calorie-nav,
  .health-nav,
  .topic-nav,
  .filter-panel,
  .skill-filter-panel,
  .section-heading,
  .hermes-heading,
  .purine-heading,
  .thyroid-heading,
  .skill-heading,
  .running-heading,
  .shoe-heading
) {
  border-color: var(--border-strong) !important;
}

:where(
  .quick-nav,
  .diet-quick-nav,
  .hermes-nav,
  .purine-nav,
  .thyroid-nav,
  .running-nav,
  .shoe-nav,
  .calorie-nav,
  .health-nav,
  .topic-nav,
  .filter-panel,
  .skill-filter-panel
) {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

:where(
  .quick-nav,
  .diet-quick-nav,
  .hermes-nav,
  .purine-nav,
  .thyroid-nav,
  .running-nav,
  .shoe-nav,
  .calorie-nav,
  .health-nav,
  .topic-nav
) > a,
.city-filter,
.skill-filter {
  grid-column: span 1 !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: var(--site-header-height) !important;
  min-height: var(--site-header-height) !important;
  padding: 0 var(--navigation-padding-inline) !important;
  border-color: var(--border-strong) !important;
  font-size: var(--navigation-font-size) !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  overflow-wrap: anywhere;
}

:where(
  .quick-nav,
  .diet-quick-nav,
  .hermes-nav,
  .purine-nav,
  .thyroid-nav,
  .running-nav,
  .shoe-nav,
  .calorie-nav,
  .health-nav,
  .topic-nav
) > a + a {
  border-left: 0 !important;
}

.city-filter,
.skill-filter {
  gap: 4px;
}

.skill-meta {
  background: var(--layer-01) !important;
}

.skill-meta span {
  border-color: var(--border-subtle) !important;
  font-weight: 400;
}

.skill-meta span + span {
  border-left: 0 !important;
}

.skill-meta strong,
.hermes-heading span,
.purine-heading span,
.thyroid-heading span,
.section-heading-label {
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}

:where(.skill-section, .hermes-section, .purine-section, .thyroid-section, .running-section, .shoe-section, .fragrance-section) {
  margin-top: clamp(56px, 7vw, 96px) !important;
  border-color: var(--border-strong) !important;
}

:where(.skill-grid, .hermes-grid, .purine-grid, .thyroid-grid, .running-grid, .shoe-grid, .fragrance-grid) {
  border-color: var(--border-subtle) !important;
}

:where(.skill-block, .hermes-block, .purine-block, .thyroid-block, .running-block, .shoe-block, .fragrance-card) {
  border-color: var(--border-subtle) !important;
  background: var(--layer-02);
  transition: background-color 110ms linear;
}

:where(.skill-block, .hermes-block, .purine-block, .thyroid-block, .running-block, .shoe-block, .fragrance-card):hover {
  background: var(--layer-01);
}

code,
pre,
.code-panel,
.terminal,
.command {
  font-family: var(--font-mono);
}

.photo-grid,
.loves-grid,
.gathered-section,
.little-loves-section,
.soft-notes-section,
.site-footer {
  border-color: var(--border-strong);
}

.photo-card,
.photo-caption,
.photo-city,
.gathered-card,
.gathered-card img,
.section-label,
.notes-list li,
.footer-brand,
.footer-nav,
.footer-meta {
  border-color: var(--border-subtle) !important;
}

.section-label,
.notes-list li,
.gathered-card,
.photo-card {
  background: var(--layer-02);
}

.section-label h2 {
  padding: 16px;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
}

.gathered-card {
  margin-bottom: 16px;
}

.gathered-content {
  gap: 6px;
  padding: 20px clamp(16px, 2vw, 32px);
}

.gathered-content p,
.photo-caption p,
.note-body {
  line-height: 1.5;
}

.result-status {
  padding: 12px 16px;
  background: var(--layer-01);
  font-size: 0.8125rem;
}

.footer-brand,
.footer-nav,
.footer-meta {
  background: var(--layer-01);
}

/* Body copy stays readable while navigation and controls remain compact. */
html body :is(
  p:not(.footer-title),
  li,
  dt,
  dd,
  th,
  td,
  figcaption,
  blockquote,
  label,
  legend,
  summary,
  pre
):not([data-preserve-font-size]) {
  font-size: var(--body-font-size) !important;
}

html body :is(input, textarea, select, option, button):not([data-preserve-font-size]) {
  font-size: var(--navigation-font-size) !important;
}

html body :is(a, span, code, small, time):not(.run-value, .shoe-value):not([data-preserve-font-size]) {
  font-size: var(--navigation-font-size) !important;
}

html body :is(
  .nutrient-unit,
  .compare-item-label,
  .compare-item-val,
  .plate-cat,
  .plate-note
):not([data-preserve-font-size]) {
  font-size: var(--body-font-size) !important;
}

html body :is(
  p:not(.footer-title),
  li,
  dt,
  dd,
  th,
  td,
  figcaption,
  blockquote,
  label,
  legend,
  summary,
  pre
) :is(a, span, code, small, time, strong, em, b, i) {
  font-size: inherit !important;
}

html body :is(strong, em, b, i):not(.health-level > strong, .purine-level > strong):not([data-preserve-font-size]) {
  font-size: var(--navigation-font-size) !important;
}

html body :is(h1, h2, h3, h4, h5, h6) :is(a, span, strong, em, b, i, code, small, time):not(.run-value, .shoe-value):not([data-preserve-font-size]) {
  font-size: inherit !important;
}

main :is(h2, h3, h4, h5, h6) {
  line-height: 1.3 !important;
}

.code-panel figcaption,
.copy-code-button {
  border-color: var(--line-on-dark) !important;
}

@media (max-width: 820px) {
  :root {
    --body-font-size: 11px;
    --navigation-font-size: 11px;
    --navigation-padding-inline: 4px;
  }

  .page {
    padding-top: 0;
  }

  .site-nav-link {
    padding: 0 var(--navigation-padding-inline);
    font-size: var(--navigation-font-size);
  }

  :where(.quick-nav, .diet-quick-nav, .hermes-nav, .purine-nav, .thyroid-nav, .running-nav, .shoe-nav, .calorie-nav, .health-nav, .topic-nav) {
    top: var(--site-header-height);
  }
}

@media (max-width: 520px) {
  :root {
    --navigation-padding-inline: 2px;
  }

  .site-nav-link {
    padding: 0 var(--navigation-padding-inline);
  }
}
