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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: #FFFFFF;
    color: #4A4A4A;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
    overflow-x: hidden;
}

/* Navigation */
.nav {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 100;
}

.nav-link {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8A8A8A;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    opacity: 1;
}

/* Hero Section */
.hero {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #FFFFFF;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 36px;
    color: #1A1A1A;
    letter-spacing: 0.02em;
    user-select: none;
    position: relative;
    z-index: 2;
}

/* Cursor Canvas */
#cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cursor-dot {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 2.5s ease-out, transform 2.5s ease-out;
}

.cursor-dot.fade {
    opacity: 0;
    transform: scale(0.3);
}

/* Portfolio Section */
.portfolio {
    padding: 80px 24px 120px;
    max-width: 900px;
    margin: 0 auto;
}

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

.module {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    border: 1px solid #F5F5F5;
    background: #FFFFFF;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.module-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8A8A8A;
    z-index: 3;
    transition: color 0.5s ease;
}

.module:hover .module-label {
    color: #1A1A1A;
}

/* Module overlay - hides content until hover */
.module-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.92;
    transition: opacity 0.5s ease;
}

.module:hover .module-overlay,
.module.touched .module-overlay {
    opacity: 0;
}

/* Module content - abstract compositions behind overlays */
.module-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Module 0 - Coral radial + teal diagonal */
.module-overlay:nth-child(1) {
    background: #FF6B6B;
}
.module:nth-child(1) .module-overlay {
    background: #FF6B6B;
}
.module-content-0 {
    background:
        radial-gradient(circle at 30% 40%, #FF6B6B 0%, transparent 50%),
        linear-gradient(135deg, #4ECDC4 0%, transparent 60%),
        radial-gradient(circle at 80% 70%, #FFE66D 0%, transparent 40%),
        #F5F5F5;
}

/* Module 1 - Teal field + mint circles */
.module:nth-child(2) .module-overlay {
    background: #4ECDC4;
}
.module-content-1 {
    background:
        radial-gradient(circle at 60% 20%, #A8E6CF 0%, transparent 35%),
        radial-gradient(circle at 20% 80%, #4ECDC4 0%, transparent 45%),
        linear-gradient(45deg, #FFE66D 0%, transparent 50%),
        #F5F5F5;
}

/* Module 2 - Yellow warm + coral accent */
.module:nth-child(3) .module-overlay {
    background: #FFE66D;
}
.module-content-2 {
    background:
        linear-gradient(200deg, #FF6B6B 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, #FFE66D 0%, transparent 50%),
        radial-gradient(circle at 10% 90%, #A8E6CF 0%, transparent 35%),
        #F5F5F5;
}

/* Module 3 - Mint + teal diagonal cross */
.module:nth-child(4) .module-overlay {
    background: #A8E6CF;
}
.module-content-3 {
    background:
        linear-gradient(315deg, #4ECDC4 0%, transparent 50%),
        linear-gradient(135deg, #A8E6CF 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, #FF6B6B 0%, transparent 30%),
        #F5F5F5;
}

/* Module 4 - Coral + yellow sunburst */
.module:nth-child(5) .module-overlay {
    background: #FF6B6B;
}
.module-content-4 {
    background:
        radial-gradient(circle at 50% 50%, #FFE66D 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, #FF6B6B 0%, transparent 35%),
        linear-gradient(90deg, #4ECDC4 0%, transparent 30%),
        #F5F5F5;
}

/* Module 5 - Teal + mint layers */
.module:nth-child(6) .module-overlay {
    background: #4ECDC4;
}
.module-content-5 {
    background:
        radial-gradient(circle at 40% 60%, #A8E6CF 0%, transparent 45%),
        linear-gradient(270deg, #FFE66D 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, #FF6B6B 0%, transparent 30%),
        #F5F5F5;
}

/* Touch hint - mobile only */
.touch-hint {
    display: none;
    text-align: center;
    margin-top: 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #8A8A8A;
}

@media (hover: none) and (pointer: coarse) {
    .touch-hint {
        display: block;
    }
}

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

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

    .nav {
        top: 16px;
        right: 20px;
    }
}
