/* ============================================================
   Portfolio page (/portfolio) — the "OLGA OLEN'" design, ported from the
   original design bundle: Stone Blue palette, Editorial layout.
   Content comes from PocketBase (/admin → Portfolio), see portfolio.js.
   ============================================================ */
@import url("fonts.css");   /* Inter — Hanken Grotesk has no basic Cyrillic, so Russian text falls back to it */
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-cyrillic-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Archristy"; src: url("../fonts/archristy.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }

:root {   /* palette "Stone Blue" */
  --bg: #ECEEF1; --panel: #DEE3E9; --ink: #23272B; --ink2: #474E54; --ink3: #5E666D; --ink4: #8C949B; --ink5: #343A40;
  --card: #F6F8FA; --line: rgba(35,39,43,0.13); --line-soft: rgba(35,39,43,0.08); --accent: oklch(0.54 0.06 245);
  --sans: "Hanken Grotesk", "Inter", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y mandatory; }
body { margin: 0; background: var(--bg); }
img { display: block; }
a { color: inherit; }
button { font: inherit; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }

.pf {
  background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; overflow-x: hidden; padding-bottom: 54px;
}
.pf-wrap { max-width: 1180px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.pf-label { margin: 0 0 34px; font-size: 18px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* the original stretches running text vertically (scaleY 1.15) */
.pf p, .pf h3, .pf h2, .pf-exh span, .pf-contacts a > span {
  display: inline-block; width: 100%; transform: scaleY(1.15); transform-origin: center;
}
.pf-exh span, .pf-contacts a > span { width: auto; }

/* ---------- hero ---------- */
.pf-hero { background: var(--panel); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.pf-hero .pf-wrap { padding-top: 38px; padding-bottom: 38px; }
.pf-hero-head { display: flex; align-items: flex-start; gap: clamp(12px, 2.2vw, 28px); flex-wrap: wrap; }
.pf-logo { width: clamp(86px, 10.5vw, 141px); height: auto; aspect-ratio: 1 / 1; object-fit: contain; flex: 0 0 auto; }
.pf-hero-title { flex: 1 1 440px; min-width: min(100%, 300px); padding-top: clamp(26px, 3vw, 40px); }
.pf-hero-title h1 { margin: 0; font-family: "Archristy", "Newsreader", serif; font-weight: 400; font-size: clamp(29px, 4.2vw, 62px); line-height: 1; letter-spacing: 0; }
.pf-hero-title h1 em { font-style: normal; color: var(--accent); }
.pf-hero-title .pf-name { margin: 68px 0 0; font-size: 26.4px; letter-spacing: 0.0459em; color: var(--accent); font-weight: 700; }
.pf-hero-title .pf-sub { margin: 11px 0 0; font-size: 21px; line-height: 1.24; color: var(--ink2); }

/* ---------- works (Editorial) ---------- */
#works { padding-top: 8px; }
.pf-worklist { padding-top: 64px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 96px; }
.pf-work { display: flex; gap: 28px; align-items: flex-start; scroll-snap-align: start; scroll-margin-top: 24px; }
.pf-photos { flex: 1 1 auto; min-width: 0; display: flex; gap: 18px; align-items: flex-start; }
.pf-ph { min-width: 0; position: relative; display: block; padding: 0; border: none; background: var(--card); cursor: zoom-in; overflow: hidden; border-radius: 3px; }
.pf-ph img { width: 100%; height: 100%; object-fit: cover; }
.pf-big { flex: 1.2 1 0; aspect-ratio: 1.2; }
.pf-side { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.pf-side .pf-ph { flex: 1 1 0; min-height: 0; }
.pf-badge {
  position: absolute; top: 14px; right: 14px; display: flex; align-items: center; gap: 7px;
  background: rgba(20,17,14,0.62); color: #F4EEE3; font-size: 12px; letter-spacing: 0.06em;
  padding: 7px 12px; border-radius: 999px; backdrop-filter: blur(4px);
}
.pf-text { flex: 0 0 clamp(168px, 18%, 240px); min-width: 0; padding-top: 6px; }
.pf-text .num { font-size: 15px; color: var(--accent); visibility: hidden; margin-bottom: 12px; }   /* kept invisible, as in the original — it sets the spacing */
.pf-text h3 { margin: 0 0 26px; font-weight: 500; font-size: 21.6px; line-height: 1.21; letter-spacing: -0.01em; text-transform: uppercase; }
.pf-text .k { margin: 0 0 4px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink4); }
.pf-text .v { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--ink5); }
.pf-text .v:last-child { margin-bottom: 0; }

/* ---------- about / statement / exhibitions ---------- */
section.pf-sec, footer.pf-contacts-wrap { scroll-snap-align: start; scroll-margin-top: 24px; }
.pf-sec-inner { border-top: 1px solid var(--line); padding-top: 54px; }
.pf-about-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.4fr); gap: clamp(36px, 7vw, 96px); align-items: start; }
.pf-about-grid img { width: 100%; max-width: 340px; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.pf-prose { display: flex; flex-direction: column; gap: 22px; max-width: 60ch; }
.pf-prose p { margin: 0; font-size: 17px; line-height: 1.68; color: var(--ink2); }
#statement { padding-top: 96px; }
#statement .pf-prose { gap: 20px; max-width: 62ch; }
#statement .pf-prose p { font-size: 16.5px; line-height: 1.66; }
.pf-exh-sec { padding-top: 96px; }
.pf-exh-sec .pf-sec-inner { display: grid; grid-template-columns: minmax(0, 0.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); }
.pf-exh-sec .pf-label { margin: 0; }
.pf-exh { display: flex; flex-direction: column; }
.pf-exh > div { display: flex; align-items: baseline; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.pf-exh > div:last-child { border-bottom: 0; }
.pf-exh .y { font-size: 19px; color: var(--ink4); flex: 0 0 96px; }
.pf-exh .t { font-size: 17px; line-height: 1.45; color: var(--ink); }
.pf-exh .t i { font-style: normal; color: var(--ink3); }

/* ---------- contacts ---------- */
.pf-contacts-wrap { margin-top: 104px; background: var(--panel); border-top: 1px solid var(--line-soft); }
.pf-contacts-wrap .pf-wrap { padding-top: 84px; padding-bottom: 40px; }
.pf-contacts-wrap .pf-label { margin-bottom: 28px; }
.pf-contacts { display: flex; flex-direction: column; gap: 2px; max-width: 520px; }
.pf-contacts a { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pf-contacts a:last-child { border-bottom: 1px solid var(--line); }
.pf-contacts .k { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink4); }
.pf-contacts .v { font-size: 17px; }
.pf-copy { margin: 64px 0 0; font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink4); }

/* ---------- bottom nav ---------- */
.pf-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--accent); box-shadow: 0 -2px 18px rgba(0,0,0,0.14); }
.pf-nav > div { max-width: 1180px; margin: 0 auto; display: flex; justify-content: center; align-items: stretch; flex-wrap: nowrap; }
.pf-nav a { flex: 0 0 auto; padding: 16px 30px; font-size: 12.5px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; color: #FBF6EE; text-decoration: none; white-space: nowrap; }
.pf-nav a + a { border-left: 1px solid rgba(255,255,255,0.22); }
.pf-nav a:hover { background: rgba(255,255,255,0.12); }

/* ---------- lightbox ---------- */
.pf-lb { position: fixed; inset: 0; z-index: 1000; background: rgba(22,18,15,0.94); display: flex; flex-direction: column; animation: lbFade .2s ease; font-family: var(--sans); }
.pf-lb-top { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 20px 26px; color: #EDE6DA; }
.pf-lb-top .t { font-size: 19px; }
.pf-lb-top .c { margin-left: 14px; font-size: 13px; letter-spacing: 0.1em; color: #A89C8B; }
.pf-lb-btn { flex: 0 0 auto; border-radius: 999px; border: 1px solid rgba(237,230,218,0.28); color: #EDE6DA; cursor: pointer; line-height: 1; }
.pf-lb-close { width: 42px; height: 42px; background: transparent; font-size: 20px; }
.pf-lb-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 0 18px; }
.pf-lb-arrow { width: 54px; height: 54px; background: rgba(0,0,0,0.2); font-size: 24px; }
.pf-lb-img { flex: 1 1 auto; height: 100%; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.pf-lb-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; }
.pf-lb-thumbs { flex: 0 0 auto; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 20px 26px 26px; max-width: 920px; margin: 0 auto; }
.pf-lb-thumbs button { width: 60px; height: 60px; padding: 0; cursor: pointer; overflow: hidden; border-radius: 3px; background: #2A2521; border: 2px solid transparent; opacity: 0.5; }
.pf-lb-thumbs button.on { border-color: var(--accent); opacity: 1; }
.pf-lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }
html.pf-lb-open { overflow: hidden; }

/* ---------- phones (as in the original) ---------- */
@media (max-width: 640px) {
  .pf-nav a { padding: 12px 6px; font-size: 12px; letter-spacing: 0.03em; }
  .pf-wrap { padding-left: 18px; padding-right: 18px; }
  .pf-hero .pf-wrap { padding-top: 52px; padding-bottom: 56px; }
  .pf-hero-head { flex-wrap: nowrap; gap: 16px; }
  .pf-logo { width: 72px; }
  .pf-hero-title { padding-top: 14px; min-width: 0; flex: 1 1 auto; }
  .pf-hero-title h1 { white-space: nowrap; font-size: 6.6vw; }
  .pf-hero-title p { text-align: center; margin-left: -44px; }
  .pf-hero-title .pf-name { font-size: 20.2px; }
  .pf-hero-title .pf-sub { font-size: 16.07px; }
  .pf-about-grid p, #statement p { font-size: 16.5px; line-height: 1.66; }
  .pf-prose, #statement .pf-prose { gap: 32px; }
  .pf-lb-stage { padding: 0; gap: 0; position: relative; }
  .pf-lb-img img { width: 100%; max-width: 100%; border-radius: 0; }
  .pf-lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
  .pf-lb-arrow.prev { left: 10px; } .pf-lb-arrow.next { right: 10px; }
  .pf-worklist { gap: 0; }
  .pf-worklist > article + article { border-top: 1px solid var(--line); margin-top: 44px; padding-top: 44px; }
  .pf-about-grid, .pf-exh-sec .pf-sec-inner { grid-template-columns: 1fr; }
  .pf-work { flex-direction: column; gap: 8px; align-items: stretch; }
  .pf-text .num { margin-bottom: 6px; }
  .pf-text h3 { margin-bottom: 13px; }
  .pf-text .v { margin-bottom: 9px; }
  .pf-photos { flex-direction: column; gap: 12px; }
  .pf-photos > * { flex: none !important; width: 100%; }
  .pf-side { flex-direction: row; aspect-ratio: auto !important; }
  .pf-side > * { flex: 1 1 0 !important; aspect-ratio: 1; min-height: 0; }
}
