/* pages.css: reading pages (projects, case studies, about).
   Same pixel language as the rest of my-place: square corners, hard
   zero-blur shadows, wood and parchment tokens, Press Start 2P for headings.
   Body text uses the system font at 18px: a recruiter skims this on a phone. */

body.page {
  --text: var(--parchment-light);
  --muted: var(--parchment);
  --link: var(--fire-yellow);
  --sheet: var(--wood-1);
  --card: var(--wood-0);
  min-height: 100%;
  padding: 0 16px 32px;
  color: var(--text);
  font: 18px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

.page a { color: var(--link); text-underline-offset: 3px; }
.page a:hover { color: var(--fire-white); }
.page a:focus-visible { outline: 3px solid var(--fire-white); outline-offset: 3px; }
.page .sign { color: var(--parchment-light); text-decoration: none; }

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  padding: 8px 12px;
  background: var(--parchment-light);
  color: var(--wood-0) !important;
  z-index: 2;
}
.skip:focus { top: 8px; }

/* --- top bar ------------------------------------------------------------- */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 0;
}

.topbar ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font: 11px/1 var(--font-title);
  color: var(--parchment);
  text-decoration: none;
}

.topbar nav a[aria-current="page"] {
  color: var(--wood-0);
  background: var(--fire-yellow);
  box-shadow: 0 0 0 2px var(--wood-0);
}

/* --- the sheet ----------------------------------------------------------- */
.sheet {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px);
  background: var(--sheet);
  box-shadow:
    inset 0 3px 0 0 var(--wood-2),
    0 0 0 3px var(--wood-0),
    6px 6px 0 3px rgb(0 0 0 / 0.5);
}

.sheet h1,
.sheet h2,
.sheet h3 {
  font-family: var(--font-title);
  font-weight: normal;
  line-height: 1.5;
  color: var(--fire-yellow);
}

.sheet h1 { margin: 0 0 12px; font-size: clamp(18px, 4.5vw, 26px); }
.sheet h2 { margin: 40px 0 12px; font-size: 14px; }
.sheet h3 { margin: 0 0 6px; font-size: 12px; color: var(--parchment-light); }

.sheet p { margin: 0 0 14px; max-width: 70ch; }
.lead { font-size: 20px; color: var(--text); }
.note, .meta, .when { color: var(--muted); font-size: 16px; }

.list { margin: 0 0 14px; padding-left: 1.2em; max-width: 70ch; }
.list li { margin-bottom: 6px; }
.list li::marker { color: var(--fire-orange); }

/* --- cards ---------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;      /* the whole card is clickable through .card__link */
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  background: var(--card);
  box-shadow: 0 0 0 3px var(--wood-0), 0 0 0 6px var(--wood-2);
}

.card:hover { box-shadow: 0 0 0 3px var(--wood-0), 0 0 0 6px var(--fire-orange); }
.card:focus-within { box-shadow: 0 0 0 3px var(--wood-0), 0 0 0 6px var(--fire-white); }
.card__body { padding: 16px; }
.card h2 { margin: 6px 0 8px; font-size: 14px; }
.card .tagline { margin-bottom: 12px; }

.card__link { color: var(--fire-yellow); text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; }
.card__link:focus-visible { outline: none; }

/* --- the project window: a pixel window onto the live site ------------- */
.window {
  position: relative;
  z-index: 1;                 /* above the card's whole-card link */
  background: var(--wood-3);
  box-shadow: inset 0 0 0 3px var(--wood-0);
  padding: 3px;
}

.window__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  background: var(--wood-2);
  box-shadow: inset 0 -3px 0 var(--wood-0);
}

.window__bar i {
  width: 8px;
  height: 8px;
  background: var(--wood-0);
}
.window__bar i:first-child { background: var(--fire-red); }

.window__url {
  margin-left: 6px;
  overflow: hidden;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--parchment-light);
}

.window__pane {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 7;
  background: var(--night-0);
  overflow: hidden;
}

/* a few stepped stars, like the cabin window */
.window__pane::before {
  content: "";
  position: absolute;
  left: 12%;
  top: 22%;
  width: 3px;
  height: 3px;
  background: var(--fire-white);
  box-shadow:
    60px 14px 0 var(--parchment), 140px -6px 0 var(--fire-white),
    210px 30px 0 var(--parchment), 30px 60px 0 var(--parchment),
    250px 70px 0 var(--fire-white), 180px 84px 0 var(--parchment);
}

.window__go { position: relative; }
.window__soon {
  margin: 0;
  font: 11px/1.6 var(--font-title);
  color: var(--parchment);
}

.study .window { margin: 8px 0 24px; }

/* --- gallery: pages of a design project ------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 24px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.gallery figure { margin: 0; }
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 0 0 3px var(--wood-0);
}
.gallery a:focus-visible img { outline: 3px solid var(--fire-white); outline-offset: 3px; }
.gallery figcaption { margin-top: 8px; color: var(--muted); font-size: 16px; }

.status--finished    { color: var(--wood-0); background: var(--parchment-light); }

/* --- chips and badges -------------------------------------------------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 2px 8px;
  font-size: 15px;
  color: var(--parchment-light);
  background: var(--forest);
  box-shadow: 0 0 0 2px var(--wood-0);
}

.status {
  display: inline-block;
  margin-right: 8px;
  padding: 3px 6px;
  font: 9px/1.4 var(--font-title);
  vertical-align: 1px;
  box-shadow: 0 0 0 2px var(--wood-0);
}
.status--live        { color: var(--wood-0); background: var(--fire-yellow); }
.status--in-progress { color: var(--wood-0); background: var(--parchment); }
.status--archived    { color: var(--parchment-light); background: var(--wood-2); }

/* --- case study ---------------------------------------------------------- */
.crumb { margin-bottom: 16px; font-size: 16px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 8px;
  padding: 0;
  list-style: none;
}

.decisions { margin: 0; display: grid; gap: 12px; }
.decisions div {
  display: grid;
  grid-template-columns: minmax(0, 15em) minmax(0, 1fr);
  gap: 4px 20px;
  padding: 12px 14px;
  background: var(--card);
}
.decisions dt { font-weight: 700; color: var(--parchment-light); }
.decisions dd { margin: 0; color: var(--text); }

@media (max-width: 640px) {
  .decisions div { grid-template-columns: 1fr; }
}

/* --- about --------------------------------------------------------------- */
.avail {
  padding: 12px 14px;
  background: var(--forest);
  box-shadow: 0 0 0 3px var(--wood-0);
}

.timeline { margin: 0; padding: 0; list-style: none; display: grid; gap: 20px; }
.timeline > li { padding-left: 16px; box-shadow: inset 3px 0 0 var(--wood-3); }
.timeline .when { margin: 0 0 2px; }

/* --- footer -------------------------------------------------------------- */
.foot { max-width: 960px; margin: 20px auto 0; color: var(--muted); font-size: 16px; }

@media print {
  body.page { background: #fff; color: #000; padding: 0; }
  .topbar, .skip, .actions, .foot { display: none; }
  .sheet { box-shadow: none; background: none; padding: 0; }
  .sheet h1, .sheet h2, .sheet h3, .decisions dt, .page a { color: #000; }
  .decisions div, .avail, .tags li { background: none; box-shadow: none; color: #000; padding-left: 0; }
}
