/* ============================================================
   MIRIS.WORKS - BLOBITECTURE PORTFOLIO
   Aesthetics: Organic forms, meaningful negative space (ma)
   ============================================================ */

/* RESET & FOUNDATIONS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Serif 4', serif;
    background-color: #1A1816;
    color: #E8DCD0;
    overflow-x: hidden;
    position: relative;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    accent-color: #B0A898;
}

/* Palette reference colors */
body::before {
    content: '';
    display: none;
    color: #0E0C0A;
    color: #2A2622;
    color: #D8D0C4;
}

/* GRAIN TEXTURE OVERLAY */
#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"><defs><filter id="grain"><feTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="4" result="noise"/><feColorMatrix in="noise" type="saturate" values="0"/></filter></defs><rect width="400" height="400" fill="%23000000" filter="url(%23grain)"/></svg>');
    background-size: 200px 200px;
    opacity: 0;
    animation: grain-fade-in 500ms ease-out 0ms forwards;
    mix-blend-mode: multiply;
}

@keyframes grain-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.06;
    }
}

/* HERO SECTION - ZONE 1 */
.zone-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #1A1816;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    animation: hero-fade-in 700ms ease-out 500ms forwards;
    opacity: 0;
}

@keyframes hero-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text {
    font-family: 'Syne', sans-serif;
    font-size: clamp(3rem, 9vw, 8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #E8DCD0;
    line-height: 1;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    font-weight: 400;
    color: #C8BCA8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 2rem;
}

/* MA - NEGATIVE SPACE SPACERS */
.ma-spacer {
    height: 150vh;
    background-color: #1A1816;
    position: relative;
}

/* PROJECTS SECTION - ZONE 2 */
.zone-projects {
    background-color: #1A1816;
    position: relative;
    padding: 100px 0;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 200px 150px;
    padding: 0 60px;
    max-width: 1600px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: project-float 6s ease-in-out infinite;
    animation-delay: calc(var(--card-index, 0) * 0.3s);
}

@keyframes project-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-30px);
    }
}

.blob-container {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.4));
    transition: filter 300ms ease;
}

.project-card:hover .blob-container {
    filter: drop-shadow(0 30px 80px rgba(0, 0, 0, 0.6));
}

.project-info {
    position: relative;
    z-index: 2;
}

.project-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #E8DCD0;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.project-year {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #A0988C;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.project-desc {
    font-family: 'Source Serif 4', serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #C8BCA8;
    line-height: 1.7;
    max-width: 280px;
}

/* ABOUT SECTION - ZONE 3 */
.zone-about {
    background-color: #1A1816;
    padding: 100px 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-blob {
    position: relative;
    max-width: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-blob-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    max-width: 600px;
    z-index: 1;
    opacity: 0.4;
}

.about-content {
    position: relative;
    z-index: 2;
    padding: 80px 60px;
    text-align: center;
}

.about-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #E8DCD0;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.about-text {
    font-family: 'Source Serif 4', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: #C8BCA8;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.about-text em {
    font-style: italic;
    color: #E8DCD0;
}

/* FOOTER SECTION - ZONE 4 */
.zone-footer {
    background-color: #1A1816;
    padding: 100px 60px;
    text-align: center;
    border-top: 1px solid rgba(200, 188, 168, 0.1);
}

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.footer-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #C8BCA8;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 300ms ease;
    text-transform: capitalize;
}

.footer-link:hover {
    color: #E8DCD0;
}

.footer-divider {
    color: #8A9298;
}

.footer-year {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: #A0988C;
    letter-spacing: 0.05em;
}

/* SCROLL-DRAW ANIMATIONS FOR BLOBS */
@keyframes blob-draw {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.blob-container path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .projects-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 150px 100px;
        padding: 0 40px;
    }

    .about-content {
        padding: 60px 40px;
    }

    .hero-text {
        font-size: clamp(2.5rem, 8vw, 6rem);
    }
}

@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
        gap: 120px;
        padding: 0 20px;
    }

    .ma-spacer {
        height: 80vh;
    }

    .zone-footer,
    .zone-about {
        padding: 60px 20px;
    }

    .about-content {
        padding: 50px 20px;
    }

    .about-blob-svg {
        width: 200%;
    }

    .footer-nav {
        gap: 1rem;
    }

    .hero-text {
        font-size: clamp(2rem, 7vw, 5rem);
    }

    .about-title {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .projects-container {
        gap: 80px;
        padding: 0 15px;
    }

    .ma-spacer {
        height: 60vh;
    }

    .hero-text {
        font-size: clamp(1.75rem, 6vw, 3rem);
    }

    .project-title {
        font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    }

    .about-title {
        font-size: clamp(1.25rem, 3vw, 2rem);
    }

    .about-text {
        font-size: 1rem;
    }

    .zone-footer,
    .zone-about {
        padding: 40px 15px;
    }

    .about-content {
        padding: 40px 15px;
    }

    .footer-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* TRANSITIONS & INTERACTION POLISH */
a {
    color: #C4A882;
    text-decoration: none;
    transition: color 200ms ease, text-decoration 200ms ease;
}

a:active {
    color: #E8DCD0;
}

/* Smooth page transitions */
section {
    position: relative;
}

/* Ensure all blobs have consistent rendering */
svg {
    backface-visibility: hidden;
}

/* Hero entrance sequence */
.hero-text,
.hero-tagline {
    will-change: opacity, transform;
}
