/* =========================================================
   RONCHAUKOFF — Artist Portfolio
   ========================================================= */

:root {
    --bg: #000000;
    --fg: #ffffff;
    --fg-muted: #d0d0d0;
    --fg-soft: #a4a4a4;
    --border: #ffffff;
    --btn-bg: #2e2e2e;
    --btn-bg-hover: #3e3e3e;
    --gap: 26px;
    --pad-x: clamp(20px, 3.2vw, 44px);
    --font-sans: 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.layout {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

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

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

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =========================================================
   TOP BAR
   ========================================================= */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px var(--pad-x) 14px;
}

.brand {
    font-weight: 700;
    font-size: clamp(21px, 1.89vw, 27.4px);
    letter-spacing: 0.06em;
    line-height: 1;
}

/* HAMBURGER (Mobile only) */
.hamburger {
    display: none;
    background: transparent;
    border: 0;
    padding: 6px;
    cursor: pointer;
    width: 34px;
    height: 28px;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #ffffff;
    transition: transform 200ms ease, opacity 200ms ease;
}

.hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* SIDENAV CLOSE (Mobile only) */
.sidenav-close {
    display: none;
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: 0;
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
}

/* SIDENAV BACKDROP (Mobile only) */
.sidenav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 90;
    opacity: 0;
    transition: opacity 220ms ease;
}

.sidenav-backdrop.is-open {
    display: block;
    opacity: 1;
}

.view-all-btn {
    background: transparent;
    color: var(--fg);
    padding: 0;
    font-size: 11px;
    letter-spacing: 0.18em;
    font-weight: 500;
    border: 0;
    display: inline-block;
    transition: opacity 160ms ease;
}

.view-all-btn:hover {
    opacity: 0.6;
}

.view-all-btn--bottom {
    display: none;
    margin: 28px auto 0;
    text-align: center;
    font-size: 12px;
}

/* =========================================================
   LAYOUT GRID (Sidebar | Main | Right column)
   ========================================================= */
.layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 170px;
    gap: 32px 56px;
    padding: 16px var(--pad-x) 28px;
    align-items: flex-start;
}

/* =========================================================
   LEFT NAV
   ========================================================= */
.sidenav {
    padding-top: 6px;
}

.sidenav ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidenav a {
    font-size: 12px;
    letter-spacing: 0.18em;
    font-weight: 400;
    color: var(--fg);
    transition: opacity 150ms ease;
}

.sidenav a:hover {
    opacity: 0.6;
}

.sidenav a.active {
    font-weight: 500;
}

/* =========================================================
   WORKS GRID
   ========================================================= */
.works {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px 22px;
}

.work-card {
    display: flex;
    flex-direction: column;
}

.thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border: 0;
    overflow: hidden;
    background: #111;
    cursor: pointer;
}

/* Faded white border halo — sharp at the thumb edge (white), fades to fully transparent
   on the outer edge. Uses 4 directional gradient strips on a pseudo-element placed
   OUTSIDE the thumb so the thumbnail content size stays exactly the same. */
.thumb::before {
    content: '';
    position: absolute;
    inset: -8px;
    pointer-events: none;
    z-index: 4;
    background:
        linear-gradient(to top,    rgba(255,255,255,1), rgba(255,255,255,0)) top    / 100% 8px no-repeat,
        linear-gradient(to bottom, rgba(255,255,255,1), rgba(255,255,255,0)) bottom / 100% 8px no-repeat,
        linear-gradient(to left,   rgba(255,255,255,1), rgba(255,255,255,0)) left   / 8px 100% no-repeat,
        linear-gradient(to right,  rgba(255,255,255,1), rgba(255,255,255,0)) right  / 8px 100% no-repeat;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease, filter 300ms ease;
    filter: brightness(0.88);
}

.thumb:hover img {
    transform: scale(1.04);
    filter: brightness(1);
}

/* Play buttons removed visually — thumbnail is the click target */
.play-btn {
    display: none;
}

