/* --- VARIABLES & RESET --- */
:root {
    --bg-color: #F2F2F0;
    --text-color: #111111;
    --gray-color: #737373;
    --accent-color: #EA580C;
    --border-radius: 2rem;
    --font-main: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* FLUID MEDIA */
img, video {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* --- UTILITIES --- */
.desktop-only { display: none; }
@media (min-width: 768px) {
    .desktop-only { display: flex; }
}
.text-right { text-align: right; }

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(242, 242, 240, 0.9);
    backdrop-filter: blur(8px);
    z-index: 100;
}

.logo-svg {
    height: 40px;
    width: auto;
    color: var(--text-color);
}

.nav-links {
    gap: 2rem;
    font-size: 0.9rem;
    color: var(--gray-color);
    font-weight: 500;
}
.nav-links a:hover { color: var(--text-color); text-decoration: underline; text-underline-offset: 4px; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.lang-switch {
    display: flex;
    gap: 0.25rem;
    padding-left: 1rem;
    border-left: 1px solid #ccc;
    color: var(--gray-color);
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 400;
    color: var(--gray-color);
    transition: color 0.3s;
}
.lang-btn.active, .lang-btn:hover {
    color: var(--text-color);
    font-weight: 700;
}

/* --- HERO (Home) --- */
.hero {
    padding: 8rem 1rem 4rem 1rem;
}

.hero-title {
    font-size: 13vw; /* Responsive massive text */
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.role-tag-container { margin-bottom: 2rem; }
.role-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(158, 0, 0, 0.3);
    color: #9E0000;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-intro {
    max-width: 800px;
}
.hero-intro p {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-bottom: 1rem;
}

/* --- META BAR (Mobile Chip Layout) --- */
.meta-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 1.5rem 0;
    margin: 0 1rem 4rem 1rem;
    border-top: 1px solid #ccc;
    font-size: 0.8rem;
    font-weight: 500;
}

.meta-item {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(17, 17, 17, 0.15); /* Chip border */
    border-radius: 999px;
    padding: 0.5rem 0.75rem;
    text-align: center;
    background-color: rgba(255,255,255,0.4);
    white-space: nowrap; 
}

/* Hide construction text on mobile */
.meta-hide-mobile {
    display: none;
}

/* Full width CTA on mobile */
.meta-cta {
    grid-column: span 2; 
    border-color: var(--text-color);
    background-color: var(--text-color);
    color: var(--bg-color);
}
.meta-cta .cta-link {
    width: 100%;
    height: 100%;
    display: block;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}
.cta-link {
    cursor: pointer;
    display: inline-block;
}
.cta-link:hover {
    color: inherit;
    opacity: 0.8;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* --- PROJECTS SECTION (Home) --- */
.projects-section {
    padding: 0 1rem 6rem 1rem;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}
.section-header h2 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.view-all { color: var(--text-color); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; font-size: 0.9rem; }
.view-all:hover { color: var(--accent-color); }

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

/* Project Card */
.project-card {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #ccc;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
}

.project-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease-out;
    z-index: 0;
}

.card-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-out, transform 0.7s ease-out;
    z-index: 1;
}

.project-card:hover .project-img,
.project-card:hover .card-video {
    transform: scale(1.05);
}

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

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.375s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    color: white;
    z-index: 2; /* Ensure overlay is above video */
}

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

.card-content {
    transform: translateY(20px);
    transition: transform 0.375s ease;
    width: 100%;
}
.project-card:hover .card-content {
    transform: translateY(0);
}

/* NEW Brand Style */
.card-brand {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.card-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.card-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-weight: 700;
}

/* CTA in Card */
.card-cta {
    display: inline-block;
    background-color: #9E0000;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1.5rem;
}

/* --- ABOUT SECTION --- */
/* Wrapper to center content vertically on standalone page */
.about-page-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 60px; /* Navbar compensation */
}

