/* germaise20 — editorial visual shell.
   Charcoal / bone / rust. Oversized display type, dark-light section
   rhythm, mono utility labels. Influenced by (not copied from)
   vanschneider.com and stephenyang.com. Palette lives in variables. */

:root {
  --bone: #f3efe6;
  --bone-deep: #e8e2d3;
  --ink: #1c1a17;
  --ink-soft: #45413a;
  --muted: #625c50;
  --line: #d5cebe;
  --line-dark: rgba(243, 239, 230, 0.18);
  --dark: #1c1a17;
  --muted-on-dark: #b7b0a2;
  --accent: #a8431f;
  --accent-on-dark: #e0713d;
  --wrap: 72rem;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bone);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

.band-dark a:focus-visible,
.hero-photo a:focus-visible,
.site-footer a:focus-visible {
  outline-color: var(--accent-on-dark);
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--bone);
  padding: 0.5rem 1rem;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 10;
}

/* Layout shell */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* Header: name as anchor, small utilitarian nav */
.header-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
}

.site-name {
  font-weight: 750;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

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

.site-header nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.site-header nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 0.35rem;
}

.site-header nav a:hover {
  color: var(--ink);
}

/* aria-current="page" marks the exact page; aria-current="true" marks
   the current section on its sub-pages. Both get the visible marker. */
.site-header nav a[aria-current],
.site-name[aria-current] {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
}

/* Type system */
.display {
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 2rem;
}

.display-md {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 1.5rem;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.band-dark .kicker {
  color: var(--accent-on-dark);
}

p {
  margin: 0 0 1rem;
  max-width: 62ch;
}

.lede {
  font-size: clamp(1.15rem, 1.05rem + 0.6vw, 1.4rem);
  line-height: 1.5;
  max-width: 48ch;
}

/* Content not yet written: visibly provisional */
.slot {
  color: var(--muted);
  font-style: italic;
}

/* Home hero: asymmetric — oversized statement beside offset portrait */
.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem);
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

/* Headline reads naturally as one sentence; at wide widths the name
   drops to its own intentional second line */
.hero-name {
  display: inline;
}

@media (min-width: 56rem) {
  .hero-name {
    display: block;
  }
}

.hero-grid {
  display: grid;
  gap: 3rem;
}

.hero-portrait {
  margin: 0 min(1.25rem, 4vw) min(1.25rem, 4vw) 0;
  max-width: 17rem;
}

.hero-portrait img {
  display: block;
  box-shadow: min(1.25rem, 4vw) min(1.25rem, 4vw) 0 var(--accent);
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) clamp(15rem, 24vw, 19rem);
    gap: 5rem;
    align-items: start;
  }

  .hero-portrait {
    max-width: none;
    margin-top: 1rem;
  }
}

/* Home gateways: dark editorial index, numbered rows — not cards */
.gateways {
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.band-dark {
  background: var(--dark);
  color: var(--bone);
}

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

.gateway {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.5rem 2rem;
  align-items: baseline;
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line-dark);
}

.gateway:first-child {
  border-top: none;
}

.gateway-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--accent-on-dark);
}

.gateway-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 750;
}

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

.gateway-title a:hover {
  color: var(--accent-on-dark);
}

.gateway-title .arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}

.gateway-title a:hover .arrow {
  transform: translateX(0.35em);
}

.gateway p {
  margin: 0;
  color: var(--muted-on-dark);
  max-width: 52ch;
}

/* Interior page opening */
.page-hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

/* Numbered editorial sections with strong rules — not cards */
.content-section {
  border-top: 2px solid var(--ink);
  padding-block: clamp(2rem, 4vw, 2.75rem) clamp(2.5rem, 5vw, 3.5rem);
}

.content-section .kicker {
  margin-bottom: 0.75rem;
}

.content-section h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}

.content-section h3 {
  font-size: 1.15rem;
  margin: 2rem 0 0.5rem;
}

/* Landing-page section titles that link to detail pages */
.content-section h2 a {
  color: inherit;
  text-decoration: none;
}

