/* The Album Journal.

   Blog pages are server-rendered by the API, so they cannot use the gallery's
   Tailwind build — this is the whole stylesheet. It follows DESIGN.md rather
   than inventing a second visual language: ink #0F172A, every rule a 1px
   gray-200 line, rounded-none everywhere, no shadows, Inter throughout.

   Kept small and dependency-free on purpose; a blog should be the fastest
   thing on the site. */

:root {
  --ink: #0f172a;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-200: #e5e7eb;
  --gray-50: #f9fafb;
  --measure: 68ch;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-underline-offset: 4px; }
a:hover { color: var(--gray-600); }

/* --- masthead ---------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}
.masthead nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.masthead nav a { font-size: 0.9rem; color: var(--gray-600); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); }

/* --- layout ------------------------------------------------------------ */

main { max-width: 760px; margin: 0 auto; padding: 3.5rem 1.5rem 4rem; }

/* The index is a magazine spread and needs more room than an article, which
   stays at its reading measure. Only the index carries this class. */
body.index main { max-width: 1080px; }

h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 1rem; }

/* --- index: nameplate -------------------------------------------------- */

/* A newspaper nameplate rather than a page heading — it is what gives the
   index its weight on arrival, and it costs no images. */
.nameplate {
  text-align: center;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}
.nameplate h1 {
  font-size: clamp(2.2rem, 6.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 0.9rem;
}
.nameplate-sub { margin: 0; color: var(--gray-500); font-size: 0.95rem; }

/* The "01 · INTRODUCTION" furniture, printed above every headline. */
.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-400);
}

/* --- index: the entries ------------------------------------------------ */

/* Every post gets the same treatment: its cover shown whole at full width,
   then the words, with a hairline between. The covers are a designed series
   — a title card with a kicker, a headline and a photo collage — and they
   only read properly uncropped. An earlier version cropped all but the
   newest to the collage half and the index looked like a stock-photo grid.

   The headline prints underneath even where the artwork carries one: two of
   the covers are captioned with a tagline rather than the title, so the
   image cannot be relied on to say where the link goes. */
.entry { padding-bottom: 3.5rem; margin-bottom: 3.5rem; border-bottom: 1px solid var(--gray-200); }
.entry:last-of-type { padding-bottom: 0; border-bottom: 0; }
.entry-link { display: block; }
.entry-img { display: block; width: 100%; height: auto; border: 1px solid var(--gray-200); }
.entry-body { max-width: 56ch; margin: 1.75rem auto 0; text-align: center; }
.entry-title { font-size: clamp(1.6rem, 3.2vw, 2.15rem); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.7rem; }
.entry-title a { text-decoration: none; }
.entry-title a:hover { text-decoration: underline; }
.entry-excerpt { margin: 0 0 0.6rem; font-size: 1.15rem; line-height: 1.55; color: var(--gray-600); }
.more { margin: 1rem 0 0; font-size: 0.95rem; font-weight: 500; }
.more a { text-decoration: none; }
.more a:hover { text-decoration: underline; }

.meta { margin: 0; font-size: 0.85rem; color: var(--gray-400); }
.empty { color: var(--gray-500); }

/* On a phone the cover runs to the edges — inside the gutters at 350px it
   reads as a thumbnail rather than a cover — and the words go left-aligned,
   where centred text at that measure starts to look like a greetings card. */
@media (max-width: 560px) {
  .entry { padding-bottom: 2.5rem; margin-bottom: 2.5rem; }
  .entry-link { margin: 0 -1.25rem; }
  .entry-img { border-left: 0; border-right: 0; }
  .entry-body { text-align: left; margin-top: 1.25rem; }
  .entry-title { font-size: 1.45rem; }
  .entry-excerpt { font-size: 1.05rem; }
}

/* --- the post ---------------------------------------------------------- */

.post { max-width: var(--measure); }
.post > h1 { margin-bottom: 0.75rem; }
.post .meta { margin-bottom: 2rem; }
.post .cover { display: block; width: 100%; height: auto; border: 1px solid var(--gray-200); padding: 6px; margin: 0 0 2rem; }
.post h2 { font-size: 1.5rem; line-height: 1.3; margin: 2.5rem 0 0.75rem; letter-spacing: -0.01em; }
.post h3 { font-size: 1.2rem; margin: 2rem 0 0.5rem; }
.post p { margin: 0 0 1.2rem; }
.post ul, .post ol { margin: 0 0 1.4rem; padding-left: 1.25rem; }
.post li { margin-bottom: 0.5rem; }
.post img { max-width: 100%; height: auto; border: 1px solid var(--gray-200); padding: 6px; }
.post blockquote {
  margin: 1.8rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--gray-200);
  color: var(--gray-600);
  font-style: normal;
}
.post code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: 0.1em 0.35em;
}
.post pre {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: 1rem;
  overflow-x: auto;
}
.post pre code { border: 0; background: none; padding: 0; }
.post hr { border: 0; border-top: 1px solid var(--gray-200); margin: 2.5rem 0; }

.post table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: 0.95rem; }
.post th, .post td { border: 1px solid var(--gray-200); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.post th { background: var(--gray-50); font-weight: 600; }

/* --- call to action ---------------------------------------------------- */

.cta { border: 1px solid var(--gray-200); padding: 1.75rem; margin: 3rem 0 0; }
.cta p { margin: 0 0 1rem; }
.cta p:last-child { margin: 0; }
.btn {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s;
}
.btn:hover { transform: translateY(-2px); color: #fff; }

.back { margin-top: 2.5rem; font-size: 0.9rem; }

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

.foot {
  border-top: 1px solid var(--gray-200);
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  color: var(--gray-500);
  font-size: 0.9rem;
}
.foot p { margin: 0 0 0.5rem; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  main { padding: 2.5rem 1.25rem 3rem; }
}
