/* CTRL+ALT — project pages (loaded after home.css, reuses its tokens and .win styles)
   Layout after tastbaar.studio/projects: a fixed back button, the big title fixed on
   top (inverting what passes under it, see home.css) and a column of windows. Here the column sits on the left,
   with a quick-links menu fixed in the bottom-right corner. */

body.project {
  --col: min(600px, 50vw);   /* width of the scrolling column */
  --col-left: var(--pad);    /* distance from the left edge (240px on wide displays, below) */
  overflow-y: auto;
  height: auto;
}

/* wide displays: column starts 240px from the left */
@media (min-width: 1200px) {
  body.project { --col-left: 240px; }
}

.back {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 2000;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  padding: 4px 10px;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 6px 12px;
  font: 14px/18px var(--mono);
}
.back:hover { background: var(--ink); color: #fff; }

.column {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  width: calc(var(--col-left) + var(--col));
  padding: 120px 0 160px var(--col-left);
}

.project .win {
  position: relative;
  width: 100%;
  cursor: default;
  user-select: text;
  touch-action: auto;
}

.project .win img,
.project .win video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  pointer-events: auto;
}

/* the homepage window you clicked morphs into this one */
.win--hero { view-transition-name: project-hero; }

.win__body ul,
.win__body ol {
  margin: 10px 0 0;
  padding-left: 18px;
}
.win__body li + li { margin-top: 8px; }
.win__body > :first-child { margin-top: 0; }

.details p { margin: 0 !important; }
.details b { font-weight: 700; }

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}
.project .win .logos img {
  width: auto;
  height: 40px;
}

@media (max-width: 800px) {
  .back { top: 16px; left: 16px; }
  /* phones: one centred column */
  .column { width: auto; align-items: center; }
  .project .win { max-width: 600px; }
  .column { padding: 80px 20px 100px; gap: 32px; }
}

/* ---------- all projects: each window is one link ---------- */
a.win--link {
  display: block;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
a.win--link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- project detail pages + all projects ----------
   CTRL+ALT sits small and fixed at the top centre */
.project--detail,
.project--list {
  --title-size: clamp(40px, 5.5vw, 80px);
}
.project--detail .title,
.project--list .title {
  inset: 24px 0 auto 0;
  align-items: flex-start;
}

/* project names (detail hero + all projects): out of the black box, set large and
   vertical along the left side of the post, reading bottom to top.
   The year stays a small white box on the image. */
.project--detail .win--hero .label,
.project--list .win--link .label {
  --name-size: 48px;
  position: absolute;
  top: 0;
  left: 0;
  /* a normal line of text turned 90° anticlockwise around its top-left corner,
     then shifted so it hangs in the margin, 16px left of the post, top-aligned.
     (avoids writing-mode, which some browsers render inconsistently) */
  transform-origin: 0 0;
  transform: rotate(-90deg) translate(-100%, calc(-100% - 16px));
  background: none;
  color: var(--ink);
  padding: 0;
  font: 800 var(--name-size) / 1 var(--display);
  letter-spacing: -0.04em;
  text-transform: none;
  white-space: nowrap;
}
@media (min-width: 1200px) {
  .project--detail .win--hero .label,
  .project--list .win--link .label { --name-size: 64px; }
}
/* the bar now only holds the year, pushed to the right */
.project--detail .win--hero .win__bar,
.project--list .win--link .win__bar { justify-content: flex-end; }
a.win--link:hover .label { text-decoration: underline; }

/* project detail: the name stays put in the left margin while the page scrolls,
   level with the top of the column (desktop only; phones: above the image) */
@media (min-width: 801px) {
  .project--detail .win--hero .label {
    position: fixed;
    top: 120px;
    left: var(--col-left);
  }
}

/* phones: no room on the left, so the name sits large above the image */
@media (max-width: 800px) {
  .project--detail .win--hero .label,
  .project--list .win--link .label {
    position: static;
    transform: none;
    --name-size: 36px;
    white-space: normal;
    margin-right: auto;
  }
  .project--detail .win--hero .win__bar,
  .project--list .win--link .win__bar {
    margin-bottom: 0;
    align-items: flex-end;
    padding-bottom: 8px;
  }
}

/* detail pages: no frames, text and images run as one continuous column
   (same position), and the overview comes first */
.project--detail .column { gap: 80px; }   /* space between items */
.project--detail .win {
  background: none;
  box-shadow: none;
}
.project--detail .win__body { padding: 16px 0 0; }
@media (max-width: 800px) {
  .project--detail .column { gap: 48px; }
}