.content-section h2 a:hover {
  color: var(--accent);
}

.content-section h2 a .arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}

.content-section h2 a:hover .arrow {
  transform: translateX(0.3em);
}

/* On-this-page table of contents (e.g. /work/articles/) */
.toc {
  margin: 2rem 0 0;
}

.toc-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem 2rem;
}

@media (min-width: 40rem) {
  .toc-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.toc-list a {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding: 0.2rem 0;
}

.toc-list a:hover,
.toc-list a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Anchor navigation lands cleanly below the section's top rule */
.content-section[id] {
  scroll-margin-top: 1.5rem;
}

/* Interest detail pages */
.backlink-row {
  margin: 0 0 1.5rem;
}

.backlink {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-decoration: none;
}

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

.interest-figure {
  margin: 1rem min(1rem, 3vw) 2.5rem 0;
  max-width: 44rem;
}

.interest-figure img {
  display: block;
  box-shadow: min(1rem, 3vw) min(1rem, 3vw) 0 var(--ink);
  margin-bottom: min(1rem, 3vw);
}

.interest-figure figcaption {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* Editorial content photographs on Interest pages */
.photo {
  margin: 1.75rem 0;
  max-width: 44rem;
}

.photo img {
  display: block;
  border: 1px solid var(--line);
}

.photo figcaption {
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.photo-medium {
  max-width: 28rem;
}

.photo-small {
  max-width: 16rem;
}

.figure-pair {
  display: grid;
  gap: 1.75rem;
  margin: 1.75rem 0;
  max-width: 44rem;
}

.figure-pair .photo {
  margin: 0;
  max-width: none;
}

@media (min-width: 40rem) {
  .figure-pair {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Photographic hero: atmospheric page opening with a background image.
   Dark gradient overlay keeps text readable over the photograph. */
.hero-photo {
  position: relative;
  background-color: var(--dark);
  background-size: cover;
  background-position: center 35%;
  color: var(--bone);
  padding-block: clamp(4rem, 12vw, 8rem) clamp(2.5rem, 7vw, 4.5rem);
}

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(28, 26, 23, 0.7),
    rgba(28, 26, 23, 0.35) 45%,
    rgba(28, 26, 23, 0.65)
  );
}

.hero-photo .wrap {
  position: relative;
}

.hero-photo .display-md {
  color: var(--bone);
}

.hero-photo .backlink {
  color: var(--muted-on-dark);
}

.hero-photo .backlink:hover {
  color: var(--accent-on-dark);
}

.hero-photo .kicker {
  color: var(--accent-on-dark);
}

.hero-photo .footnote,
.hero-photo .slot {
  color: var(--muted-on-dark);
}

.hero-photo .hero-caption {
  margin: 2.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-on-dark);
}

/* Skiing: Scott and his wife, snow-covered on a chairlift */
.skiing-hero {
  background-image: url("/assets/images/sandi-skiing-lift.webp");
}

/* Project entries: editorial, not cards */
.project {
  max-width: 46rem;
}

.project + .project {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.project h3,
.project h4 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin: 1.5rem 0 0.5rem;
}

.project h4 {
  font-size: 1.15rem;
}

.project h3 a {
  color: var(--ink);
  text-decoration: none;
}

.project h3 a:hover {
  color: var(--accent);
}

.crosslink {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.crosslink a {
  color: var(--accent);
  text-decoration: none;
}

.crosslink a:hover {
  text-decoration: underline;
}

/* Destination list: deliberate outbound links, not a pile of blue text */
.dest-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  max-width: 46rem;
}

.dest-list li {
  border-top: 1px solid var(--line);
}

.dest-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.dest-list a {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.1rem 0.25rem;
  text-decoration: none;
  color: var(--ink);
}

.dest-name {
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dest-note {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.dest-list a:hover .dest-name {
  color: var(--accent);
}

/* Simple editorial data table (e.g. Hudson frequencies) */
.data-table {
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  max-width: 34rem;
  width: 100%;
}

.data-table caption {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-bottom: 0.5rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.5rem 1.25rem 0.5rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}

/* Route checkpoints (Hudson Page 2): entry rows with optional photo */
.checkpoint {
  display: grid;
  gap: 1rem 2rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}

.checkpoint h3 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.checkpoint .photo {
  margin: 0;
  max-width: 22rem;
}

@media (min-width: 44rem) {
  .checkpoint {
    grid-template-columns: 1fr minmax(11rem, 15rem);
    align-items: start;
  }

  .checkpoint .cp-body {
    grid-column: 1;
  }

  .checkpoint .photo {
    grid-column: 2;
    grid-row: 1;
  }
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.75rem;
  white-space: nowrap;
}

.tag-report {
  color: var(--accent);
  border-color: var(--accent);
}

/* Muted footnote (e.g. patent-family notes) */
.footnote {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 62ch;
}

/* Small optional detour (e.g. Interests → /ai/) */
.detour {
  margin: clamp(2.5rem, 6vw, 4rem) 0;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--accent);
  background: var(--bone-deep);
  max-width: 42rem;
}

.detour .kicker {
  margin-bottom: 0.5rem;
}

.detour p {
  margin: 0;
}

/* Photos: category cards that link into the Piwigo gallery */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.album-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
}

.album-frame {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bone-deep);
}

.album-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.album-card:hover img,
.album-card:focus-visible img {
  transform: scale(1.04);
}

.album-label {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.album-card:hover .album-label,
.album-card:focus-visible .album-label {
  color: var(--accent);
}

/* Sixth card: deliberate editorial "full archive" tile on a dark band */
.album-card-archive .album-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--dark);
  border-color: var(--dark);
}

