/* ========================================
   Layout — sticky header, sections, modals
   ======================================== */

/* ----------------------------------------
   Fixed vertical nav — right side
   ---------------------------------------- */

.side-nav {
    position: fixed;
    right: clamp(24px, 4vw, 56px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 18px;
}

.nav-link {
    color: rgba(var(--color-text-rgb), 0.5);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--color-text);
}

/* ----------------------------------------
   Section containers
   ---------------------------------------- */

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 48px);
}

.page-section {
    padding: clamp(72px, 11vh, 120px) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Section heading row */
.section-head {
    margin-bottom: clamp(32px, 5vh, 56px);
}

.section-heading {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--color-text);
}

/* ----------------------------------------
   Shared modal overlay
   ---------------------------------------- */

.project-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
}

.project-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.25s ease;
}

.project-modal-content {
    position: relative;
    width: 90vw;
    max-width: 1000px;
    max-height: 90vh;
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-modal-scroll {
    height: 90vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.project-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    color: var(--color-text);
    font-weight: 300;
    z-index: 1001;
}

.project-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(16px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* ----------------------------------------
   Shared card hover — border lift
   (transform overrides live in each page-specific file)
   ---------------------------------------- */

.photo-card:hover,
.project-card:hover,
.blog-card:hover,
.art-card:hover {
    border-color: var(--border-card-hover);
}

/* ----------------------------------------
   Responsive
   ---------------------------------------- */

@media screen and (max-width: 991px) {
    .section-heading {
        text-align: center;
    }
}

@media screen and (max-width: 767px) {

    /* Nav moves to top bar */
    .side-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        transform: none;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 24px;
        padding: 22px 20px 14px;
        background: transparent;
        border-bottom: none;
        z-index: 100;
    }

    .project-modal.show {
        align-items: flex-end;
    }

    .project-modal-content {
        width: 100%;
        max-width: none;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        animation: modalSlideUp 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .project-modal-scroll {
        height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    @keyframes modalSlideUp {
        from { opacity: 0; transform: translateY(40px); }
        to   { opacity: 1; transform: translateY(0);    }
    }

    .project-modal-close {
        position: sticky;
        top: 12px;
        left: calc(100% - 56px);
        z-index: 10;
        margin: 12px 16px 0 auto;
        display: flex;
    }
}

@media screen and (max-width: 479px) {
    .nav-links {
        gap: 14px;
    }
}
