/*
Theme Name: Murat Bergi Editorial v28
Theme URI: https://www.muratbergi.com/
Author: Murat Bergi
Description: Minimal editorial photography portfolio theme.
Version: 1.28.7
*/

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: #F7F5F0;
    color: #202020;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.site-header {
    width: 100%;
    padding: 38px 4.6% 20px;
    background: #F7F5F0;
    position: relative;
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 50px;
}

.site-branding {
    flex: 0 0 auto;
}

.site-title {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: -0.018em;
    text-transform: lowercase;
}

.site-tagline {
    margin-top: 8px;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.30em;
    color: #777;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 38px;
    padding-top: 1px;
    min-height: 24px;
}

.nav-link,
.portfolio-toggle,
.language-switcher {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.16em;
    color: #222;
}

.nav-link,
.portfolio-toggle {
    display: inline-flex;
    align-items: center;
    height: 24px;
    margin: 0;
    padding: 0;
}

.nav-link:hover,
.portfolio-toggle:hover,
.lang-link:hover {
    opacity: .55;
}

.portfolio-chevron {
    display: inline-block;
    margin-left: 5px;
    line-height: 1;
    position: relative;
    top: -1px;
    transition: transform 180ms ease;
}

.portfolio-toggle[aria-expanded="true"] .portfolio-chevron {
    transform: rotate(180deg);
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 24px;
    white-space: nowrap;
}

.lang-link {
    text-transform: uppercase;
}

.lang-separator {
    opacity: .35;
    letter-spacing: 0;
}

.current-lang {
    opacity: .45;
}

.portfolio-panel {
    width: 100%;
    padding-top: 16px;
    padding-bottom: 0;
}

.portfolio-panel[hidden] {
    display: none;
}

.portfolio-index {
    margin-left: auto;
    width: min(520px, 42vw);
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    column-gap: 34px;
    row-gap: 10px;
}

.portfolio-index a {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.portfolio-index a:hover {
    opacity: .5;
}

.site-content {
    width: 79%;
    max-width: 1420px;
    margin: 8px auto 72px;
}

.home .site-content,
.front-page .site-content {
    width: 79%;
    max-width: 1420px;
}

.home .entry-content,
.front-page .entry-content {
    width: 100%;
    max-width: none;
}

.entry-content > .wp-block-image,
.entry-content > figure,
.entry-content > .wp-block-gallery {
    margin-left: 0;
    margin-right: 0;
}

.entry-title {
    max-width: 900px;
    margin: 30px auto 40px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 4.4vw, 64px);
    font-weight: 400;
    line-height: 1.05;
}

body:not(.home) .entry-content {
    max-width: 1050px;
    margin-left: auto;
    margin-right: auto;
}

.site-footer {
    width: 79%;
    max-width: 1420px;
    margin: 0 auto;
    padding: 22px 0 34px;
    border-top: 1px solid rgba(0,0,0,0.08);
    font-size: 10px;
    letter-spacing: 0.13em;
    color: #888;
}

body.portfolio-open .site-content {
    margin-top: 10px;
}

@media (max-width: 1100px) {
    .main-nav {
        gap: 26px;
    }

    .portfolio-index {
        width: 66vw;
    }

    .site-content,
    .home .site-content,
    .front-page .site-content,
    .site-footer {
        width: 86%;
    }
}

@media (max-width: 760px) {
    .site-header {
        padding: 26px 5% 18px;
    }

    .header-top {
        flex-direction: column;
        gap: 24px;
    }

    .site-title {
        font-size: 29px;
    }

    .main-nav {
        width: 100%;
        gap: 22px;
        flex-wrap: wrap;
    }

    .portfolio-panel {
        padding-top: 18px;
    }

    .portfolio-index {
        width: 100%;
        grid-template-columns: 1fr;
        row-gap: 9px;
    }

    .portfolio-index a {
        font-size: 13px;
    }

    .site-content,
    .home .site-content,
    .front-page .site-content,
    .site-footer {
        width: 90%;
    }
}


/* v6 editorial refinements */
.site-header {
    padding-left: 4.8%;
    padding-right: 4.8%;
}

.language-switcher .current-lang {
    opacity: 1;
    font-weight: 500;
}

.language-switcher .lang-link:not(.current-lang) {
    opacity: .42;
}

.portfolio-index {
    align-items: start;
}

.portfolio-index a {
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .portfolio-index {
        width: min(560px, 58vw);
    }
}