.album-archive-inner {
  font-family: var(--mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.5;
  color: var(--bone);
}

.album-archive-inner .arrow {
  color: var(--accent-on-dark);
}

.album-card-archive:hover .album-frame,
.album-card-archive:focus-visible .album-frame {
  border-color: var(--accent-on-dark);
}

@media (prefers-reduced-motion: reduce) {
  .album-card img {
    transition: none;
  }
  .album-card:hover img,
  .album-card:focus-visible img {
    transform: none;
  }
}

/* /ai/: playful but same system */
.one-word {
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin: 1.5rem 0 2rem;
}

.ai-figure {
  margin: 2.5rem min(1rem, 3vw) 2.5rem 0;
  max-width: 30rem;
}

.ai-figure img {
  display: block;
  box-shadow: min(1rem, 3vw) min(1rem, 3vw) 0 var(--ink);
  /* The shadow paints outside the image box and takes no layout space;
     reserve its height in flow so it cannot cover the caption below. */
  margin-bottom: min(1rem, 3vw);
}

.ai-figure figcaption,
.ai-restyle figcaption {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.ai-secondary {
  display: grid;
  gap: 1.5rem 2.5rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.ai-secondary h2 {
  margin-top: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.015em;
}

.ai-restyle {
  margin: 0;
  max-width: 13rem;
}

.ai-restyle img {
  display: block;
  border: 1px solid var(--line);
}

@media (min-width: 40rem) {
  .ai-secondary {
    grid-template-columns: 1fr minmax(9rem, 13rem);
    align-items: start;
  }
}

.disclaimer {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 56ch;
}

/* Footer: deliberate, dark, restrained */
.site-footer {
  margin-top: clamp(3rem, 8vw, 6rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  background: var(--dark);
  color: var(--bone);
  border-top: 1px solid var(--line-dark);
}

.site-footer .footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 48rem) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr auto auto;
    gap: 4rem;
  }
}

.footer-name {
  margin: 0;
  font-weight: 750;
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.footer-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-on-dark);
  text-decoration: none;
}

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

/* The homepage ends on the dark gateways band; keep its footer joined */
body.home .site-footer {
  margin-top: 0;
}

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

  .gateway-title a:hover .arrow,
  .content-section h2 a:hover .arrow {
    transform: none;
  }
}
