@import url("https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap");

/* Bagmutskiy portfolio — theme-shell main. Paper tokens match awards / about. */

.bagmutskiy-terms .entry-header,
.bagmutskiy-terms-main .entry-header {
  display: none;
}

body.bagmutskiy-terms,
body.bagmutskiy-terms #page,
body.bagmutskiy-terms #content,
body.bagmutskiy-terms #primary,
body.bagmutskiy-terms .site-main,
body.bagmutskiy-terms .ast-container {
  background: #f4f2ee;
}

body.bagmutskiy-terms #primary,
.bagmutskiy-terms-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.pf {
  --paper: #f4f2ee;
  --paper-2: #ece9e3;
  --ink: #1a1916;
  --muted: #5c5a55;
  --line: #d9d4cb;
  --accent: #1a3a32;
  --measure: 38rem;
  --wide: 72rem;
  --photo: 90rem;
  background: var(--paper);
  color: var(--ink);
  font-family: "Graphik Compact", "Source Sans 3", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  padding: 0 0 4.5rem;
  overflow-wrap: break-word;
}

.pf :where(h1, h2, h3, p, ul, ol, figure, blockquote) {
  margin: 0;
}

.pf a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(26, 25, 22, 0.28);
}

.pf a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.pf a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.pf img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper-2);
}

.pf-skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pf-skip:focus {
  position: fixed;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--paper);
  padding: 0.4rem 0.7rem;
}

.pf-preview-chrome {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: baseline;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  max-width: var(--photo);
  margin: 0 auto;
}

body.pf-has-shell .pf-preview-chrome {
  display: none;
}

.pf-preview-chrome span {
  color: var(--muted);
}

.pf-crumb {
  max-width: var(--photo);
  margin: 0 auto;
  padding: 0.55rem 1.25rem 0;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.pf-crumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  list-style: none;
  padding: 0;
}

.pf-crumb li:not(:last-child)::after {
  content: "→";
  margin-left: 0.45rem;
  color: var(--line);
}

.pf-hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.45rem 1.25rem 0.85rem;
}

.pf h1 {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-size: clamp(1.65rem, 3.4vw, 2.35rem);
  max-width: 18ch;
}

.pf-lead {
  max-width: 34rem;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.pf-jump {
  margin-top: 0.45rem;
  font-size: 0.85rem;
}

.pf-edit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.85rem, 2vw, 1.65rem) clamp(0.9rem, 2.2vw, 1.75rem);
  max-width: var(--photo);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  align-items: start;
}

.pf-edit--uniform {
  grid-template-columns: repeat(3, 1fr);
}

.pf-edit--uniform figure {
  grid-column: auto !important;
}

.pf-edit--masonry figure[data-orient="portrait"] {
  grid-row: span 2;
}

.pf-edit figure[data-slot="hero"],
.pf-edit figure[data-slot="full"],
.pf-edit figure[data-slot="standard"] {
  grid-column: 1 / -1;
}

.pf-edit figure[data-slot="hero"],
.pf-edit figure[data-slot="full"][data-orient="portrait"],
.pf-edit figure[data-slot="standard"][data-orient="portrait"] {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pf-edit figure[data-slot="hero"] img,
.pf-edit figure[data-slot="full"][data-orient="portrait"] img,
.pf-edit figure[data-slot="standard"][data-orient="portrait"] img {
  width: auto;
  max-width: 100%;
  max-height: min(88vh, 52rem);
  height: auto;
}

.pf-edit figure[data-slot="pair"] {
  grid-column: auto;
}

.pf-edit figure[data-slot="break"] {
  grid-column: 1 / -1;
  height: 1.75rem;
  padding: 0;
  background: none;
}

.pf-chapter-block {
  max-width: var(--photo);
  margin: 0 auto;
  padding: 0 0 1.75rem;
}

.pf-chapter {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  max-width: var(--photo);
  margin: 0 auto 0.85rem;
  padding: 0 1.25rem;
}

.pf-visually-hidden,
.pf-chapter--visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pf-textlink {
  display: inline-block;
  margin: 0.25rem 1.1rem 0.25rem 0;
}

.pf-edit figcaption {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 42rem;
}

.pf-series,
.pf-related,
.pf-cta,
.pf-dir,
.pf-proof {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.5rem 1.25rem 2.75rem;
}

.pf h2 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  margin-bottom: 1.1rem;
}

.pf-series-grid,
.pf-related-grid,
.pf-dir-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
}

.pf-dir-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pf-card {
  display: block;
  text-decoration: none;
}

.pf-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: var(--focal, 50% 20%);
}

.pf-card-label {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.92rem;
  text-decoration: none;
}

.pf-dir-group + .pf-dir-group {
  margin-top: 2.25rem;
}

.pf-cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
  font-size: 1.02rem;
}

.pf-proof-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.pf-note {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .pf-dir-grid,
  .pf-series-grid,
  .pf-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pf-edit--uniform {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .pf-edit {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .pf-edit figure[data-slot="pair"] {
    grid-column: 1 / -1;
  }

  .pf-edit--diptych-ok {
    grid-template-columns: 1fr 1fr;
  }

  .pf-edit--diptych-ok figure[data-slot="pair"] {
    grid-column: auto;
  }

  .pf-edit--uniform {
    grid-template-columns: 1fr;
  }

  .pf-dir-grid,
  .pf-series-grid,
  .pf-related-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pf-card img {
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 420px) {
  .pf-dir-grid,
  .pf-related-grid,
  .pf-series-grid {
    grid-template-columns: 1fr;
  }
}

.pf-series-all {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.pf-series-kicker {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.pf-series-story {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1.1rem 1.25rem;
  align-items: start;
}

.pf-series-side {
  display: grid;
  gap: 0.85rem;
}

.pf-series-card {
  display: block;
  text-decoration: none;
}

.pf-series-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: var(--focal, 50% 20%);
}

.pf-series--story .pf-series-story > .pf-series-card:first-child img {
  aspect-ratio: 4 / 5;
}

.pf-related-text {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 700px) {
  .pf-series-story {
    grid-template-columns: 1fr;
  }

  .pf-series-side {
    grid-template-columns: 1fr 1fr;
  }

  .pf-series--cards .pf-series-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .pf-dir-grid,
  .pf-series-side,
  .pf-series--cards .pf-series-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* WP chrome must not inherit portfolio content rules (same leak Series already fixed). */
body.pf-has-shell {
  background: transparent;
  padding-bottom: 0;
}

body.pf-has-shell .custom-logo,
body.pf-has-shell .elementor-location-header img,
body.pf-has-shell .elementor-location-footer img,
body.pf-has-shell .wpsr-fm-chat-wrapper img,
body.pf-has-shell .wpsr-fm-chat-bubble img {
  width: auto;
  max-width: 100%;
  height: auto;
  background: transparent;
}

/* Photography mode: route-scoped quiet chrome. Contact stays in the menu. */
@media (max-width: 430px) {
  body.pf-quiet .wpsr-fm-chat-wrapper,
  body.pf-quiet .wpsr-fm-chat-bubble,
  body.pf-quiet .elementor-location-header .elementor-widget-social-icons,
  body.pf-quiet .elementor-location-header .elementor-social-icons-wrapper {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf * {
    animation: none !important;
    transition: none !important;
  }
}
