/* ==========================================================================
   Homepage
   First block: phone layout (under 900px). Second block: desktop, on the same
   1440px canvas as the rest of the site (1rem = 10px at 1440px wide).
   Top of the page as on Wix Studio: the opening video, the contact line and
   the three upcoming works. Below, the portfolio: the works newest first along
   a black timeline (the year sits in the black line), photo on one side, title
   and dates on the other. The version before this one is kept in
   drafts/home-before-redesign/.
   ========================================================================== */

/* ---------- Phone ---------- */

main { padding-top: 0; }   /* the header floats over the mint contact band (the video above it is gone) */

.hero { position: relative; aspect-ratio: 1440 / 853; background: var(--black); overflow: hidden; }
.hero video { width: 100%; height: 100%; object-fit: cover; }

.intro {
  background: var(--mint);
  padding: calc(var(--header-h) + 1.8rem) 1.6rem 2rem;   /* the mint reaches up behind the header */
  font-size: 1.5rem;
  line-height: 1.6;
}
.intro a { text-decoration: none; }

.upcoming {
  display: grid;
  justify-items: center;
  gap: 4rem;
  padding: 3.6rem 1.6rem 4.4rem;
}
.up { width: min(26.2rem, 100%); }
.up .photo-link { display: block; }
.up img { width: 100%; height: auto; aspect-ratio: 262 / 318; object-fit: cover; }

/* Items without a photo keep an empty space where it would be, so the
   three titles stay on one line (except on phones, where it's just text). */
@media (min-width: 560px) and (max-width: 899px) {
  .upcoming { grid-template-columns: repeat(3, 1fr); align-items: start; gap: 2rem; }
  .up { width: 100%; }
  .up--no-img::before { content: ""; display: block; aspect-ratio: 262 / 318; }
}
.up h2 { margin-top: 0.8rem; }

/* ---------- Portfolio: the timeline ---------- */

.works {
  --year-w: 4.4rem;        /* width of the black line */
  --gap: 1.4rem;
  padding: 4rem 1.6rem 6rem;
  background: var(--white);
}

/* "PORTFOLIO" in a black bar that runs from the edge of the page into the line */
.works-head a,
.works-foot a {
  display: flex;
  align-items: center;
  height: 4.4rem;
  background: var(--black);
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-decoration: none;
}
.works-head a { width: calc(100% + 3.2rem); margin-left: -1.6rem; padding-left: calc(1.6rem + var(--year-w) + var(--gap)); }
.works-foot a { width: calc(100% + 1.6rem); padding-left: calc(var(--year-w) + var(--gap)); letter-spacing: 0.08em; }
.works-head a::after, .works-foot a::after { content: "→"; margin-left: 0.6em; letter-spacing: 0; transition: transform 0.2s; }
.works-head a:hover::after, .works-foot a:hover::after { transform: translateX(0.3em); }

.tl { position: relative; }
.tl::before {                                   /* the black line */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--year-w);
  background: var(--black);
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--year-w) minmax(0, 1fr);
  grid-template-areas: "year photo" "year text";
  column-gap: var(--gap);
  padding: 2.8rem 0 1.6rem;
}
.tl-year {
  grid-area: year;
  padding-top: 0.2rem;
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}
.tl-photo { grid-area: photo; display: block; }
.tl-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: opacity 0.2s; }
.tl-text { grid-area: text; padding-top: 1.2rem; }

/* ---------- Work captions: one style next to every work photo ---------- */

.up h2, .tl-text h3 {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.25;
}
.up p, .tl-text p {
  margin-top: 0.5rem;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.4;
}
.up h2 a, .tl-text h3 a, .up p a { color: inherit; text-decoration: none; }
.up p a { text-decoration: underline; text-underline-offset: 0.2em; }

/* A title with its own page (set by js/works.js): underlined, with an arrow
   that moves on hover. Titles without a page yet stay plain. */
