/* 
   Main Stylesheet (style.css)
   Contains all global styles, layout definitions, and responsive rules.
   Follows Apple's high-end minimal aesthetic.
*/

:root {
    /* Color Palette - Light Theme */
    --bg-light: #ffffff;
    --text-light-primary: #1d1d1f;   /* Almost Black */
    --text-light-secondary: #86868b; /* Apple Gray */
    
    /* Color Palette - Dark Theme */
    --bg-dark: #161617;              /* Almost Black */
    --text-dark-primary: #f5f5f7;    /* Off White */
    --text-dark-secondary: #a1a1a6;  /* Light Gray */

    /* Typography & Effects */
    --font-stack: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --easing-apple: cubic-bezier(0.16, 1, 0.3, 1); /* Signature "smooth" ease */
    --shadow-soft: 0 20px 40px rgba(0,0,0,0.05);   /* Subtle elevation */
    --shadow-hover: 0 30px 60px rgba(0,0,0,0.12);  /* Lift on hover */
}

/* =========================================
   Base Reset & Global Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased; /* Crisp text on Mac */
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-light);
    color: var(--text-light-primary);
    line-height: 1.5;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.8); /* Translucent background */
    backdrop-filter: blur(20px);          /* Frosted glass effect */
    -webkit-backdrop-filter: blur(20px);
    transition: background-color 0.5s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.site-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: inherit;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.site-nav a {
    text-decoration: none;
    color: var(--text-light-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--text-light-primary);
}

/* =========================================
   Project Section Layout
   ========================================= */
.project-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 160px 0;
    transition: background-color 0.8s ease, color 0.8s ease; /* Smooth theme transition */
}

.project-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    gap: 60px;
}

/* Theme Handling */
[data-theme="light"] {
    background-color: var(--bg-light);
    color: var(--text-light-primary);
}

[data-theme="dark"] {
    background-color: var(--bg-dark);
    color: var(--text-dark-primary);
}

[data-theme="dark"] .project-subtitle,
[data-theme="dark"] .project-description p {
    color: var(--text-dark-secondary);
}

/* Sticky Info Column (Left) */
.project-info {
    width: 35%;
    height: fit-content;
    position: sticky;
    top: 160px; /* Sticks 160px from top while scrolling */
}

.project-number {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    opacity: 0.5;
}

.project-title {
    font-size: 56px;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.project-subtitle {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-light-secondary);
    margin-bottom: 40px;
}

.project-description p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-light-secondary);
    margin-bottom: 24px;
    max-width: 500px;
}

/* Gallery Column (Right) */
.project-gallery {
    width: 55%;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.image-wrapper {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background-color: rgba(0,0,0,0.02);
    min-height: 300px; /* Prevent height collapse before image load */
    opacity: 0;        /* Hidden initially for animation */
    transform: translateY(40px) scale(0.98);
    transition: opacity 1s var(--easing-apple), transform 1s var(--easing-apple);
    will-change: opacity, transform;
}

/* Animation State */
.image-wrapper.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 1.2s var(--easing-apple);
}

.image-wrapper:hover img {
    transform: scale(1.03); /* Subtle zoom on hover */
}

/* Footer */
.site-footer {
    padding: 80px 0;
    text-align: center;
    color: var(--text-light-secondary);
    font-size: 14px;
}

/* =========================================
   Mobile Hamburger Menu
   ========================================= */
.hamburger {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.hamburger .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-light-primary);
    transition: all 0.3s ease;
    transform-origin: left;
}

/* Hamburger Animation States */
.hamburger.active .bar:first-child {
    transform: rotate(45deg);
}

.hamburger.active .bar:last-child {
    transform: rotate(-45deg);
}

/* =========================================
   Responsive Breakpoints
   ========================================= */
@media (max-width: 1024px) {
    .project-content {
        flex-direction: column; /* Stack vertically on tablets */
        gap: 60px;
    }

    .project-info {
        width: 100%;
        position: relative;
        top: 0; /* Remove sticky behavior */
        margin-bottom: 40px;
    }
    
    .project-gallery {
        width: 100%;
    }

    .project-title {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    /* Show Hamburger on Mobile */
    .hamburger {
        display: flex;
    }

    /* Fullscreen Overlay Menu */
    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateX(100%); /* Slide out by default */
        transition: transform 0.4s var(--easing-apple);
        z-index: 1000;
    }

    .site-nav.active {
        transform: translateX(0); /* Slide in */
    }

    .site-nav ul {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .site-nav a {
        font-size: 24px;
        color: var(--text-light-primary);
    }

    .image-wrapper {
        min-height: 200px;
        transform: translateY(30px) scale(0.98);
    }
    
    .project-section {
        padding: 80px 0;
    }
    
    .project-gallery {
        gap: 40px;
    }
}