/* DURATION TAG */
.duration {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* TEXT BELOW THUMB */
.title {
    margin: 12px 0 3px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.meta {
    margin: 0;
    font-size: 13px;
    color: var(--fg-muted);
    font-weight: 300;
    letter-spacing: 0.01em;
}

/* =========================================================
   RIGHT COLUMN — RECENT WORKS
   ========================================================= */
.recent {
    padding-top: 6px;
}

.recent-title {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.recent ul {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.recent li {
    font-size: 13px;
    color: var(--fg-muted);
    letter-spacing: 0.01em;
}

.recent a {
    text-decoration: underline;
    text-underline-offset: 3px;
    color: var(--fg);
    transition: opacity 150ms ease;
}

.recent a:hover {
    opacity: 0.65;
}

.recent span {
    color: var(--fg-soft);
}

/* =========================================================
   CONTACT VIEW
   ========================================================= */
.contact-view {
    grid-column: 2 / span 2;
    max-width: 720px;
    padding: 4px 0 30px;
}

body.view-contact .works,
body.view-contact .recent,
body.view-contact .view-all-btn--top {
    display: none !important;
}

body.view-contact .contact-view {
    display: block;
}

.contact-title {
    margin: 0 0 12px;
    font-size: clamp(20px, 1.7vw, 24px);
    font-weight: 700;
    letter-spacing: 0.06em;
}

.contact-intro {
    margin: 0 0 26px;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 300;
    color: var(--fg-muted);
    max-width: 560px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.contact-form input,
.contact-form textarea {
    background: transparent;
    color: var(--fg);
    border: 1px solid #5e5e5e;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.04em;
    outline: none;
    transition: border-color 160ms ease;
    width: 100%;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #6f6f6f;
    letter-spacing: 0.06em;
    font-weight: 400;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #ffffff;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.contact-send {
    align-self: flex-start;
    margin-top: 4px;
    background: transparent;
    color: var(--fg);
    border: 1px solid #5e5e5e;
    padding: 7px 18px;
    font-size: 12px;
    letter-spacing: 0.16em;
    font-weight: 500;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

.contact-send:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #ffffff;
}

.contact-extras {
    margin-top: 8px;
}

.contact-email {
    margin: 0 0 14px;
    font-size: 13px;
    letter-spacing: 0.08em;
}

.contact-email strong {
    font-weight: 700;
    letter-spacing: 0.04em;
}

.contact-cv {
    display: inline-block;
    border: 1px solid #5e5e5e;
    padding: 7px 16px;
    font-size: 11px;
    letter-spacing: 0.14em;
    font-weight: 500;
    transition: background 160ms ease, border-color 160ms ease;
}

.contact-cv:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #ffffff;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
    border-top: 1px solid #1a1a1a;
    margin: 0 var(--pad-x);
    padding: 16px 0 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
}

.footer a {
    transition: color 150ms ease;
}

.footer a:hover {
    color: var(--fg);
}

.socials {
    display: flex;
    gap: 8px;
    align-items: center;
}

.socials span {
    color: var(--fg-soft);
}

/* =========================================================
   LIGHTBOX (Vimeo Player)
   ========================================================= */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: clamp(16px, 4vw, 40px);
}

.lightbox.is-open {
    display: flex;
    animation: fadeIn 180ms ease;
}

.lightbox-content {
    width: min(1100px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* When the page is in fullscreen mode, scale the player up but leave some breathing room */
:fullscreen .lightbox-content,
:-webkit-full-screen .lightbox-content {
    width: min(82%, calc((100vh - 200px) * 16 / 9));
    max-width: 100%;
}

.lightbox-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 0;
    position: relative;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
    text-align: center;
    margin-top: 18px;
    padding: 0 16px;
}

.lightbox-title {
    margin: 0;
    font-size: clamp(15px, 1.4vw, 18px);
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #ffffff;
    text-transform: uppercase;
}

.lightbox-role {
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.18em;
    color: #b8b8b8;
    text-transform: uppercase;
}

.lightbox-iframe {
    width: 100%;
    height: 100%;
}

.lightbox-iframe iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: transparent;
    border: 0;
    color: #ffffff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    transition: opacity 150ms ease, transform 150ms ease;
}

.lightbox-close:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

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

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 110px minmax(0, 1fr) 150px;
        gap: 22px;
    }

    .works {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    /* TOP BAR: Hamburger left, brand centered */
    .topbar {
        padding: 18px 18px 14px;
        position: relative;
        justify-content: center;
    }

    .hamburger {
        display: flex;
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
    }

    .brand {
        font-size: clamp(24px, 7vw, 34px);
        font-weight: 700;
        letter-spacing: 0.03em;
        text-align: center;
    }

    /* Hide desktop top-right "VIEW ALL WORKS" — replaced with bottom one */
    .view-all-btn--top {
        display: none;
    }

    /* Show bottom centered "VIEW ALL WORKS" */
    .view-all-btn--bottom {
        display: block;
    }

    /* LAYOUT: stacked, recent on top, then works */
    .layout {
        display: flex;
        flex-direction: column;
        gap: 18px;
        padding: 6px 18px 22px;
    }

    /* SIDENAV becomes off-canvas drawer */
    .sidenav {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: min(78vw, 320px);
        background: #0a0a0a;
        padding: 70px 28px 28px;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 280ms ease;
        border-right: 1px solid #1a1a1a;
        overflow-y: auto;
    }

    .sidenav.is-open {
        transform: translateX(0);
    }

    .sidenav ul {
        gap: 18px;
    }

    .sidenav a {
        font-size: 14px;
    }

    .sidenav-close {
        display: block;
    }

    /* RECENT WORKS — top of stack */
    .recent {
        order: 1;
        padding-top: 0;
    }

    .works {
        order: 2;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 14px;
    }

    .contact-view {
        max-width: 100%;
        padding: 4px 0 24px;
    }

    .title {
        font-size: 14px;
    }

    .meta {
        font-size: 12px;
    }

    .duration {
        font-size: 11px;
        bottom: 6px;
        right: 8px;
    }

    /* FOOTER stacked centered */
    .footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        margin: 0 18px;
        padding: 14px 0 16px;
    }
}

@media (max-width: 420px) {
    .brand {
        font-size: 26px;
    }
}