.about-section {
    padding: 4rem 1rem 8rem 1rem;
}
.about-grid {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr; /* Mobile default */
}
.about-image img {
    width: 100%;
    border-radius: var(--border-radius);
    aspect-ratio: 3/4;
    object-fit: cover;
    /* Original Color - No Grayscale Filter */
}

.about-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.role-tag-simple {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}
.about-bio {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 3rem;
}
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 99px;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}
.btn-outline {
    border: 1px solid #ccc;
    color: var(--text-color);
}
.btn-outline:hover {
    background: var(--text-color);
    color: white;
    border-color: var(--text-color);
}
/* Brand Colors for Hover States */
.btn-linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: white;
}
.btn-instagram:hover {
    background: #E1306C;
    border-color: #E1306C;
    color: white;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- LEGAL PAGES STYLE --- */
.legal-main {
    padding: 8rem 1rem 4rem 1rem;
    min-height: 80vh;
}
.legal-title {
    font-size: 13vw; /* Match hero title responsive sizing */
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 4rem;
    color: var(--text-color);
}
.legal-content {
    max-width: 800px;
    /* No margin auto to keep left aligned like project descriptions */
}
/* Style headings like "About the project" headers */
.legal-content h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 1.5rem;
    color: var(--text-color);
}
.legal-content p, .legal-content li {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color); /* Darker text for readability */
    margin-bottom: 1rem;
    opacity: 0.9;
}
.legal-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

/* --- PROJECT DETAIL PAGE --- */
.project-container {
    padding: 6rem 1rem 3rem 1rem; /* Adjusted for mobile */
}
.project-header {
    margin-bottom: 3rem;
}
.tags-list {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.tag-pill {
    padding: 0.3rem 0.8rem;
    border-radius: 99px;
    border: 1px solid rgba(17,17,17,0.2);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray-color);
}
.project-title {
    font-size: 3rem;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    word-break: break-word; /* Prevent overflow */
}
.project-subtitle {
    font-size: 1.25rem;
    color: var(--gray-color);
    max-width: 800px;
    font-weight: 300;
}

.project-media-container {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 3rem;
    background: #ccc;
}
.media-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 6rem;
}
.label-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.text-block p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    opacity: 0.9;
}
.cta-project {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.info-meta {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}
.meta-list {
    list-style: none;
    font-weight: 500;
}
.tools-list span {
    display: inline-block;
    background: white;
    border: 1px solid #ddd;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.gallery-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 6rem;
}
.gallery-item img, .gallery-item video {
    width: 100%;
    height: auto;
    border-radius: 1.5rem;
}

/* Gallery Grid Utility (Default 1 col for mobile) */
.gallery-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Ensure vertical videos in gallery don't overflow on mobile */
.gallery-grid-3 .gallery-item video {
    max-height: 80vh;
    object-fit: contain;
    background: #000;
}

.next-project {
    border-top: 1px solid #ccc;
    padding-top: 4rem;
    margin-bottom: 2rem;
}
.next-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    transition: color 0.3s;
}
.next-link:hover .next-title {
    color: var(--accent-color);
}
.next-arrow {
    color: var(--gray-color);
    font-size: 1.1rem;
}

/* --- PORTRAIT SPLIT LAYOUT (MOBILE BASE) --- */
.portrait-split-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.sticky-media-col {
    width: 100%;
    /* On mobile, media usually comes first in visual hierarchy, 
       but markup order is media first, so that works. */
}

.portrait-video-wrapper {
    width: 100%;
    /* Mobile constraint: */
    max-height: 80vh;
    aspect-ratio: 9/16;
    border-radius: 1.5rem;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    margin: 0 auto;
}

.portrait-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure whole video is visible */
}

.scrolling-content-col {
    width: 100%;
}

/* --- FOOTER --- */
footer {
    padding: 2rem 1rem;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* Added for better mobile responsiveness */
    gap: 2rem; /* Increased gap */
    font-size: 0.85rem;
    color: var(--gray-color);
}
.footer-links-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    width: 100%; /* Mobile: full width */
    align-items: flex-start; /* Mobile: align left */
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-legal { display: flex; gap: 1.5rem; font-size: 0.8rem; flex-wrap: wrap; }