.up h2 a.has-page, .tl-text h3 a.has-page {
  text-decoration: underline;
  text-decoration-thickness: 0.1rem;
  text-underline-offset: 0.2em;
}
.up h2 a.has-page::after, .tl-text h3 a.has-page::after {
  content: "→";
  display: inline-block;
  margin-left: 0.35em;
  transition: transform 0.2s;
}
h2 a.has-page:hover::after, h3 a.has-page:hover::after,
h2 a.has-page:focus-visible::after, h3 a.has-page:focus-visible::after { transform: translateX(0.3em); }

/* The photos open the work page too */
.photo-link img { transition: opacity 0.2s; }
.photo-link.has-page:hover img { opacity: 0.85; }

/* ---------- Desktop (900px and wider) ---------- */

@media (min-width: 900px) {

  .hero { aspect-ratio: auto; height: 85.3rem; }

  .intro {
    height: calc(14.4rem + var(--header-h));
    padding: calc(var(--header-h) + 2.9rem) 0 0 5.7rem;
    font-size: 1.8rem;
    line-height: 2.88rem;
  }

  /* Upcoming: three columns (tall enough for every line of text) */
  .upcoming {
    min-height: 45.4rem;
    display: grid;
    grid-template-columns: repeat(3, 43.6rem);
    justify-items: start;
    align-items: start;
    gap: 0 1.95rem;
    padding: 0 0 6.4rem 4.5rem;
  }
  .up { width: auto; }
  .up img { width: 26.2rem; height: 31.8rem; aspect-ratio: auto; margin: 4.5rem 0 0 8.7rem; }
  .up--no-img::before { content: ""; display: block; height: 36.3rem; aspect-ratio: auto; }
  .up h2 { margin: 0.6rem 0 0 7.9rem; }
  .up p { margin-left: 7.9rem; width: 35.8rem; }

  /* Portfolio: photo | black line with the year | title and dates */
  .works {
    --photo-w: 52rem;
    --year-w: 5.7rem;
    --gap: 3.2rem;
    padding: 6.4rem 5.7rem 12rem;
  }
  .works-head a, .works-foot a { height: 5.7rem; font-size: 1.5rem; }
  .works-head a {
    width: calc(var(--photo-w) + var(--gap) + var(--year-w) + 5.7rem);
    margin-left: -5.7rem;
    padding-left: 5.7rem;
  }
  .works-foot a {
    width: auto;
    margin: 0 -5.7rem 0 calc(var(--photo-w) + var(--gap));
    padding-left: calc(var(--year-w) + var(--gap));
  }

  .tl::before { left: calc(var(--photo-w) + var(--gap)); }
  .tl-item {
    grid-template-columns: var(--photo-w) var(--year-w) minmax(0, 1fr);
    grid-template-areas: "photo year text";
    padding: 4.8rem 0;
  }
  .tl-item:first-child { padding-top: 5.6rem; }
  .tl-item:last-child { padding-bottom: 5.6rem; }
  .tl-year { padding-top: 0.6rem; font-size: 1.6rem; }
  .tl-text { max-width: 52rem; padding-top: 0; }

  /* Work captions: same size everywhere on desktop */
  .up h2, .tl-text h3 { font-size: 2.2rem; }
  .up p, .tl-text p { margin-top: 0.6rem; font-size: 1.7rem; }
}

/* Upcoming (Johhan, 26 Nov 2026): three works in view; when there are more, the row scrolls sideways — swipe,
   trackpad, or the arrows top right (js/home.js shows them only when there is more to see). Phones keep the list. */
