/* 계엄령.com - Documentary Contact Sheet Archive */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --doc-dark: #141414;
    --tile-surface: #1C1C1C;
    --light-gray: #E8E8E8;
    --mid-gray: #808080;
    --dark-gray: #404040;
    --torn-edge: #2A2A2A;
    --highlight: #C0C0C0;
    --doc-border: #303030;
}

body {
    background: var(--doc-dark);
    color: var(--light-gray);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    overflow-x: hidden;
}

/* Grain Filter Overlay */
.grain-filter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* Archive Header */
.archive-header {
    text-align: center;
    padding: 4rem 2rem 2rem;
    position: relative;
    z-index: 2;
}
.handwritten-title {
    font-family: 'Nanum Pen Script', cursive;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    color: var(--light-gray);
    margin-bottom: 0.5rem;
}

/* Annotations */
.annotation {
    font-family: 'Nanum Pen Script', cursive;
    font-size: 0.9rem;
    color: var(--mid-gray);
    display: inline-block;
}

/* Portfolio Grid */
.portfolio-grid {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    position: relative;
    z-index: 2;
}

/* Grid Tiles */
.grid-tile {
    background: var(--tile-surface);
    padding: 16px;
    aspect-ratio: 1;
    position: relative;
    border: 1px solid var(--doc-border);
    opacity: 0;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.grid-tile.visible {
    animation: tileDevelop 0.4s ease forwards;
}
@keyframes tileDevelop { from { opacity: 0; } to { opacity: 1; } }

/* Layered-depth stack effect */
.tile-stack {
    box-shadow:
        3px 3px 0 var(--doc-border),
        6px 6px 0 var(--torn-edge);
}
.tile-stack:hover {
    box-shadow:
        5px 3px 0 var(--doc-border),
        10px 6px 0 var(--torn-edge);
}

/* Tile Typography */
.tile-headline {
    font-family: 'Nanum Pen Script', cursive;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 400;
    color: var(--light-gray);
    margin-bottom: 0.5rem;
}
.tile-body {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.9rem;
    color: #B0B0B0;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}
.tile-annotation {
    font-family: 'Nanum Pen Script', cursive;
    font-size: 0.85rem;
    color: var(--mid-gray);
    display: block;
}
.tile-note {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.8rem;
}

/* Pulse Memorial Markers */
.pulse-marker {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--highlight);
    animation: pulseHeartbeat 3s ease-in-out infinite;
}
@keyframes pulseHeartbeat {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* Torn Fragments */
.torn-fragment {
    position: relative;
    background: var(--torn-edge);
    z-index: 3;
    clip-path: polygon(0% 10%, 15% 0%, 40% 8%, 60% 2%, 85% 12%, 100% 5%, 100% 90%, 80% 100%, 55% 92%, 30% 98%, 10% 95%, 0% 85%);
}
.fragment-1 { grid-column: span 1; height: 60px; transform: rotate(1deg); }
.fragment-2 { grid-column: span 2; height: 50px; transform: rotate(-1deg); }

/* Section Divider */
.section-divider {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    z-index: 2;
}
.footer-annotation {
    font-family: 'Nanum Pen Script', cursive;
    font-size: 0.9rem;
    color: var(--mid-gray);
}

@media (max-width: 768px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-tile { aspect-ratio: auto; min-height: 200px; }
    .fragment-2 { grid-column: span 2; }
}
