/* ============================================================
   patternlandscape.com — a working log of images and notes.
   Dark theme + type shared with justinbooz.com; layout after
   forensic-architecture.org: a feed of numbered cards with
   thin-bordered metadata tables.
   ============================================================ */

@font-face {
  font-family: "Inter Variable";
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --swatch-1: rgba(255, 255, 255, 0.85);
  --swatch-2: rgba(255, 255, 255, 0.75);
  --swatch-3: rgba(255, 255, 255, 0.6);
  --swatch-4: rgba(255, 255, 255, 0.4);
  --bg: #191919;
  --line: rgba(255, 255, 255, 0.35);
  --accent: #ff2b45;
  --pad: 1rem;
  --font-sans: "Monument Grotesk Variable", "Inter Variable",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 450;
  line-height: 1.35;
  color: var(--swatch-3);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:active { opacity: 0.7; }
.u { text-decoration: underline; }

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

.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding: 1.4rem var(--pad) 2.2rem;
}

/* same treatment as the name on justinbooz.com */
.wordmark {
  color: var(--swatch-1);
  font-weight: 700;
  font-size: 3.6rem;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.parent-link {
  justify-self: end;
  color: var(--swatch-2);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.parent-link:hover { color: var(--swatch-1); }

/* ---- feed -------------------------------------------------- */

.feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem 2.5rem;
  padding: 0 var(--pad) 4rem;
  max-width: 1600px;
  margin: 0 auto;
}

.card { min-width: 0; }

.card-head {
  display: block;
  margin-bottom: 0.7rem;
}

.num {
  color: var(--swatch-1);
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.5em;
}

.card-title {
  color: var(--swatch-1);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.card-head:hover .card-title { text-decoration: underline; }

.thumb {
  display: block;
}

.thumb img,
.thumb video {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* ---- metadata table (FA-style thin borders) ---------------- */

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin-top: 0;
}

.meta .cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.7rem 0.7rem;
  min-width: 0;
}

.meta .label {
  display: block;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  color: var(--swatch-4);
  margin-bottom: 0.35em;
}

.meta .desc {
  grid-column: 1 / -1;
  color: var(--swatch-3);
}

/* ---- post page --------------------------------------------- */

.post {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 var(--pad) 4rem;
}

.back {
  display: inline-block;
  color: var(--swatch-4);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
}

.back:hover { color: var(--swatch-2); }

.post h1 {
  color: var(--swatch-1);
  text-transform: uppercase;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.3;
  margin: 0 0 1rem;
}

.post h1 .num { font-size: 0.8rem; }

.post-text {
  margin: 1.6rem 0 2rem;
  max-width: 40rem;
}

.post-text p { margin: 0 0 1em; }

.post-media figure {
  margin: 0 0 1rem;
}

.post-media img,
.post-media video {
  display: block;
  width: 100%;
  height: auto;
}

.zoomable img { cursor: zoom-in; }
.zoomable img:active { opacity: 0.7; }

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

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 0 var(--pad) 1.2rem;
  max-width: 1600px;
  margin: 0 auto;
  font-size: 0.75rem;
  color: var(--swatch-4);
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img,
.lightbox video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox video { cursor: default; }

.lightbox .close {
  position: absolute;
  top: 1rem;
  right: 1.4rem;
  font-size: 1.6rem;
  color: var(--swatch-2);
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  padding: 0.2rem;
}

/* ---- mobile ------------------------------------------------ */

@media (max-width: 720px) {
  .feed {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  body { font-size: 0.8rem; }

  .wordmark { font-size: 2.4rem; }

  .lightbox { padding: 10px; }
}
