/* Base Variables and Resets */
:root {
    --bg-color: #f7f7f7;
    --text-color: #231f20;
    --grey-color: #848484;
    --font-ext: 'Helvetica Now Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-ext);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Custom Cursor */
    cursor: url('../assets/general/cursor.svg') 16 16, auto;
    
    /* Ensuring the body takes full height */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Page Container matches Figma Layout padding */
.page-container {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Changed from min-height: 100vh */
    padding: 32px;
    max-width: 100%; /* Changed from 1440px to fill the screen as requested */
    margin: 0 auto;
    width: 100%;
    overflow: hidden; /* Lock header/footer to viewport height */
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    width: 100%;
}

.logo-img {
    height: 48px;
    width: auto;
}

.nav-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-grow: 1;
}

.nav-links {
    display: flex;
    gap: 44px;
    align-items: center;
}

.nav-controls {
    display: flex;
    gap: 80px;
    align-items: center;
    margin-left: 44px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-link.active {
    font-weight: 700;
    color: var(--text-color);
}

.nav-link:hover {
    color: var(--grey-color);
}

.lang-switch {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.lang-option {
    color: var(--grey-color);
    font-weight: 400;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lang-option.active {
    color: var(--text-color);
    font-weight: 700;
}

/* Hamburger Menu styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 64px;
    height: 32px;
    cursor: pointer;
    z-index: 100; /* Ensure on top of mobile menu */
}

.hamburger .line {
    width: 100%;
    height: 4px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    transform-origin: 1px center;
}

/* Hamburger Open State (X) */
.hamburger.open .line:nth-child(1) {
    transform: rotate(45deg);
    width: 36px;
}

.hamburger.open .line:nth-child(2) {
    opacity: 0;
}

.hamburger.open .line:nth-child(3) {
    transform: rotate(-45deg);
    width: 36px;
    margin-top: auto; /* Push down to align properly depending on the height to origin, but using fixed pixel spacing is safer */
}
.hamburger.open .line:nth-child(1) {
    transform-origin: top left;
    transform: rotate(45deg) translate(5px, -5px);
    width: 100%;
}
.hamburger.open .line:nth-child(3) {
    transform-origin: bottom left;
    transform: rotate(-45deg) translate(5px, 5px);
    width: 100%;
}


/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 50;
    display: flex;
    flex-direction: column;
    padding: 100px 32px 32px 32px; /* Top padding clears the header */
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 32px;
    font-size: 32px;
    font-weight: 400;
}

.mobile-nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
}
.mobile-nav-link.active {
    font-weight: 700;
}

.mobile-footer {
    display: flex;
    flex-direction: column; /* Puts text above links */
    gap: 16px;
    margin-top: auto;
    font-size: 10px;
    color: var(--grey-color);
    align-items: center; /* Centralize */
    text-align: center;
}

.mobile-footer-links {
    display: flex;
    gap: 16px;
    font-size: 12px;
    justify-content: center; /* Centralize links */
}
.mobile-footer-link {
    color: var(--text-color);
    text-decoration: underline;
}

/* Base Footer Responsiveness */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 10px;
    color: var(--grey-color);
    width: 100%;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .nav-links, .desktop-only {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-controls {
        gap: 26px;
        margin-left: 0;
    }
    
    /* Make the base footer match the mobile-menu footer layout */
    .footer {
        flex-direction: column;
        gap: 16px;
        align-items: center;
        text-align: center;
        justify-content: center;
    }
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    overflow-y: auto; /* Only content area scrolls if content exceeds height */
    min-height: 0;
}

.welcome-section {
    padding: 32px 0;
    width: 100%;
    height: 120px; /* Fixed height */
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.welcome-text {
    font-size: 50px;
    line-height: 1.1;
    font-weight: 400;
    white-space: nowrap;
    position: absolute;
    will-change: transform;
    animation: marquee 50s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* Carousel Text styles and transitions */
.carousel-text {
    font-weight: 700;
    display: inline-block;
    transition: opacity 0.5s ease;
}

.carousel-text.fade-out {
    opacity: 0;
}

.carousel-text.fade-in {
    opacity: 1;
}

/* Kaleidoscope Section */
.kaleido-section {
    flex: 1; /* Automatically fill remaining space to keep footer visible */
    width: 100%;
    min-height: 200px; /* Reduced to allow fitting smaller viewports */
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
}

#kaleidoscope {
    width: 100%;
    height: 100%;
    min-height: 0; /* Allow resizing below 600px */
    display: block;
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 10px;
    color: var(--grey-color);
    width: 100%;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-link {
    color: var(--grey-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--text-color);
}

/* Work Page Styles */
.work-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    width: 100%;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 18px;
    color: var(--grey-color);
    transition: color 0.3s ease;
}

.back-button:hover {
    color: var(--text-color);
}

.back-arrow {
    width: 37px;
    height: 20px;
}

.breadcrumb {
    font-size: 14px;
    color: var(--grey-color);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    margin-bottom: 40px;
}

.work-item {
    width: 100%;
    aspect-ratio: 683 / 395;
    overflow: hidden;
    background-color: #eee;
}

.work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-item:hover .work-img {
    transform: scale(1.05);
}

@media (max-width: 1024px) {
    .work-grid {
        grid-template-columns: 1fr;
    }
    
    .work-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* Project Detail Page Styles */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    width: 100%;
}

.project-info {
    display: flex;
    gap: 80px;
    padding: 24px 0 80px 0;
    width: 100%;
    align-items: flex-start;
}

.project-title-area {
    flex: 1;
}

#project-title-display {
    font-size: 50px;
    line-height: 1;
    font-weight: 400;
    text-transform: uppercase;
}

