/* p9r.dev - Neubrutalist Sepia Developer's Corkboard */

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

html {
    scroll-behavior: auto;
}

body {
    font-family: 'Varela Round', sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #3d2a1a;
    background-color: #faf3e5;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 11px,
        rgba(26, 16, 8, 0.04) 11px,
        rgba(26, 16, 8, 0.04) 12px
    );
}

/* ===== NAVIGATION BAR ===== */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 56px;
    background: #1a1008;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.nav-mark {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: #f5e6c8;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #d4a574;
    text-decoration: none;
    transition: color 150ms ease-out;
}

.nav-link:hover {
    color: #c4713b;
}

/* ===== HERO SLAB ===== */
.hero-slab {
    margin-top: 56px;
    width: 100%;
    min-height: 50vh;
    background: #2c1810;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

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

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    letter-spacing: -0.02em;
    color: #f5e6c8;
    margin-bottom: 16px;
}

.hero-dot {
    color: #c4713b;
}

.hero-tagline {
    font-family: 'Varela Round', sans-serif;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #d4a574;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== SAWTOOTH DIVIDER ===== */
.sawtooth-divider {
    width: 100%;
    height: 20px;
    overflow: hidden;
    background: #faf3e5;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 11px,
        rgba(26, 16, 8, 0.04) 11px,
        rgba(26, 16, 8, 0.04) 12px
    );
}

.sawtooth-svg {
    width: 100%;
    height: 20px;
    display: block;
}

.sawtooth-svg .tooth {
    fill: #1a1008;
    transform-origin: center top;
    animation: tooth-grow 800ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
    transform: scaleY(0);
}

@keyframes tooth-grow {
    to {
        transform: scaleY(1);
    }
}

.tooth:nth-child(1) { animation-delay: 0ms; }
.tooth:nth-child(2) { animation-delay: 25ms; }
.tooth:nth-child(3) { animation-delay: 50ms; }
.tooth:nth-child(4) { animation-delay: 75ms; }
.tooth:nth-child(5) { animation-delay: 100ms; }
.tooth:nth-child(6) { animation-delay: 125ms; }
.tooth:nth-child(7) { animation-delay: 150ms; }
.tooth:nth-child(8) { animation-delay: 175ms; }
.tooth:nth-child(9) { animation-delay: 200ms; }
.tooth:nth-child(10) { animation-delay: 225ms; }
.tooth:nth-child(11) { animation-delay: 250ms; }
.tooth:nth-child(12) { animation-delay: 275ms; }
.tooth:nth-child(13) { animation-delay: 300ms; }
.tooth:nth-child(14) { animation-delay: 325ms; }
.tooth:nth-child(15) { animation-delay: 350ms; }
.tooth:nth-child(16) { animation-delay: 375ms; }
.tooth:nth-child(17) { animation-delay: 400ms; }
.tooth:nth-child(18) { animation-delay: 425ms; }
.tooth:nth-child(19) { animation-delay: 450ms; }
.tooth:nth-child(20) { animation-delay: 475ms; }
.tooth:nth-child(21) { animation-delay: 500ms; }
.tooth:nth-child(22) { animation-delay: 525ms; }
.tooth:nth-child(23) { animation-delay: 550ms; }
.tooth:nth-child(24) { animation-delay: 575ms; }
.tooth:nth-child(25) { animation-delay: 600ms; }
.tooth:nth-child(26) { animation-delay: 625ms; }
.tooth:nth-child(27) { animation-delay: 650ms; }
.tooth:nth-child(28) { animation-delay: 675ms; }
.tooth:nth-child(29) { animation-delay: 700ms; }
.tooth:nth-child(30) { animation-delay: 725ms; }

/* ===== MASONRY WALL ===== */
.masonry-wall {
    column-count: 3;
    column-gap: 6px;
    padding: 6px 24px 48px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== CARDS BASE ===== */
.card {
    break-inside: avoid;
    border: 4px solid #1a1008;
    box-shadow: 6px 6px 0px #1a1008;
    margin-bottom: 6px;
    padding: 24px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 350ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 350ms cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 150ms ease-out;
}

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

.card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0px #1a1008;
}

.card.visible:hover {
    transform: translate(-3px, -3px);
}

/* ===== PULSE ANIMATION ===== */
@keyframes pulse-ring {
    0% { box-shadow: 6px 6px 0px #1a1008, 0 0 0 0 rgba(196, 113, 59, 0.5); }
    70% { box-shadow: 6px 6px 0px #1a1008, 0 0 0 12px rgba(196, 113, 59, 0); }
    100% { box-shadow: 6px 6px 0px #1a1008, 0 0 0 0 rgba(196, 113, 59, 0); }
}

.card.pulse {
    animation: pulse-ring 600ms ease-out;
}

/* ===== TITLE CARDS ===== */
.card-title {
    background: #f5e6c8;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
}

.card-title h2 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    color: #1a1008;
    letter-spacing: -0.02em;
    text-align: center;
}

/* Corner marks */
.corner-mark {
    position: absolute;
    width: 8px;
    height: 8px;
}

.corner-tl {
    top: 8px;
    left: 8px;
    border-top: 3px solid #c4713b;
    border-left: 3px solid #c4713b;
}

.corner-br {
    bottom: 8px;
    right: 8px;
    border-bottom: 3px solid #c4713b;
    border-right: 3px solid #c4713b;
}

/* ===== CONTENT CARDS ===== */
.card-content {
    background: #faf3e5;
}

.card-content h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #1a1008;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.card-content p {
    color: #3d2a1a;
    font-size: 1rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

.card-icons {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
}

/* ===== ACCENT CARDS ===== */
.card-accent {
    background: #c4713b;
}

.card-accent h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #faf3e5;
    margin-bottom: 8px;
}

.card-accent p {
    color: #faf3e5;
    font-size: 1rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* ===== CODE CARDS ===== */
.card-code {
    background: #2c1810;
}

.card-code pre {
    margin: 0;
    overflow-x: auto;
}

.card-code code {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #d4a574;
    white-space: pre;
}

/* ===== FOOTER ===== */
.footer {
    background: #1a1008;
    padding: 32px 24px;
    border-top: 4px solid #2c1810;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-mark {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: #f5e6c8;
}

.footer-text {
    font-family: 'Varela Round', sans-serif;
    font-size: 0.875rem;
    color: #a8834a;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .masonry-wall {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .masonry-wall {
        column-count: 1;
        padding: 6px 12px 48px;
    }

    .nav-bar {
        padding: 0 12px;
    }

    .nav-links {
        gap: 12px;
    }

    .hero-slab {
        padding: 40px 16px;
        min-height: 40vh;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