.upcoming-wrap { position: relative; }
.up-arrows { position: absolute; z-index: 2; top: 0.8rem; right: 1.6rem; display: flex; }
.up-arrows[hidden] { display: none; }
.up-arrows button { padding: 0.4rem 0.6rem; font: inherit; font-size: 1.8rem; line-height: 1; color: #000; background: none; border: 0; cursor: pointer; }
.up-arrows button:disabled { color: #c4c4c4; cursor: default; }
@media (min-width: 560px) {
  .upcoming { display: flex; align-items: flex-start; overflow-x: auto; overscroll-behavior-x: contain;
              scroll-snap-type: x mandatory; scrollbar-width: none; }
  .upcoming::-webkit-scrollbar { display: none; }
  .upcoming > .up { scroll-snap-align: start; }
}
@media (min-width: 560px) and (max-width: 899px) {
  .upcoming { scroll-padding-left: 1.6rem; }
  .upcoming > .up { flex: 0 0 calc((100% - 4rem) / 3); }
}
@media (min-width: 900px) {
  .upcoming { scroll-padding-left: 4.5rem; }
  .upcoming > .up { flex: 0 0 43.6rem; }
  .upcoming::after { content: ""; flex: 0 0 2.6rem; }   /* room after the last one */
  .up-arrows { top: 1.6rem; right: 4.5rem; }
}

/* a line that should not break (rural visits: "Performance for Matīss Rucko’s exhibition opening") */
@media (min-width: 560px) { .up-one-line { white-space: nowrap; } }

/* ---------- Portfolio as a grid (Johhan, 29 Nov 2026, after Jefta van Dinther's "Works" page) ----------
   "Works" on the left, the works in four columns of upright pictures (4:5), the title and the year under each.
   The timeline styles above are no longer used (kept for drafts/home-before-works-grid/). */
.wg { padding: 4rem 1.6rem 6rem; background: var(--white); }
.wg-head { margin: 0 0 2rem; font-size: 1.6rem; font-weight: 400; line-height: 1.3; }
.wg-head a { color: inherit; text-decoration: none; }
.wg-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.8rem 1.2rem; margin: 0; padding: 0; list-style: none; }
.wg-photo { display: block; overflow: hidden; }
.wg-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 0.6s ease; }
.wg-photo:hover img { transform: scale(1.03); }
.wg-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0.9rem 0 0; font-size: 1.35rem; line-height: 1.3; }
.wg-cap a { color: inherit; text-decoration: none; }
.wg-cap a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.wg-year { flex: none; font-variant-numeric: tabular-nums; }

@media (min-width: 900px) {
  .wg { display: grid; grid-template-columns: 24.8rem minmax(0, 1fr); align-items: start; padding: 4rem 2.2rem 9rem 4rem; }
  .wg-head { margin: 0; }
  .wg-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4rem 2.2rem; }
  .wg-cap { font-size: 1.45rem; }
}

/* ---------- Bio (Johhan, 29 Nov 2026): between Upcoming and the works, on the same columns as the works grid ---------- */
.bio { padding: 4rem 1.6rem 0; background: var(--white); }
.bio-head { margin: 0 0 2rem; font-size: 1.6rem; font-weight: 400; line-height: 1.3; }
.bio-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.bio-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.bio-text p { margin: 0 0 1em; font-size: 1.5rem; line-height: 1.4; }
.bio-text .bio-credit { margin-top: 2em; font-size: 1.2rem; opacity: 0.6; }

@media (min-width: 900px) {
  .bio { display: grid; grid-template-columns: 24.8rem minmax(0, 1fr); align-items: start; padding: 6rem 2.2rem 0 4rem; }
  .bio-head { margin: 0; }
  .bio-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.2rem; }
  .bio-text { grid-column: 2 / span 2; max-width: 56rem; }
  .bio-text p { font-size: 1.9rem; line-height: 1.35; }
  .bio-text .bio-credit { font-size: 1.3rem; }
}

/* ---------- Works as cards (Johhan, 29 Nov 2026): three columns of white cards, picture on top, bold title, year ----------
   (overrides the four-column upright grid above) */
