
/* ===== PHOTOGRAPHY PAGE ===== */

.photography-page {
    width: min(100% - 48px, 1050px);
    margin: 0 auto;
}

/* HERO */

.photo-hero {
    padding: clamp(95px, 14vw, 155px) 0 55px;
}

.photo-hero h1 {
    margin-top: 28px;
    font-size: clamp(52px, 9vw, 100px);
    line-height: 0.99;
    letter-spacing: -0.075em;
    font-weight: 650;
}

.photo-intro {
    max-width: 520px;
    margin-top: 27px;
    color: var(--theme-muted);
    font-size: 16px;
    line-height: 1.9;
}

.photo-hero-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 55px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--theme-border);
    color: var(--theme-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.3px;
}

.photo-hero-bottom a {
    transition: color 0.2s ease;
}

.photo-hero-bottom a:hover {
    color: var(--theme-text);
}

/* IMAGE PLACEHOLDERS */

.photo-placeholder {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    min-width: 0;
    background-color: #e8e7e5;
    color: #55545a;
}

.photo-placeholder::before,
.photo-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.photo-placeholder::before {
    z-index: -1;
    background:
        radial-gradient(
            ellipse at 20% 20%,
            rgba(255, 255, 255, 0.8),
            transparent 48%
        ),
        radial-gradient(
            ellipse at 80% 80%,
            rgba(150, 143, 158, 0.3),
            transparent 55%
        ),
        linear-gradient(135deg, #e5e3e1, #d4d5d8 55%, #e9e4df);
    transition: transform 0.6s ease;
}

.photo-placeholder::after {
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.photo-card:hover .photo-placeholder::before,
.photo-feature:hover .photo-placeholder::before {
    transform: scale(1.035);
}

.placeholder-label,
.placeholder-corner {
    position: absolute;
    z-index: 1;
    color: rgba(35, 35, 40, 0.65);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.3px;
}

.placeholder-label {
    top: 20px;
    left: 20px;
}

.placeholder-corner {
    right: 20px;
    bottom: 20px;
}

.placeholder-message {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 7px;
    padding: 20px;
    text-align: center;
}

.placeholder-symbol {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 5px;
    border: 1px solid rgba(35, 35, 40, 0.2);
    border-radius: 50%;
    font-size: 23px;
    font-weight: 300;
}

.placeholder-message p {
    font-size: 13px;
    font-weight: 550;
}

.placeholder-message small {
    font-size: 8px;
    letter-spacing: 1.2px;
    opacity: 0.7;
}

/* FEATURED IMAGE */

.photo-feature {
    margin-bottom: 105px;
}

.photo-placeholder-feature {
    min-height: 430px;
    aspect-ratio: 16 / 7;
    border-radius: 5px;
    background-color: #dfdfdf;
}

.photo-placeholder-feature::before {
    background:
        radial-gradient(
            ellipse at 75% 15%,
            rgba(255, 255, 255, 0.9),
            transparent 35%
        ),
        radial-gradient(
            ellipse at 20% 90%,
            rgba(159, 160, 177, 0.65),
            transparent 48%
        ),
        linear-gradient(120deg, #d4d5d9, #e9e5e1 50%, #c9d1d4);
}

.photo-caption {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 13px;
    color: var(--theme-muted);
    font-size: 10px;
    letter-spacing: 0.8px;
}

/* GALLERY HEADING */

.photo-gallery-section {
    padding-bottom: 100px;
}

.photo-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 35px;
}

.photo-section-heading h2 {
    margin-top: 13px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.06em;
}

.photo-section-heading > p {
    max-width: 280px;
    color: var(--theme-muted);
    font-size: 13px;
    line-height: 1.8;
}

/* GALLERY GRID */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px 24px;
    align-items: start;
}

.photo-card {
    min-width: 0;
}

.photo-card-tall {
    grid-row: span 2;
}

.photo-card-wide {
    grid-column: 1 / -1;
}

.photo-card .photo-placeholder {
    aspect-ratio: 4 / 3;
    border-radius: 4px;
}

.photo-card-tall .photo-placeholder {
    aspect-ratio: 3 / 4;
}

.photo-card-wide .photo-placeholder {
    aspect-ratio: 16 / 7;
}

.placeholder-detail::before {
    background:
        radial-gradient(ellipse at 80% 15%, #e6e0d8, transparent 45%),
        linear-gradient(145deg, #c7c7c3, #e2dcd5 55%, #c5c7c8);
}

.placeholder-nature::before {
    background:
        radial-gradient(ellipse at 50% 0%, #e9e8d9, transparent 48%),
        linear-gradient(145deg, #d1d8cd, #b7c3b7 55%, #d8d7c9);
}

.placeholder-urban::before {
    background:
        radial-gradient(ellipse at 90% 10%, #d6d8dc, transparent 40%),
        linear-gradient(135deg, #c6c9cd, #d9d6d0 55%, #b8bec3);
}

.placeholder-evening::before {
    background:
        radial-gradient(ellipse at 50% 100%, #d8b9a8, transparent 55%),
        linear-gradient(125deg, #c2c5d0, #d9c7c0 55%, #b7bbc9);
}

.placeholder-experiment::before {
    background:
        radial-gradient(ellipse at 15% 20%, #f0e7d9, transparent 42%),
        linear-gradient(135deg, #ded6d0, #c8c8d0 55%, #deded9);
}

.photo-card-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    padding-top: 13px;
}

.photo-card-info h3 {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.2px;
}

.photo-card-info span {
    flex-shrink: 0;
    color: var(--theme-muted);
    font-size: 9px;
    letter-spacing: 0.8px;
}

.gallery-note {
    margin-top: 38px;
    color: var(--theme-muted);
    font-size: 12px;
}

/* PERSONAL NOTE */

.photo-note {
    max-width: 760px;
    padding: 65px 0 75px;
    margin: 0 auto 65px;
    border-top: 1px solid var(--theme-border);
    border-bottom: 1px solid var(--theme-border);
    text-align: center;
}

.photo-note h2 {
    margin-top: 20px;
    font-size: clamp(35px, 6vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.065em;
}

.photo-note > p:not(.eyebrow) {
    max-width: 510px;
    margin: 23px auto 0;
    color: var(--theme-muted);
    font-size: 14px;
    line-height: 1.9;
}

.photo-signature {
    display: inline-block;
    margin-top: 27px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
}

/* BOTTOM LINKS */

.photo-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 0 80px;
}

.photo-bottom .text-link {
    font-size: 13px;
}

/* DARK MODE */

html[data-theme="dark"] .photo-placeholder {
    background-color: #29292d;
    color: #e1e1e5;
}

html[data-theme="dark"] .photo-placeholder::before {
    background:
        radial-gradient(
            ellipse at 20% 20%,
            rgba(110, 110, 125, 0.5),
            transparent 48%
        ),
        radial-gradient(
            ellipse at 80% 80%,
            rgba(40, 48, 58, 0.8),
            transparent 55%
        ),
        linear-gradient(135deg, #29292e, #38383e 55%, #252b30);
}

html[data-theme="dark"] .photo-placeholder-feature::before {
    background:
        radial-gradient(ellipse at 75% 15%, #45454b, transparent 35%),
        radial-gradient(ellipse at 20% 90%, #3b3a49, transparent 48%),
        linear-gradient(120deg, #292a30, #353136 50%, #252d31);
}

html[data-theme="dark"] .placeholder-label,
html[data-theme="dark"] .placeholder-corner {
    color: rgba(245, 245, 247, 0.65);
}

html[data-theme="dark"] .placeholder-symbol {
    border-color: rgba(245, 245, 247, 0.3);
}

html[data-theme="dark"] .placeholder-detail::before {
    background: linear-gradient(145deg, #343438, #403b38 55%, #2d3033);
}

html[data-theme="dark"] .placeholder-nature::before {
    background: linear-gradient(145deg, #303831, #39443b 55%, #33352f);
}

html[data-theme="dark"] .placeholder-urban::before {
    background: linear-gradient(135deg, #303137, #3a3936 55%, #2d3237);
}

html[data-theme="dark"] .placeholder-evening::before {
    background: linear-gradient(125deg, #353542, #403536 55%, #303341);
}

html[data-theme="dark"] .placeholder-experiment::before {
    background: linear-gradient(135deg, #3b3532, #363640 55%, #30312f);
}

/* RESPONSIVE */

@media (max-width: 650px) {
    .photography-page {
        width: calc(100% - 36px);
    }

    .photo-hero {
        padding-top: 90px;
        padding-bottom: 40px;
    }

    .photo-hero h1 {
        font-size: clamp(46px, 11vw, 68px);
    }

    .photo-intro {
        font-size: 14px;
    }

    .photo-hero-bottom {
        margin-top: 40px;
        font-size: 8px;
        letter-spacing: 0.7px;
    }

    .photo-feature {
        margin-bottom: 75px;
    }

    .photo-placeholder-feature {
        min-height: 260px;
        aspect-ratio: 4 / 3;
    }

    .photo-caption {
        flex-direction: column;
        gap: 5px;
    }

    .photo-gallery-section {
        padding-bottom: 70px;
    }

    .photo-section-heading {
        align-items: start;
        flex-direction: column;
        gap: 12px;
    }

    .photo-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .photo-card-tall {
        grid-row: auto;
    }

    .photo-card-wide {
        grid-column: auto;
    }

    .photo-card-tall .photo-placeholder {
        aspect-ratio: 4 / 3;
    }

    .photo-card-wide .photo-placeholder {
        aspect-ratio: 4 / 3;
    }

    .photo-note {
        padding: 50px 0;
        margin-bottom: 45px;
    }

    .photo-note h2 {
        font-size: clamp(34px, 9vw, 48px);
    }

    .photo-bottom {
        padding-bottom: 55px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .photo-placeholder::before {
        transition: none;
    }
}


/* =========================================
   PHOTOGRAPHY — REAL IMAGES & VIEWER
   ========================================= */

/* Featured photograph */

.photo-feature-button,
.photo-card-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: zoom-in;
    text-align: left;
}

.photo-feature-button {
    overflow: hidden;
    border-radius: 5px;
}

.photo-feature-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    background: var(--theme-border);
    transition: transform 0.6s ease;
}

.photo-feature-button:hover .photo-feature-image {
    transform: scale(1.025);
}

/* Gallery photographs */

.photo-card-button {
    overflow: hidden;
    border-radius: 4px;
}

.photo-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--theme-border);
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.photo-card-tall .photo-card-image {
    aspect-ratio: 3 / 4;
}

.photo-card-button:hover .photo-card-image {
    transform: scale(1.035);
}

.photo-card-image:not([src]),
.photo-feature-image:not([src]) {
    visibility: hidden;
}

/* Loading, empty and error messages */

.photo-gallery-message {
    grid-column: 1 / -1;
    padding: 55px 20px;
    color: var(--theme-muted);
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
}

.photo-empty-feature {
    display: flex;
    min-height: 300px;
    aspect-ratio: 16 / 7;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 25px;
    border: 1px solid var(--theme-border);
    border-radius: 5px;
    background: var(--theme-surface, transparent);
    color: var(--theme-muted);
    text-align: center;
}

.photo-empty-feature p {
    color: var(--theme-text);
    font-size: 18px;
}

.photo-empty-feature span {
    font-size: 9px;
    letter-spacing: 1.5px;
}

/* Fullscreen photo viewer */

.photo-viewer {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 70px 65px 35px;
    background: rgba(10, 10, 12, 0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.photo-viewer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.photo-viewer-figure {
    display: flex;
    flex: 1;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
}

.photo-viewer-image {
    display: block;
    max-width: 100%;
    max-height: calc(100% - 55px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 2px;
}

.photo-viewer-caption {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    padding-top: 17px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    letter-spacing: 0.5px;
}

.photo-viewer-count {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.5);
    font-variant-numeric: tabular-nums;
}

.photo-viewer button {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.photo-viewer button:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.photo-viewer .photo-viewer-close {
    position: absolute;
    top: 22px;
    right: 25px;
    font-size: 27px;
}

body.photo-viewer-open {
    overflow: hidden;
}

/* Keyboard focus */

.photo-card-button:focus-visible,
.photo-feature-button:focus-visible,
.photo-viewer button:focus-visible {
    outline: 2px solid #8ab4ff;
    outline-offset: 4px;
}

/* Mobile viewer */

@media (max-width: 650px) {
    .photo-feature-image {
        aspect-ratio: 4 / 3;
    }

    .photo-empty-feature {
        min-height: 240px;
        aspect-ratio: 4 / 3;
    }

    .photo-viewer {
        gap: 8px;
        padding: 65px 12px 25px;
    }

    .photo-viewer button {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .photo-viewer .photo-viewer-close {
        top: 15px;
        right: 15px;
    }

    .photo-viewer-caption {
        gap: 10px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .photo-feature-image,
    .photo-card-image,
    .photo-viewer {
        transition: none;
    }
}

/* ===== PRIVATE PHOTOGRAPHY ADMIN ===== */

.photo-admin[hidden],
#photoAdminControls[hidden] {
    display: none !important;
}

.photo-admin {
    position: fixed;
    z-index: 10000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, calc(100% - 32px));
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    border: 1px solid var(--theme-border, #dedee3);
    border-radius: 20px;
    background: var(--theme-surface, #fff);
    color: var(--theme-text, #1d1d1f);
    box-shadow: 0 24px 100px rgba(0, 0, 0, 0.25);
}

.photo-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.photo-admin-header h2 {
    margin: 4px 0 8px;
}

.photo-admin-header p,
#photoAdminStatus,
#photoAdminLoginMessage {
    color: var(--theme-muted, #6e6e73);
    font-size: 13px;
}

#photoAdminClose {
    font-size: 28px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

#photoAdminLogin,
#photoUploadForm,
#photoUrlForm {
    display: grid;
    gap: 10px;
}

.photo-admin label {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
}

.photo-admin input {
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--theme-border, #dedee3);
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
}

.photo-admin button[type="submit"],
#photoAdminLogout {
    margin-top: 10px;
    padding: 12px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--theme-text, #1d1d1f);
    color: var(--theme-surface, #fff);
    font: inherit;
    cursor: pointer;
}

.photo-admin-divider {
    height: 1px;
    margin: 24px 0;
    background: var(--theme-border, #dedee3);
}

#photoAdminList {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.photo-admin-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.photo-admin-item img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
}

.photo-admin-item button {
    margin-left: auto;
}

@media (max-width: 480px) {
    .photo-admin {
        padding: 20px;
    }
}
