/* ==================================================================
   PROJECTS PAGE — one project at a time, no frame. The corner-motif
   pair (top-left + bottom-left, global.css) decorates the page edge;
   .projects__content sits directly on the page background, inset
   from the left so its text never runs under the florals. Type sizes
   below are matched to the CV page's (.cv__entry-title / body text)
   rather than a bespoke scale, per brief.
================================================================== */

.projects {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--nav-height) + clamp(1.5rem, 4vh, 3rem)) var(--gutter) clamp(1.5rem, 4vh, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vh, 2rem);
}

.projects__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- CONTENT — sits directly on the page background (no
   frame, no card). Inset from the left so text clears the top-left/
   bottom-left corner-motif florals (global.css, up to 260px wide);
   right side just uses the normal page gutter. ---------- */
.projects__content {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3%, 2.25rem) var(--gutter) clamp(1.5rem, 3%, 2.25rem) clamp(200px, 24vw, 300px);
}

.projects__meta {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
  flex-shrink: 0;
}
.projects__dot { margin: 0 0.5em; color: var(--muted); }
.projects__date { color: var(--muted); }

.projects__title {
  /* matches .cv__entry-title (cv.css) so a project title reads at
     the same size as a CV entry title, not its own bespoke scale */
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 clamp(0.75rem, 2vh, 1.25rem);
  flex-shrink: 0;
}

.projects__body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.projects__description {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 0.5rem;
}
.projects__description p {
  /* matches the CV page's body copy (.cv__bullets li inherits the
     1rem base rather than setting its own size) */
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
}

.projects__media {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.projects__image {
  flex: 1;
  min-height: 0;
  background-color: var(--line);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
}
.projects__tags {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 1.25rem;
}
.projects__type {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.projects__role {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- NAVIGATOR — prev / dots / next ----------
   Two states only, one accent colour: unselected dots are a hollow
   ring (border, no fill); the active project's dot fills solid
   burgundy. Clicking any dot jumps straight there — with 5 dots,
   project 1 → project 5 is one click via "prev", not three "next"s. */
.projects__nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 1.75rem);
}
.projects__arrow {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--dur-med) var(--ease-editorial), color var(--dur-med) var(--ease-editorial);
}
.projects__arrow:hover,
.projects__arrow:focus-visible {
  border-color: var(--burgundy);
  color: var(--burgundy);
}
.projects__dots {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.projects__dot-btn {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background-color var(--dur-med) var(--ease-editorial),
              border-color var(--dur-med) var(--ease-editorial),
              transform var(--dur-med) var(--ease-editorial);
}
.projects__dot-btn:hover,
.projects__dot-btn:focus-visible {
  border-color: var(--burgundy);
}
.projects__dot-btn.is-active {
  background: var(--burgundy);
  border-color: var(--burgundy);
  transform: scale(1.2);
}

/* Visually-hidden live region announcing the current project to
   screen readers on every navigate. */
.projects__sr-status {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==================================================================
   MOBILE — no room for the left-side corner florals or a two-column
   body at readable sizes, so below 900px: motifs hidden, content
   falls back to the plain gutter inset, single column.
================================================================== */
@media (max-width: 900px) {
  .projects__stage { justify-content: center; }
  .corner-motif--tl,
  .corner-motif--bl { display: none; }
  .projects__content { padding: 0 var(--gutter); }
  .projects__body { grid-template-columns: 1fr; gap: 1.5rem; }
  .projects__description { overflow-y: visible; padding-right: 0; }
  .projects__image { aspect-ratio: 16 / 10; flex: none; }
}