/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #111;
    --white: #fafafa;
    --gray: #888;
    --light-gray: #e8e8e8;
    --bg: #fff;
    --text: #111;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container.narrow { max-width: 800px; }

.section { padding: 6rem 0; }

.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 3rem;
}

.full-image { width: 100%; border-radius: 2px; }

/* ===== BACK LINK ===== */
.back-link {
    position: fixed;
    top: 1.2rem;
    left: 1.5rem;
    z-index: 100;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.5rem 1rem;
    border-radius: 2px;
    transition: color 0.3s;
}

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

/* ===== PAGE TITLE ===== */
.page-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: 3rem;
    padding-top: 3rem;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 3rem;
}

/* ===== HERO ===== */
.hero {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-content-left {
    align-items: flex-start;
    text-align: left;
}

.hero-title {
    font-size: clamp(2.8rem, 9vw, 6.5rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-align: left;
}

.hero-subtitle {
    font-size: clamp(0.7rem, 2vw, 1rem);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gray);
    margin-top: 1rem;
    text-align: left;
}

.hero-tag {
    font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray);
    margin-top: 0.5rem;
    font-style: italic;
    text-align: left;
}

.scroll-arrow {
    position: absolute;
    bottom: 2rem;
    color: var(--gray);
    animation: bounce 2s infinite;
    transition: color 0.3s;
}

.scroll-arrow:hover { color: var(--text); }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ===== RENDER ===== */
.render-section {
    padding: 0 0 4rem;
}

.render-section .container {
    max-width: 1000px;
}

.render-hero {
    padding: 2rem 0 4rem;
}

.render-hero .container {
    max-width: 1400px;
}

.render-hero .full-image {
    animation: levitate 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    border-radius: 4px;
}

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

/* ===== ABOUT ===== */
.about-section { padding: 6rem 0 4rem; }

.about-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5rem;
}

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

.about-text ul {
    list-style: disc;
    margin: 0 0 1.5rem 1.5rem;
    color: #333;
}

.about-text ul li {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 0.3rem;
}

.about-text strong {
    font-weight: 600;
    color: #111;
}

/* ===== SECTIONS NAV (3 cards) ===== */
.sections-nav { padding: 2rem 0 6rem; }

.sections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.section-card {
    display: block;
    text-align: center;
    padding: 1.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    transition: all 0.3s;
}

.section-card:hover {
    border-color: var(--text);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.section-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 2px;
    margin-bottom: 1.25rem;
    background: var(--white);
}

.section-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ===== RESEARCH DIAGRAM PLACEHOLDER ===== */
.research-diagram-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    border: 1px dashed var(--light-gray);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.research-diagram-placeholder p {
    font-size: 0.85rem;
    color: var(--gray);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ===== PRINCIPLES ===== */
.principles-list {
    max-width: 700px;
}

.principle-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.principle-item:first-child {
    border-top: 1px solid var(--light-gray);
}

.principle-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.principle-item p {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
}

/* ===== SKETCHES GALLERY ===== */
.sketches-grid-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.sketch-thumb {
    cursor: pointer;
    transition: transform 0.3s;
}

.sketch-thumb:hover { transform: translateY(-4px); }

.sketch-thumb img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border: 1px solid var(--light-gray);
    border-radius: 2px;
}

