:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --nav-bg: #ececec;
    --font-main: 'Inter', sans-serif;
    --color-bg: #FDFDFD;
    /* Light beige/grey background */
    --color-text: #111;
    --color-accent: #e5e5e0;
    /* Slightly darker for elements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

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

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

a,
a:visited,
a:active {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 500;
}

h3 {
    font-size: 1.3rem;
}

/* Header / Nav */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    pointer-events: none;
}

.logo {
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: auto;
    position: static;
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
    transition: opacity 0.2s ease;
}

.logo a:hover {
    opacity: 0.6;
}

/* Navigation */
nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    background: #ebebeb45;
    backdrop-filter: blur(100px);
    padding: 6px;
    border-radius: 4px;
    z-index: 100;
    pointer-events: auto;
    width: 300px;
    /* Fixed width to ensure consistent equal spacing */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

nav.nav-hidden {
    transform: translateX(-50%) translateY(-150%);
    opacity: 0;
}

nav ul {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

nav li {
    flex: 1;
    display: flex;
    justify-content: center;
}

nav a {
    text-decoration: none;
    color: #111;
    font-size: 0.9rem;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
    background-color: transparent;
    position: relative;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

nav a.active {
    background-color: transparent;
    box-shadow: none;
}

/* Specific selector for active dot */
nav a.active .dot {
    background-color: #FF4D00;
}

/* Central Header Project Title */
.header-project-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.header-project-title.visible {
    opacity: 1;
    visibility: visible;
}

/* Hide nav when project title is visible */
header.project-scrolled nav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.3s ease;
}

.project-link:hover {
    opacity: 0.9;
}

.dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: transparent;
    /* Invisible by default */
    margin-right: 12px;
    margin-bottom: 2px;
    /* Visual alignment */
    border-radius: 0;
    /* Square */
}

/* Placeholders */
.placeholder {
    width: 100%;
    height: 100%;
    /* Start with a reasonable height or aspect ratio */
    aspect-ratio: 3/2;
    background-color: var(--placeholder-bg);
    display: flex;
    align-items: center;
    /* Center placeholder text/icon vertically */
    justify-content: center;
    /* Center placeholder text/icon horizontally */
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
}

.placeholder-light {
    background-color: #b0c4cf;
    /* Muted blue/grey for sailboat */
}

.placeholder-beige {
    background-color: #f2efe9;
    /* Beige for Pasareta */
}

/* Footer */
footer {

    /* Removed top padding, managed by layout */
    overflow: hidden;
    margin-top: 8rem;
}

.marquee-container {
    width: 100%;
    margin-bottom: 4rem;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.marquee-track {
    display: inline-flex;
    animation: scroll 20s linear infinite;
    /* transition: animation-play-state 0.5s ease; This doesn't work in CSS */
}

.marquee-track:hover {
    animation-play-state: paused;
}

.large-email {
    font-size: 14vw;
    line-height: 1.2;
    /* Updated line height */
    font-family: var(--font-main);
    letter-spacing: -0.04em;
    color: #000;
    padding: 0 4rem;
    /* Spacing between repeated items */
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.footer-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #111;
    width: 100%;
    padding: 0 3rem;
    /* Match header padding (was 2rem 3rem in original) */
    /* Ensure it aligns with logo */
}

/* Mobile Hamburger Menu Button */
.hamburger-btn {
    display: none;
    width: 40px;
    height: 40px;
    background-color: #ebebeb45;
    backdrop-filter: blur(100px);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 200;
}

/* Orange dot inside the button */
.hamburger-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: #FF4D00;
}

.hamburger-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ebebeb45;
    backdrop-filter: blur(100px);
    z-index: 150;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-overlay ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-nav-overlay li {
    margin: 1.5rem 0;
}

.mobile-nav-overlay a {
    text-decoration: none;
    color: #111;
    font-size: 1.5rem;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

.mobile-nav-overlay a:hover {
    opacity: 0.6;
}

.mobile-nav-overlay a .dot {
    width: 6px;
    height: 6px;
    margin-right: 12px;
    background-color: transparent;
}

.mobile-nav-overlay a.active .dot {
    background-color: #FF4D00;
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
        justify-content: space-between;
    }

    .logo {
        display: block;
        position: static;
        pointer-events: auto;
    }

    .header-spacer {
        display: none;
    }

    /* Hide desktop nav on mobile */
    nav {
        display: none;
    }

    /* Show hamburger button on mobile */
    .hamburger-btn {
        display: block;
    }

    /* Show mobile nav overlay structure on mobile */
    .mobile-nav-overlay {
        display: flex;
    }

    .hero {
        padding: 6rem 1.5rem 4rem;
    }

    .projects {
        gap: 2rem;
        padding: 1.5rem;
    }

    .placeholder {
        min-height: 300px;
    }

    .large-email {
        font-size: 13vw;
    }

    footer {
        padding-top: 4rem;
    }

    .footer-meta {
        padding: 0 1.5rem;
    }

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


}

