/*
Theme Name: Walyd Portfolio
Theme URI:
Author: Walyd
Description: Minimal art portfolio — fixed left sidebar, scrollable right content.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: walyd-portfolio
*/

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --cream: #f5f0e8;
    --ink:   #1a1a1a;
    --mid:   #999;
    --jost:  'Jost', 'Helvetica Neue', Arial, sans-serif;
    --cg:    'Cormorant Garamond', Georgia, serif;
}

html, body {
    background: var(--cream);
    color: var(--ink);
    font-family: var(--jost);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Sidebar ─────────────────────────────────────────────── */
.site-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    padding: 3.5rem 2rem 3.5rem 3.5rem;
    background: var(--cream);
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow-y: auto;
}

.sidebar-name {
    font-family: var(--cg);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--ink);
    display: block;
    line-height: 1.3;
    margin-bottom: 2.5rem;
}

.sidebar-menu-label {
    font-family: var(--jost);
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 0.85rem;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav a {
    font-family: var(--jost);
    font-size: 0.88rem;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 2.1;
    display: block;
    opacity: 0.4;
    transition: opacity 0.18s;
    white-space: nowrap;
}

.sidebar-nav a:hover,
.sidebar-nav a.active { opacity: 1; }

/* WordPress menu active states */
.sidebar-nav .current-menu-item a,
.sidebar-nav .current-page-item a,
.sidebar-nav .current-page-ancestor a { opacity: 1; }

.sidebar-instagram {
    color: var(--mid);
    transition: color 0.2s;
    line-height: 0;
}

.sidebar-instagram:hover { color: var(--ink); }

/* Desktop: show bottom-of-sidebar icon, hide mobile duplicate */
.sidebar-instagram--desktop {
    display: inline-block;
    margin-top: auto;
    padding-top: 2.5rem;
}

.sidebar-instagram--mobile {
    display: none;
}

/* Mobile/tablet (≤1024px): hide desktop icon, show mobile icon */
@media (max-width: 1024px) {
    .sidebar-instagram--desktop { display: none; }
    .sidebar-instagram--mobile  { display: inline-block; margin-top: 1rem; }
}

@media (max-width: 768px) {
    .instagram-link {
        display: block;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(0,0,0,0.08);
    }
}

@media (min-width: 769px) {
    .instagram-link {
        position: absolute;
        bottom: 2rem;
        left: 2.5rem;
    }
}

/* Mobile hamburger — hidden on desktop */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1.1rem;
    left: 1.1rem;
    z-index: 200;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    color: var(--ink);
    line-height: 0;
}

/* ── Content Area ────────────────────────────────────────── */
.content-area {
    margin-left: 220px;
    padding: 4rem 8rem 6rem 4rem;
    min-height: 100vh;
    background: var(--cream);
}

/* ── Selected Works / Works on Paper ─────────────────────── */
.works-list {
    display: flex;
    flex-direction: column;
    gap: 7rem;
    padding-top: 5rem;
}

/* Prevent image selection highlighting */
.painting-block img,
.bio-image img {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    pointer-events: none;
}

.painting-block {
    position: relative;
    margin-bottom: 5rem;
    text-align: center;
}