/* --- RESPONSIVE DESKTOP --- */
@media (min-width: 768px) {
    .navbar { padding: 1.5rem 2.5rem; }
    .hero { padding: 10rem 2.5rem 6rem 2.5rem; }
    .hero-title { font-size: 7rem; }
    .hero-intro p { font-size: 1.5rem; }
    
    /* Restore meta-bar to grid on desktop */
    .meta-bar { 
        display: grid; 
        grid-template-columns: repeat(4, 1fr); 
        margin: 0 2.5rem 8rem 2.5rem; 
        font-size: 0.85rem; 
        padding: 1.5rem 0;
        gap: 1rem;
        border-top: 1px solid #ccc;
    }
    .meta-bar .text-right {
        text-align: right;
    }

    /* Restore Meta Items to clean text on Desktop */
    .meta-item {
        display: block; 
        border: none;
        border-radius: 0;
        padding: 0;
        background: none;
        text-align: left;
        white-space: normal;
        justify-content: flex-start;
    }
    /* Fix for status dot alignment on desktop */
    .meta-item:first-child {
        display: flex; 
    }

    .meta-hide-mobile {
        display: block;
    }

    .meta-cta {
        grid-column: auto;
        background: none;
        color: inherit;
        text-align: right;
        border: none;
        justify-content: flex-end;
        display: block; /* Restore text-right behavior */
    }
    .meta-cta:hover .cta-link {
        color: var(--accent-color);
    }
    
    /* End Meta Restore */

    .projects-section { padding: 0 2.5rem 8rem 2.5rem; }
    .projects-grid { grid-template-columns: 1fr 1fr; }
    .about-section { padding: 4rem 2.5rem; }
    .about-grid { grid-template-columns: 5fr 7fr; gap: 4rem; }
    .about-bio { font-size: 2.25rem; }
    
    .legal-main { padding: 10rem 2.5rem 6rem 2.5rem; }
    .legal-title { font-size: 6rem; }
    
    .project-container { padding: 10rem 2.5rem 6rem 2.5rem; }
    .project-title { font-size: 5rem; }
    .project-info-grid { grid-template-columns: 8fr 4fr; gap: 6rem; }
    .next-title { font-size: 4rem; }
    footer { padding: 3rem 2.5rem; }
    .footer-links-container { width: auto; flex-direction: row; align-items: center; gap: 2rem; }
    
    /* WIDE LAYOUT ADJUSTMENTS FOR DESKTOP */
    /* Project 3: 3:1 aspect ratio */
    .wide-card {
        grid-column: 1 / -1;
        aspect-ratio: 3 / 1; 
    }
    
    /* Project 6: 16:9 aspect ratio but full width */
    .wide-card-16-9 {
        grid-column: 1 / -1;
        aspect-ratio: 16 / 9;
    }
    
    .media-wide {
        aspect-ratio: 3 / 1 !important;
    }

    /* Gallery Grid 3 Columns on Desktop */
    .gallery-grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    /* PORTRAIT LAYOUT ADJUSTMENTS (Desktop) */
    .portrait-split-container {
        display: grid;
        grid-template-columns: 450px 1fr; 
        gap: 4rem;
        align-items: start;
        max-width: 1400px;
        margin: 0 auto;
        padding-right: 4rem;
    }

    .sticky-media-col {
        position: static;
        display: flex;
        justify-content: flex-start;
    }

    .portrait-video-wrapper {
        width: 100%;
        /* Desktop: Fixed aspect, let height follow width/grid */
        max-height: none; 
        aspect-ratio: 9/16;
        border-radius: 2rem;
        background: #000;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }
    
    .portrait-video-wrapper video {
        object-fit: cover; /* Fill on desktop */
    }

    .scrolling-content-col {
        padding-top: 0;
        width: 100%;
    }
}

@media (min-width: 1024px) {
    .hero-title { font-size: 9rem; }
    .project-title { font-size: 6rem; }
}