/* Proje detay sayfası — koyu tema (katmanlı yüzeyler, ince çizgiler, teknik künye). Yalnızca
   project.html yükler. Cyan vurgu ve ortak tokenlar (--blue-2, --an-*, --fs-micro, .shell…)
   styles.css'ten gelir. Lightbox da yalnızca bu sayfada.
   PV.5.10: antrasit katmanlar (saf siyah yok); kompakt ilk ekran — başlık + künye ile kapak tek bir
   kompozisyon, kenardan kenara değil; telefonda başlık, kapak, künye. Galeri hemen ardından gelir.
   2026-10-08 revizyonu: başlık + künye sol sütunun üstünde (başlığın üstünde boş blok yok), kapak
   fotoğrafın kendi oranında ve kırpılmadan, en fazla --pd-cover-max yüksekliğinde. */

.project-page {
  --pd-deep: var(--an-2);
  --pd-base: var(--an-1);
  --pd-elevated: var(--an-3);
  --pd-panel: var(--an-3);
  --pd-line: var(--an-line);
  --pd-line-strong: var(--an-line-2);
  /* Text on the dark surfaces above (all pass WCAG AA, the faint tone for small labels too) */
  --pd-text: var(--an-text);
  --pd-body: var(--an-body);
  --pd-muted: var(--an-muted);
  --pd-faint: var(--an-faint);
  background: var(--pd-base);
  color: var(--pd-text);
}

