/* ===== Font Imports ===== */
@font-face {
    font-family: 'Bright';
    src: url('Bright DEMO.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* ===== Base Styles ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    width: 100%;
    font-family: 'Roboto Mono', monospace;
    scroll-behavior: smooth;
    overflow-x: hidden;
    background-color: #181818;
}

/* ===== Transition Overlay ===== */
.transition-overlay {
    position: fixed;
    inset: 0;
    background: #181818;
    opacity: 1;
    pointer-events: all;
    transition: opacity 0.5s ease-in-out;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-gif {
    width: 80px;
    height: 80px;
    object-fit: contain;
    transform: translateY(-20px);
}

.transition-overlay.loaded {
    opacity: 0;
    pointer-events: none;
}

/* ===== Page System ===== */
.page {
    width: 100%;
    min-height: 100vh;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.8rem 1.6rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 38px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

.nav-logo a:hover img {
    opacity: 0.75;
    transform: scale(1.04);
}

.nav-divider {
    width: 1px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.3);
}

.nav-desktop {
    display: flex;
    gap: 2rem;
}

.nav-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.6rem;
    transition: all 0.3s ease;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 19px;
    height: 19px;
    color: #fff;
    transition: all 0.3s ease;
}

.nav-icon:hover svg {
    transform: scale(1.1);
    color: #000;
}

.nav-icon.active svg {
    color: #000;
}

/* ===== Mobile Navigation ===== */
.nav-mobile {
    display: none;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu {
    position: fixed;
    top: 6rem;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-menu-item {
    background: none;
    border: none;
    padding: 1rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem;
    color: #fff;
    cursor: pointer;
    text-align: left;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: block;
}

.mobile-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ===== Home Section ===== */
#home-section {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.video-container {
    position: relative;
    width: 100%;
    height: 90vh;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translateX(-50%);
    object-fit: cover;
    z-index: 0;
}

.copy-section {
    position: relative;
    width: 100%;
    background-color: transparent;
    z-index: 2;
    transform: translateY(-2rem);
    padding: 4rem 2rem 0;
}

.copy-content {
    max-width: 900px;
    margin: 0 auto;
}

.main-title {
    font-family: 'Bright', 'Roboto Mono', monospace;
    font-size: 4.8rem;
    font-weight: 700;
    line-height: 0.8;
    margin-bottom: 30px;
    color: #363636;
    animation: fadeIn 2s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.copy-text {
    margin-bottom: 0;
    animation: fadeIn 2s ease-out;
    animation-delay: 0.6s;
    animation-fill-mode: both;
}

.copy-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #363636;
    margin-bottom: 0;
}

.founder-link {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.founder-link:hover {
    opacity: 0.7;
}

/* ===== Fade In Animation ===== */
.fade-in {
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ===== Filter Section ===== */
.filter-section {
    width: 100%;
    background-color: #181818;
    padding: 0 0 2rem;
    margin-top: 0;
    overflow: hidden;
}

.filter-buttons {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.filter-marquee-track {
    display: flex;
    width: fit-content;
    cursor: grab;
    user-select: none;
    will-change: transform;
}

.filter-marquee-track:active {
    cursor: grabbing;
}

.filter-buttons-set {
    display: flex;
    gap: 3rem;
    padding: 0 1.5rem;
    flex-shrink: 0;
}

.filter-btn {
    background: none;
    border: none;
    color: #fff;
    padding: 1rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: lowercase;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-btn.active {
    color: #181818;
}

.filter-label {
    text-transform: lowercase;
    white-space: nowrap;
}

.filter-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(23%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(95%) contrast(88%);
    transition: filter 0.3s ease;
}

.filter-btn:hover .filter-logo {
    filter: brightness(0) saturate(100%) invert(44%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(90%) contrast(90%);
}

.filter-btn.active .filter-logo {
    filter: brightness(0) saturate(100%) invert(100%);
}

/* ===== Portfolio Grid ===== */
.portfolio-grid-container {
    width: 100%;
    background-color: #181818;
    padding: 0 6rem 6rem;
}

.bottom-buffer {
    width: 100%;
    height: 50vh;
    background-color: #181818;
}

.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.masonry-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.masonry-item {
    margin-bottom: 2rem;
}

.media-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.5s ease;
    will-change: transform;
    background-color: #363636;
}

.media-wrapper img,
.media-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0;
    transition: filter 0.3s ease, transform 1s ease, opacity 0.6s ease;
    will-change: transform, filter, opacity;
}

.masonry-item.visible .media-wrapper img,
.masonry-item.visible .media-wrapper video {
    opacity: 1;
}

.media-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    text-align: center;
}

.media-info p {
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    margin: 0.2rem 0;
    line-height: 1.2;
    text-transform: lowercase;
}

.media-info .project-name {
    font-weight: 400;
    margin-bottom: 0.2rem;
}

/* Desktop hover effect only */
@media (hover: hover) and (pointer: fine) {
    .masonry-item:hover .media-wrapper {
        transform: scale(1.03);
    }

    .masonry-item:hover .media-wrapper img,
    .masonry-item:hover .media-wrapper video {
        filter: blur(8px);
        transform: scale(1.01);
    }

    .masonry-item:hover .media-info {
        opacity: 1;
    }
}

/* ===== Contact Overlay ===== */
.contact-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 1;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.contact-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.contact-columns {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4rem;
    cursor: default;
}

.contact-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-col-divider {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.contact-book-btn {
    font-family: 'Roboto Mono', monospace;
    font-size: 2.5rem;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-book-btn:hover {
    opacity: 0.65;
}

.contact-email {
    font-family: 'Roboto Mono', monospace;
    font-size: 2.5rem;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-email:hover {
    opacity: 0.65;
}

/* ===== Responsive — Tablet ===== */
@media (max-width: 768px) {
    .loading-gif {
        transform: translateY(-5px);
    }

    .nav {
        padding: 1rem 1.5rem;
    }

    .nav-desktop {
        display: none;
    }

    .nav-mobile {
        display: block;
    }

    .mobile-menu {
        display: flex;
    }

    .video-container {
        height: auto;
        overflow: hidden;
    }

    .hero-video {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        height: auto;
    }

    .copy-section {
        transform: none;
        padding: 2rem 1.5rem 0;
    }

    .main-title {
        font-size: 5rem;
    }

    .copy-text p {
        font-size: 1rem;
    }

    .filter-section {
        margin-top: 0;
        padding: 0 1.5rem 2rem;
    }

    .portfolio-grid-container {
        padding: 0 1.5rem 4rem;
    }

    .masonry-grid {
        gap: 1.5rem;
    }

    .masonry-item {
        margin-bottom: 1.5rem;
    }
}

/* ===== Responsive — Phone ===== */
@media (max-width: 480px) {
    .main-title {
        font-size: 5rem;
    }

    .copy-section {
        padding: 1.5rem 1rem 0;
    }

    .filter-section {
        padding: 0 1rem 2rem;
    }

    .portfolio-grid-container {
        padding: 0 1rem 3rem;
    }

    .masonry-grid {
        flex-direction: column;
        gap: 1rem;
    }

    .masonry-item {
        margin-bottom: 1rem;
    }

    .contact-columns {
        flex-direction: column;
        gap: 2rem;
    }

    .contact-col-divider {
        width: 60px;
        height: 1px;
    }

    .contact-book-btn,
    .contact-email {
        font-size: 1.5rem;
    }
}

/* ===== Utility Classes ===== */
.hidden:not(.contact-overlay) {
    display: none !important;
}