.sketch-thumb figcaption {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.6rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0,0,0,0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox.active { opacity: 1; pointer-events: all; }

.lightbox-content {
    max-width: 92vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 92vw;
    max-height: 80vh;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.4s;
}

.lightbox.active .lightbox-content img { transform: scale(1); }

.lightbox-caption {
    color: rgba(255,255,255,0.6);
    font-size: 0.78rem;
    margin-top: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 2rem;
    color: rgba(255,255,255,0.6);
    z-index: 10;
    padding: 0.5rem;
    transition: color 0.3s;
}

.lightbox-close:hover { color: #fff; }

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: rgba(255,255,255,0.4);
    z-index: 10;
    padding: 1rem;
    transition: color 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover { color: #fff; }

.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

/* ===== ZOOMABLE IMAGE ===== */
.zoomable-wrapper {
    position: relative;
    margin-bottom: 0.75rem;
}

.zoomable-container {
    overflow: auto;
    border: 1px solid var(--light-gray);
    border-radius: 2px;
    max-height: 70vh;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}

.zoomable-container:active { cursor: grabbing; }

.zoomable-img {
    transform-origin: 0 0;
    transition: transform 0.3s;
    min-width: 100%;
}

.zoom-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.25rem;
}

.zoom-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--light-gray) !important;
    border-radius: 2px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.zoom-btn:hover {
    background: var(--text);
    color: var(--bg);
}

.image-caption {
    font-size: 0.78rem;
    color: var(--gray);
    font-style: italic;
}

/* ===== CONTINUE BUTTON ===== */
.continue-section { padding: 2rem 0 6rem; }

.continue-btn {
    display: inline-block;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border: 1px solid var(--text);
    transition: all 0.3s;
}

.continue-btn:hover {
    background: var(--text);
    color: var(--bg);
}

/* ===== INTERACTIVE IMAGE HOTSPOTS ===== */
.interactive-image { position: relative; }

.hotspot {
    position: absolute;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
    padding: 0.5em 1em;
    border-radius: 0;
    transition: all 0.3s;
    white-space: nowrap;
    background: #fff;
    border: none;
    line-height: 1.4;
    box-shadow: 0 0 0 4px #fff;
}

.hotspot-multiline {
    white-space: normal;
    text-align: left;
}

.hotspot:hover {
    background: var(--text);
    color: var(--bg);
}

.hotspot.active {
    background: var(--text);
    color: var(--bg);
}

/* ===== ITEM LIST (replaces accordion headers) ===== */
.item-list {
    margin-top: 3rem;
    border-top: 1px solid var(--light-gray);
}

.item-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
    transition: background 0.3s, padding-left 0.3s;
}

.item-btn:hover {
    background: rgba(0,0,0,0.02);
    padding-left: 1rem;
}

.item-btn:active {
    background: var(--text);
    color: var(--bg);
}

.item-num {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--gray);
    min-width: 2rem;
}

.item-name {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

/* ===== DETAIL MODAL ===== */
.detail-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
}

.detail-modal.active {
    opacity: 1;
    pointer-events: all;
}

.detail-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.detail-modal-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.detail-modal-body {
    background: var(--bg);
    max-width: 1000px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-overflow-scrolling: touch;
}

.detail-modal.active .detail-modal-body {
    transform: translateY(0) scale(1);
}

.detail-modal-close {
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    font-size: 1.8rem;
    z-index: 10;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    transition: all 0.3s;
}

.detail-modal-close:hover {
    color: var(--text);
    background: #fff;
}

.detail-modal-images {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    background: var(--white);
    overflow: visible;
}

.detail-modal-images img {
    max-width: 100%;
    max-height: 55vh;
    object-fit: contain;
    object-position: center;
    width: auto;
    height: auto;
    margin: 0 auto;
}

.detail-modal-text {
    padding: 2.5rem 3rem;
    overflow-y: auto;
}

.detail-modal-text h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.detail-modal-text .modal-subtitle {
    font-size: 0.78rem;
    color: var(--gray);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.detail-modal-text p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 1rem;
}

.detail-modal-text ul {
    list-style: none;
    margin: 1rem 0;
}

.detail-modal-text ul li {
    font-size: 0.88rem;
    color: #444;
    padding: 0.3rem 0 0.3rem 1rem;
    position: relative;
}

.detail-modal-text ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 4px;
    height: 4px;
    background: var(--gray);
    border-radius: 50%;
}