.wg-list { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
.wg-item { display: flex; flex-direction: column; background: #fff; box-shadow: 0 0.2rem 1.4rem rgba(0, 0, 0, 0.08); }
.wg-photo img { aspect-ratio: 3 / 2; }
.wg-cap { display: block; margin: 0; padding: 1.6rem 1.6rem 3.2rem; }
.wg-cap a { display: block; font-size: 2rem; font-weight: 700; line-height: 1.2; }
.wg-cap .wg-year { display: block; margin-top: 0.6rem; font-size: 1.4rem; font-weight: 700; }
.wg-item:hover .wg-cap a { text-decoration: underline; text-underline-offset: 0.15em; }

@media (min-width: 560px) {
  .wg-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .wg-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.2rem; }
  .wg-cap { padding: 2.2rem 2.2rem 6rem; font-size: inherit; }
  .wg-cap a { font-size: 2.6rem; }
  .wg-cap .wg-year { font-size: 1.7rem; }
}

/* ---------- Works lined up with Upcoming (Johhan, 29 Nov 2026; the bio keeps its own layout: "Bio" on the left) ----------
   Every column starts where an Upcoming title and picture start. Desktop: Upcoming's columns are 43.6rem from 4.5rem
   with 1.95rem between, the title 7.9rem in → columns at 12.4, 57.95 and 103.5rem, each 35.8rem (the title's width).
   Tablet: the same three columns as Upcoming. Phones: one column, 26.2rem wide and centred, like Upcoming's pictures.
   "All works" and "Archive" in bold on the right, above the cards. */
.wg-tabs { display: flex; justify-content: flex-end; gap: 2.4rem; margin: 0 0 2rem; font-size: 1.6rem; font-weight: 700; }
.wg-tabs a { color: inherit; text-decoration: none; }
.wg-tabs a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

@media (max-width: 559px) {
  .wg-list { justify-items: center; }
  .wg-item { width: min(26.2rem, 100%); }
  .wg-tabs { width: min(26.2rem, 100%); margin-left: auto; margin-right: auto; }
}
@media (min-width: 560px) and (max-width: 899px) {
  .wg-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
}
@media (min-width: 900px) {
  .wg { display: block; padding: 4rem 0 9rem 12.4rem; }
  .wg-list { grid-template-columns: repeat(3, 35.8rem); column-gap: 9.85rem; }   /* Upcoming measured: titles at 12.4, 58.05, 103.7rem */
  .wg-list { row-gap: 4rem; }
  .wg-tabs { width: 127.1rem; margin-bottom: 2.4rem; font-size: 1.8rem; }
}

/* Bio photo a little smaller (Johhan, 29 Nov 2026): 21rem instead of a full works column (26.6rem); the text follows it */
.bio-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
@media (min-width: 900px) {
  .bio-row { grid-template-columns: 21rem minmax(0, 56rem); gap: 3.2rem; }
  .bio-text { grid-column: auto; }
}

/* "All works" and "Archive" (Johhan, 29 Nov 2026): the same style as the "Bio" label, a little bolder, on the right,
   one under the other */
.wg-tabs { flex-direction: column; align-items: flex-start; gap: 0.2rem; width: max-content; margin: 0 0 2.4rem auto;
           font-size: 1.6rem; font-weight: 600; line-height: 1.3; }
@media (max-width: 559px) { .wg-tabs { margin-right: max(0px, calc((100% - 26.2rem) / 2)); } }
@media (min-width: 900px) {
  .wg-tabs { width: max-content; margin: 0 4.5rem 2.4rem auto; font-size: 1.6rem; }   /* right edge on Upcoming's last line (139.5rem) */
}

/* "All works" / "Archive" on the left where "Bio" is, one under the other; "Bio" bold too (Johhan, 29 Nov 2026) */
.bio-head { font-weight: 600; }
.wg-tabs { margin: 0 0 2rem; }
@media (max-width: 559px) { .wg-tabs { margin-right: 0; } }
@media (min-width: 900px) {
  .wg { position: relative; }
  .wg-tabs { position: absolute; left: 4rem; top: 4rem; margin: 0; }   /* the "Bio" label's left line; level with the first cards */
}

/* Bio text smaller; the work cards' titles in the bio's font instead of the heavy bold (Johhan, 29 Nov 2026) */
.bio-text p { font-size: 1.4rem; }
.wg-cap a { font-weight: 400; font-size: 1.7rem; line-height: 1.3; }
.wg-cap .wg-year { font-weight: 400; font-size: 1.4rem; }
@media (min-width: 900px) {
  .bio-text p { font-size: 1.6rem; line-height: 1.4; }
  .wg-cap a { font-size: 2rem; }
  .wg-cap .wg-year { font-size: 1.5rem; margin-top: 0.4rem; }
}

/* Bio: the photos lie on top of each other and fade into one another every 10 s (js/bio-photos.js) */
.bio-photos { display: grid; align-self: start; }
.bio-photos .bio-photo { grid-area: 1 / 1; opacity: 0; transition: opacity 1.2s ease; }
.bio-photos .bio-photo.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .bio-photos .bio-photo { transition: none; } }

