/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Syne:wght@400;700;800&display=swap');

:root {
    --bg-color: #0d0d0d;
    --text-color: #f0f0f0;
    --accent-color: #a0a0a0;
    --container-width: 90vw;
    --nav-height: 80px;
    --transition-speed: 0.6s;
    --easing: cubic-bezier(0.22, 1, 0.36, 1);
    --font-display: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html,
body {
    width: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 800;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Typography Utility */
.serif {
    font-family: var(--font-display);
    font-weight: 800;
}

.display-text {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 10rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
    font-weight: 800;
    text-transform: uppercase;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    /* Increased height for descriptions */
    display: flex;
    justify-content: center;
    /* Center the new nav */
    align-items: center;
    padding: 0 5vw;
    z-index: 100;
    mix-blend-mode: difference;
    transition: height 0.3s ease;
    position: fixed;
    /* Ensure fixed */
}

/* Home Link Background */
.home-trigger {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    cursor: pointer;
}

/* Brand Navigation - Interactive */
.brand-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-display);
    position: relative;
    z-index: 1;
    /* Sit above home trigger */
    pointer-events: none;
    /* Let clicks pass through gaps */
}

.nav-item-container {
    position: relative;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    pointer-events: auto;
    /* Re-enable for items */
}

.nav-item {
    display: flex;
    align-items: baseline;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: white;
    /* Force white for mix-blend-mode */
    text-decoration: none;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.nav-char {
    display: inline-block;
}

.nav-word {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.6s var(--easing);
    display: inline-block;
}

.separator {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
    padding: 0 0.2rem;
    pointer-events: none;
    font-size: 1.5rem;
}

.nav-desc {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 250px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-body);
    font-weight: 400;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s var(--easing);
    margin-top: 15px;
    letter-spacing: -0.01em;
}

/* Hover / Active States */
.nav-item-container:hover .nav-word,
.nav-item-container.active .nav-word {
    max-width: 200px;
    opacity: 1;
    margin-left: 2px;
}

.nav-item-container:hover .nav-desc,
.nav-item-container.active .nav-desc {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.nav-item-container:hover .nav-item {
    opacity: 1;
}

/* Dim other items when one is hovered */
.brand-nav:hover .nav-item-container:not(:hover) {
    opacity: 0.3;
}

.brand-nav:hover .separator {
    opacity: 0.3;
}

/* Mobile specific */
@media (max-width: 768px) {
    header {
        height: auto;
        padding: 1rem 0;
        backdrop-filter: blur(10px);
        /* Better visibility on mobile */
        background: rgba(0, 0, 0, 0.2);
    }

    .brand-nav {
        flex-wrap: wrap;
        gap: 10px 0;
        width: 100%;
    }

    .nav-item-container {
        padding: 0 0.5rem;
    }

    .nav-item {
        font-size: 1.2rem;
    }

    .separator {
        font-size: 1.2rem;
        padding: 0 0.1rem;
    }

    .nav-desc {
        width: 100vw;
        position: fixed;
        left: 0;
        top: 60px;
        /* Below fixed header */
        transform: none;
        background: rgba(0, 0, 0, 0.8);
        padding: 10px 0;
        margin: 0;
        transform: translateY(-10px);
    }

    .nav-item-container.active .nav-desc {
        transform: translateY(0);
    }
}

/* Section Common */
section {
    padding: 10vh 5vw;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--nav-height);
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    width: 30vw;
    height: 40vh;
    opacity: 0.2;
    z-index: -1;
    overflow: hidden;
}

.hero-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.hero-sub {
    margin-top: 2rem;
    font-size: 1.1rem;
    max-width: 400px;
    line-height: 1.6;
    color: var(--accent-color);
}

/* Portfolio Grid */
.projects-section {
    padding-top: 5vh;
}

.section-header {
    margin-bottom: 5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-title {
    font-size: 2rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4vw;
    /* Recci style often uses clean grids */
}

.project-item {
    position: relative;
    margin-bottom: 5rem;
    transition: transform 0.5s var(--easing);
}

.project-item:nth-child(even) {
    transform: translateY(10rem);
    /* Staggered grid effect like Noah */
}

.project-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background-color: #222;
    margin-bottom: 1.5rem;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--easing), opacity 0.5s;
    opacity: 0.8;
}

.project-item:hover .project-thumb img {
    transform: scale(1.05);
    opacity: 1;
}

.project-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
}

.project-cat {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.05em;
}

/* About / Process Section */
.system-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
}

.system-list {
    display: flex;
    flex-direction: column;
}

.system-item {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem 0;
    transition: all 0.5s;
    opacity: 0.5;
}

.system-item:hover {
    opacity: 1;
    padding-left: 2rem;
    /* Interaction cue */
}

.system-num {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
    font-family: var(--font-body);
    /* Number looks better in Inter usually */
    font-weight: 600;
}

.system-title {
    font-size: 3rem;
    font-family: var(--font-display);
    font-weight: 800;
}

/* Contact */
.contact-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.contact-link {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 5rem);
    /* Reduced from 5vw to fit long email */
    font-weight: 800;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
    word-wrap: break-word;
    /* Ensure it wraps if absolutely necessary */
    max-width: 90vw;
    /* Prevent screen overflow */
    display: inline-block;
}

.contact-link:hover {
    border-color: white;
}

/* Footer */
footer {
    padding: 2rem 5vw;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
}

/* Anim Utilities */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s var(--easing);
}

.reveal-text.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-item:nth-child(even) {
        transform: translateY(0);
    }

    .display-text {
        font-size: 12vw;
    }

    .system-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-menu {
        display: none;
        /* Mobile menu needed */
    }
}

/* Sticky Project Section - Noah Demeuldre Style */
.sticky-project-section {
    position: relative;
    padding: 0;
    /* Full bleed usually */
    margin: 10vh 0;
}

.sticky-container {
    position: sticky;
    top: 10vh;
    /* Leave space for header */
    height: 80vh;
    /* Large visual area */
    width: 60%;
    /* Visual occupies left side */
    float: left;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 5vw;
    z-index: 10;
}

.sticky-visual {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.sticky-visual img,
.sticky-visual video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease-in-out;
}

.scroll-list {
    width: 40%;
    /* Text occupies right side */
    float: right;
    padding-top: 10vh;
    /* Start lower */
    padding-bottom: 20vh;
}

.scroll-item {
    height: 60vh;
    /* Each item has height to trigger scroll */
    display: flex;
    align-items: center;
    padding: 0 4vw;
    opacity: 0.3;
    transition: opacity 0.3s;
    cursor: pointer;
}

.scroll-item.active {
    opacity: 1;
}

.item-content {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
    transition: border-color 0.3s;
}

.scroll-item.active .item-content {
    border-left-color: white;
}

.item-cat {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.item-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.item-desc {
    color: #aaa;
    font-size: 1rem;
    line-height: 1.5;
}

/* Clearfix for floats */
.sticky-project-section::after {
    content: "";
    display: table;
    clear: both;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sticky-container {
        position: relative;
        width: 100%;
        height: 50vh;
        float: none;
        top: 0;
        padding: 0 5vw;
        margin-bottom: 2rem;
    }

    .scroll-list {
        width: 100%;
        float: none;
        padding-top: 0;
        padding-bottom: 5vh;
    }

    .scroll-item {
        height: auto;
        padding: 2rem 5vw;
        margin-bottom: 2rem;
        opacity: 1;
        /* Always visible on mobile */
    }
}