@media (max-width: 900px) {
    .portfolio-index a {
        white-space: normal;
    }
}


/* ===== v7 mobile navigation ===== */
.mobile-menu-toggle,
.mobile-menu-panel {
    display: none;
}

@media (max-width: 760px) {
    .site-header {
        padding: 24px 5% 18px;
    }

    .header-top {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 20px;
    }

    .site-title {
        font-size: 28px;
    }

    .site-tagline {
        margin-top: 7px;
        font-size: 8px;
        letter-spacing: .28em;
    }

    .desktop-nav,
    .portfolio-panel {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        appearance: none;
        border: 0;
        background: transparent;
        padding: 1px 0 0;
        margin: 0;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 11px;
        font-weight: 400;
        line-height: 1;
        letter-spacing: .16em;
        color: #222;
        cursor: pointer;
    }

    .mobile-menu-panel {
        display: block;
        width: 100%;
        padding: 28px 0 10px;
    }

    .mobile-menu-panel[hidden] {
        display: none;
    }

    .mobile-menu-inner {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-menu-section {
        width: 100%;
        padding-bottom: 24px;
        margin-bottom: 22px;
        border-bottom: 1px solid rgba(0,0,0,.08);
    }

    .mobile-menu-heading,
    .mobile-main-link {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 11px;
        line-height: 1.2;
        letter-spacing: .16em;
    }

    .mobile-menu-heading {
        margin-bottom: 14px;
        color: #777;
    }

    .mobile-menu-section a {
        display: block;
        margin: 0 0 10px;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 16px;
        line-height: 1.28;
    }

    .mobile-main-link {
        display: block;
        margin-bottom: 17px;
    }

    .mobile-language-switcher {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        margin-top: 6px;
        padding-top: 22px;
        border-top: 1px solid rgba(0,0,0,.08);
        width: 100%;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 11px;
        letter-spacing: .16em;
    }

    .mobile-language-switcher .current-lang {
        opacity: 1;
        font-weight: 500;
    }

    .mobile-language-switcher .lang-link:not(.current-lang) {
        opacity: .42;
    }

    .site-content,
    .home .site-content,
    .front-page .site-content,
    .site-footer {
        width: 90%;
    }

    body.mobile-menu-open .site-content {
        margin-top: 12px;
    }
}


/* ===== v8 consistent project/page system ===== */

/* Remove legacy/theme title artifacts that were white on the cream background. */
.entry-title {
    color: #202020;
}

/* Standard non-project pages such as BIO */
.standard-page {
    width: min(1040px, 100%);
    margin: 0 auto;
}

.page-heading {
    width: min(760px, 100%);
    margin: 42px auto 34px;
}

.page-title {
    margin: 0;
    color: #202020;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 4.2vw, 58px);
    line-height: 1.04;
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* Documentary project pages */
.project-page {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.project-page .entry-content {
    width: 100%;
    max-width: none !important;
    margin: 0 auto;
    color: #202020;
}

/* Bring legacy Gutenberg/classic content into one editorial rhythm. */
.project-page .entry-content > p,
.project-page .entry-content > blockquote,
.project-page .entry-content > h1,
.project-page .entry-content > h2,
.project-page .entry-content > h3,
.project-page .entry-content > h4,
.project-page .entry-content > ul,
.project-page .entry-content > ol {
    width: min(920px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.project-page .entry-content > h1,
.project-page .entry-content > h2 {
    color: #202020 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.08;
}

.project-page .entry-content > h1 {
    margin-top: 42px;
    margin-bottom: 30px;
    font-size: clamp(36px, 4.5vw, 62px);
}

.project-page .entry-content > h2 {
    margin-top: 38px;
    margin-bottom: 24px;
    font-size: clamp(26px, 3vw, 40px);
}

/* Body text should read like an editorial essay, not a stretched Word document. */
.project-page .entry-content > p,
.project-page .entry-content > ul,
.project-page .entry-content > ol {
    font-size: 17px;
    line-height: 1.62;
    font-weight: 400;
}

.project-page .entry-content > blockquote {
    margin-top: 30px;
    margin-bottom: 32px;
    padding: 0;
    border: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.55;
}

/* Images and galleries get a wider photographic field than text. */
.project-page .entry-content > figure,
.project-page .entry-content > .wp-block-image,
.project-page .entry-content > .wp-block-gallery,
.project-page .entry-content > .gallery {
    width: 100%;
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

.project-page .entry-content img {
    max-width: 100%;
    height: auto;
}

/* Legacy inline colors occasionally created white headings. Neutralize them. */
.project-page .entry-content h1[style],
.project-page .entry-content h2[style],
.project-page .entry-content h3[style] {
    color: #202020 !important;
}

/* BIO/body consistency */
.standard-page .entry-content {
    width: min(760px, 100%);
    max-width: none !important;
    margin: 0 auto;
}

.standard-page .entry-content p {
    font-size: 16px;
    line-height: 1.65;
    font-weight: 400;
}

/* Extra spacing below site header on content pages */
body:not(.home) .site-content {
    margin-top: 10px;
}

/* Mobile */
@media (max-width: 760px) {
    .page-heading {
        margin-top: 24px;
        margin-bottom: 24px;
    }

    .project-page .entry-content > p,
    .project-page .entry-content > blockquote,
    .project-page .entry-content > h1,
    .project-page .entry-content > h2,
    .project-page .entry-content > h3,
    .project-page .entry-content > h4,
    .project-page .entry-content > ul,
    .project-page .entry-content > ol {
        width: 100%;
    }

    .project-page .entry-content > p,
    .project-page .entry-content > ul,
    .project-page .entry-content > ol {
        font-size: 16px;
        line-height: 1.58;
    }

    .project-page .entry-content > blockquote {
        font-size: 17px;
    }
}


/* =========================================================
   v10 — unified portfolio editorial system
   Same visual grammar, two content rhythms:
   photoessay + longform
   ========================================================= */

.project-page {
    width: min(1220px, calc(100% - 64px));
    margin: 0 auto;
}

.project-heading {
    width: min(920px, 100%);
    margin: 54px auto 46px;
}

.project-title {
    margin: 0;
    color: #202020 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.02;
    font-weight: 400;
    letter-spacing: -0.025em;
}

/* Shared reading language */
.project-page .entry-content {
    width: 100%;
    max-width: none !important;
    margin: 0 auto;
    color: #202020;
}

.project-page .entry-content p,
.project-page .entry-content li {
    font-size: 17px;
    line-height: 1.66;
}

.project-page .entry-content a {
    text-underline-offset: 3px;
}

.project-page .entry-content figcaption,
.project-page .entry-content .wp-caption-text {
    margin-top: 9px;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: .015em;
    opacity: .62;
}

.project-page .entry-content img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* PHOTO ESSAY
   Short text, generous image field */
.project-photoessay .entry-content > p,
.project-photoessay .entry-content > blockquote,
.project-photoessay .entry-content > ul,
.project-photoessay .entry-content > ol,
.project-photoessay .entry-content > h2,
.project-photoessay .entry-content > h3 {
    width: min(760px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.project-photoessay .entry-content > p {
    margin-top: 0;
    margin-bottom: 22px;
}

.project-photoessay .entry-content > figure,
.project-photoessay .entry-content > .wp-block-image,
.project-photoessay .entry-content > .wp-block-gallery,
.project-photoessay .entry-content > .gallery,
.project-photoessay .entry-content > img {
    width: min(1180px, 100%);
    margin: 58px auto;
}

/* Classic editor images often live inside paragraphs.
   Let image-only paragraphs breathe wider. */
.project-photoessay .entry-content p:has(> img:only-child),
.project-photoessay .entry-content p:has(> a:only-child > img:only-child) {
    width: min(1180px, 100%);
    margin-top: 58px;
    margin-bottom: 58px;
}

/* LONG FORM
   Narrower reading column, photographs open the page up */
.project-longform .entry-content > p,
.project-longform .entry-content > blockquote,
.project-longform .entry-content > ul,
.project-longform .entry-content > ol,
.project-longform .entry-content > h2,
.project-longform .entry-content > h3,
.project-longform .entry-content > h4 {
    width: min(800px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.project-longform .entry-content > p {
    margin-top: 0;
    margin-bottom: 20px;
}

.project-longform .entry-content > h2 {
    margin-top: 54px;
    margin-bottom: 24px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.12;
    font-weight: 400;
}

.project-longform .entry-content > h3 {
    margin-top: 42px;
    margin-bottom: 18px;
    font-size: 20px;
    line-height: 1.3;
}

.project-longform .entry-content > blockquote {
    margin-top: 34px;
    margin-bottom: 36px;
    padding: 0;
    border: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.58;
}

.project-longform .entry-content > figure,
.project-longform .entry-content > .wp-block-image,
.project-longform .entry-content > .wp-block-gallery,
.project-longform .entry-content > .gallery,
.project-longform .entry-content > img {
    width: min(1100px, 100%);
    margin: 52px auto;
}

.project-longform .entry-content p:has(> img:only-child),
.project-longform .entry-content p:has(> a:only-child > img:only-child) {
    width: min(1100px, 100%);
    margin-top: 52px;
    margin-bottom: 52px;
}

/* Legacy inline heading colors should never turn invisible. */
.project-page .entry-content h1[style],
.project-page .entry-content h2[style],
.project-page .entry-content h3[style],
.project-page .entry-content h4[style] {
    color: #202020 !important;
}

/* Keep internal article/chapter headings subordinate to project title. */
.project-page .entry-content > h1 {
    width: min(800px, 100%);
    margin: 52px auto 24px;
    color: #202020 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.12;
    font-weight: 400;
}

/* References / lists remain readable instead of stretching across the screen. */
.project-longform .entry-content > ol,
.project-longform .entry-content > ul {
    padding-left: 1.25em;
}

/* Responsive */
@media (max-width: 760px) {
    .project-page {
        width: calc(100% - 36px);
    }

    .project-heading {
        margin-top: 30px;
        margin-bottom: 30px;
    }

    .project-title {
        font-size: clamp(34px, 11vw, 48px);
        line-height: 1.04;
    }

    .project-page .entry-content p,
    .project-page .entry-content li {
        font-size: 16px;
        line-height: 1.6;
    }

    .project-photoessay .entry-content > figure,
    .project-photoessay .entry-content > .wp-block-image,
    .project-photoessay .entry-content > .wp-block-gallery,
    .project-photoessay .entry-content > .gallery,
    .project-photoessay .entry-content > img,
    .project-longform .entry-content > figure,
    .project-longform .entry-content > .wp-block-image,
    .project-longform .entry-content > .wp-block-gallery,
    .project-longform .entry-content > .gallery,
    .project-longform .entry-content > img,
    .project-photoessay .entry-content p:has(> img:only-child),
    .project-photoessay .entry-content p:has(> a:only-child > img:only-child),
    .project-longform .entry-content p:has(> img:only-child),
    .project-longform .entry-content p:has(> a:only-child > img:only-child) {
        margin-top: 34px;
        margin-bottom: 34px;
    }
}


/* =========================================================
   v11 — gallery-first longform
   Short intro -> photographs -> optional project text
   ========================================================= */

.project-longform .project-heading {
    margin-bottom: 32px;
}

.project-longform .project-intro {
    width: min(760px, 100%);
    margin: 0 auto 62px;
}

.project-longform .project-intro > h1,
.project-longform .project-intro > h2,
.project-longform .project-intro > h3,
.project-longform .project-intro > h4 {
    margin: 0 0 20px;
    color: #202020 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 2.6vw, 36px);
    line-height: 1.13;
    font-weight: 400;
    letter-spacing: -0.012em;
}

.project-longform .project-intro > p {
    margin: 0 0 18px;
    font-size: 17px;
    line-height: 1.65;
}

.project-longform .project-gallery {
    width: 100%;
    margin: 0 auto;
}

.project-longform .project-gallery > figure,
.project-longform .project-gallery > .wp-block-image,
.project-longform .project-gallery > .wp-block-gallery,
.project-longform .project-gallery > .gallery,
.project-longform .project-gallery > img,
.project-longform .project-gallery > p,
.project-longform .project-gallery > div {
    width: min(1100px, 100%);
    margin: 0 auto 58px;
}

.project-longform .project-gallery img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

.project-longform .project-gallery figcaption,
.project-longform .project-gallery .wp-caption-text {
    width: 100%;
    margin-top: 9px;
    color: #202020;
    font-size: 12px;
    line-height: 1.45;
    opacity: .58;
}

/* Optional essay drawer */
.project-text-details {
    width: min(800px, 100%);
    margin: 76px auto 100px;
    border-top: 1px solid rgba(32,32,32,.25);
    border-bottom: 1px solid rgba(32,32,32,.25);
}

.project-text-toggle {
    position: relative;
    padding: 22px 0;
    cursor: pointer;
    list-style: none;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    user-select: none;
}

.project-text-toggle::-webkit-details-marker {
    display: none;
}

.project-text-toggle::marker {
    display: none;
}

.project-text-toggle:hover {
    opacity: .58;
}

.project-text-body {
    padding: 12px 0 42px;
}

.project-text-body > p,
.project-text-body > blockquote,
.project-text-body > ul,
.project-text-body > ol,
.project-text-body > h1,
.project-text-body > h2,
.project-text-body > h3,
.project-text-body > h4 {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.project-text-body > p,
.project-text-body > li {
    font-size: 16px;
    line-height: 1.7;
}

.project-text-body > h1,
.project-text-body > h2 {
    margin-top: 46px !important;
    margin-bottom: 20px !important;
    color: #202020 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px !important;
    line-height: 1.16;
    font-weight: 400;
}

.project-text-body > h3,
.project-text-body > h4 {
    margin-top: 34px !important;
    margin-bottom: 16px !important;
}

.project-text-body > blockquote {
    margin-top: 28px !important;
    margin-bottom: 30px !important;
    padding: 0;
    border: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.62;
}

/* Don't re-open the wide image rules inside the hidden essay text. */
.project-text-body figure,
.project-text-body .wp-block-image,
.project-text-body img {
    max-width: 100%;
}

@media (max-width: 760px) {
    .project-longform .project-intro {
        margin-bottom: 42px;
    }

    .project-longform .project-intro > p {
        font-size: 16px;
        line-height: 1.6;
    }

    .project-longform .project-gallery > figure,
    .project-longform .project-gallery > .wp-block-image,
    .project-longform .project-gallery > .wp-block-gallery,
    .project-longform .project-gallery > .gallery,
    .project-longform .project-gallery > img,
    .project-longform .project-gallery > p,
    .project-longform .project-gallery > div {
        margin-bottom: 34px;
    }

    .project-text-details {
        margin-top: 54px;
        margin-bottom: 70px;
    }

    .project-text-toggle {
        padding: 19px 0;
    }
}


/* =========================================================
   v21 — bilingual project parity + larger photo essays
   ========================================================= */

/* Short-text projects are allowed to feel photographic rather than article-like. */
.project-photoessay {
    width: min(1460px, calc(100% - 64px));
}

.project-photoessay .project-heading {
    width: min(920px, 100%);
}

.project-photoessay .entry-content > figure,
.project-photoessay .entry-content > .wp-block-image,
.project-photoessay .entry-content > .wp-block-gallery,
.project-photoessay .entry-content > .gallery,
.project-photoessay .entry-content > img,
.project-photoessay .entry-content p:has(> img:only-child),
.project-photoessay .entry-content p:has(> a:only-child > img:only-child) {
    width: min(1380px, 100%);
}

/* MetaSlider should use the same generous field on photo essays. */
.project-photoessay .metaslider,
.project-photoessay .ml-slider,
.project-photoessay .flexslider,
.project-photoessay .nivoSlider,
.project-photoessay .coin-slider {
    width: min(1380px, 100%) !important;
    max-width: 1380px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Mirrored translation images are input material for the v21 slideshow script. */
.mb21-mirrored-images {
    display: contents;
}

/* TR and EN long-form pages share one exact text-drawer geometry. */
.project-longform .project-intro {
    width: min(800px, 100%);
    margin: 0 auto 34px;
}

.project-longform .project-text-details {
    width: min(800px, 100%);
    margin: 0 auto 54px;
}

.project-longform .project-text-body {
    padding: 12px 0 42px;
}

@media (max-width: 760px) {
    .project-photoessay {
        width: calc(100% - 24px);
    }

    .project-photoessay .entry-content > figure,
    .project-photoessay .entry-content > .wp-block-image,
    .project-photoessay .entry-content > .wp-block-gallery,
    .project-photoessay .entry-content > .gallery,
    .project-photoessay .entry-content > img,
    .project-photoessay .entry-content p:has(> img:only-child),
    .project-photoessay .entry-content p:has(> a:only-child > img:only-child),
    .project-photoessay .metaslider,
    .project-photoessay .ml-slider {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* =========================================================
   v23 — BIO parity
   ========================================================= */
.bio-page .page-heading,
.bio-page .entry-content {
    width: min(760px, 100%);
}
.bio-page .bio-portrait,
.bio-page .entry-content > figure,
.bio-page .entry-content > .wp-block-image {
    margin: 0 0 32px;
}
.bio-page .bio-portrait img,
.bio-page .entry-content > figure img,
.bio-page .entry-content > .wp-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
}
.bio-page .entry-content p {
    font-size: 16px;
    line-height: 1.65;
}
.bio-page .bio-instagram {
    margin-top: 0;
}

/* =========================================================
   v24 — mobile-first repair
   Desktop rules above remain untouched. Below 760px the
   header, homepage, projects, book and bio get a clean,
   non-overlaying mobile layout.
   ========================================================= */
@media (max-width: 760px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Header must be a real cream strip on mobile, never an overlay. */
    html body .site-header {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 20px 18px 16px !important;
        background: #F7F5F0 !important;
        color: #202020 !important;
        transform: none !important;
        z-index: 1000 !important;
    }

    html body .header-top {
        position: relative !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        min-height: 42px !important;
        gap: 18px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html body .site-branding {
        position: static !important;
        display: block !important;
        flex: 0 1 auto !important;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        z-index: 2 !important;
    }

    html body .site-title {
        position: static !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #202020 !important;
        font-family: Georgia, "Times New Roman", serif !important;
        font-size: 27px !important;
        line-height: 1 !important;
        font-weight: 400 !important;
        letter-spacing: -0.018em !important;
        text-indent: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        white-space: nowrap !important;
        transform: none !important;
    }

    html body .site-tagline {
        position: static !important;
        display: block !important;
        margin: 6px 0 0 !important;
        padding: 0 !important;
        color: #777 !important;
        font-size: 7px !important;
        line-height: 1 !important;
        letter-spacing: .27em !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    html body .desktop-nav,
    html body .portfolio-panel {
        display: none !important;
    }

    html body .mobile-menu-toggle {
        position: static !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 3px 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        color: #202020 !important;
        font-family: Arial, Helvetica, sans-serif !important;
        font-size: 10px !important;
        line-height: 1 !important;
        font-weight: 500 !important;
        letter-spacing: .16em !important;
        text-indent: 0 !important;
        text-transform: uppercase !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: visible !important;
        transform: none !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        z-index: 3 !important;
    }

    html body .mobile-menu-toggle::before,
    html body .mobile-menu-toggle::after {
        content: none !important;
        display: none !important;
        background: none !important;
    }

    html body .mobile-menu-panel {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 25px 0 6px !important;
        background: #F7F5F0 !important;
        color: #202020 !important;
        transform: none !important;
    }

    html body .mobile-menu-panel[hidden] {
        display: none !important;
    }

    html body .mobile-menu-panel:not([hidden]) {
        display: block !important;
    }

    /* One mobile content grid, without nested-width shrinkage. */
    html body .site-content,
    html body.home .site-content,
    html body.front-page .site-content {
        width: calc(100% - 36px) !important;
        max-width: none !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 10px auto 42px !important;
        padding: 0 !important;
        transform: none !important;
    }

    html body.home .site-content,
    html body.front-page .site-content {
        margin-top: 0 !important;
        margin-bottom: 34px !important;
    }

    html body.home .entry-content,
    html body.front-page .entry-content {
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Homepage slideshow: sit below the header and size naturally. */
    html body.home .entry-content .metaslider,
    html body.home .entry-content .ml-slider,
    html body.front-page .entry-content .metaslider,
    html body.front-page .entry-content .ml-slider {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 auto !important;
        transform: none !important;
    }

    html body.home .entry-content .metaslider img,
    html body.home .entry-content .ml-slider img,
    html body.front-page .entry-content .metaslider img,
    html body.front-page .entry-content .ml-slider img {
        display: block !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }

    /* Projects */
    html body .project-page,
    html body .project-photoessay,
    html body .project-longform {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    html body .project-heading {
        width: 100% !important;
        max-width: none !important;
        margin: 18px 0 30px !important;
    }

    html body .project-title {
        margin: 0 !important;
        max-width: 100% !important;
        color: #202020 !important;
        font-size: clamp(38px, 12vw, 48px) !important;
        line-height: .98 !important;
        letter-spacing: -0.03em !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    html body .project-page .entry-content,
    html body .project-photoessay .entry-content,
    html body .project-longform .entry-content {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    html body .project-page .entry-content p,
    html body .project-page .entry-content li,
    html body .project-photoessay .entry-content > p,
    html body .project-longform .project-intro > p {
        font-size: 17px !important;
        line-height: 1.58 !important;
    }

    html body .project-photoessay .entry-content > p,
    html body .project-photoessay .entry-content > blockquote,
    html body .project-photoessay .entry-content > ul,
    html body .project-photoessay .entry-content > ol,
    html body .project-longform .project-intro,
    html body .project-longform .project-text-details {
        width: 100% !important;
        max-width: none !important;
    }

    html body .project-photoessay .entry-content > figure,
    html body .project-photoessay .entry-content > .wp-block-image,
    html body .project-photoessay .entry-content > .wp-block-gallery,
    html body .project-photoessay .entry-content > .gallery,
    html body .project-photoessay .entry-content > img,
    html body .project-photoessay .entry-content p:has(> img:only-child),
    html body .project-photoessay .entry-content p:has(> a:only-child > img:only-child) {
        width: 100% !important;
        max-width: none !important;
        margin-top: 32px !important;
        margin-bottom: 32px !important;
    }

    html body .project-photoessay .entry-content img {
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Longform drawer and slideshow stay compact enough for a phone. */
    html body .project-longform .project-intro {
        margin: 0 0 26px !important;
    }

    html body .project-longform .project-text-details {
        margin: 0 0 34px !important;
    }

    html body .project-text-toggle {
        padding: 17px 0 !important;
        font-size: 10px !important;
    }

    html body .project-text-body {
        padding: 8px 0 28px !important;
    }

    /* Book + BIO + other standard pages */
    html body .standard-page,
    html body .bio-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    html body .page-heading,
    html body .bio-page .page-heading {
        width: 100% !important;
        max-width: none !important;
        margin: 18px 0 28px !important;
    }

    html body .page-title {
        margin: 0 !important;
        max-width: 100% !important;
        font-size: clamp(38px, 11vw, 48px) !important;
        line-height: 1 !important;
        letter-spacing: -0.03em !important;
    }

    html body .standard-page .entry-content,
    html body .bio-page .entry-content {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    html body .standard-page .entry-content p,
    html body .bio-page .entry-content p {
        font-size: 16px !important;
        line-height: 1.62 !important;
    }

    html body .bio-page .bio-portrait,
    html body .bio-page .entry-content > figure,
    html body .bio-page .entry-content > .wp-block-image {
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 26px !important;
    }

    /* Footer follows content instead of being pushed toward a fake viewport. */
    html body .site-footer {
        position: static !important;
        width: calc(100% - 36px) !important;
        max-width: none !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 auto !important;
        padding: 18px 0 28px !important;
        transform: none !important;
    }
}


/* =========================================================
   v25 — critical mobile header + compact homepage spacing
   ========================================================= */
@media (max-width: 760px) {
    html body .site-header {
        position: relative !important;
        inset: auto !important;
        display: block !important;
        min-height: 72px !important;
        padding: 16px 20px 14px !important;
        background: #F7F5F0 !important;
        color: #202020 !important;
        overflow: visible !important;
    }
    html body .header-top { align-items: center !important; }
    html body .site-title { color: #202020 !important; font-size: 26px !important; }
    html body button.mobile-menu-toggle,
    html body button.mobile-menu-toggle .mobile-menu-label { color: #202020 !important; opacity: 1 !important; visibility: visible !important; }
    html body button.mobile-menu-toggle::before,
    html body button.mobile-menu-toggle::after { content: none !important; display: none !important; }
    html body:not(.home) .site-content { margin-top: 0 !important; }
    html body .project-heading,
    html body .page-heading { margin-top: 14px !important; }
    html body.home .site-content,
    html body.front-page .site-content { margin-bottom: 10px !important; }
    html body.home .entry-content,
    html body.front-page .entry-content,
    html body.home .metaslider,
    html body.home .ml-slider,
    html body.home .flexslider,
    html body.front-page .metaslider,
    html body.front-page .ml-slider,
    html body.front-page .flexslider { margin-bottom: 0 !important; padding-bottom: 0 !important; }
    html body.home .site-footer,
    html body.front-page .site-footer { margin-top: 0 !important; padding-top: 16px !important; }
}


/* =========================================================
   v26 — mobile language shortcut + compact Urban Animals text
   ========================================================= */
.mobile-header-actions,
.mobile-quick-lang { display: none; }

@media (max-width: 760px) {
    html body .mobile-header-actions {
        display: inline-flex !important;
        align-items: center !important;
        gap: 18px !important;
        margin-left: auto !important;
    }

    html body .mobile-quick-lang {
        display: inline-block !important;
        color: #202020 !important;
        font: 600 11px/1 Arial, Helvetica, sans-serif !important;
        letter-spacing: .15em !important;
        text-decoration: none !important;
        text-transform: uppercase !important;
        padding: 4px 0 !important;
    }

    /* Language is now always reachable in the header, so the duplicate
       switch inside the opened menu is visually de-emphasized. */
    html body .mobile-language-switcher {
        margin-top: 28px !important;
        opacity: .45 !important;
    }

    /* Urban Animals carries considerably more introductory copy than the
       other photo essay. On phones the photographs lead; the full text is
       available one tap away. Desktop remains unchanged. */
    html body .project-key-urban-animals .mobile-project-text-details {
        display: block !important;
        width: 100% !important;
        margin: 8px 0 30px !important;
        border-top: 1px solid rgba(32,32,32,.18) !important;
        border-bottom: 1px solid rgba(32,32,32,.18) !important;
    }

    html body .project-key-urban-animals .mobile-project-text-toggle {
        list-style: none !important;
        cursor: pointer !important;
        padding: 15px 0 !important;
        color: #202020 !important;
        font: 600 11px/1 Arial, Helvetica, sans-serif !important;
        letter-spacing: .16em !important;
        text-transform: uppercase !important;
    }

    html body .project-key-urban-animals .mobile-project-text-toggle::-webkit-details-marker { display: none !important; }
    html body .project-key-urban-animals .mobile-project-text-toggle::marker { content: '' !important; }

    html body .project-key-urban-animals .mobile-project-text-body {
        padding: 4px 0 22px !important;
    }

    html body .project-key-urban-animals .mobile-project-text-body p,
    html body .project-key-urban-animals .mobile-project-text-body blockquote {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        font-size: 16px !important;
        line-height: 1.58 !important;
    }
}


/* =========================================================
   v27 — desktop photo-essay scale + breathing room
   Tuhaf Bir His / A Strange Feeling + Şehir Hayvanları / Urban Animals
   Longform, Book, BIO and mobile intentionally unchanged.
   ========================================================= */
@media (min-width: 761px) {
    /* Give short photo essays a wider photographic field without changing
       the restrained text column or the cream editorial identity. */
    html body .project-photoessay {
        width: min(1640px, calc(100% - 48px));
    }

    /* Keep titles and introductory copy comfortably readable. */
    html body .project-photoessay .project-heading {
        width: min(920px, 100%);
    }

    html body .project-photoessay .entry-content > p,
    html body .project-photoessay .entry-content > blockquote,
    html body .project-photoessay .entry-content > ul,
    html body .project-photoessay .entry-content > ol,
    html body .project-photoessay .entry-content > h2,
    html body .project-photoessay .entry-content > h3 {
        width: min(760px, 100%);
    }

    /* Photographs become the visual anchor: wider field, more air between
       images, but no forced cropping or stretching. */
    html body .project-photoessay .entry-content > figure,
    html body .project-photoessay .entry-content > .wp-block-image,
    html body .project-photoessay .entry-content > .wp-block-gallery,
    html body .project-photoessay .entry-content > .gallery,
    html body .project-photoessay .entry-content > img,
    html body .project-photoessay .entry-content p:has(> img:only-child),
    html body .project-photoessay .entry-content p:has(> a:only-child > img:only-child) {
        width: min(1560px, 100%);
        max-width: 1560px;
        margin-top: 72px;
        margin-bottom: 72px;
    }

    html body .project-photoessay .entry-content > figure img,
    html body .project-photoessay .entry-content > .wp-block-image img,
    html body .project-photoessay .entry-content > img,
    html body .project-photoessay .entry-content p:has(> img:only-child) > img,
    html body .project-photoessay .entry-content p:has(> a:only-child > img:only-child) > a > img {
        display: block;
        max-width: 100%;
        max-height: 88vh;
        width: auto;
        height: auto;
        margin-left: auto;
        margin-right: auto;
        object-fit: contain;
    }

    /* MetaSlider, where present, follows the same scale. */
    html body .project-photoessay .metaslider,
    html body .project-photoessay .ml-slider,
    html body .project-photoessay .flexslider,
    html body .project-photoessay .nivoSlider,
    html body .project-photoessay .coin-slider {
        width: min(1560px, 100%) !important;
        max-width: 1560px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* v28.1 — robust PROJECT TEXT drawer when long-form pages use MetaSlider */
.project-text-toggle {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}
.project-text-body[hidden] {
    display: none !important;
}
