/* ========================================
   BANALEEE - Portfolio
   Minimaliste noir & blanc
   ======================================== */

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

:root {
    --color-bg: #ffffff;
    --color-text: #111111;
    --color-text-light: #666666;
    --color-border: #e0e0e0;
    --color-hover: #000000;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --header-height: 60px;
    --grid-gap: 20px;
    --page-padding: 40px;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.6;
}

ul {
    list-style: none;
}

img, video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--page-padding);
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.header__logo:hover {
    opacity: 1;
}

/* --- Navigation --- */
.nav__links {
    display: flex;
    gap: 24px;
}

.nav__link {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    position: relative;
}

.nav__link--active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--color-text);
}

.nav__link:hover {
    opacity: 1;
}

.nav__link:hover::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--color-text);
}

/* --- Social Links --- */
.header__socials {
    display: flex;
    gap: 16px;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.social-link:hover {
    opacity: 0.5;
}

/* --- Mobile Menu Toggle --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}

.menu-toggle__line {
    display: block;
    width: 24px;
    height: 1.5px;
    background-color: var(--color-text);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.is-active .menu-toggle__line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle.is-active .menu-toggle__line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .menu-toggle__line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Mobile Nav Overlay --- */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    background-color: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-nav.is-open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav__links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.mobile-nav__link {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.mobile-nav__socials {
    display: flex;
    gap: 24px;
}

.mobile-nav__socials a {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
}

/* --- Portfolio Filters --- */
.portfolio__filters {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.filter-btn {
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 4px 0;
    position: relative;
    transition: color 0.3s ease;
}

.filter-btn:hover {
    color: var(--color-text);
}

.filter-btn--active {
    color: var(--color-text);
}

.filter-btn--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--color-text);
}

/* --- Portfolio Grid --- */
.portfolio {
    padding-top: calc(var(--header-height) + 20px);
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
    padding-bottom: 60px;
    min-height: 80vh;
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}

/* --- Project Card --- */
.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.project-card:hover {
    opacity: 1;
}

.project-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 2px;
}

.project-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #ccc;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.project-card__thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.5s ease, filter 0.5s ease;
}

.project-card__thumbnail--contain {
    object-fit: contain;
    padding: 1.5rem;
}

.project-card__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Cards WITH video: swap thumbnail for video */
.project-card.has-video:hover .project-card__video,
.project-card.has-video .project-card__video.is-playing {
    opacity: 1;
}

.project-card.has-video:hover .project-card__thumbnail,
.project-card.has-video .project-card__thumbnail.is-hidden {
    opacity: 0;
}

/* Cards WITHOUT video: zoom + brightness shift */
.project-card:not(.has-video):hover .project-card__thumbnail {
    transform: scale(1.05);
    filter: brightness(0.85);
}

.project-card__info {
    padding: 12px 0 24px;
}

.project-card__title {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-bottom: 2px;
}

.project-card__category {
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--color-text-light);
}

.project-card__note {
    font-style: italic;
    opacity: 0.6;
}

/* --- Fade-in animation on scroll --- */
.project-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.project-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 80px var(--page-padding) 40px;
}

.footer__cta {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    display: inline-block;
    position: relative;
    transition: opacity 0.3s ease;
}

.footer__cta::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--color-text);
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

.footer__cta:hover {
    opacity: 0.7;
}

.footer__cta:hover::after {
    transform: scaleX(0.95);
}

.footer__copyright {
    margin-top: 16px;
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--color-text-light);
    letter-spacing: 0.02em;
}

/* --- About Page --- */
.about {
    padding-top: calc(var(--header-height) + 60px);
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
    padding-bottom: 80px;
    min-height: 80vh;
}

.about__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

.about__image {
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 400px;
    cursor: grab;
    position: relative;
    overflow: hidden;
}

.about__image:active {
    cursor: grabbing;
}

#card-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.about__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #ccc;
    font-size: 0.85rem;
    font-weight: 300;
}

.about__title {
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.about__subtitle {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.about__bio p {
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about__skills {
    margin-top: 40px;
}

.about__skills-title {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.about__skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.about__skills-list li {
    font-size: 0.8rem;
    font-weight: 300;
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text-light);
}

/* --- Contact Page --- */
.contact {
    padding-top: calc(var(--header-height) + 60px);
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
    padding-bottom: 80px;
    min-height: 80vh;
}

.contact__container {
    max-width: 600px;
    margin: 0 auto;
}

.contact__title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 12px;
}

.contact__intro {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact__form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact__label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.contact__input,
.contact__textarea {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 300;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    outline: none;
    transition: border-color 0.3s ease;
}

.contact__input:focus,
.contact__textarea:focus {
    border-bottom-color: var(--color-text);
}

.contact__textarea {
    resize: vertical;
    min-height: 120px;
}

.contact__submit {
    align-self: flex-start;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    padding: 12px 32px;
    background-color: var(--color-text);
    color: var(--color-bg);
    border: 1px solid var(--color-text);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.contact__submit:hover {
    background-color: transparent;
    color: var(--color-text);
}

.contact__email {
    margin-top: 48px;
    text-align: center;
}

.contact__email p {
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.contact__email-link {
    font-size: 1rem;
    font-weight: 400;
    position: relative;
}

.contact__email-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--color-text);
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --page-padding: 24px;
        --grid-gap: 16px;
    }

    .portfolio__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__cta {
        font-size: 2rem;
    }

    .about__container {
        gap: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --page-padding: 16px;
        --grid-gap: 12px;
    }

    .nav,
    .header__socials {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-nav {
        display: flex;
    }

    .header__logo {
        position: relative;
        left: auto;
        transform: none;
        font-size: 1rem;
    }

    .portfolio__grid {
        grid-template-columns: 1fr;
    }

    .project-card__media {
        aspect-ratio: 16 / 9;
    }

    .footer__cta {
        font-size: 1.5rem;
    }

    .footer {
        padding: 60px var(--page-padding) 30px;
    }

    .about__container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about__image {
        max-width: 300px;
        margin: 0 auto;
    }

    .about__title {
        font-size: 1.5rem;
    }

    .contact__title {
        font-size: 1.8rem;
    }

    .portfolio__filters {
        margin-bottom: 20px;
    }
}