/* About Page Specifics */
/* Using a more specific selector strategy or utility class if user prefers, 
   but for now we'll target the main content */

/* General List Items (Skills, Experience, Education) */
/* Assuming they are ul/li structure in about.html */
.list-grid {
    list-style: none;
    padding: 0;

}

.list-grid-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    /* 33% each */
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0dc;

}

.list-grid-item .item-title {
    text-align: left;



}

.list-grid-item .item-badge {
    text-align: center;
    justify-self: left;

    display: flex;
    gap: 1em;

}

/* Re-styling badge inside list to ensure it's centered */
.list-grid-item .badge {
    margin-bottom: 0;
    align-self: center;
}

.list-grid-item .item-date {
    text-align: right;
    color: #666;
    font-size: 0.9rem;
}

/* About Page Container Override */
body.about-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem;
    }

    .logo,
    .header-spacer {
        width: auto;
    }

    .hero {
        padding: 4rem 1.5rem;
    }

    .hero h1 {
        font-size: 1.25rem;
    }
}

/* Hero */
.hero {
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 660px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.5;
    color: #111;
    margin-top: 4rem;
}

.hero-image-container {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-placeholder {
    width: 100%;
    height: 100%;
    background-image: url('img/hero_work_index.png');
    background-size: cover;
    background-position: center;
}

/* Project Grid */
.project-grid,
.projects {
    /* Using .projects as wrapper selector in HTML */
    display: flex;
    flex-direction: column;
    gap: 8rem;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.project-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.placeholder {
    width: 100%;
    /* aspect-ratio set in placeholder definition */
    background-color: #e0e0dc;
    border-radius: 2px;
    transition: transform 0.3s ease;
    background-color: #EEEADD;
    background-size: cover;
    background-position: center;
}

.placeholder-inmusic {
    background-color: #EEEADD;
    background-image: url(img/inm1.png);
    background-size: cover;
    background-position: center;
}

.placeholder-light {
    background-color: #ABC0CD;
    background-image: url(img/ist.png);
    background-size: cover;
    background-position: center;
}

.placeholder-beige {
    background-color: #EEEADD;
    background-image: url(img/pasareta.png);
    background-size: cover;
    background-position: center;
}

.placeholder-kgz {
    background-color: #f0f0f0;
    background-image: url(img/kgz1.png);
    background-size: cover;
    background-position: center;
}

.badge-container {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
}

.badge {
    display: inline-block;
    background-color: transparent;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.project-info h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0;
}

/* Toast Notification */
#toast-notification {
    display: none;


    /* Match nav background */


    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 2em;
    transform: translate(-50%, -50%);
    /* Center perfectly */
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;


    border-radius: 4px;
    transition: all 0.2s ease;
    background-color: transparent;
    position: relative;

    transform: translateX(-50%);
    background-color: #ebebeb35;
    backdrop-filter: blur(100px);
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 100;

    display: inline-block
}

#toast-notification.show {
    visibility: visible;
    opacity: 1;
}

/* Footer Interactions */
.large-email {
    transition: 0.3s ease;
}

.large-email:hover {
    opacity: 0.1;
    /* Grey out on hover */
}

.footer-meta a {
    text-decoration: none;
    color: #111;
    transition: opacity 0.2s ease;
}

.footer-meta a:hover {
    opacity: 0.6;
}

/* Specific Card Styles */
.blue-bg {
    background-color: var(--project-blue);
    padding: 0;
    /* Full bleed into card */
    border-radius: 0px;
    /* Sharp edges */
    height: 600px;
    /* Fixed height for the look */
    position: relative;
    overflow: hidden;
}

.blue-bg .image-container.split {
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.blue-bg img {
    width: 50%;
    /* Takes up half */
    height: 70%;
    /* Takes up part of height */
    object-fit: cover;
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .logo,
    .header-spacer {
        width: auto;
    }

    .hero {
        padding: 4rem 1.5rem;
        width: 80%;
    }

    .hero h1 {
        font-size: 1.25rem;
    }
}