/*
=====================================================
SIMONOV DOP - COMING SOON
Cinematic, Minimal, Professional Landing Page
=====================================================

TABLE OF CONTENTS:
1. CSS Custom Properties (Variables)
2. Reset & Base Styles
3. Background Media Styles
4. Content & Typography
5. Animations
6. Responsive Breakpoints
=====================================================
*/


/* =====================================================
   1. CSS CUSTOM PROPERTIES
   ===================================================== 
   
   CUSTOMIZATION GUIDE:
   - Change colors, fonts, and timing here
   - All values cascade throughout the stylesheet
*/

:root {
    /* ---------- COLORS ---------- */
    /* Primary background - near black */
    --color-bg: #0a0a0a;

    /* Text colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-text-muted: rgba(255, 255, 255, 0.4);

    /* Overlay darkness (0.4 = 40%, 0.6 = 60%) */
    --overlay-opacity: 0.55;

    /* ---------- TYPOGRAPHY ---------- */
    /* Headline font - modern sans-serif */
    --font-headline: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Body font - clean sans-serif */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font sizes (mobile-first, scaled with clamp) */
    --size-headline: clamp(2.5rem, 8vw, 6rem);
    --size-name: clamp(1.25rem, 3vw, 2rem);
    --size-subtitle: clamp(0.75rem, 1.5vw, 0.875rem);

    /* Letter spacing */
    --tracking-headline: 0.02em;
    --tracking-name: 0.25em;
    --tracking-subtitle: 0.35em;

    /* ---------- SPACING ---------- */
    --space-safe-area: env(safe-area-inset-bottom, 2rem);

    /* ---------- ANIMATIONS ---------- */
    --duration-fade: 1.5s;
    --duration-stagger: 0.3s;
    --easing-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
}


/* =====================================================
   2. RESET & BASE STYLES
   ===================================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    /* Dynamic viewport height for mobile */
    overflow-x: hidden;
    position: relative;
}


/* =====================================================
   3. BACKGROUND MEDIA STYLES
   ===================================================== 
   
   TO CHANGE BACKGROUND IMAGE:
   Edit the URL in .bg-image background-image property
*/

.background-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

/* ---------- VIDEO BACKGROUND ---------- */
.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* ---------- IMAGE BACKGROUND ---------- 
   
   CHANGE BACKGROUND IMAGE HERE:
   Replace the URL with your image path
   Recommended: 1920x1080 or higher resolution
   Formats: JPG, WebP, or AVIF for best performance
*/
.bg-image {
    position: absolute;
    inset: 0;
    background-image: url('assets/background.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* ---------- DARK OVERLAY ---------- 
   
   Adjust --overlay-opacity in :root to change darkness
   Current: 0.55 (55% dark)
*/
.bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, calc(var(--overlay-opacity) - 0.1)) 0%,
            rgba(0, 0, 0, var(--overlay-opacity)) 50%,
            rgba(0, 0, 0, calc(var(--overlay-opacity) + 0.1)) 100%);
}


/* =====================================================
   4. CONTENT & TYPOGRAPHY
   ===================================================== */

.content {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    height: 100dvh;
    padding: 2rem;
    padding-bottom: calc(2rem + var(--space-safe-area));
}

.content-wrapper {
    text-align: center;
    max-width: 90vw;
}

/* ---------- MAIN HEADLINE ---------- */
.headline {
    font-family: var(--font-headline);
    font-size: var(--size-headline);
    font-weight: 500;
    letter-spacing: var(--tracking-headline);
    line-height: 1.1;
    color: var(--color-text-primary);
    margin-bottom: 2rem;

    /* Animation */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp var(--duration-fade) var(--easing-smooth) forwards;
}

/* ---------- DOP NAME ---------- */
.name {
    font-family: var(--font-body);
    font-size: var(--size-name);
    font-weight: 400;
    letter-spacing: var(--tracking-name);
    text-transform: uppercase;
    color: var(--color-text-primary);
    margin-bottom: 1rem;

    /* Animation - delayed */
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp var(--duration-fade) var(--easing-smooth) forwards;
    animation-delay: var(--duration-stagger);
}

/* ---------- SUBTITLE ---------- */
.subtitle {
    font-family: var(--font-body);
    font-size: var(--size-subtitle);
    font-weight: 300;
    letter-spacing: var(--tracking-subtitle);
    text-transform: uppercase;
    color: var(--color-text-muted);

    /* Animation - more delayed */
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp var(--duration-fade) var(--easing-smooth) forwards;
    animation-delay: calc(var(--duration-stagger) * 2);
}

/* ---------- TOP HEADER ---------- */
.top-header {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 20;
    padding: 1.5rem 2rem;

    /* Animation */
    opacity: 0;
    animation: fadeIn var(--duration-fade) var(--easing-smooth) forwards;
    animation-delay: 1s;
}

