/* ============================================
   lungless.dev — Dark Academia Portfolio
   ============================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    color: #E8DCC8;
    background: #2C1810;
    overflow-x: hidden;
    cursor: default;
}

/* --- Background Gradient --- */
#bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #2C1810 0%, #3A2218 50%, #4A2C17 100%);
    z-index: -2;
}

/* --- Noise Texture Overlay --- */
#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1000;
}

/* --- Cursor-Follow Spotlight --- */
#spotlight {
    position: fixed;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196,149,58,0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 999;
    transform: translate(-50%, -50%);
    transition: left 0.2s cubic-bezier(0.4, 0, 0.2, 1), top 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

#spotlight.active {
    opacity: 1;
}

/* --- Sections Base --- */
.cabinet-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px;
    z-index: 1;
}

/* --- Specimen Number (Roman Numeral) --- */
.specimen-number {
    position: absolute;
    top: 24px;
    right: 32px;
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: #9B8763;
    text-transform: uppercase;
}

/* --- Section Headings --- */
.section-heading {
    font-family: 'Alfa Slab One', serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5B8A72;
    margin-bottom: 40px;
}

/* --- Fade Sections --- */
.fade-section {
    opacity: 0;
    transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-section.visible {
    opacity: 1;
}

/* ============================================
   Section I: Opening Cabinet
   ============================================ */
#opening {
    justify-content: flex-start;
    padding-top: 0;
}

.opening-content {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.site-title {
    font-family: 'Alfa Slab One', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5B8A72;
    opacity: 0;
    transition: opacity 1200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.site-title.revealed {
    opacity: 1;
}

.site-subtitle {
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: #9B8763;
    text-transform: uppercase;
    margin-top: 16px;
    opacity: 0;
    transition: opacity 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.site-subtitle.revealed {
    opacity: 1;
}

/* ============================================
   Section II: Field Notes
   ============================================ */
.field-notes-grid {
    display: grid;
    grid-template-columns: 1fr 0.62fr;
    gap: 60px;
    align-items: start;
}

.field-notes-text p {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(1rem, 1.1vw, 1.2rem);
    line-height: 1.72;
    max-width: 65ch;
    color: #E8DCC8;
    margin-bottom: 24px;
    opacity: 0;
    transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.field-notes-text p.revealed {
    opacity: 1;
}

.field-notes-specimen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
}

.specimen-rotate {
    animation: rotateSpecimen 30s linear infinite;
    transform-style: preserve-3d;
}

@keyframes rotateSpecimen {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

.salamander-3d {
    width: 220px;
    height: 300px;
}

.specimen-label {
    font-family: 'Roboto Slab', serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: #9B8763;
    text-transform: uppercase;
    margin-top: 20px;
}

.specimen-label-sub {
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    font-style: italic;
    color: #7A6B5D;
    margin-top: 4px;
}

/* ============================================
   SVG Dividers
   ============================================ */
.svg-divider {
    padding: 20px 80px;
    z-index: 1;
    position: relative;
}

.svg-divider svg {
    width: 100%;
    height: 40px;
}

/* ============================================
   Section III: Specimen Grid
   ============================================ */
#specimen-grid {
    align-items: flex-start;
    padding-top: 80px;
    padding-bottom: 80px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.specimen-card {
    position: relative;
    padding: 32px;
    border: 2px solid #9B8763;
    outline: 1px solid #9B8763;
    outline-offset: 4px;
    transition: background-color 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.specimen-card:hover {
    background-color: rgba(196, 149, 58, 0.04);
}

.card-number {
    position: absolute;
    top: 12px;
    right: 16px;
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: #9B8763;
}

.card-title {
    font-family: 'Alfa Slab One', serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5B8A72;
    margin-bottom: 16px;
}

.card-description {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #E8DCC8;
    margin-bottom: 20px;
}

.card-link {
    font-family: 'Roboto Slab', serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9B8763;
    text-decoration: none;
    transition: color 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card-link:hover {
    color: #5B8A72;
}

/* ============================================
   Section IV: Marginalia
   ============================================ */
#marginalia {
    align-items: flex-end;
    padding-right: 15%;
}

.marginalia-column {
    max-width: 480px;
}

.marginalia-column .section-heading {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.margin-note {
    position: relative;
    padding: 16px 0;
    padding-left: 60px;
    border-bottom: 1px solid rgba(155, 135, 99, 0.2);
}

.margin-note::before {
    content: attr(data-annotation);
    position: absolute;
    left: 0;
    top: 16px;
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    font-style: italic;
    color: #7A6B5D;
}

.margin-note p {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(0.9rem, 1vw, 1rem);
    line-height: 1.65;
    color: #E8DCC8;
}

/* ============================================
   Section V: Colophon
   ============================================ */
#colophon {
    align-items: center;
    text-align: center;
}

.colophon-content {
    max-width: 520px;
}

.colophon-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.85rem;
    line-height: 1.72;
    color: #E8DCC8;
    margin-bottom: 16px;
}

.colophon-contact {
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: #9B8763;
    text-transform: uppercase;
    margin-top: 32px;
    margin-bottom: 40px;
}

.wax-seal {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.wax-seal svg {
    width: 80px;
    height: 80px;
}

.colophon-year {
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: #7A6B5D;
}

/* --- Accent Colors Reference --- */
/* #C4953A - Specimen Amber (used in HTML SVG and spotlight) */
/* #F2EBE0 - Bone White */
.bone-white { color: #F2EBE0; }
.specimen-amber { color: #C4953A; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .cabinet-section {
        padding: 40px 24px;
    }

    .field-notes-grid {
        grid-template-columns: 1fr;
    }

    .field-notes-specimen {
        padding-top: 20px;
    }

    .salamander-3d {
        width: 60%;
        height: auto;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .svg-divider {
        padding: 20px 24px;
    }

    #marginalia {
        align-items: flex-start;
        padding-right: 24px;
    }
}
