/* gaiaweb — public site. Palette and type lifted from the design canvas. */

:root {
  --paper: #fdfdfc;
  --ink: #1a1a18;
  --body: #3d3d38;
  --muted: #8a8a80;
  --rule: #eceae4;
  --field: #d9d7d0;
  --hairline: #cfcdc5;
  --serif: Newsreader, Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: 48px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: #6b6b63; }
::selection { background: #e6e4dd; }
img { display: block; max-width: 100%; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { max-width: 1440px; width: 100%; margin: 0 auto; }

.mono {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- header ---- */

.site-head {
  display: flex; flex-wrap: wrap; gap: 24px 48px;
  align-items: baseline; justify-content: space-between;
  padding: 40px var(--gutter) 0;
}
.wordmark { font-family: var(--serif); font-size: 26px; font-weight: 400; line-height: 1.1; }
.wordmark-sub { margin-top: 8px; letter-spacing: 0.18em; }

.brandmark { display: block; }
.brand-top { display: flex; align-items: center; gap: 18px; }
/* --logo-h comes from the console, delivered in the page's nonced <style>.
   Width follows the aspect ratio. */
.brand-logo {
  display: block; height: var(--logo-h, 48px); width: auto;
  max-width: 100%; object-fit: contain;
}
.brand-beside > :first-child { margin-top: 0; }
.brand-under { margin-top: 12px; }

.site-nav {
  display: flex; flex-wrap: wrap; gap: 28px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding-bottom: 4px;
}
.site-nav a { padding-bottom: 5px; border-bottom: 1px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--hairline); }
.site-nav a[aria-current='page'] { border-bottom-color: var(--ink); color: var(--ink); }

/* Equal breathing room above and below the content, so the gap under the nav
   matches the gap down to the footer rule. */
main { flex: 1; padding: 72px var(--gutter); }

/* ---- about ---- */

/* Text column plus a card area. With two cards the 1fr + 2fr split and the
   matching 48px gaps reproduce the design's three equal columns exactly; more
   cards subdivide the card area instead of squeezing the text. */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.about.no-cards { grid-template-columns: minmax(0, 620px); }
.about-cards { display: grid; grid-template-columns: repeat(var(--cards, 2), minmax(0, 1fr)); gap: 48px; }
.lead {
  font-family: var(--serif); font-size: 27px; line-height: 1.4;
  font-weight: 300; margin: 0 0 40px; text-wrap: pretty;
}
.prose p { margin: 0 0 20px; color: var(--body); text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }
.prose a, .inline-link { border-bottom: 1px solid var(--hairline); }
.notes {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 40px; letter-spacing: 0.12em;
}

/* ---- plates (artwork tiles) ---- */

.plate {
  aspect-ratio: 4 / 5; width: 100%;
  display: flex; align-items: flex-end; padding: 14px;
  transition: opacity 0.25s;
  background: repeating-linear-gradient(135deg, #f4f3f0 0 7px, #eae8e3 7px 14px);
  overflow: hidden;
}
.plate.green { background: repeating-linear-gradient(135deg, #f3f4f0 0 7px, #e8eae3 7px 14px); }
/* The stripes and the inset exist to frame the "no image yet" label. Once a
   plate holds a picture, the picture is the whole tile. */
.plate.has-image { background: none; padding: 0; }
.plate img { width: 100%; height: 100%; object-fit: cover; }
a:hover > .plate { opacity: 0.78; }
.plate-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.plate-cap { margin-top: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---- series ---- */

.page-head {
  display: flex; flex-wrap: wrap; gap: 16px 64px; align-items: baseline;
  border-bottom: 1px solid var(--rule); padding-bottom: 28px; margin-bottom: 48px;
}
.page-head h1 { font-family: var(--serif); font-size: 44px; font-weight: 300; margin: 0; line-height: 1; }
.page-head p { margin: 0; max-width: 52ch; color: var(--body); }

.grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 48px 32px; }
.work-title { font-family: var(--serif); font-size: 18px; font-weight: 400; margin-top: 14px; }
.work-meta { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.empty { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---- journal ---- */

.column { max-width: 760px; }
.column h1 { font-family: var(--serif); font-size: 44px; font-weight: 300; margin: 0 0 48px; line-height: 1; }
.entries { display: flex; flex-direction: column; }
.entry {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 32px;
  padding: 28px 0; border-top: 1px solid var(--rule);
  align-items: start;
}
/* The cover column only exists on rows that have one, so text-only entries
   keep the full width rather than leaving a hole. */
.entry.has-cover { grid-template-columns: 120px minmax(0, 1fr) 148px; }
.entry-cover { display: block; }
.entry-cover img {
  width: 148px; aspect-ratio: 4 / 3; object-fit: cover;
  background: repeating-linear-gradient(135deg, #f4f3f0 0 7px, #eae8e3 7px 14px);
}
.entry:hover { background: #faf9f7; }
.entry-date { padding-top: 6px; }
.entry-title { display: block; font-family: var(--serif); font-size: 22px; font-weight: 400; }
.entry-excerpt { display: block; color: var(--body); margin-top: 8px; text-wrap: pretty; }

.post-cover { margin: 0 0 40px; }
.post-cover img {
  width: 100%; height: auto;
  background: repeating-linear-gradient(135deg, #f4f3f0 0 7px, #eae8e3 7px 14px);
}

.post-head { margin-bottom: 40px; }
.post-head h1 { font-family: var(--serif); font-size: 38px; font-weight: 300; margin: 12px 0 0; line-height: 1.15; }
.post-body { color: var(--body); font-size: 16px; }
.post-body p { margin: 0 0 22px; text-wrap: pretty; }
.post-body h2, .post-body h3 {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  margin: 40px 0 14px; line-height: 1.25;
}
.post-body h2 { font-size: 26px; }
.post-body h3 { font-size: 20px; }
.post-body a { border-bottom: 1px solid var(--hairline); }
.post-body ul, .post-body ol { margin: 0 0 22px; padding-left: 22px; }
.post-body li { margin-bottom: 8px; }
.post-body blockquote {
  margin: 32px 0; padding-left: 24px; border-left: 1px solid var(--field);
  font-family: var(--serif); font-size: 20px; line-height: 1.5; color: var(--ink);
}
.post-body img {
  width: 100%; height: auto; margin: 32px 0;
  background: repeating-linear-gradient(135deg, #f4f3f0 0 7px, #eae8e3 7px 14px);
}
.post-body hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }
.post-body pre {
  font-family: var(--mono); font-size: 13px; background: #f6f5f2;
  padding: 16px; overflow-x: auto; margin: 0 0 22px;
}
.post-body code { font-family: var(--mono); font-size: 0.9em; }
.post-body .ql-align-center { text-align: center; }
.post-body .ql-align-right { text-align: right; }
.post-body .ql-align-justify { text-align: justify; }
.post-body .ql-indent-1 { padding-left: 32px; }
.post-body .ql-indent-2 { padding-left: 64px; }
.post-body .ql-indent-3 { padding-left: 96px; }
.back { display: inline-block; margin-top: 48px; }

/* ---- contact ---- */

.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 80px; align-items: start; }
.contact h1 { font-family: var(--serif); font-size: 44px; font-weight: 300; margin: 0 0 12px; line-height: 1; }
.contact-intro { margin: 0 0 40px; color: var(--body); max-width: 46ch; text-wrap: pretty; }
.email-link { font-family: var(--serif); font-size: 24px; border-bottom: 1px solid var(--hairline); }
.aside { display: flex; flex-direction: column; gap: 40px; font-size: 14.5px; }
.aside h2 { font: inherit; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-weight: 400; }
.aside p { margin: 0; color: var(--body); text-wrap: pretty; }

/* ---- footer ---- */

.site-foot {
  padding: 32px var(--gutter) 40px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between;
  letter-spacing: 0.12em;
}

/* ---- lightbox ---- */

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(253, 253, 252, 0.97);
  display: flex; flex-direction: column; padding: 32px var(--gutter);
}
.lightbox[hidden] { display: none; }
.lb-bar { display: flex; justify-content: space-between; align-items: baseline; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 48px; padding: 24px 0; }
.lb-plate { height: 100%; aspect-ratio: 4 / 5; display: flex; align-items: flex-end; padding: 18px; background: repeating-linear-gradient(135deg, #f4f3f0 0 7px, #eae8e3 7px 14px); overflow: hidden; }
.lb-plate.has-image { background: none; padding: 0; }
.lb-plate img { width: 100%; height: 100%; object-fit: contain; }
.lb-nav { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 8px; }
.lb-nav:hover { color: var(--ink); }
.lb-caption { text-align: center; }
.lb-caption .t { font-family: var(--serif); font-size: 22px; }
.lb-caption .m { margin-top: 6px; }

/* ---- responsive ---- */

@media (max-width: 1024px) {
  .about, .about.no-cards { grid-template-columns: minmax(0, 1fr); }
  .about-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .grid { --cols: 2 !important; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 56px; }
}

@media (max-width: 700px) {
  :root { --gutter: 24px; }
  /* On a narrow screen let a wide logo shrink by width rather than overflow,
     with the height you set as the ceiling. */
  .brand-logo { height: auto; max-height: var(--logo-h, 48px); }
  .brand-top { gap: 12px; }
  main { padding-top: 48px; padding-bottom: 48px; }
  .about-cards { grid-template-columns: minmax(0, 1fr); }
  .grid { --cols: 1 !important; }
  .lead { font-size: 23px; }
  .page-head h1, .column h1, .contact h1 { font-size: 34px; }
  .entry, .entry.has-cover { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .entry-date { padding-top: 0; }
  .entry-cover img { width: 100%; margin-top: 8px; }
  .lb-stage { gap: 16px; }
}

.links { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* ---- pixelfed carousel ---- */

.carousel { margin-top: 96px; border-top: 1px solid var(--rule); padding-top: 28px; }
.carousel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; margin-bottom: 24px;
}
.carousel-head h2 { font: inherit; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0; font-weight: 400; }
.carousel-nav { display: flex; gap: 4px; }
.carousel-nav .lb-nav:disabled { opacity: 0.25; cursor: default; }

/* A plain horizontal scroller, so it still works with JavaScript off. */
.shots {
  list-style: none; margin: 0; padding: 0 0 12px;
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.shot { flex: 0 0 auto; width: 240px; scroll-snap-align: start; }
.shot img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  transition: opacity 0.25s;
}
.shot a:hover img { opacity: 0.78; }
.shot-cap {
  display: block; margin-top: 10px; color: var(--body); font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@media (max-width: 700px) {
  .carousel { margin-top: 64px; }
  .shot { width: 68vw; }
}