.contacts {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.contact-link {
    font-family: var(--font-body);
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.contact-divider {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    user-select: none;
}

.imdb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.2rem;
    padding: 0 0.45rem;
    border-radius: 0.2rem;
    background: #f5c518;
    color: #111111;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.imdb-button:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.lang-select {
    height: 1.35rem;
    padding: 0 0.35rem;
    border: 0.5px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.2rem;
    background: rgba(0, 0, 0, 0.35);
    color: var(--color-text-secondary);
    font-family: var(--font-body);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    outline: none;
}

.lang-select:hover,
.lang-select:focus {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--color-text-primary);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ---------- PROJECTS SECTION ---------- */
.projects-section {
    position: relative;
    z-index: 10;
    padding: 5rem 0 4rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 15%, rgba(0, 0, 0, 0.8) 100%);
}

.projects-title {
    font-family: var(--font-body);
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 2.5rem;
}

.projects-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.85rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 2rem 2rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: ew-resize;
}

.projects-track::-webkit-scrollbar {
    display: none;
}

.project-card {
    flex: 0 0 auto;
    width: 154px;
    padding: 1.05rem;
    border: 0.5px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-decoration: none;
    scroll-snap-align: start;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.project-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    background: rgba(255, 255, 255, 0.04);
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
}

.project-empty {
    color: var(--color-text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
    margin: 0 auto;
    padding: 1rem 2rem 2rem;
}

.project-year {
    font-family: var(--font-body);
    font-size: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
}

.project-name {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-primary);
    line-height: 1.3;
}

.project-desc {
    font-family: var(--font-body);
    font-size: 0.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

/* ---------- GALLERY SECTION ---------- */
.gallery-section {
    position: relative;
    z-index: 10;
    padding: 1rem 2rem 5rem;
}

.gallery-title {
    font-family: var(--font-body);
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 1.8rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 0.8rem;
    max-width: 560px;
    margin: 0 auto;
}

.gallery-empty {
    display: none;
    color: var(--color-text-muted);
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    margin-top: 1rem;
    text-transform: uppercase;
}

.gallery-item {
    display: block;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.86);
    padding: 2rem;
}

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

.lightbox-image {
    max-width: min(78vw, 1000px);
    max-height: 82vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.lightbox-close {
    top: 1.2rem;
    right: 1.2rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* ---------- FOOTER INDICATOR ---------- */
.footer {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding-bottom: calc(1.5rem + var(--space-safe-area));

    /* Animation */
    opacity: 0;
    animation: fadeIn 2s var(--easing-smooth) forwards;
    animation-delay: 1.5s;
}

.footer-line {
    width: 40px;
    height: 1px;
    background: var(--color-text-muted);
}

.scroll-hint {
    width: 10px;
    height: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    transform: rotate(45deg);
    opacity: 0.45;
    animation: hintFloat 1.8s ease-in-out infinite;
}

.scroll-indicator {
    position: fixed;
    left: 50%;
    bottom: 1.1rem;
    transform: translateX(-50%);
    z-index: 25;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.scroll-indicator.is-hidden {
    opacity: 0;
}

.scroll-indicator-text {
    font-family: var(--font-body);
    font-size: 0.55rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.scroll-indicator-arrow {
    width: 8px;
    height: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    transform: rotate(45deg);
    animation: hintFloat 1.8s ease-in-out infinite;
}


/* =====================================================
   5. ANIMATIONS
   ===================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes hintFloat {
    0% {
        transform: rotate(45deg) translateY(0);
        opacity: 0.35;
    }

    50% {
        transform: rotate(45deg) translateY(3px);
        opacity: 0.5;
    }

    100% {
        transform: rotate(45deg) translateY(0);
        opacity: 0.35;
    }
}


/* =====================================================
   6. RESPONSIVE BREAKPOINTS
   ===================================================== */

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

    /* Hide video on mobile for better performance */
    /* Show video on mobile */
    .bg-video {
        display: block;
    }

    /* Ensure image background is visible on mobile */
    .bg-image {
        display: block;
    }

    .content {
        padding: 1.5rem;
    }

    .headline {
        margin-bottom: 1.5rem;
    }

    .name {
        margin-bottom: 0.75rem;
    }

    .gallery-section {
        padding: 0.75rem 1rem 4rem;
    }

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

    .lightbox {
        padding: 1rem;
    }

    .lightbox-image {
        max-width: 90vw;
    }
}

/* ---------- TABLET ---------- */
@media (min-width: 769px) and (max-width: 1024px) {
    .content {
        padding: 3rem;
    }
}

/* ---------- DESKTOP & ULTRAWIDE ---------- */
@media (min-width: 1025px) {

    /* Show video on desktop */
    .bg-video {
        display: block;
    }

    /* Optional: hide image when video is playing */
    /* Uncomment if using video background */
    /*
  .bg-video + .bg-image {
    display: none;
  }
  */

    .content {
        padding: 4rem;
    }

    .headline {
        margin-bottom: 2.5rem;
    }
}

/* ---------- HIGH DPI / RETINA ---------- */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    /* Use higher resolution background for retina displays if available */
    /* .bg-image {
    background-image: url('assets/background@2x.jpg');
  } */
}

/* ---------- REDUCED MOTION PREFERENCE ---------- */
@media (prefers-reduced-motion: reduce) {

    .headline,
    .name,
    .subtitle,
    .footer,
    .scroll-hint {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ---------- DARK MODE (already dark, but ensure consistency) ---------- */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}
