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

:root {
    --preview-height-percent: 40vh;
    --preview-max-height: 400px;
    --landing-text-width: min(90vw, 1000px);
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #fff;
    color: #000;
    font-size: 14px;
    line-height: 1.4;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #0000EE;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.cursor-trail.active {
    opacity: 1;
    animation: fadeOut 0.8s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 100;
}

.landing-page.hidden {
    display: none;
}

.landing-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 2;
}

.landing-text {
    max-width: var(--landing-text-width);
    font-size: 48px;
    line-height: 1.4;
    word-wrap: break-word;
    width: 100%;
}

.studio-name {
    font-size: 48px;
    font-weight: normal;
    color: #000;
    cursor: pointer;
    text-decoration: underline;
    display: inline;
    word-wrap: break-word;
}

.studio-name:hover {
    color: #0000EE;
}

.projects-page {
    display: none;
    padding: 40px;
    min-height: 100vh;
    width: 100%;
}

.projects-page.visible {
    display: block;
}

.back-link {
    font-size: 14px;
    text-decoration: underline;
    color: #0000EE;
    display: inline-block;
    margin-bottom: 30px;
    cursor: pointer;
}

.back-link:hover {
    opacity: 0.6;
}

.projects-list {
    max-width: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.projects-column h2 {
    font-size: 14px;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    position: relative;
    z-index: 100;
}

.project-item {
    padding: 8px 0;
    cursor: pointer;
    position: relative;
    z-index: 100;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
    width: fit-content;
    max-width: 100%;
}

.project-item:hover {
    z-index: 101;
}

.project-item.active {
    color: #0000EE;
    text-decoration: underline;
}

.publication-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.publication-link:hover {
    color: #0000EE;
    text-decoration: underline;
    font-weight: bold;
}

.image-preview {
    position: fixed;
    pointer-events: none;
    z-index: 2000;
    display: none;
    height: min(var(--preview-height-percent), var(--preview-max-height));
    width: auto;
    max-width: 45vw;
}

.image-preview.active {
    display: block;
}

.image-preview img,
.image-preview video {
    height: 100%;
    width: auto;
    max-width: 700px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(4px 4px 4px #0000EE);
}

/* Mobile styles */
@media (max-width: 768px) {
    .projects-page {
        padding-left: 40px;
        padding-right: 20px;
    }
    
    .detail-page {
        padding-left: 40px;
        padding-right: 20px;
    }
    
    .projects-list {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .project-item {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
    
    .image-preview {
        pointer-events: auto;
    }
    
    .footer {
        position: fixed;
        bottom: 10vh !important;  /* 10% from bottom - adjust this value (lower = closer to bottom) */
        top: auto !important;
        left: 20px !important;
        transform: rotate(-90deg) translateX(50%) !important;
        transform-origin: left bottom;
        font-size: 12px !important;  /* Change this to adjust text size */
        white-space: nowrap;
        z-index: 10000;
    }
}

.detail-page {
    display: none;
    padding: 40px 20px;
    min-height: 100vh;
    width: 100%;
}

.detail-page.visible {
    display: block;
}

.detail-content {
    max-width: 90vw;
    margin: 0 auto;
}

.detail-title {
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 10px;
    line-height: 1.4;
}

.detail-meta {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.paper-link-button {
    display: inline-block;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 10px 20px;
    background-color: #0000EE;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
}

.paper-link-button:hover {
    opacity: 0.8;
}

.detail-images {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-image {
    width: 100%;
    height: auto;
    display: block;
}

.detail-video {
    width: 100%;
    height: auto;
    display: block;
}

.footer {
    position: fixed;
    bottom: 40px;
    left: 40px;
    font-size: 14px;
    color: #000;
    z-index: 100;
}

/* Hide footer when landing page is visible */
.landing-page:not(.hidden) ~ .footer {
    display: none;
}
