:root {
  --cream: #f5f3e7;
  --navy: #16285e;
  --muted: #4f6a87;
  --line: #dcd8c6;
  --card: #f8f6ec;
  --landscape-height: calc(100vw / 7.72);
  --landscape-peek: .35;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background-color: var(--cream);
  background-image: radial-gradient(#e3dfcd 1px, transparent 1.2px);
  background-size: 22px 22px;
  background-attachment: fixed;
  color: var(--navy);
  font-family: "Source Sans 3", system-ui, sans-serif;
}
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }
.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: 2.5rem;
  padding: 2rem 3.5rem 0;
  font-family: "Newsreader", serif;
  font-size: 1.25rem;
}
.site-nav a, .site-title a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-header { text-align: center; padding: 3rem 1rem 3.5rem; }
.site-title {
  font-family: "Newsreader", serif;
  font-size: clamp(2.8rem, 5vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -.02em;
}
.site-header p { margin: .4rem 0 0; color: var(--muted); font-size: 1.4rem; }
#main-content { padding: 0 3.25rem calc(var(--landscape-height) + 3rem); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.post-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
  min-height: 170px;
  padding: 1.5rem 1.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.post-card:hover { background: #fffdf4; border-color: #c9c3a8; }
.post-card img { width: 76px; height: 88px; object-fit: contain; flex: none; }
.post-card h2 {
  margin: 0 0 .7rem;
  font-family: "Newsreader", serif;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.post-card span, .article-header time { color: var(--muted); font-size: 1.05rem; }
.landscape {
  position: fixed;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--landscape-height);
  background: url("../images/fledgling/landscape.png") bottom center / 100% auto no-repeat;
  pointer-events: none;
}
.is-post .landscape { transform: translateY(calc((1 - var(--landscape-peek)) * 100%)); }
.is-post #main-content { padding-bottom: calc(var(--landscape-height) * var(--landscape-peek) + 3rem); }
.page-content { max-width: 780px; margin: 0 auto; padding: 2.5rem; background: var(--card); border: 1px solid var(--line); }
.article-header h1, .prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: "Newsreader", serif;
  font-weight: 600;
  line-height: 1.15;
}
.article-header h1, .prose h1 { margin: 0 0 .75rem; font-size: clamp(2.2rem, 5vw, 3.25rem); }
.prose { font-size: 1.15rem; line-height: 1.65; overflow-wrap: break-word; }
.prose h2 { margin-top: 2rem; font-size: 1.8rem; }
.prose h3 { margin-top: 1.75rem; font-size: 1.4rem; }
.prose a { text-underline-offset: 3px; }
.prose img, .prose video, .prose iframe { max-width: 100%; }
.prose img { height: auto; }
.prose iframe { aspect-ratio: 16 / 9; width: 100%; height: auto; border: 0; }
.prose pre { padding: 1rem; overflow-x: auto; background: #ebe8da; font-size: .9rem; line-height: 1.5; }
.prose code { font-family: ui-monospace, monospace; }
.prose blockquote { margin-left: 0; padding-left: 1.25rem; border-left: 2px solid var(--line); color: var(--muted); }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { padding: .5rem; border: 1px solid var(--line); text-align: left; }
.project-list { padding: 0; list-style: none; }
.project-list li { margin-bottom: 1.25rem; }
.project-list span { color: var(--muted); font-size: .9rem; margin-left: .5rem; }
.project-list p { margin: .2rem 0 0; }
.post-navigation { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1100px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  :root { --landscape-height: 26vw; }
  .site-nav { padding: 1.25rem 1.25rem 0; gap: 1.5rem; }
  #main-content { padding: 0 1rem calc(var(--landscape-height) + 2rem); }
  .is-post #main-content { padding-bottom: calc(var(--landscape-height) * var(--landscape-peek) + 2rem); }
  .post-grid { grid-template-columns: 1fr; }
  .landscape { background-size: auto 100%; }
  .page-content { padding: 1.5rem; }
}