/* ---------- Work column (js/work-panel.js; Johhan, 29 Nov 2026): a click on a work opens its facts on the right ---------- */
.wp { position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: 100%; overflow-y: auto; overscroll-behavior: contain;
      padding: calc(var(--header-h) + 1.6rem) 1.6rem 6rem; background: #fff; box-shadow: -0.4rem 0 2.4rem rgba(0, 0, 0, 0.12);
      transform: translateX(100%); transition: transform 0.35s ease; }
.wp.is-open { transform: none; }
.wp-close { position: absolute; top: calc(var(--header-h) + 0.4rem); right: 1.2rem; padding: 0.4rem 0.8rem; border: 0; background: none;
            font: 300 3.2rem/1 var(--sans); color: #000; cursor: pointer; }
.wp-title { margin: 0; font-size: 3rem; font-weight: 400; line-height: 1.1; }
.wg-item.is-current .wg-cap a { color: #e8382c; }
@media (min-width: 900px) {
  .wp { width: 62rem; padding: calc(var(--header-h) + 2.4rem) 4rem 8rem 4rem; }
  .wp-close { right: 2.4rem; }
  .wp-title { font-size: 4.4rem; }
}
@media (prefers-reduced-motion: reduce) { .wp { transition: none; } }

/* Bio on the right side of the page (Johhan, 29 Nov 2026): the block ends where the right column of work cards ends
   (139.5rem). The photo is centred above the middle card (58.05–93.85rem, centre 75.95rem → photo 65.45–86.45rem),
   not lined up with its edge ("dont align these photos"). The "Bio" label stays on the left. */
@media (min-width: 900px) {
  .bio-row { grid-template-columns: 21rem minmax(0, 49.85rem); justify-content: end; margin-right: 2.3rem; }
  .bio-text { max-width: none; }
}
/* the column starts under the header bar, so the home and menu buttons stay clear of it */
.wp { top: var(--header-h); padding-top: 1.6rem; }
.wp-close { top: 0.6rem; }
@media (min-width: 900px) { .wp { padding-top: 2.4rem; } .wp-close { top: 1.4rem; } }

/* "Upcoming works" label, same style as "Bio" (Johhan, 29 Nov 2026). Desktop: in the left margin, level with the top
   of the photos; white behind it so a work sliding past (when the row scrolls) goes under it. */
.up-head { margin: 0; padding: 3.6rem 1.6rem 0; font-size: 1.6rem; font-weight: 600; line-height: 1.3; }
@media (max-width: 899px) { .upcoming-wrap .upcoming { padding-top: 2rem; } }
@media (min-width: 900px) {
  .up-head { position: absolute; z-index: 1; left: 4rem; top: 4.5rem; width: 8rem; padding: 0; background: var(--white); }
}

/* Facts on each work card, minimal (Johhan, 29 Nov 2026: "premiere date, authors' names, venue and year" — then
   "dont make the white square bigger then it was. just content and design can be more minimal"). The year line shows
   the premiere date (it carries the year); under it one small line for the venue and the makers' names (roles and the
   full credits are in the column that opens on click). On desktop the white part keeps its old height, 13.15rem. */
.wg-facts { margin: 0; padding: 0 1.6rem 2.4rem; font-size: 1.2rem; line-height: 1.35; }
.wg-cap { padding-bottom: 0.6rem; }
.wg-names { color: #7a7a7a; }
@media (min-width: 900px) {
  .wg-cap { padding: 2.2rem 2.2rem 0.6rem; }
  .wg-facts { box-sizing: border-box; height: 5.4rem; overflow: hidden; padding: 0 2.2rem; font-size: 1.2rem; }
}

/* Bio placed by Johhan with the mouse (29 Nov 2026, drafts/bio-place-2026-11-29.json): photo at 44.9rem, text from
   67.0rem, 73rem wide, both 2.3rem higher than before; the "Bio" label where it was. The cards below stay where they
   were (the 2.3rem goes under the row). Replaces the "bio on the right" placement above. */
@media (min-width: 900px) {
  .bio-row { grid-template-columns: 21rem 73rem; column-gap: 1.1rem; justify-content: start;
             margin: -2.3rem 0 2.3rem 16.1rem; }
  .bio-text { max-width: none; }
}
/* TRIBUNAL card: no page yet, the click opens the info column (data-panel) */
.wg-item [data-panel] { color: inherit; text-decoration: none; cursor: pointer; }

/* Work column v4 (Johhan, 29 Nov 2026: "the same info and pictures as in the archive"): the column shows the work's
   whole archive card. Its look comes from archive/style.css (js/work-panel.js applies every .og-… rule there inside
   .wp); these lines only give the column what the archive page itself gives its cards. */
.wp { --ink: #111; --muted: #6f6f6f; color: var(--ink); }
.wp a { color: inherit; }
.wp img { object-fit: cover; }
.wp .wp-in > .og-card { box-shadow: none; }   /* stronger than the archive's own card rule, which is added later */
.wp .og-card .og-head { width: auto; margin-right: 4.4rem; }   /* room for the × */
@media (min-width: 900px) {
  .wp { width: 62rem; padding-left: 3rem; padding-right: 3rem; }   /* the archive card is 55.3rem wide */
}
.wp-view { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
           padding: 4rem 2rem; background: rgba(255, 255, 255, 0.97); cursor: zoom-out; }
.wp-view[hidden] { display: none; }
.wp-view img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.wp-view-close { position: absolute; top: 1rem; right: 1.6rem; padding: 0.4rem 0.8rem; border: 0; background: none;
                 font: 300 3.2rem/1 var(--sans); color: #000; cursor: pointer; }

/* Arrow at the end of the portfolio to the full list (Johhan, 29 Nov 2026). Right edge of the cards. */
.wg-end { margin: 3.2rem auto 0; width: min(26.2rem, 100%); text-align: right; font-size: 1.8rem; font-weight: 600; line-height: 1.2; }
.wg-end a { color: inherit; text-decoration: none; }
.wg-end a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.wg-end-arrow { display: inline-block; margin-left: 0.3em; font-size: 1.4em; font-weight: 400; transition: transform 0.2s; }
.wg-end a:hover .wg-end-arrow { transform: translateX(0.3em); }
@media (min-width: 560px) { .wg-end { width: auto; margin: 3.2rem 0 0; } }
@media (min-width: 900px) { .wg-end { width: 127.1rem; margin-top: 4rem; font-size: 2rem; } }
/* Small arrows after the Archive / All works tabs, so they read as links forward (Johhan, 29 Nov 2026). Same arrow as
   at the end of the portfolio, lighter and smaller than the words. */
.wg-tabs a::after { content: "→"; display: inline-block; margin-left: 0.35em; font-weight: 400; font-size: 0.9em; transition: transform 0.2s; }
.wg-tabs a:hover::after { transform: translateX(0.25em); }
/* A work with no photo yet (Teemantkasukas): the title set as the picture, same 3:2 box */
.wg-type { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; padding: 1.6rem; background: #111; color: #fff;
           font-size: 2.2rem; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
@media (min-width: 900px) { .wg-type { font-size: 3rem; } }

/* 4 work cards in a row on desktop (Johhan, 29 Nov 2026: "how would it look if there are 4 pictures in 1 row" — then
   "i still see 3 works in a row", so 4 is now the default). Same span as the 3 columns had (12.4–139.5rem): 4 cards of
   28.78rem with 4rem between them; type a little smaller so long titles stay on one line and every card keeps the same
   height. The old 3 in a row can still be seen with ?cols=3 in the address (html.cols3). */
@media (min-width: 900px) {
  html:not(.cols3) .wg-list { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 127.1rem; column-gap: 4rem; row-gap: 4rem; }
  html:not(.cols3) .wg-cap { padding: 1.8rem 1.8rem 0.5rem; }
  html:not(.cols3) .wg-cap a { font-size: 1.8rem; }
  html:not(.cols3) .wg-cap .wg-year { font-size: 1.4rem; }
  html:not(.cols3) .wg-facts { padding: 0 1.8rem; height: 4.6rem; font-size: 1.15rem; }
  html:not(.cols3) .wg-type { font-size: 2.4rem; }
}

/* At most 12 works on the homepage, newest first (Johhan, 29 Nov 2026: "max 12 works… if each new work is coming on top
   the oldest leaves the homepage"). Older ones stay in the HTML list and on the All works page. */
.wg-list > .wg-item:nth-child(n+13) { display: none; }

/* ---------- Work (Johhan, 1 Dec 2026): the All works page's grid is now the homepage portfolio ----------
   Same look as work/work-index.css: the label on the left, upright 4:5 pictures in four columns (two on phones),
   title left and year right under each, a slow 3% zoom on hover. Own class names (wa-*), so none of the earlier
   card rules (.wg-*) apply. The label in the homepage's label style (bold, like "Bio" and "Upcoming"). */
.wa { padding: 4rem 1.6rem 6rem; background: var(--white); scroll-margin-top: var(--header-h); }
.wa-side { margin: 0 0 2rem; }
.wa-head { margin: 0; font-size: 1.6rem; font-weight: 600; line-height: 1.3; }
.wa-tabs { margin-top: 0.4rem; font-size: 1.6rem; font-weight: 600; line-height: 1.3; }
.wa-tabs a { color: inherit; text-decoration: none; }
.wa-tabs a::after { content: "→"; display: inline-block; margin-left: 0.35em; font-weight: 400; font-size: 0.9em; transition: transform 0.2s; }
.wa-tabs a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.wa-tabs a:hover::after { transform: translateX(0.25em); }
.wa-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.8rem 1.2rem; margin: 0; padding: 0; list-style: none; }
.wa-photo { display: block; overflow: hidden; background: #eee; }
.wa-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 0.6s ease; }
.wa-photo:hover img { transform: scale(1.03); }
.wa-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0.9rem 0 0; font-size: 1.35rem; line-height: 1.3; }
.wa-cap a { color: inherit; text-decoration: none; }
.wa-cap a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.wa-year { flex: none; font-variant-numeric: tabular-nums; }
.wa-item.is-current .wa-cap a { color: #e8382c; }
.wa-list > .wa-item:nth-child(n+13) { display: none; }   /* at most 12, newest first (Johhan, 29 Nov 2026) */
@media (min-width: 900px) {
  .wa { display: grid; grid-template-columns: 24.8rem minmax(0, 1fr); align-items: start; padding: 6rem 2.2rem 12rem 4rem; }
  .wa-side { margin: 0; }
  .wa-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4rem 2.2rem; }
  .wa-cap { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) { .wa-photo img { transition: none; } .wa-photo:hover img { transform: none; } }

/* The panel's title leads to the work's own page; a small arrow says so (1 Dec 2026) */
.wp .og-title a::after, .wp .wp-title a::after { content: "\2009\2192"; }

/* Bio on its own soft green, another tone of the mint at the very top (Johhan, 2 Dec 2026: "anna Biole õrn teine tonaalsus
   selles rohekast, mis on kõige üleval"): the top is a bluish mint (#e7f5f2), the bio a warmer pale sage; a little room under it */
.bio { background: #ecf4e8; padding-bottom: 4rem; }
@media (min-width: 900px) { .bio { padding-bottom: 6rem; } }