.painting-block img {
    display: block;
    margin: 0 auto;
    max-height: 800px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.work-item__caption {
    font-family: var(--jost);
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    color: #888;
    display: block;
    margin-top: 0.75rem;
    text-align: center;
}

/* ── Bio ─────────────────────────────────────────────────── */

/* Bio page breaks out of default content-area padding */
body.page-template-page-bio .content-area {
    padding: 0;
}

.bio-layout {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

.bio-left {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    padding: 5rem 3rem 5rem 4rem;
}

.bio-left-inner {
    max-width: 380px;
}

.bio-heading {
    font-family: var(--cg);
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: 2rem;
}

.bio-body p {
    font-family: var(--jost);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.85;
    color: var(--ink);
    text-align: left;
    margin-bottom: 1.1rem;
}

.bio-right {
    flex: 0 0 55%;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.bio-right img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* ── CV ──────────────────────────────────────────────────── */
.cv-wrap {
    max-width: 580px;
    padding-top: 5rem;
}

.cv-intro {
    margin-bottom: 2.5rem;
}

.cv-intro-name {
    font-family: var(--jost);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--ink);
}

.cv-intro-location {
    font-family: var(--jost);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--mid);
}

.cv-section {
    margin-bottom: 2.5rem;
}

.cv-section-heading {
    font-family: var(--jost);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 1.1rem;
}

.cv-entries {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.cv-entry {
    display: flex;
    gap: 1.5rem;
    font-family: var(--jost);
    font-size: 0.85rem;
    line-height: 1.55;
    align-items: baseline;
}

.cv-entry__year {
    font-weight: 500;
    flex-shrink: 0;
    width: 3rem;
    color: var(--ink);
}

.cv-entry__detail {
    font-weight: 300;
    color: var(--ink);
}

.cv-entry__detail a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.7;
}

/* ── Press ───────────────────────────────────────────────── */
.press-page-heading {
    font-family: var(--jost);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--mid);
    padding-top: 5rem;
    margin-bottom: 2.5rem;
}

.press-list {
    display: flex;
    flex-direction: column;
    max-width: 820px;
}

.press-item {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 4rem;
}

.press-item-image {
    width: 280px;
    min-width: 280px;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.press-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.press-item-content {
    flex: 1;
}

.press-card__pub {
    font-family: var(--jost);
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 0.4rem;
}

.press-card__title {
    font-family: var(--jost);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.press-card__year {
    font-family: var(--jost);
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--mid);
    margin-bottom: 1rem;
}

.press-card__btn {
    display: inline-block;
    font-family: var(--jost);
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cream);
    background: var(--ink);
    padding: 0.48rem 1.1rem;
    transition: opacity 0.2s;
}

.press-card__btn:hover { opacity: 0.75; }

/* ── Contact ─────────────────────────────────────────────── */
.contact-page-heading {
    font-family: var(--jost);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--mid);
    padding-top: 5rem;
    margin-bottom: 3rem;
}

.contact-simple {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-intro {
    font-family: var(--jost);
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--mid);
    line-height: 1.6;
}

.contact-email {
    font-family: var(--jost);
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--ink);
    text-decoration: none;
    transition: text-decoration 0.15s;
}

.contact-email:hover {
    text-decoration: underline;
}

/* ── Exhibitions (legacy page — works with new layout) ──── */
.page-heading {
    font-family: var(--jost);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 2.5rem;
}

.page-inner { max-width: 820px; }

.exh-block { margin-bottom: 3rem; }

.exh-subhead {
    font-family: var(--jost);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 1.25rem;
}

.exh-list { list-style: none; }

.exh-entry {
    display: flex;
    gap: 2rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    align-items: baseline;
}

.exh-year {
    font-family: var(--jost);
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--mid);
    flex-shrink: 0;
    width: 3rem;
}

.exh-detail {
    font-family: var(--jost);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.5;
    color: var(--ink);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    margin-left: 220px;
    padding: 1.5rem 8rem 1.5rem 4rem;
    text-align: center;
    border-top: none;
    font-family: var(--jost);
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 0.08em;
    background: var(--cream);
}

.site-footer__copy {
    font-weight: 300;
}

/* ── Responsive ──────────────────────────────────────────── */

/* =========================================================
   MOBILE (max-width: 768px)
   ========================================================= */
