/* nonri.xyz - Vaporwave / Portfolio-Grid / Scholarly-Intellectual */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F4EDE4;
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: #4A3A5A;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Header */
#site-header {
    padding: 40px 40px 30px;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeIn 600ms ease forwards;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.site-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 48px;
    color: #2A2040;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.site-subtitle {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 16px;
    color: #4A3A5A;
    margin-top: 4px;
}

/* Navigation */
.header-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #8A7A9A;
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
    transition: color 200ms ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #B87D60;
    transition: width 200ms ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #B87D60;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Section Divider */
.section-divider {
    max-width: 1200px;
    margin: 40px auto 20px;
    padding: 0 40px;
    position: relative;
}

.section-divider::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: #DDD0C0;
    position: relative;
}

.section-divider::after {
    content: '';
    position: absolute;
    right: 40px;
    top: -8px;
    width: 1px;
    height: 8px;
    background: #DDD0C0;
}

.divider-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #8A7A9A;
    display: inline-block;
    margin-top: 8px;
    text-transform: uppercase;
}

/* Portfolio Grid */
.grid-section {
    max-width: 1200px;
    margin: 0 auto;
}

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

/* Cards */
.card {
    background: #EAE0D4;
    border: 1px solid #DDD0C0;
    clip-path: polygon(0 8px, 8px 0, 100% 0, 100% 100%, 0 100%);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 32, 64, 0.12);
    border-color: #B87D60;
}

.card-visual {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.card-visual svg {
    width: 100%;
    height: 100%;
    display: block;
}

.card.blurred .card-visual {
    filter: blur(8px);
    transition: filter 500ms ease-out;
}

.card.revealed .card-visual {
    filter: blur(0);
    transition: filter 500ms ease-out;
}

/* Card Caption */
.card-caption {
    padding: 12px 16px;
    opacity: 0;
    transition: opacity 300ms ease;
}

.card.revealed .card-caption {
    opacity: 1;
    transition-delay: 200ms;
}

.caption-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #8A7A9A;
    display: block;
    margin-bottom: 4px;
}

.caption-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    color: #8A7A9A;
    line-height: 1.5;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border: 2px solid #B87D60;
    border-radius: 50%;
    pointer-events: none;
    animation: rippleExpand 500ms ease-out forwards;
}

@keyframes rippleExpand {
    from {
        width: 0;
        height: 0;
        opacity: 1;
    }
    to {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

/* Detail Overlay */
.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 32, 64, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 400ms ease;
    pointer-events: none;
}

.detail-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.detail-overlay.hidden {
    display: none;
}

.detail-content {
    background: #F4EDE4;
    max-width: 800px;
    width: 90%;
    border: 1px solid #DDD0C0;
    clip-path: polygon(0 8px, 8px 0, 100% 0, 100% 100%, 0 100%);
    position: relative;
    transition: transform 400ms ease;
    transform: scale(0.95);
}

.detail-overlay.visible .detail-content {
    transform: scale(1);
}

.detail-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #2A2040;
    cursor: pointer;
    z-index: 10;
    font-family: 'Nunito', sans-serif;
    transition: color 200ms ease;
}

.detail-close:hover {
    color: #B87D60;
}

.detail-visual svg {
    width: 100%;
    display: block;
}

.detail-info {
    padding: 24px 32px 32px;
}

.detail-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #8A7A9A;
    display: block;
    margin-bottom: 8px;
}

.detail-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: #4A3A5A;
}

/* Footer */
#site-footer {
    background: #EAE0D4;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    border-top: 1px solid #DDD0C0;
}

.footer-illustration svg {
    width: 120px;
    height: 90px;
}

.footer-copyright {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #8A7A9A;
}

/* Illustration accent highlight */
.card-visual svg path[fill="#7A9AB0"],
.detail-visual svg path[fill="#7A9AB0"] {
    fill: #7A9AB0;
}

/* Hover accent for links */
a {
    color: #B87D60;
    transition: color 200ms ease;
}

a:hover {
    color: #C4A080;
}

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

    .site-title {
        font-size: 36px;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        padding: 16px 20px 30px;
    }

    #site-header {
        padding: 24px 20px 20px;
    }

    .site-title {
        font-size: 28px;
    }

    .section-divider {
        padding: 0 20px;
    }
}