/* ===== FOOTER ===== */
.footer-section {
    padding: 5rem 0;
    border-top: 1px solid var(--light-gray);
}

.footer-content { text-align: center; }
.footer-left { text-align: left; }
.footer-left .footer-links { justify-content: flex-start; }

.footer-label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.75rem;
}

.footer-name {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.footer-meta {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.6;
}

.footer-meta a {
    color: var(--gray);
    transition: color 0.3s;
}

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

.footer-links {
    margin-top: 1rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.footer-links a {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray);
    transition: color 0.3s;
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s, transform 0.8s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 768px) {
    .section { padding: 4rem 0; }
    .container { padding: 0 1.25rem; }

    /* Hero */
    .hero { padding: 0 1.25rem; }
    .hero-title { font-size: clamp(2rem, 11vw, 3.5rem); }
    .hero-subtitle { font-size: 0.7rem; letter-spacing: 0.2em; }
    .hero-tag { font-size: 0.6rem; }

    /* Section cards */
    .sections-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .section-card {
        display: grid;
        grid-template-columns: 100px 1fr;
        gap: 1rem;
        text-align: left;
        padding: 1rem;
        align-items: center;
    }

    .section-card-img {
        aspect-ratio: 1;
        margin-bottom: 0;
    }

    .section-card h3 { font-size: 0.8rem; }

    /* Page title */
    .page-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
        padding-top: 3.5rem;
    }

    .subsection-title { font-size: 1.2rem; margin-bottom: 2rem; }

    /* Back link */
    .back-link {
        top: 0.8rem;
        left: 0.8rem;
        font-size: 0.6rem;
        padding: 0.4rem 0.7rem;
    }

    /* Hotspots on mobile */
    .hotspot {
        font-size: 0.45rem;
        padding: 0.3em 0.5em;
        letter-spacing: 0.02em;
        box-shadow: 0 0 0 2px #fff;
    }

    .hotspot-multiline { font-size: 0.45rem; }

    /* About */
    .about-text p {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: 1.2rem;
    }

    /* Principles */
    .principles-grid { grid-template-columns: 1fr; gap: 0; }
    .principle { padding: 1.2rem 0; }

    /* Sketches */
    .sketches-grid-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Lightbox */
    .lightbox-prev { left: 0.25rem; font-size: 2rem; padding: 0.5rem; }
    .lightbox-next { right: 0.25rem; font-size: 2rem; padding: 0.5rem; }

    /* Detail modal */
    .detail-modal-content { padding: 0; }

    .detail-modal-body {
        grid-template-columns: 1fr;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        height: 100%;
    }

    .detail-modal-images {
        padding: 1.5rem;
    }

    .detail-modal-images img {
        max-height: 40vh;
    }

    .detail-modal-text {
        padding: 1.5rem;
    }

    .detail-modal-text h3 { font-size: 1.2rem; }

    .detail-modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    /* Item list */
    .item-btn { gap: 1rem; padding: 1rem 0.25rem; }
    .item-name { font-size: 0.88rem; }

    /* Continue button */
    .continue-btn {
        font-size: 0.75rem;
        padding: 0.85rem 1.5rem;
        width: 100%;
        text-align: center;
    }

    /* Zoom */
    .zoomable-container { max-height: 50vh; }
    .zoom-btn { width: 32px; height: 32px; font-size: 0.9rem; }

    /* Footer */
    .footer-section { padding: 3rem 0; }
    .footer-name { font-size: 1.3rem; }
    .footer-meta { font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: clamp(1.8rem, 12vw, 2.8rem); }

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

    .hotspot { font-size: 0.38rem; padding: 0.2em 0.4em; box-shadow: 0 0 0 1px #fff; }
    .hotspot-multiline { font-size: 0.38rem; }

    .item-btn { gap: 0.75rem; }
    .item-num { min-width: 1.5rem; font-size: 0.65rem; }
    .item-name { font-size: 0.82rem; }
}
