/* yongzoon.xyz - Personal Identity Site */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #FAF7F2;
    color: #1A1210;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Drifting Horizontal Rules === */
#drifting-rules {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.drift-line {
    position: absolute;
    height: 1px;
    background-color: #C4A08A;
    opacity: 0.18;
}

.drift-line:nth-child(1) { width: 35vw; top: 12%; animation: drift-right 55s linear infinite; }
.drift-line:nth-child(2) { width: 45vw; top: 24%; animation: drift-left 70s linear infinite; }
.drift-line:nth-child(3) { width: 28vw; top: 38%; animation: drift-right 40s linear infinite; }
.drift-line:nth-child(4) { width: 55vw; top: 48%; animation: drift-left 60s linear infinite; }
.drift-line:nth-child(5) { width: 20vw; top: 56%; animation: drift-right 80s linear infinite; }
.drift-line:nth-child(6) { width: 40vw; top: 67%; animation: drift-left 50s linear infinite; }
.drift-line:nth-child(7) { width: 30vw; top: 75%; animation: drift-right 65s linear infinite; }
.drift-line:nth-child(8) { width: 50vw; top: 85%; animation: drift-left 45s linear infinite; }
.drift-line:nth-child(9) { width: 25vw; top: 92%; animation: drift-right 75s linear infinite; }
.drift-line:nth-child(10) { width: 60vw; top: 33%; animation: drift-left 35s linear infinite; opacity: 0.12; }

@keyframes drift-right {
    0% { transform: translateX(-60vw); }
    100% { transform: translateX(110vw); }
}

@keyframes drift-left {
    0% { transform: translateX(110vw); }
    100% { transform: translateX(-60vw); }
}

/* === Hero Section === */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background-color: #F5F0E8;
}

.hero-inner {
    text-align: center;
}

#hero-name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 140px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1A1210;
    opacity: 0;
    transition: opacity 2s ease;
}

#hero-name.visible {
    opacity: 1;
}

#hero-rule {
    width: 0;
    height: 1px;
    background-color: #B8944A;
    margin: 24px auto;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#hero-rule.visible {
    width: 40vw;
}

#hero-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #C4A08A;
    opacity: 0;
    transition: opacity 1.2s ease;
}

#hero-subtitle.visible {
    opacity: 1;
}

/* Scroll Indicator */
#scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 1s ease;
}

#scroll-indicator.visible {
    opacity: 0.4;
}

#scroll-indicator span {
    display: block;
    width: 1px;
    height: 40px;
    background-color: #B8944A;
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { transform: scaleY(1); opacity: 0.4; }
    50% { transform: scaleY(0.5); opacity: 1; }
}

/* === Content Section - Masonry Grid === */
#content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 60px;
}

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

.masonry-card {
    background-color: #FAF7F2;
    border: 1px solid rgba(196, 160, 138, 0.2);
    padding: 48px 36px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: relative;
}

.masonry-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.masonry-card.settle {
    animation: settle-shake 0.4s ease-out;
}

@keyframes settle-shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
    75% { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

/* Staggered vertical offsets */
.masonry-card:nth-child(2) { margin-top: 60px; }
.masonry-card:nth-child(3) { margin-top: 30px; }
.masonry-card:nth-child(5) { margin-top: 40px; }
.masonry-card:nth-child(6) { margin-top: 80px; }

.masonry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #B8944A;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.masonry-card:hover::before {
    transform: scaleX(1);
}

.masonry-card.card-accent {
    background-color: #3A1520;
    color: #F5F0E8;
    border-color: #6B1D35;
}

.masonry-card.card-accent .card-label {
    color: #B8944A;
}

.masonry-card.card-accent h2 {
    color: #F5F0E8;
}

.masonry-card.card-accent p {
    color: rgba(245, 240, 232, 0.7);
}

.card-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #C4A08A;
    display: block;
    margin-bottom: 16px;
}

.masonry-card h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 28px;
    letter-spacing: 0.04em;
    color: #1A1210;
    margin-bottom: 16px;
}

.masonry-card p {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(26, 18, 16, 0.65);
}

/* === Footer === */
#footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 80px 60px 60px;
}

.footer-rule {
    width: 60px;
    height: 1px;
    background-color: #B8944A;
    margin: 0 auto 30px;
    opacity: 0.5;
}

.footer-text {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #C4A08A;
}

/* === Responsive === */
@media (max-width: 900px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    #hero-name {
        font-size: 80px;
    }

    #content {
        padding: 80px 30px;
    }

    .masonry-card:nth-child(2),
    .masonry-card:nth-child(3),
    .masonry-card:nth-child(5),
    .masonry-card:nth-child(6) {
        margin-top: 0;
    }

    .masonry-card:nth-child(even) {
        margin-top: 40px;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    #hero-name {
        font-size: 56px;
        letter-spacing: 0.08em;
    }

    #hero-rule.visible {
        width: 60vw;
    }

    #content {
        padding: 60px 20px;
    }

    .masonry-card {
        padding: 36px 24px;
    }

    .masonry-card:nth-child(even) {
        margin-top: 0;
    }
}
