/* ============================================
   prototype.quest — Scandinavian Portfolio Design
   ============================================ */

/* --- Color Reference --- */
:root {
    --white: #FFFFFF;
    --snow: #F5F5F5;
    --light-gray: #E0E0E0;
    --medium-gray: #9E9E9E;
    --charcoal: #333333;
    --true-black: #0A0A0A;
    --bubble-accent: #7EB8DA;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.75;
    color: #333333;
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.panel-open {
    overflow: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    color: #0A0A0A;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* --- Exhibition Entrance --- */
.entrance {
    position: relative;
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, #FFFFFF 0%, #F5F5F5 100%);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
}

.entrance-content {
    padding-left: 8vw;
    padding-top: 20vh;
}

.entrance-wordmark {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(36px, 5.5vw, 72px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #0A0A0A;
    line-height: 1.1;
    margin-bottom: 24px;
}

.entrance-manifesto {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.75;
    color: #333333;
    max-width: 480px;
}

.bubble-cluster--entrance {
    position: absolute;
    bottom: 12vh;
    right: 10vw;
    animation: bubbleDrift 6s ease-in-out infinite;
}

@keyframes bubbleDrift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- Portfolio Grid --- */
.portfolio {
    max-width: 1080px;
    margin: 80px auto;
    padding: 0 24px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
}

/* --- Portfolio Cards --- */
.portfolio-card {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: #F5F5F5;
    overflow: hidden;
}

.portfolio-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.portfolio-card--feature {
    grid-column: 1;
}

.portfolio-card--supporting {
    grid-column: 2;
}

/* Card Images */
.card-image {
    width: 100%;
    overflow: hidden;
    filter: grayscale(1) contrast(1.1);
}

.card-image--feature {
    aspect-ratio: 3 / 2;
}

.card-image--supporting {
    aspect-ratio: 4 / 3;
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image-placeholder svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Card Meta */
.card-meta {
    padding: 20px 24px 24px;
}

.card-number {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #9E9E9E;
    display: block;
    margin-bottom: 8px;
}

.card-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(20px, 2.5vw, 28px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #0A0A0A;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.card-description {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 400;
    font-size: clamp(13px, 1.2vw, 15px);
    line-height: 1.65;
    color: #333333;
    margin-bottom: 12px;
}

.card-date {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #9E9E9E;
}

/* --- Underline Draw Effect --- */
.underline-draw-text {
    display: inline;
}

.underline-draw {
    display: block;
    width: 100%;
    height: 4px;
    margin-top: 2px;
}

.underline-draw path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 0.3s ease;
}

.portfolio-card:hover .underline-draw path,
.archive-entry:hover .underline-draw path {
    stroke-dashoffset: 0;
}

/* --- Research Archive --- */
.archive {
    max-width: 1080px;
    margin: 120px auto 80px;
    padding: 0 24px;
}

.archive-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 300;
    font-size: clamp(18px, 2vw, 24px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #9E9E9E;
    margin-bottom: 40px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E0E0E0;
}

.archive-list {
    list-style: none;
}

.archive-entry {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #E0E0E0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.archive-entry:hover {
    background-color: #F5F5F5;
}

.archive-number {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #9E9E9E;
    flex-shrink: 0;
    width: 36px;
}

.archive-title {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.3vw, 16px);
    color: #333333;
    flex-grow: 1;
    position: relative;
    display: inline-block;
}

.archive-title .underline-draw {
    height: 3px;
}

.archive-date {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #9E9E9E;
    flex-shrink: 0;
}

/* --- Detail Panel --- */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 998;
}

.panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.detail-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 60vw;
    max-width: 720px;
    background: #FFFFFF;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    transform: translateX(100%);
    transition: transform 0.4s ease-out;
    z-index: 999;
    overflow-y: auto;
    padding: 60px 48px;
}

.detail-panel.active {
    transform: translateX(0);
}

.detail-panel-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid #E0E0E0;
    cursor: pointer;
    font-size: 20px;
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, color 0.2s ease;
    line-height: 1;
}

.detail-panel-close:hover {
    border-color: #0A0A0A;
    color: #0A0A0A;
}

.detail-panel-content {
    margin-top: 20px;
}

.detail-panel-content .panel-number {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #9E9E9E;
    display: block;
    margin-bottom: 12px;
}

.detail-panel-content .panel-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #0A0A0A;
    margin-bottom: 8px;
    line-height: 1.15;
}

.detail-panel-content .panel-date {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #9E9E9E;
    margin-bottom: 32px;
    display: block;
}

.detail-panel-content .panel-divider {
    width: 48px;
    height: 1px;
    background: #E0E0E0;
    margin-bottom: 32px;
}

.detail-panel-content .panel-body {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.75;
    color: #333333;
}

.detail-panel-content .panel-body p {
    margin-bottom: 20px;
}

.detail-panel-content .panel-body p:last-child {
    margin-bottom: 0;
}

.detail-panel-content .panel-tags {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #E0E0E0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-panel-content .panel-tag {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #9E9E9E;
    border: 1px solid #E0E0E0;
    padding: 4px 12px;
    text-transform: uppercase;
}

/* --- Footer --- */
.site-footer {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    border-top: 1px solid #E0E0E0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-wordmark {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #9E9E9E;
}

.footer-year {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #9E9E9E;
}

.bubble-cluster--footer {
    position: absolute;
    bottom: 40px;
    right: 24px;
    animation: bubbleDrift 6s ease-in-out infinite;
    animation-delay: -3s;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-card--feature,
    .portfolio-card--supporting {
        grid-column: 1;
    }

    .detail-panel {
        width: 90vw;
        max-width: none;
        padding: 40px 24px;
    }

    .entrance-content {
        padding-left: 6vw;
        padding-top: 25vh;
    }

    .archive-entry {
        flex-wrap: wrap;
        gap: 8px;
    }

    .archive-date {
        width: 100%;
        padding-left: 56px;
    }
}

@media (max-width: 480px) {
    .entrance-wordmark {
        font-size: clamp(28px, 8vw, 48px);
    }

    .detail-panel {
        width: 100vw;
        padding: 32px 20px;
    }
}
