* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url('../img/sparkle-cursor.png'), auto;
}

body {
    font-family: 'Dokdo', cursive;
    line-height: 1.6;
    color: #333;
    background: #fdd23b;
    min-height: 100vh;
    position: relative;
}

html, body {
    cursor: url('../img/sparkle-cursor.png'), auto;
    background-image: url('../img/background.png');
    background-repeat: repeat;
    background-size: 100%; 
    background-position: top left;
    background-attachment: scroll; /* allows parallax logic */
}

/* MAIN LAYOUT STYLES */
.main-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* BENTO LAYOUT - Only for pages with bento grid */
.bento-layout {
    display: flex;
    gap: 40px;
    max-width: 1800px;
    align-items: flex-start;
}

.bento-layout .left-section {
    flex: 0 0 35%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 60px;
}

.bento-layout .right-section {
    flex: 1;
}

/* BENTO ARTWORK - Specific styling for artwork in bento layouts */
.bento-artwork {
    width: 100%;
    max-width: 480px;
    height: 100%;
    object-fit: cover;
    display: block;
    margin-left: 90px;
    border-top: 8px solid #fff;
    border-bottom: 8px solid #fff;
    border-left: 8px solid #fff;
    border-right: 8px solid #fff;
    box-shadow: 0 0 0 8px #ec6ba7;
    position: static;
    transform: none !important;
}

/* NORMAL ARTWORK - For pages without bento grid */
.artwork-image {
    width: 40%;
    height: 40%;
    margin: auto;
    margin-top: 1%;
    object-fit: cover;
    display: block;
    border-top: 8px solid #fff;
    border-bottom: 8px solid #fff;
    border-left: 8px solid #fff;
    border-right: 8px solid #fff;
    box-shadow: 0 0 0 8px #ec6ba7, 0 16px 32px rgba(0,0,0,0.3);
    position: static;
    transform: none !important;
}

.content-wrapper {
    padding: 60px 40px;
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    margin-top: 25px;
    border-radius: 20px;
    position: relative;
}

.title-section {
    margin-bottom: 50px;
    text-align: center;
}

.artwork-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    font-weight: normal;
    margin-bottom: 20px;
    color: #ec6ba7;
    letter-spacing: 2px;
    animation: bounce 2s infinite alternate;
}

@keyframes bounce {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-10px); }
}

.artwork-subtitle {
    font-size: 2.2rem;
    color: #333;
    margin: 20px 0;
    font-weight: normal;
}

.description-text {
    font-size: 1.6rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tags-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 60px;
    justify-content: center;
}

.tag {
    padding: 12px 24px;
    border-radius: 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    font-weight: normal;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 3px solid #fff;
    position: relative;
    overflow: hidden;
    cursor: url('../img/sparkle-cursor.png'), auto;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.tag:hover::before {
    left: 100%;
}

.tag.software {
    background: #ec6ba7;
    color: white;
    box-shadow: 0 5px 0 #ba5082, 0 10px 20px rgba(196, 69, 105, 0.3);
}

.tag.skill {
    background: #81c950;
    color: white;
    box-shadow: 0 5px 0 #5b9138, 0 10px 20px rgba(248, 181, 0, 0.3);
}

.tag.tool {
    background: #547dfd;
    color: white;
    box-shadow: 0 5px 0 #4062c8, 0 10px 20px rgba(0, 210, 211, 0.3);
}

.tag.concept {
    background: #c9a0df;
    color: white;
    box-shadow: 0 5px 0 #a782bb, 0 10px 20px rgba(255, 159, 243, 0.3);
}

.tag:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
}

.tag:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #fdd23b, 0 5px 10px rgba(196, 69, 105, 0.3);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin: 80px 0;
}

.detail-section {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    border: 4px solid #ff6b9d;
    box-shadow: 0 8px 0 #ec6ba7, 0 16px 32px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.detail-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 0 #ec6ba7, 0 25px 40px rgba(0,0,0,0.3);
}

.detail-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: #ec6ba7;
    margin-bottom: 20px;
    font-weight: normal;
    text-transform: uppercase;
}

.detail-content {
    color: #666;
    line-height: 1.8;
    font-size: 1.4rem;
}

.metadata-bar {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    border: 4px solid #f8b500;
    box-shadow: 0 8px 0 #feca57, 0 16px 32px rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 60px;
    position: relative;
}