@media (max-width: 768px) {

    .site-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 1.5rem 1.5rem 1rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    /* Name row: Emma Santos left, hamburger right */
    .site-sidebar .site-name {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .site-content,
    .content-area {
        margin-left: 0;
        padding: 1rem 1.5rem 3rem;
        min-height: auto;
    }

    .site-footer {
        margin-left: 0;
        padding: 1.5rem;
    }

    .press-item {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 3rem;
    }

    .press-item-image {
        width: 100%;
        min-width: 100%;
        height: 220px;
    }

    .press-item-content {
        width: 100%;
    }

    .bio-layout {
        flex-direction: column-reverse;
    }

    .bio-right {
        flex: none;
        width: 100%;
        height: 50vh;
        min-height: 300px;
    }

    .bio-left {
        flex: none;
        width: 100%;
        padding: 2rem 1.5rem 1rem;
        background: transparent;
    }

    .site-content,
    .content-area,
    .works-list {
        padding-top: 0.5rem !important;
        margin-top: 0 !important;
    }

    .content-area {
        min-height: 0;
    }

    .press-page-heading,
    .contact-page-heading,
    .cv-wrap {
        padding-top: 0.5rem !important;
        margin-top: 0 !important;
    }

    .painting-block img {
        max-height: 600px;
    }

    .painting-block {
        margin-bottom: 3rem;
    }

    .work-item__caption {
        margin-top: 0.5rem;
    }

    .cv-entry {
        flex-direction: column;
        gap: 0.25rem;
    }

    .cv-year {
        min-width: unset;
    }

    .sidebar-nav {
        display: none;
        width: 100%;
    }

    .sidebar-nav.open {
        display: block;
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        width: 100%;
        background: #f5f0e8;
        padding: 1.5rem 2rem;
        z-index: 999;
        text-align: left;
    }

    .sidebar-nav.open a {
        display: block;
        padding: 0.6rem 0;
        font-size: 1rem;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        font-size: 1.3rem;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
        border-radius: 0 !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        color: #1a1a1a;
        padding: 0;
        margin: 0;
    }

    .hamburger:focus,
    .hamburger:active {
        background: none !important;
        outline: none !important;
        box-shadow: none !important;
    }

    .site-sidebar .site-name {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* =========================================================
   TABLET (768px - 1024px)
   ========================================================= */
@media (min-width: 768px) and (max-width: 1024px) {

    .site-sidebar {
        width: 180px;
    }

    .site-content,
    .content-area {
        margin-left: 180px;
        padding: 1.5rem 3rem 4rem 2rem;
    }

    .site-content,
    .content-area,
    .works-list {
        padding-top: 0.5rem !important;
        margin-top: 0 !important;
    }

    .press-page-heading,
    .contact-page-heading,
    .cv-wrap {
        padding-top: 0.5rem !important;
        margin-top: 0 !important;
    }

    .site-footer {
        margin-left: 180px;
    }

    .press-item {
        gap: 1.5rem;
    }

    .press-item-image {
        width: 220px;
        min-width: 220px;
        height: 170px;
    }

    .bio-image {
        width: 50%;
    }

}

/* =========================================================
   HAMBURGER MENU - show on mobile
   ========================================================= */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: none;
    }
}

@media (min-width: 769px) {
    .hamburger {
        display: none;
    }

    .sidebar-nav {
        display: block !important;
    }

}

/* =========================================================
   MOBILE LANDSCAPE
   ========================================================= */
@media (max-width: 926px) and (orientation: landscape) {

    .site-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 1rem 1.5rem;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .site-name {
        display: flex;
        align-items: center;
        gap: 1rem;
        width: 100%;
        justify-content: space-between;
    }

    /* Hide sidebar instagram in landscape — shows inside burger menu instead */
    .site-sidebar > .instagram-link {
        display: none;
    }

    .site-content,
    .content-area {
        margin-left: 0;
        padding: 1rem 1.5rem 3rem;
    }

    .site-footer {
        margin-left: 0;
    }

    .sidebar-nav {
        display: none;
    }

    .sidebar-nav.open {
        display: block;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #f5f0e8;
        padding: 1rem 1.5rem;
        z-index: 200;
    }

    .hamburger {
        display: block;
    }
}
