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

body {
    font-family: 'Karla', sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    overflow-x: hidden;
}



.preloader {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-title {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    color: #000;
    font-size: 28px;
    letter-spacing: 0.5px;
}

.preloader-title span {
    display: inline-block;
}

.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar styles */
.sidebar {
    width: 35%;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    padding: 40px;
    border-right: 0px solid #eee;
}

.sidebar-content {
    max-width: 400px;
}

h1 {
    font-size: inherit;
    font-family: 'Karla', sans-serif;
    line-height: 1.6;
    color: #000;
    font-weight: 400;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #000;
}

.bio {
    margin-bottom: 40px;
}

.bio p {
    margin-bottom: 15px;
    white-space: pre-line;
}

/* Bio accordion styles */
.bio-toggle {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: #000;
    cursor: pointer;
    margin-top: 0;
    margin-bottom: 0;
}

.bio-toggle-text {
    font-style: normal;
    text-decoration: none;
}

.bio-expandable {
    overflow: hidden;
}

.bio-expandable p {
    margin-bottom: 15px;
}

.links {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
}

.link {
    padding: 10px 0;
    color: #000;
    text-decoration: none;
    border-top: 1px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.link:last-child {
    border-bottom: 1px solid #000;
}

.link:hover {
    color: #000;
    transform: translateX(5px);
}

.arrow {
    font-size: 18px;
}

.material-symbols-outlined {
    font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 20;
}

.address p {
    font-size: inherit;
    color: #000;
}

.contact-link {
    margin-top: 40px;
    margin-bottom: 40px;
}

.contact-link .link {
    border-top: 0px solid #000;
    border-bottom: 0px solid #000;
}

/* Content styles */
.content {
    width: 65%;
    margin-left: 35%;
    padding: 40px;
    will-change: transform; /* Optimize for animations */
}

.content-title {
    font-size: inherit;
    font-family: 'Karla', sans-serif;
    line-height: 1.6;
    color: #000;
    font-weight: 400;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #000;
}

/* Make the sidebar title act like a link on project pages */
.sidebar-content h1 {
    cursor: pointer;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 60px;
}

.grid-item {
    opacity: 1; /* Grid items visible by default */
    overflow: hidden;
    border-radius: 0; /* No rounded corners */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    aspect-ratio: 4/5; /* 4:5 aspect ratio */
    --overlay-opacity: 0;
    --overlay-y: 100%;
}

.grid-item.has-caption::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 110px;
    background: rgba(255, 255, 255, 1);
    opacity: var(--overlay-opacity);
    transform: translateY(var(--overlay-y));
    pointer-events: none;
    z-index: 1;
}

.grid-item img,
.grid-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Show pointer only for clickable items */
.grid-item[data-iframe-src],
.grid-item[data-gallery-sources],
.grid-item[data-external-href] {
    cursor: pointer;
}

/* Route-enabled items */
.grid-item[data-slug] {
    cursor: pointer;
}

/* Detail view layout */
.project-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-media img,
.project-media video {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.project-media video {
    background: #000;
}

/* Removed open icon styles */

/* Lightbox overlay */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: #eee;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox-overlay.is-visible {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 90vw;
    height: 90vh;
    background: #eee;
    /* box-shadow: 0 10px 40px rgba(0,0,0,0.5); */
}

.lightbox-gallery {
    position: absolute;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-gallery.is-visible {
    display: flex;
}

.lightbox-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-slide img,
.lightbox-slide video {
    max-width: 100%;
    max-height: 100%;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    width: 40px;
    height: 40px;
    border-radius: 20px;
    cursor: pointer;
}

.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

.lightbox-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #111;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 18px;
    font-size: 22px;
    line-height: 36px;
    text-align: center;
    background: rgba(0,0,0,0.7);
    color: #fff;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.lightbox-close:hover {
    background: rgba(0,0,0,0.85);
}

.lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Caption styles */
.item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 110px;
    padding: 20px;
    background: none;
    color: black;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

/* Hover reveal handled via GSAP in script.js */

.item-caption h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 600;
}

.item-caption p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .sidebar-content {
        max-width: none;
        width: 100%;
    }
    
    .content {
        width: 100%;
        margin-left: 0;
    }
    
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

@media (max-width: 1100px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .sidebar,
    .content {
        padding: 20px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
} 