/* 
=================================================================
PORTFOLIO SITE - CSS
=================================================================
Minimal, sophisticated interior architecture portfolio
*/

/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html {
    height: 100%;
    font-size: 16px;
}

@media(min-width: 1280px) {
    html {
        font-size: 18px;
    }
}

body {
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: 'Inter', sans-serif;
    line-height: 1.2;
    background: #fff;
    color: #111;
    padding-bottom: 1px;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    font-size: inherit;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: currentColor;
}

:focus {
    outline: 0;
}

button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: inherit;
}

.sr-only {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.no-underline {
    text-decoration: none;
}

/* CSS Variables */
:root {
    --ff-sans: 'Inter', sans-serif;
    --background-light: #fff;
    --color-light: #111;
    --color-transparent-light: rgba(0, 0, 0, 0.15);
    --color-transparent-light-hover: rgba(0, 0, 0, 0.15);
    --background-dark: #111;
    --color-dark: #fff;
    --color-transparent-dark: rgba(255, 255, 255, 0.15);
    --color-transparent-dark-hover: rgba(255, 255, 255, 0.2);
    --line-height: 1.2;
    --radius-round: 10000px;
    --gap: 0.7rem;
    --double-gap: calc(var(--gap) * 2);
    --half-gap: calc(var(--gap) * 0.5);
    --header-height: 3.5rem;
    --footer-height: var(--header-height);
    --header-spacing: calc(var(--header-height) - var(--gap));
    --projectslist-spacing-xl: 4vw;
    --overlay-border-radius: 1rem;
    --vh: 1vh;
}

@media(min-width: 1280px) {
    :root {
        --overlay-border-radius: 1.8rem;
    }
}

/* Typography */
.text {
    font-size: 1.1rem;
    line-height: 1.3;
}

@media(min-width: 1024px) {
    .text {
        font-size: 1rem;
    }
}

.text--large {
    font-size: 1.8rem;
    line-height: 1.074;
    text-wrap: balance;
}

/* Buttons */
.button {
    background: var(--color-transparent-light);
    color: var(--color-light);
    padding: 0.65em 1.3em 0.7em;
    display: block;
    border-radius: var(--radius-round);
    text-decoration: none;
    font-size: 0.8em;
    letter-spacing: 0.1em;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: var(--gap);
    padding-right: var(--gap);
    width: 100%;
    pointer-events: none;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 3;
    gap: var(--gap);
}

.header a,
.header button {
    pointer-events: all;
}

@media(max-width: 1280px) {
    .site-title {
        visibility: hidden;
        pointer-events: none;
    }
}

/* Page structure */
.page {
    min-height: 100vh;
    position: relative;
    z-index: 2;
    background: var(--background-light);
    margin-bottom: var(--footer-height);
    border-bottom-left-radius: var(--overlay-border-radius);
    border-bottom-right-radius: var(--overlay-border-radius);
    box-shadow: 0 3px 5px -2px rgba(0, 0, 0, 0.13), 
                0 7px 14px -5px rgba(0, 0, 0, 0.15);
}

.page_header {
    display: flex;
    align-items: center;
    padding-left: var(--gap);
    padding-right: var(--gap);
    margin-top: calc(var(--header-height) * -1);
    padding: var(--gap);
    pointer-events: none;
}

.page_header a,
.page_header button {
    pointer-events: all;
}

@media(min-width: 1280px) {
    .page_header {
        height: var(--header-height);
        margin-top: 0;
        justify-content: center;
        margin-top: calc(var(--header-height) * -1);
        position: sticky;
        top: 0;
    }
}

.page.home .page_header {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Intro section */
.intro {
    padding-bottom: var(--double-gap);
    padding-top: min(20vw, 8rem);
    padding-left: var(--gap);
    padding-right: var(--gap);
    max-width: 1400px;
}

/* Media box for images */
.mediabox {
    position: relative;
    height: 0;
    display: block;
    padding-bottom: calc(100% / var(--ratio));
    width: 100%;
    background: #eee;
}

.mediabox img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Projects list */
.projectslist_item_link {
    display: block;
    position: relative;
    text-decoration: none;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
}

.layout--featured .projectslist_item_title {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    padding: var(--gap);
    align-items: flex-start;
    background: linear-gradient(rgba(255, 255, 255, 0.15), transparent 200px);
}

@media(min-width: 1280px) {
    .layout--featured .projectslist_item_title {
        text-align: center;
        justify-content: center;
    }
}

.layout--featured .projectslist_item:not(:last-child) .projectslist_item_title {
    bottom: -20vh;
}

.layout--featured .projectslist_item:last-child .image {
    overflow: hidden;
    border-bottom-left-radius: var(--overlay-border-radius);
    border-bottom-right-radius: var(--overlay-border-radius);
}

.projectslist_item_title_text {
    display: block;
    position: sticky;
    top: var(--header-spacing);
    max-width: 500px;
    font-size: 1.8rem;
    line-height: 1.074;
}

@media(min-width: 1280px) {
    .layout--featured .projectslist_item_title_text {
        top: 0;
        padding-top: calc(var(--gap) * 1.2);
        padding-bottom: calc(var(--gap) * 1.2);
        max-width: calc(100% - 550px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.projectslist_item_image {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.layout--featured .projectslist_item_image .mediabox {
    padding-bottom: 0;
    min-height: 800px;
    height: 100vh;
}

/* Navigation */
.navigation-background {
    pointer-events: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 4;
    transition: backdrop-filter 350ms;
    backdrop-filter: blur(15px) opacity(0);
    transform: translateX(-100%);
}

.navigation-open .navigation-background {
    backdrop-filter: blur(15px) opacity(1);
    transform: translateX(0);
}

.navigation_modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    overflow: auto;
}

.navigation_panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    min-height: 100%;
    cursor: no-drop;
}

.navigation_panel_content {
    padding-top: 2rem;
    padding-bottom: 2rem;
    padding-left: var(--gap);
    padding-right: var(--gap);
    flex: 1;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.navigation_panel_content a,
.navigation_panel_content button {
    pointer-events: all;
}

.navigation_modal .nav {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    font-size: clamp(2.5rem, 1rem + 3vw, 4rem);
}

.navigation_modal .nav_item {
    display: flex;
    justify-content: center;
}

.navigation_modal .nav_link {
    color: #fff;
    transition: backdrop-filter 200ms;
    backdrop-filter: blur(10px) invert(100%) brightness(70%) opacity(0);
}

.navigation-open .navigation_modal .nav_link {
    backdrop-filter: blur(10px) invert(100%) brightness(70%) opacity(1);
}

/* Project Modal */
.project-modal {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: none;
    max-height: 100%;
    border: 0;
    overflow: auto;
    background: transparent;
    padding: 0;
    overscroll-behavior: contain;
    z-index: 1000;
    height: 100vh;
    opacity: 0;
    transition: opacity 300ms ease;
}

.project_backdrop {
    background: rgba(0, 0, 0, 0.7);
    display: block;
    height: 110vh;
    margin-top: -2rem;
    position: relative;
    z-index: 0;
    cursor: pointer;
}

.project_body {
    background: var(--background-light);
    box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, 0.12),
                0 3px 2px -2px rgba(0, 0, 0, 0.13),
                0 7px 5px -2px rgba(0, 0, 0, 0.13),
                0 12px 10px -2px rgba(0, 0, 0, 0.14),
                0 22px 18px -2px rgba(0, 0, 0, 0.15),
                0 41px 33px -2px rgba(0, 0, 0, 0.16),
                0 100px 80px -2px rgba(0, 0, 0, 0.17);
    border-bottom-left-radius: var(--overlay-border-radius);
    border-bottom-right-radius: var(--overlay-border-radius);
    position: relative;
    z-index: 1;
    min-height: calc(var(--header-height) * 2);
}

.project_header {
    background: var(--background-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.project_title {
    white-space: nowrap;
    overflow: hidden;
    padding-top: 0.3em;
    padding-bottom: 0.3em;
    flex: 1;
    text-overflow: ellipsis;
    font-size: 1.2rem;
    font-weight: 500;
}

.project_close {
    margin-left: auto;
}

.project_content {
    min-height: calc(var(--header-height) * 2);
    overflow: hidden;
    border-bottom-left-radius: var(--overlay-border-radius);
    border-bottom-right-radius: var(--overlay-border-radius);
}

.page_content {
    padding-left: var(--gap);
    padding-right: var(--gap);
}

.page_content_section {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: var(--gap);
    gap: var(--gap);
    padding-top: var(--gap);
    align-items: center;
}

@media(min-width: 1024px) {
    .page_content_section {
        grid-template-columns: 1fr 1fr;
        gap: 5vw;
        padding: 5vw;
    }
}

.page_content_section:first-child {
    padding-top: calc(var(--gap) * 0.5);
}

.page_content_section:last-child {
    padding-bottom: var(--gap);
}

.block {
    margin-bottom: var(--gap);
}

.block--text .text {
    max-width: 85ch;
}

@media(min-width: 1024px) {
    .block--text .text {
        margin-right: 27%;
    }
}

.block h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

body.has-project-modal {
    height: 100%;
    overflow: hidden;
    margin-right: var(--scrollbar-width, 0);
}

/* Footer */
.footer {
    z-index: 1;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background: #ccc;
    color: #000;
}

.footer_inner {
    padding: var(--gap);
    position: absolute;
    bottom: 0;
    width: 100%;
    height: var(--footer-height);
    overflow: auto;
}

.footer-nav {
    display: flex;
    white-space: nowrap;
}

.footer-nav_item {
    display: flex;
}

.footer-nav_item + .footer-nav_item:before {
    content: "";
    display: block;
    padding-left: var(--double-gap);
    padding-right: var(--double-gap);
}

.footer-nav_item:last-child {
    padding-right: 100px;
}

/* Utility classes */
.is-centered {
    text-align: center;
}

@media(min-width: 1280px) {
    .l\:hidden {
        display: none !important;
    }
}

/* Hidden elements */
.hidden {
    display: none;
}

/* Responsive visibility */
@media(min-width: 420px) {
    .xs\:hidden {
        display: none !important;
    }
}

@media(max-width: 420px) {
    .xs\:max\:hidden {
        display: none !important;
    }
}

@media(min-width: 667px) {
    .s\:hidden {
        display: none !important;
    }
}

@media(max-width: 667px) {
    .s\:max\:hidden {
        display: none !important;
    }
}

@media(min-width: 1024px) {
    .m\:hidden {
        display: none !important;
    }
}

@media(max-width: 1024px) {
    .m\:max\:hidden {
        display: none !important;
    }
}

/* ===============================================
   PROJECT DRAWER STYLES
   =============================================== */

.project-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-drawer.is-open {
    opacity: 1;
    pointer-events: all;
}

.project-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.project-drawer-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), max-height 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-drawer.is-open .project-drawer-content {
    transform: translateY(0);
}

.project-drawer-content.expanded {
    max-height: 100vh;
    border-radius: 0;
}

.project-drawer-close {
    position: sticky;
    top: 2rem;
    right: 2rem;
    float: right;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    color: #333;
    margin-bottom: -48px;
}

.project-drawer-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.project-drawer-body {
    overflow-y: auto;
    padding: 4rem 6rem 4rem;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.project-drawer-title {
    font-size: 3rem;
    font-weight: 300;
    margin: 0 0 3rem;
    color: #000;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

/* Project Details Styling - Hidden Fortress aesthetic */
.project-drawer-body .page_content_section {
    margin-bottom: 3rem;
}

.project-drawer-body .page_content_section h2,
.project-drawer-body .page_content_section h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    margin: 0 0 1rem;
    color: #000;
    letter-spacing: 0.02em;
}

.project-drawer-body .block--text .text p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
}

.project-drawer-body .block--text .text p:last-child {
    margin-bottom: 0;
}

.project-drawer-body .block--text .text strong {
    font-weight: 600;
    color: #000;
}

/* Gallery in drawer - Hidden Fortress style */
.project-drawer-body .image-gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2.5rem;
}

.project-drawer-body .gallery-row {
    display: grid;
    gap: 2rem;
}

.project-drawer-body .gallery-row.full {
    grid-template-columns: 1fr;
}

.project-drawer-body .gallery-row.half {
    grid-template-columns: 1fr 1fr;
}

.project-drawer-body .gallery-item {
    overflow: hidden;
    background: #fff;
}

.project-drawer-body .gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.project-drawer-body .gallery-item:hover img {
    opacity: 0.9;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .project-drawer-content {
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
    }
    
    .project-drawer-body {
        padding: 2.5rem 1.5rem 1.5rem;
    }
    
    .project-drawer-title {
        font-size: 2rem;
    }
    
    .project-drawer-body .gallery-row.half {
        grid-template-columns: 1fr;
    }
    
    .project-drawer-body .image-gallery {
        gap: 1.5rem;
    }
    
    .project-drawer-body .gallery-row {
        gap: 1.5rem;
    }
}

/* Prevent body scroll when drawer is open */
body.drawer-open {
    overflow: hidden;
}

/* ===============================================
   FULL-BLEED IMAGE SECTIONS
   =============================================== */

/* Full-bleed images (edge-to-edge, "super big") */
.page_content_section.fullbleed {
    grid-template-columns: 1fr;
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

.page_content_section.fullbleed .image-gallery,
.page_content_section.fullbleed .gallery-row,
.page_content_section.fullbleed .gallery-item {
    margin: 0;
    padding: 0;
    width: 100%;
}

.page_content_section.fullbleed img {
    width: 100%;
    max-width: 100%;
    display: block;
    border-radius: 0;
}

/* Image gallery improvements */
.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    width: 100%;
}

.gallery-row {
    display: grid;
    gap: 0;
    width: 100%;
}

.gallery-row.full {
    grid-template-columns: 1fr;
}

.gallery-row.half {
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.gallery-item {
    overflow: hidden;
    background: #000;
    line-height: 0;
    width: 100%;
    min-height: 400px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: block;
    object-fit: cover;
}

@media (max-width: 768px) {
    .gallery-row.half {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        min-height: 300px;
    }
    
    .gallery-item img {
        min-height: 300px;
    }
}

/* Spacing adjustments for better scrolling rhythm */
.page_content_section + .page_content_section {
    margin-top: 4rem;
}

@media(min-width: 1024px) {
    .page_content_section + .page_content_section {
        margin-top: 6rem;
    }
}