.project-desc-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.project-description {
    font-size: 18px;
    line-height: 1.4;
    color: var(--text-color);
    white-space: pre-wrap;
}

.project-credits {
    font-size: 14px;
    color: var(--grey-color);
}

.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding-bottom: 32px;
}

.project-gallery-img {
    max-width: 60%; /* Increased by 20% from 50% */
    max-height: 54vh; /* Increased by 20% from 45vh */
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

@media (max-width: 1024px) {
    .project-gallery-img {
        max-width: 100%;
        max-height: none;
    }
    
    .project-info {
        flex-direction: column;
        gap: 32px;
        padding-bottom: 40px;
    }
    
    #project-title-display {
        font-size: 32px;
    }
}

/* About Me Page Styles */
.about-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 24px 0;
    width: 100%;
}

.about-content {
    display: flex;
    gap: 80px;
    padding: 0 0 80px 0;
    width: 100%;
    align-items: flex-start;
}

.about-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 648px;
}

.about-name {
    font-size: 50px;
    line-height: 1.2;
    font-weight: 400;
    text-transform: uppercase;
    margin: 0;
    color: var(--text-color);
}

.about-title {
    font-size: 18px;
    color: var(--text-color);
    margin: 0 0 10px 0;
    font-weight: 400;
}

.about-pic-container {
    width: 100%;
    height: 580px;
    overflow: hidden;
    position: relative;
}

.about-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-right {
    flex: 1;
    max-width: 648px;
}

.about-bio {
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-color);
}

.about-bio p {
    margin-bottom: 24px;
}

.about-bio p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .about-content {
        flex-direction: column;
        gap: 32px;
        padding-bottom: 40px;
    }
    
    .about-header {
        flex-direction: row; 
        justify-content: space-between;
    }

    .about-name {
        font-size: 32px;
    }

    .about-pic-container {
        max-width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }
}
/* Contact Page Styles */
.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 24px 0;
    width: 100%;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 0 0 80px 0;
    width: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.form-label {
    font-size: 50px;
    line-height: 1.2;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--text-color);
    flex-shrink: 0;
    width: 330px; /* Aligned with largest label "MESSAGE:" */
}

.form-input-wrapper {
    flex-grow: 1;
    border-bottom: 1.5px solid var(--grey-color);
    padding-bottom: 8px;
    display: flex;
    align-items: flex-end;
    min-height: 62px;
}

.form-input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: var(--font-ext);
    font-size: 18px;
    color: var(--text-color);
    padding: 0;
    outline: none;
}

.form-textarea {
    width: 100%;
    border: none;
    background: transparent;
    font-family: var(--font-ext);
    font-size: 18px;
    color: var(--text-color);
    padding: 0;
    outline: none;
    resize: none;
    height: 150px;
}

/* Custom placeholder color */
.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--grey-color);
    opacity: 0.6;
}

.form-submit-row {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-top: 20px;
}

.submit-button {
    background-color: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 16px 40px;
    font-family: var(--font-ext);
    font-size: 18px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: var(--grey-color);
}

@media (max-width: 1024px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-label {
        font-size: 32px;
        width: 100%;
    }
    
    .form-input-wrapper {
        width: 100%;
        min-height: 40px;
    }
}

/* Archive Page Styles */
.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 24px 0;
    width: 100%;
}

.archive-content {
    width: 100%;
    padding-bottom: 80px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.archive-item {
    width: 100%;
    aspect-ratio: 3 / 4; /* Updated to 3:4 (vertical) per user request */
    position: relative;
    overflow: hidden;
    background-color: #eee;
}

.archive-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.archive-item:hover .archive-img {
    transform: scale(1.02);
}

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

/* Success Message Styles */
.success-message {
    margin-top: 40px;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #ddd;
    animation: fadeIn 0.5s ease;
}

.success-message p {
    font-size: 18px;
    color: var(--text-color);
    margin: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
