/* Adam's Nature: dark forest palette
   understory  #121c16  page background
   canopy      #1a2820  raised surfaces
   bark        #2c3b31  rules and borders
   lichen      #dcdfcf  main text
   moss        #9aa894  secondary text
   copper      #c98c4a  copper beech accent, used sparingly
*/

:root {
  --understory: #121c16;
  --canopy: #1a2820;
  --bark: #2c3b31;
  --lichen: #dcdfcf;
  --moss: #9aa894;
  --copper: #c98c4a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  box-sizing: border-box;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--understory);
  color: var(--lichen);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a {
  color: var(--lichen);
  text-decoration-color: var(--copper);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--copper); }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: var(--canopy);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
}
.site-name {
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
}
.site-nav a { text-decoration: none; color: var(--moss); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--lichen); }
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--copper);
}

main { display: block; }

/* Home hero: the cross-section */
.hero {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 8vw, 7rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  overflow: hidden;
}
@media (min-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}
.hero h1 {
  font-weight: 400;
  font-size: clamp(3.25rem, 9vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}
.hero .lede {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  line-height: 1.5;
  color: var(--moss);
  max-width: 30ch;
  margin: 0;
}

.rings { width: 100%; max-width: 34rem; justify-self: center; }
.rings path {
  fill: none;
  stroke: var(--moss);
  stroke-width: 1.1;
  opacity: 0.55;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: grow 2.4s ease-out forwards;
}
.rings path.this-year { stroke: var(--copper); opacity: 1; stroke-width: 1.6; }
.rings .pith { fill: var(--moss); opacity: 0.7; }
@keyframes grow { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .rings path { animation: none; stroke-dashoffset: 0; }
}
.rings-caption {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--moss);
  margin: 0.75rem 0 0;
  text-align: center;
}

/* Prose sections */
.band {
  border-top: 1px solid var(--bark);
}
.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2rem);
}
.wrap > :first-child { margin-top: 0; }

h2 {
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
  margin: 2.5rem 0 1rem;
}
h3 {
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 2rem 0 0.5rem;
}
p { margin: 0 0 1.25rem; }

/* Article listing */
.entries { list-style: none; margin: 0; padding: 0; }
.entries li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--bark);
}
.entries li:first-child { padding-top: 0.5rem; }
.entries a {
  font-size: 1.45rem;
  line-height: 1.3;
  text-decoration: none;
}
.entries a:hover { text-decoration: underline; text-decoration-color: var(--copper); }
.entries p { color: var(--moss); margin: 0.4rem 0 0; }
.entries time {
  display: block;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--moss);
  margin-bottom: 0.35rem;
}

.threads { margin: 0; }
.threads dt { font-weight: 600; margin-top: 1.25rem; }
.threads dd { margin: 0.25rem 0 0; color: var(--moss); }

/* Article pages */
.article-head {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2rem) 0;
}
.article-head h1 {
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0.5rem 0 1.25rem;
}
.article-head .standfirst {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: var(--moss);
  line-height: 1.5;
  max-width: 44ch;
}
.article-head time {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--moss);
}

.prose ul { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--copper); }
.prose strong { font-weight: 600; }

figure { margin: 2.5rem 0; }
figcaption {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--moss);
  margin-top: 0.75rem;
  line-height: 1.5;
}
.diagram {
  background: var(--canopy);
  border: 1px solid var(--bark);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
}
.diagram svg { min-width: 30rem; margin: 0 auto; }
.diagram text { font-family: var(--sans); fill: var(--lichen); font-size: 13px; }
.diagram .dim { fill: var(--moss); font-size: 12px; }
.diagram .wall { fill: none; stroke: var(--moss); stroke-width: 2; }
.diagram .zone { fill: var(--understory); stroke: var(--bark); stroke-width: 1; }
.diagram .zone-sun { fill: #2a2a1c; stroke: var(--copper); stroke-width: 1; }
.diagram .sun { fill: none; stroke: var(--copper); stroke-width: 1.5; }
.diagram .arrow { stroke: var(--moss); stroke-width: 1.2; fill: none; }

.aside {
  border-left: 2px solid var(--copper);
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--moss);
  margin: 2rem 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--bark);
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--moss);
}
.site-footer .inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer p { margin: 0; }

/* Photos and images inside articles */
.prose img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--bark);
  margin: 2rem 0 0.5rem;
}
.prose p:has(> img:only-child) { margin-bottom: 0; }
.prose p > em:only-child {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.875rem;
  color: var(--moss);
  line-height: 1.5;
  margin-bottom: 2rem;
}
.prose blockquote {
  border-left: 2px solid var(--copper);
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--moss);
}
.prose blockquote p:last-child { margin-bottom: 0; }
