/* ============================================
   Erik Harden — Artist Website
   Aesthetic: Cinematic minimalism, dark & still
   ============================================ */

:root {
    --color-bg: #0a0a0a;
    --color-bg-deep: #050505;
    --color-white: #f0ece6;
    --color-white-dim: rgba(240, 236, 230, 0.5);
    --color-white-ghost: rgba(240, 236, 230, 0.15);
    --color-overlay: rgba(0, 0, 0, 0.65);
    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Karla', 'Helvetica Neue', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---- Reset ---- */

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

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

body {
    background: var(--color-bg);
    color: var(--color-white);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

/* ============================================
   Hero
   ============================================ */

.hero {
    position: relative;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 20vh;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: saturate(0.3) brightness(0.7);
    animation: heroZoom 20s var(--ease-in-out) forwards;
}

@keyframes heroZoom {
    from {
        transform: scale(1.08);
    }
    to {
        transform: scale(1);
    }
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.4) 0%,
            var(--color-overlay) 40%,
            var(--color-overlay) 55%,
            rgba(5, 5, 5, 0.85) 75%,
            rgba(5, 5, 5, 0.95) 88%,
            rgb(5, 5, 5) 100%
        );
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    animation: fadeUp 1.8s var(--ease-out) 0.3s both;
}

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

.hero__signature {
    width: clamp(220px, 40vw, 400px);
    margin: 0 auto 2rem;
    opacity: 0.95;
    filter: drop-shadow(0 2px 20px rgba(0, 0, 0, 0.5));
}

.hero__tagline {
    font-family: var(--font-display);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--color-white-dim);
    letter-spacing: 0.06em;
    margin-bottom: 2.5rem;
}

/* Social icons */

.hero__social {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.hero__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white-dim);
    transition: color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.hero__social a:hover {
    color: var(--color-white);
    transform: translateY(-2px);
}

.hero__social svg {
    width: 20px;
    height: 20px;
}

/* Scroll indicator */

.hero__scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: fadeUp 1.8s var(--ease-out) 1.5s both;
}

.hero__scroll span {
    display: block;
    width: 1px;
    height: 48px;
    background: var(--color-white-ghost);
    position: relative;
    overflow: hidden;
}

.hero__scroll span::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-white-dim);
    animation: scrollLine 2.4s var(--ease-in-out) infinite;
}

@keyframes scrollLine {
    0% {
        top: -100%;
    }
    50% {
        top: 100%;
    }
    100% {
        top: 100%;
    }
}

/* ============================================
   Gallery
   ============================================ */

.gallery {
    background: var(--color-bg-deep);
    padding: clamp(3rem, 8vw, 8rem) clamp(1.5rem, 6vw, 6rem);
    min-height: 50vh;
}

.gallery__grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: clamp(0.5rem, 1vw, 0.75rem);
}

@media (max-width: 640px) {
    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery__item {
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.6) brightness(0.9);
    transition: filter 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.gallery__item:hover img {
    filter: saturate(0.8) brightness(1);
    transform: scale(1.03);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--color-bg-deep);
    padding: 4rem 2rem;
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-out), visibility 0.4s;
    cursor: zoom-out;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.4s var(--ease-out);
}

.lightbox.is-active .lightbox__img {
    transform: scale(1);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 640px) {
    .hero__signature {
        width: 200px;
    }

    .hero__social {
        gap: 1.5rem;
    }

    .hero__social svg {
        width: 18px;
        height: 18px;
    }

    .gallery {
        padding: 2rem 1rem;
    }
}

/* ============================================
   Utility: Reduced motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