.metadata-bar::before {
    content: '★ STATS ★';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #f8b500;
    color: white;
    padding: 8px 20px;
    border-radius: 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    border: 3px solid #fff;
}

.metadata-item {
    text-align: center;
    min-width: 120px;
}

.metadata-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    color: #c44569;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: normal;
}

.metadata-value {
    font-size: 1.6rem;
    color: #333;
    font-weight: bold;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: #ff6b9d;
    border: 3px solid #fff;
    box-shadow: 0 5px 0 #c44569, 0 10px 20px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #c44569, 0 15px 25px rgba(0,0,0,0.4);
}

.floating-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #c44569, 0 5px 10px rgba(0,0,0,0.3);
}

.pixel-decoration {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #f8b500;
    border: 3px solid #fff;
    box-shadow: 0 5px 0 #feca57;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Scroll animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.2s; }
.reveal-delay-2 { transition-delay: 0.4s; }
.reveal-delay-3 { transition-delay: 0.6s; }

/* BENTO GRID STYLES */
.bento-grid {
    margin: 60px 0;
    text-align: center;
}

.bento-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: #ec6ba7;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.bento-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 150px);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.bento-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bento-item:hover {
    transform: translateY(-3px);
}

.bento-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-item.video {
    grid-column: span 1;
    grid-row: span 2;
}

.bento-image,
.bento-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.bento-item:hover .bento-image,
.bento-item:hover .bento-video {
    transform: scale(1.05);
}

.bento-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, #985cd2);
    color: white;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.bento-item:hover .bento-overlay {
    transform: translateY(0);
}

.bento-overlay h4 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    margin-bottom: 3px;
    color: #fdd23b;
}

.bento-overlay p {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Footer Styles */
.footer {
    background: #fff;
    border-top: 4px solid #ff6b9d;
    box-shadow: 0 -8px 0 #ec6ba7, 0 -16px 32px rgba(0,0,0,0.2);
    margin-top: 80px;
    padding: 40px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.social-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-icon {
    width: 50px;
    height: 50px;
    background: #ec6ba7;
    border: 3px solid #fff;
    border-radius: 15px;
    box-shadow: 0 5px 0 #ec6ba7, 0 10px 20px rgba(196, 69, 105, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #c44569, 0 15px 25px rgba(196, 69, 105, 0.4);
    filter: brightness(1.1);
}

.social-icon:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #c44569, 0 5px 10px rgba(196, 69, 105, 0.3);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

.copyright {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    line-height: 1.6;
}

.copyright p {
    margin: 5px 0;
}

/* Responsive styles for new layout */
@media (max-width: 768px) {
    .back-button-container {
        top: 10px;
        left: 10px;
    }
    
    .back-button {
        padding: 8px 12px;
        font-size: 8px;
    }
    
    .back-button svg {
        width: 14px;
        height: 14px;
    }
    
    .back-button span {
        font-size: 6px;
    }
    
    .bento-layout {
        flex-direction: column;
        gap: 20px;
        padding: 10px;
        align-items: center;
    }
    
    .bento-layout .left-section {
        flex: none;
        width: 100%;
        margin-top: 20px;
    }
    
    .bento-artwork {
        max-width: 350px;
        width: 100%;
        margin: 0 auto;
        display: block;
    }
    
    .content-wrapper {
        padding: 30px 20px;
    }
    
    .artwork-title {
        font-size: 2rem;
    }
    
    .artwork-subtitle {
        font-size: 1.8rem;
    }
    
    .description-text {
        font-size: 1.4rem;
    }
    
    .details-grid {
        flex-direction: column;
    }
    
    .metadata-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .floating-elements {
        display: none;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .tags-section {
        justify-content: center;
    }
    
    .tag {
        font-size: 8px;
        padding: 8px 16px;
    }
    
    .bento-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 120px);
        gap: 12px;
    }
    
    .bento-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .bento-item.video {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .bento-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .artwork-title {
        font-size: 1.4rem;
    }

    .detail-title {
        font-size: 12px;
    }

    .metadata-label {
        font-size: 7px;
    }
    
    .bento-container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, 120px);
        gap: 8px;
    }
    
    .bento-item.large,
    .bento-item.video {
        grid-column: span 1;
        grid-row: span 1;
    }
}