/*
Theme Name: Daniel Jaroschik
Theme URI: https://danieljaroschik.com
Author: Daniel Jaroschik
Description: A minimal single-page portfolio theme for a London-based cinematographer.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: daniel-jaroschik
*/

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg:      #0a0a0a;
    --color-text:    #f0ece4;
    --color-muted:   #888880;
    --color-overlay: rgba(0, 0, 0, 0.72);
    --font-futura:   'Futura', 'Futura PT', 'Century Gothic', 'Trebuchet MS', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-futura);
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

/* ===========================
   HERO
=========================== */
.site-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    overflow: hidden;
}

.site-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Dark gradient over hero so text is legible */
.site-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.10) 0%,
        rgba(0,0,0,0.25) 50%,
        rgba(0,0,0,0.70) 100%
    );
    pointer-events: none;
}

.site-hero__text {
    position: absolute;
    bottom: 10%;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 2;
    padding: 0 2rem;
}

.site-hero__name {
    font-family: var(--font-futura);
    font-weight: 300;
    font-size: clamp(2rem, 6vw, 5rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.1;
}

.site-hero__subtitle {
    font-family: var(--font-futura);
    font-weight: 300;
    font-style: oblique;
    font-size: clamp(0.75rem, 1.8vw, 1.1rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.72);
    margin-top: 0.9rem;
}

/* ===========================
   PORTFOLIO GRID
=========================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    background: #000;
    padding: 3px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    cursor: pointer;
    background: #111;
}

.portfolio-item__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.55s ease;
    filter: brightness(0.9);
}

/* Hover overlay */
.portfolio-item__overlay {
    position: absolute;
    inset: 0;
    background: var(--color-overlay);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-align: center;
}

.portfolio-item:hover .portfolio-item__thumb {
    transform: scale(1.04);
    filter: brightness(0.6);
}

.portfolio-item:hover .portfolio-item__overlay {
    opacity: 1;
}

.portfolio-item__play {
    margin-bottom: 0.9rem;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.portfolio-item:hover .portfolio-item__play {
    opacity: 1;
    transform: scale(1.08);
}

.portfolio-item__title {
    font-family: var(--font-futura);
    font-weight: 300;
    font-size: clamp(0.8rem, 1.4vw, 1.05rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.portfolio-item.has-video {
    cursor: pointer;
}

.portfolio-item__play {
    margin-bottom: 0.9rem;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.portfolio-item__play svg {
    width: 44px;
    height: 44px;
}

.portfolio-item:hover .portfolio-item__play {
    opacity: 1;
    transform: scale(1.08);
}

.portfolio-item__desc {
    font-family: var(--font-futura);
    font-weight: 300;
    font-style: oblique;
    font-size: clamp(0.65rem, 1vw, 0.82rem);
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    max-width: 220px;
}

/* Optional: clicking a portfolio item opens its link */
.portfolio-item a.portfolio-item__link {
    position: absolute;
    inset: 0;
    z-index: 3;
}

/* ===========================
   CONTACT FOOTER
=========================== */
.site-contact {
    padding: 4.5rem 2rem;
    text-align: center;
    background: var(--color-bg);
    border-top: 1px solid rgba(255,255,255,0.07);
}

.site-contact__inner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.site-contact__item {
    font-family: var(--font-futura);
    font-weight: 300;
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-muted);
    transition: color 0.2s ease;
}

.site-contact__item a:hover {
    color: var(--color-text);
}

.site-contact__divider {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,0.15);
    display: block;
    margin: 0.2rem auto;
}

/* ===========================
   LIGHTBOX PLAYER
=========================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: lb-fade-in 0.3s ease;
}

.lightbox.is-open {
    display: flex;
}

@keyframes lb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox__inner {
    position: relative;
    width: 100%;
    max-width: 1100px;
    animation: lb-scale-in 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes lb-scale-in {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* 16:9 responsive wrapper */
.lightbox__video-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}

.lightbox__video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.lightbox__meta {
    margin-top: 1.1rem;
    text-align: center;
}

.lightbox__title {
    font-family: var(--font-futura);
    font-weight: 300;
    font-size: clamp(0.8rem, 1.6vw, 1rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
}

.lightbox__desc {
    font-family: var(--font-futura);
    font-weight: 300;
    font-style: oblique;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.45);
    margin-top: 0.35rem;
}

.lightbox__close {
    position: absolute;
    top: -2.8rem;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    font-family: var(--font-futura);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: color 0.2s ease;
    padding: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lightbox__close:hover { color: #fff; }

.lightbox__close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

/* ===========================
   LIGHTBOX
=========================== */
.dj-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.94);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: lb-fade-in 0.25s ease;
}

.dj-lightbox.is-open {
    display: flex;
}

@keyframes lb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.dj-lightbox__inner {
    position: relative;
    width: 100%;
    max-width: 1100px;
    animation: lb-scale-in 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes lb-scale-in {
    from { transform: scale(0.96); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* 16:9 responsive wrapper */
.dj-lightbox__player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.dj-lightbox__player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.dj-lightbox__meta {
    margin-top: 1.1rem;
    text-align: center;
}

.dj-lightbox__title {
    font-family: var(--font-futura);
    font-weight: 300;
    font-size: clamp(0.8rem, 1.6vw, 1rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
}

.dj-lightbox__desc {
    font-family: var(--font-futura);
    font-weight: 300;
    font-style: oblique;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.45);
    margin-top: 0.35rem;
}

.dj-lightbox__close {
    position: fixed;
    top: 1.4rem;
    right: 1.6rem;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    font-size: 1.8rem;
    line-height: 1;
    font-family: var(--font-futura);
    font-weight: 300;
    transition: color 0.2s ease;
    z-index: 1001;
    padding: 0.25rem 0.5rem;
}

.dj-lightbox__close:hover {
    color: #fff;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item {
        aspect-ratio: 16 / 9;
    }

    /* On touch devices, always show overlay (no hover) */
    .portfolio-item__overlay {
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .portfolio-item.touched .portfolio-item__overlay {
        opacity: 1;
    }
}
