/* ========================================
   CSS Reset & Base Styles
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #000000;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: #888888;
}

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

::selection {
    background: #ffffff;
    color: #000000;
}

/* ========================================
   Header
   ======================================== */
.header {
    padding: 15px 40px;
    border-bottom: 1px solid #222222;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #000000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.logo-link {
    display: block;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-contact {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-left: 20px;
}

.header-cta {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 13px;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.header-cta svg {
    transition: transform 0.25s ease;
}

.header-cta:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.header-cta:hover svg {
    transform: translateY(-1px);
}

.header-contact-link {
    font-size: 13px;
    color: #888888;
    transition: color 0.25s ease;
}

.header-contact-link:hover {
    color: #ffffff;
}

.site-title {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.site-subtitle {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #888888;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    padding: 20px 40px;
    border-bottom: 1px solid #222222;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.nav-link {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888888;
    transition: color 0.25s ease;
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ffffff;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ========================================
   Main Content
   ======================================== */
.main {
    flex: 1;
    padding: 40px;
}

/* ========================================
   Sections
   ======================================== */
.section {
    margin-bottom: 60px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888888;
    margin-bottom: 20px;
}

/* ========================================
   Project Grid
   ======================================== */
.grid {
    display: grid;
    /* Auto-fit columns: minimum 320px, expand to fill space */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 8px;
}

.grid-item {
    position: relative;
    cursor: pointer;
    background-color: #111111;
    border-radius: 3px;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.grid-item-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 3px;
}

.grid-item:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 1);
}

.grid-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.4s ease;
}

.grid-item:hover .grid-item-thumb img {
    transform: scale(1.05);
}

/* Video Preview on Hover */
.grid-item-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.grid-item-preview iframe,
.grid-item-preview video {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    object-fit: cover;
}

.grid-item.preview-active {
    /* Scale and z-index handled by :hover state */
}

.grid-item.preview-active .grid-item-preview {
    opacity: 1;
}

.grid-item.preview-active .grid-item-thumb img {
    opacity: 0;
}

.grid-item.preview-active:hover .grid-item-thumb img {
    transform: none;
}


/* Play Icon */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6; /* Subtle visibility even without hover */
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

.play-icon svg {
    width: 30px;
    height: 30px;
    color: #000000;
    margin-left: 4px;
}

.grid-item:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
}

.grid-item.has-preview:hover .play-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

.grid-item.preview-active .play-icon {
    opacity: 0;
}

.grid-item-overlay {
    padding: 10px 8px;
    z-index: 4;
}

.grid-item-title {
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-item-meta {
    font-size: 11px;
    font-weight: 400;
    color: #888888;
}

/* ========================================
   Lightbox Modal
   ======================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

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

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #ffffff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.lightbox-close:hover {
    color: #888888;
    transform: scale(1.1);
}

.lightbox-content {
    width: 90%;
    max-width: 1200px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

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

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (default for YouTube) */
    background-color: #000000;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Vertical video container (Instagram/TikTok) */
.video-container.vertical-video {
    padding-bottom: 0;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video player styling for Instagram/TikTok */
.lightbox-video {
    max-width: 90vw;
    max-height: 90vh;
    width: auto !important;
    height: auto !important;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    object-fit: contain !important; /* Show full video without cropping */
    display: block;
}

/* Wrapper for vertical videos to properly position button */
.vertical-video-wrapper {
    position: relative;
    display: inline-block;
}

/* Watch on Platform Button */
.watch-on-platform {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
    cursor: pointer;
}

.watch-on-platform svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.watch-on-platform:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #000000;
    border-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.watch-on-platform:hover svg {
    transform: translate(2px, -2px);
}

/* ========================================
   Vertical Video Grid Items (Instagram/TikTok)
   ======================================== */
#short-form-grid .grid-item-thumb {
    aspect-ratio: 9 / 16;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 30px 40px;
    border-top: 1px solid #222222;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 14px;
    color: #888888;
    transition: color 0.25s ease;
    position: relative;
}

.footer-link:hover {
    color: #ffffff;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ffffff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.footer-link:hover::after {
    transform: scaleX(1);
}

.footer-divider {
    color: #333333;
}

/* ========================================
   About Page
   ======================================== */
.about-main {
    display: flex;
    justify-content: center;
}

.about-content {
    max-width: 700px;
    width: 100%;
}

.about-heading {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2em;
    margin-bottom: 40px;
    color: #888888;
}

.about-bio {
    font-size: 18px;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 24px;
    color: #cccccc;
}

.about-contact {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #222222;
}

.contact-heading {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
    color: #888888;
}

.contact-item {
    font-size: 16px;
    margin-bottom: 12px;
}

.contact-item a {
    color: #cccccc;
    position: relative;
    display: inline-block;
}

.contact-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ffffff;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.contact-item a:hover {
    color: #ffffff;
}

.contact-item a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ========================================
   Responsive Design - Tablet
   ======================================== */
@media (max-width: 1024px) {
    .header {
        padding: 12px 30px;
    }

    .nav {
        padding: 15px 30px;
    }

    .main {
        padding: 30px;
    }

    .footer {
        padding: 25px 30px;
    }
}

/* ========================================
   Responsive Design - Mobile
   ======================================== */
@media (max-width: 768px) {
    .header {
        padding: 10px 20px;
    }

    .header-content {
        gap: 15px;
        flex-wrap: wrap;
    }

    .header-contact {
        width: 100%;
        margin-left: 0;
        gap: 15px;
    }

    .logo {
        width: 50px;
        height: 50px;
    }

    .site-title {
        font-size: 18px;
        letter-spacing: 0.15em;
    }

    .site-subtitle {
        font-size: 10px;
    }

    .nav {
        padding: 15px 20px;
    }

    .nav-list {
        gap: 15px 20px;
    }

    .nav-link {
        font-size: 12px;
    }

    .main {
        padding: 20px;
    }

    .grid {
        gap: 15px;
    }

    /* Show overlay and play icon on mobile since no hover */
    .grid-item-overlay {
        opacity: 1;
    }

    .play-icon {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        width: 60px;
        height: 60px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    }

    /* Disable video preview on mobile/touch devices */
    .grid-item-preview {
        display: none;
    }

    .play-icon svg {
        width: 24px;
        height: 24px;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 32px;
        width: 44px;
        height: 44px;
    }

    .lightbox-content {
        width: 95%;
    }

    .footer {
        padding: 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
    }

    .footer-divider {
        display: none;
    }

    .footer-link::after {
        display: none;
    }

    .about-bio {
        font-size: 16px;
    }

    .about-contact {
        margin-top: 40px;
        padding-top: 30px;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Page load animation */
.header {
    animation: slideUp 0.6s ease-out;
}

.nav {
    animation: slideUp 0.6s ease-out 0.1s both;
}

.main {
    animation: fadeIn 0.6s ease-out 0.2s both;
}

/* ========================================
   Utility Classes
   ======================================== */
.hidden {
    display: none !important;
}

/* Loading state for images */
.grid-item img.loading {
    opacity: 0;
}

.grid-item img.loaded {
    opacity: 1;
}