/* Small uppercase labels: category, section numbers, fact names. */
.pd-label { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--pd-muted); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.pd-label::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--blue-2); }
.pd-section-label { margin: 0 0 12px; color: var(--blue-2); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* Head: breadcrumb and back link, then title + fact ledger beside the cover. */
.pd-head { padding: 100px 0 40px; background: var(--pd-deep); border-bottom: 1px solid var(--pd-line); }
.pd-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-bottom: 14px; border-bottom: 1px solid var(--pd-line); }
.project-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; color: var(--pd-faint); font-size: .76rem; font-weight: 600; }
.project-breadcrumb a { color: var(--pd-muted); }
.project-breadcrumb a:hover { color: var(--blue-2); }
.project-breadcrumb [aria-current] { color: var(--pd-body); }
.pd-back { display: inline-flex; align-items: center; gap: 8px; color: var(--pd-text); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.pd-back span { color: var(--blue-2); transition: transform .2s ease; }
.pd-back:hover { color: var(--blue-2); }
.pd-back:hover span { transform: translateX(-3px); }
/* PV.5.10: title and facts on the left, the cover on the right (desktop); phones stack title,
   cover, facts. */
/* Title and facts form one block at the top of the left column, level with the top of the cover;
   the cover sits on the right edge. --pd-cover-max is the tallest the cover may be. */
.pd-head-grid { --pd-cover-max: 60vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; grid-template-areas: "title cover" "facts cover"; gap: 28px 56px; align-items: start; margin-top: 26px; }
.pd-head-grid > .pd-title { grid-area: title; }
.pd-head-grid > .pd-facts { grid-area: facts; }
.pd-head-grid > .project-cover { grid-area: cover; justify-self: end; }
.pd-title h1 { margin: 14px 0 0; color: var(--pd-text); font-size: clamp(2rem, 3.2vw, 3rem); font-weight: 400; line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.pd-note { max-width: 620px; margin: 20px 0 0; color: var(--pd-body); }
.pd-actions { margin-top: 28px; }
/* Fact ledger: label above value, ruled rows, two columns. */
.pd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--pd-line-strong); }
.pd-facts div { min-width: 0; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--pd-line); }
.pd-facts dt { color: var(--pd-faint); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.pd-facts dd { margin: 6px 0 0; color: var(--pd-text); font-size: .95rem; font-weight: 500; line-height: 1.35; }

/* Cover: beside the title, the whole photo in its own proportions (never cropped), at most the
   column wide and --pd-cover-max tall; a hairline frame hugs the photo — never a full-width billboard. */
.project-cover { position: relative; width: fit-content; max-width: 100%; margin: 0; overflow: hidden; background: var(--pd-panel); border: 1px solid var(--pd-line); }
.project-cover img { display: block; width: auto; height: auto; max-width: 100%; max-height: var(--pd-cover-max); object-fit: contain; }
.project-cover-button { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.project-cover-button img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.project-cover-button:hover img { transform: scale(1.015); }
/* No photo: a 4:3 panel as large as a 4:3 cover would be. */
.project-cover:has(.project-cover-placeholder) { width: min(100%, calc(var(--pd-cover-max) * 4 / 3)); aspect-ratio: 4 / 3; }
.project-cover-placeholder { position: relative; overflow: hidden; }
.project-cover-placeholder span { font-size: clamp(3rem, 8vw, 6rem); }
.project-zoom-hint { position: absolute; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; color: var(--pd-text); background: rgba(21, 23, 26, .78); border: 1px solid var(--pd-line-strong); backdrop-filter: blur(8px); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.project-zoom-hint::before { content: ""; width: 6px; height: 6px; background: var(--blue-2); }

/* Summary: section label and heading on the left, the description on the right. */
.pd-summary { padding: 64px 0 56px; }
.pd-summary-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 20px 64px; padding-top: 28px; border-top: 1px solid var(--pd-line); }
.pd-summary-grid h2 { margin: 0; color: var(--pd-text); font-size: 1.5rem; font-weight: 400; line-height: 1.2; letter-spacing: -.02em; }
.pd-summary-text > p { max-width: 760px; margin: 0; color: var(--pd-body); font-size: 1.12rem; line-height: 1.8; }
.pd-summary-text > p + p { margin-top: 18px; }
.pd-summary-text > .project-empty-note { padding: 14px 18px; color: var(--pd-body); background: var(--pd-elevated); border: 1px solid var(--pd-line); border-left: 3px solid var(--blue-2); font-size: .92rem; line-height: 1.6; }

/* Gallery: 3 columns, 2 on tablets and phones (and when 1, 2 or 4 photos avoid a lone tile). */
.project-gallery-section { padding: 8px 0 96px; }
.project-gallery-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin-bottom: 24px; padding-top: 28px; border-top: 1px solid var(--pd-line); }
.project-gallery-heading h2 { margin: 0; color: var(--pd-text); font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 300; line-height: 1.1; letter-spacing: -.03em; }
.project-gallery-heading > p { margin: 0; color: var(--pd-muted); font-size: .8rem; }
.project-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.project-gallery.is-two-up { grid-template-columns: repeat(2, 1fr); }
/* 7, 10… photos would leave one tile alone on the last row: on a six-column track the last four
   tiles become two pairs (rows of 3, 2, 2), from desktop down to tablets. */
.project-gallery.ends-in-pairs { grid-template-columns: repeat(6, 1fr); }
.project-gallery.ends-in-pairs > .project-gallery-item { grid-column: span 2; }
.project-gallery.ends-in-pairs > .project-gallery-item:nth-last-child(-n+4) { grid-column: span 3; }
.project-gallery-item { position: relative; display: block; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; border: 1px solid var(--pd-line); background: var(--pd-panel); cursor: zoom-in; transition: border-color .2s ease; }
.project-gallery-item[hidden] { display: none; }
.project-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.project-gallery-item:hover { border-color: var(--blue-2); }
.project-gallery-item:hover img { transform: scale(1.03); }

/* PV.5.1: a video tile shows its poster frame (or the dark panel) with a play mark; it plays only
   in the viewer, when opened. Long galleries continue with "Daha fazla göster". */
.project-gallery-item.is-video { cursor: pointer; }
.project-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; display: grid; place-items: center; transform: translate(-50%, -50%); background: rgba(21, 23, 26, .72); border: 1px solid rgba(236, 234, 228, .5); border-radius: 50%; backdrop-filter: blur(6px); transition: background .2s ease, border-color .2s ease; }
.project-play::before { content: ""; margin-left: 4px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--pd-text); }
.project-gallery-item.is-video:hover .project-play { background: rgba(21, 23, 26, .92); border-color: var(--blue-2); }
.project-gallery-more { display: flex; justify-content: center; margin-top: 28px; }
.project-gallery-more-button { min-height: 48px; padding: 0 26px; color: var(--pd-text); background: transparent; border: 1px solid var(--pd-line-strong); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.project-gallery-more-button:hover { background: rgba(0, 183, 255, .08); border-color: var(--blue-2); }

/* Previous / next project and the way back to all references. */
.project-pager { background: var(--pd-deep); border-top: 1px solid var(--pd-line); }
.project-pager-grid { min-height: 132px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.project-pager-link span { display: block; color: var(--pd-faint); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.project-pager-link strong { display: block; margin-top: 6px; color: var(--pd-text); font-size: 1.05rem; font-weight: 500; line-height: 1.3; transition: color .2s ease; }
.project-pager-link:hover strong { color: var(--blue-2); }
.project-pager-link.is-next { text-align: right; }
.project-pager-all { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; color: var(--pd-text); background: var(--pd-elevated); border: 1px solid var(--pd-line-strong); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; transition: border-color .2s ease, background .2s ease; }
.project-pager-all::before { content: ""; width: 6px; height: 6px; background: var(--blue-2); }
.project-pager-all:hover { background: rgba(0, 183, 255, .08); border-color: var(--blue-2); }

/* Lightbox. The photo fills the stage box (at most 90vw × 82vh) and object-fit: contain scales it
   up or down to fit without cropping, so small originals and portrait shots also use the screen.
   The caption bar is one compact row; its side padding lines up with the photo box. */
body.lightbox-open { overflow: hidden; }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: var(--pd-text); background: var(--an-0); }
.lightbox::backdrop { background: var(--an-0); }
.lightbox[open] { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.lightbox-stage { min-height: 0; display: grid; place-items: center; padding: 2vh 5vw 0; }
.lightbox-image { width: 100%; height: 100%; max-width: 90vw; max-height: 82vh; object-fit: contain; }
.lightbox-video { width: 100%; height: 100%; max-width: 90vw; max-height: 82vh; background: #000; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 5vw 12px; border-top: 1px solid var(--pd-line); }
.lightbox-caption { margin: 0; display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.lightbox-caption strong { font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-caption span { flex: none; color: var(--pd-muted); font-size: .74rem; font-weight: 600; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.lightbox-controls { display: flex; gap: 6px; flex: 0 0 auto; }
.lightbox-button { width: 44px; height: 44px; display: grid; place-items: center; color: var(--pd-text); background: transparent; border: 1px solid var(--pd-line-strong); font-size: 1.15rem; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.lightbox-button:hover { background: var(--an-3); border-color: var(--blue-2); }
.lightbox-button[hidden] { display: none; }

@media (max-width: 1050px) {
  .pd-head-grid { gap: 24px 36px; }
  .pd-summary-grid { gap: 20px 40px; }
  .project-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .pd-head { padding: 96px 0 32px; }
  /* Phones and portrait tablets: title, the cover (full width when landscape; a portrait photo is
     capped in height and centred), then the facts — balanced on the first screen. */
  .pd-head-grid { --pd-cover-max: min(50vh, 440px); grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "title" "cover" "facts"; gap: 20px; margin-top: 20px; }
  .pd-head-grid > .project-cover { justify-self: center; }
  .project-cover:has(.project-cover-placeholder) { width: 100%; aspect-ratio: 3 / 2; }
  .pd-summary { padding: 44px 0 40px; }
  .pd-summary-grid { grid-template-columns: 1fr; }
  .project-gallery-heading { display: block; }
  .project-gallery-heading > p { margin-top: 10px; }
  .project-pager-grid { grid-template-columns: 1fr 1fr; padding: 28px 0; }
  .project-pager-all { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
}

@media (max-width: 560px) {
  .pd-topline { padding-bottom: 14px; }
  .pd-title h1 { font-size: 1.95rem; }
  .project-zoom-hint { right: 10px; bottom: 10px; }
  .pd-summary-text > p { font-size: 1rem; }
  .project-gallery-section { padding-bottom: 64px; }
  .project-gallery { gap: 8px; }
  /* Phones: back to two columns; an odd last tile sits centred at the same size. */
  .project-gallery.ends-in-pairs { grid-template-columns: repeat(2, 1fr); }
  .project-gallery.ends-in-pairs > .project-gallery-item,
  .project-gallery.ends-in-pairs > .project-gallery-item:nth-last-child(-n+4) { grid-column: auto; }
  .project-gallery.ends-in-pairs > .project-gallery-item:nth-child(odd):last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 4px); }
  .project-pager-link strong { font-size: .95rem; }
  /* Phones: the photo may use the full width; the bar keeps the gutter. */
  .lightbox-stage { padding: 8px 0 0; }
  .lightbox-image, .lightbox-video { max-width: 100vw; }
  .lightbox-bar { gap: 10px; padding: 8px 16px 12px; }
  .lightbox-caption { gap: 8px; }
}
