:root { --primary: #111; --text: #555; --bg: #fdfdfd; --white: #fff; --gray: #eee; }
body { margin: 0; font-family: 'Inter', sans-serif; background-color: var(--bg); color: var(--primary); }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.about-section { padding: 80px 0 50px; text-align: center; }
.about-section h1 { font-weight: 600; font-size: 2.8rem; margin-bottom: 5px; }
.subtitle { font-weight: 400; color: #888; font-size: 1.1rem; margin-top:0;  letter-spacing: 2px;}
.about-text { max-width: 950px; margin: 30px auto 0; line-height: 1.8; color: var(--text); font-weight: 300; font-size: 1.05rem; text-align: justify; }
.about-text p { margin-bottom: 15px; }
.about-text p:last-child { margin-bottom: 0; }

.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 50px; }
.filter-btn {
    background: transparent; border: 1px solid #ccc; padding: 10px 20px; border-radius: 40px;
    cursor: pointer; font-family: inherit; font-size: 0.9rem; color: var(--text);
    transition: all 0.3s ease; font-weight: 500;
}
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary);}

.gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px; padding-bottom: 80px;
}
.project-card { cursor: pointer; transition: transform 0.3s ease; }
.project-card:hover { transform: translateY(-5px); }

.project-cover {
    width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; background: var(--gray);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: box-shadow 0.3s;
}
.project-card:hover .project-cover { box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.project-info { padding: 15px 5px; }
.project-title { margin: 0; font-size: 1.1rem; font-weight: 600; text-transform: capitalize;}
.project-meta { font-size: 0.85rem; color: #888; margin-top: 5px; font-weight: 300;}

/* STUDIO GRID BOX (for Books and Laptops) */
.studio-grid-mockup {
    display: flex; justify-content: center; align-items: center;
    aspect-ratio: 1 / 1; width: 100%; overflow: hidden; padding: 20px; box-sizing: border-box;
    background-image: url('https://images.unsplash.com/photo-1618220179428-22790b46a0eb?q=80&w=600&auto=format&fit=crop'); 
    background-size: cover; background-position: center; position: relative;
}

/* MINI BOOK 3D */
.mini-book-3d {
    height: 85%; display: inline-block; position: relative;
    box-shadow: -10px 10px 20px rgba(0,0,0,0.4); border-radius: 2px 4px 4px 2px;
    transform: perspective(800px) rotateY(-10deg); transform-style: preserve-3d; transition: transform 0.3s ease;
}
.project-card:hover .mini-book-3d { transform: perspective(800px) rotateY(-15deg) scale(1.05); }
.mini-book-3d::after {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 12%;
    background: linear-gradient(to right, rgba(255,255,255,0.4) 0%, rgba(0,0,0,0.15) 30%, rgba(255,255,255,0.1) 60%, transparent 100%);
    border-radius: 2px 0 0 2px; pointer-events: none;
}
.mini-book-3d::before {
    content: ''; position: absolute; top: 2%; right: -6px; bottom: 2%; width: 6px;
    background: #fdfdfd; border-radius: 0 3px 3px 0; box-shadow: inset -1px 0 3px rgba(0,0,0,0.1);
    transform: perspective(800px) rotateY(20deg); transform-origin: left; z-index: -1;
}
.mini-book-3d img { width: auto; height: auto; max-width: 100%; max-height: 100%; display: block; border-radius: 2px 4px 4px 2px; }

/* LAPTOP MOCKUP */
.laptop-mockup {
    position: relative; width: 100%; max-width: 900px; margin: 0 auto;
    transform: translateY(-5px); /* balance optical center */
}
.project-card .laptop-mockup { width: 85%; transition: transform 0.3s ease; }
.project-card:hover .laptop-mockup { transform: translateY(-10px) scale(1.02); }

.laptop-screen-frame {
    background: #181818; border-radius: 12px 12px 0 0; padding: 4% 4% 6% 4%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4); position: relative;
}
.laptop-screen-frame::after { /* Webcam */
    content: ''; position: absolute; top: 2%; left: 50%; transform: translateX(-50%);
    width: 1.5%; aspect-ratio: 1/1; background: #333; border-radius: 50%;
}
.laptop-screen {
    background: #fff; border-radius: 2px; overflow: hidden; aspect-ratio: 16 / 10; position: relative;
}
/* IMPORTANT: For Web design, object-position: top ensures we see the header of the website if it's a long scroll screenshot */
.laptop-screen img {
    width: 100%; height: 100%; object-fit: cover; object-position: top; display: block;
}
.laptop-base {
    height: 12px; background: #e0e4e8; border-radius: 0 0 12px 12px; position: relative;
    width: 110%; left: -5%;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.2), 0 10px 20px rgba(0,0,0,0.3);
    display: flex; justify-content: center;
}
.laptop-base::before { /* Trackpad indent */
    content: ''; width: 15%; height: 6px; background: #b4bac0; border-radius: 0 0 4px 4px;
}
/* Scale laptop base thickness in larger modals */
.modal-gallery .laptop-base { height: 20px; }
.modal-gallery .laptop-base::before { height: 10px; }

/* CLOSED BOOK MOCKUP (Modal Header) */
.book-cover-mockup {
    position: relative; max-width: 400px; margin: 0 auto 50px;
    border-radius: 2px 6px 6px 2px; box-shadow: -15px 20px 40px rgba(0,0,0,0.25);
    transform: perspective(1000px) rotateY(-10deg); transform-style: preserve-3d;
}
.book-cover-mockup::before {
    content: ''; position: absolute; top: 2%; right: -12px; bottom: 2%; width: 12px;
    background: #fdfdfd; border-radius: 0 4px 4px 0; box-shadow: inset -2px 0 5px rgba(0,0,0,0.1);
    transform: perspective(1000px) rotateY(20deg); transform-origin: left; z-index: -1;
}
.book-cover-mockup::after {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 25px;
    background: linear-gradient(to right, rgba(255,255,255,0.3) 0%, rgba(0,0,0,0.1) 15%, rgba(255,255,255,0.1) 30%, transparent 100%);
    border-radius: 2px 0 0 2px; pointer-events: none;
}
.book-cover-mockup img { width: 100%; height: auto; display: block; border-radius: 2px 6px 6px 2px; }

/* MODAL GENERAL */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #e9ecef; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s; overflow-y: auto;
}
.modal.active { opacity: 1; pointer-events: auto; }
.modal-content { max-width: 1100px; margin: 60px auto; padding: 20px; position: relative;}
.close-btn { position: fixed; top: 20px; right: 40px; font-size: 40px; cursor: pointer; color: #111; line-height: 1; z-index: 1001;}
.modal-header { margin-bottom: 50px; text-align: center;}
.modal-header h2 { margin: 0; font-size: 2rem; font-weight: 600; text-transform: capitalize;}
.modal-cat { color: #888; font-size: 0.9rem;  letter-spacing: 1px;}
.modal-gallery { text-align: center; }
.modal-gallery > img { width: 100%; max-width: 800px; border-radius: 8px; margin-bottom: 40px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);}

/* HYPER-REALISTIC BOOK MOCKUP (INTERIORS) */
.mockup-scene {
    position: relative; padding: 60px 20px;
    background-image: url('https://images.unsplash.com/photo-1618220179428-22790b46a0eb?q=80&w=2000&auto=format&fit=crop'); 
    background-size: cover; background-position: center; border-radius: 12px; margin: 40px auto 80px; max-width: 1000px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.1); display: flex; justify-content: center;
}
.book-mockup-3d {
    display: flex; position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 5px 10px rgba(0,0,0,0.2);
    perspective: 2000px; background: #fff; border-radius: 2px;
}
.book-mockup-3d::before {
    content: ''; position: absolute; top: 5px; left: -5px; right: -5px; bottom: -5px; background: #fdfdfd; z-index: -1;
    box-shadow: -1px 1px 1px #ddd, -2px 2px 1px #ddd, -3px 3px 1px #ccc, 1px 1px 1px #ddd, 2px 2px 1px #ddd, 3px 3px 1px #ccc; border-radius: 2px;
}
.book-page-3d { width: 50%; position: relative; background: #fcfcfc; overflow: hidden; }
.book-page-3d img { width: 100%; height: auto; display: block; }
.page-left-3d { border-right: 1px solid rgba(0,0,0,0.1); }
.page-left-3d::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 40%, rgba(0,0,0,0.05) 85%, rgba(0,0,0,0.3) 100%); pointer-events: none;
}
.page-right-3d { border-left: 1px solid rgba(0,0,0,0.1); }
.page-right-3d::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 40%, rgba(0,0,0,0.05) 85%, rgba(0,0,0,0.3) 100%); pointer-events: none;
}
.page-full-3d { width: 100%; position: relative; background: #fcfcfc; overflow: hidden; }
.page-full-3d img { width: 100%; height: auto; display: block; }
.page-full-3d::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 45%, rgba(0,0,0,0.4) 50%, rgba(255,255,255,0.1) 55%, rgba(255,255,255,0) 100%); pointer-events: none;
}

/* CORP COVER GRID FIX (Don't crop logos) */
.corp-cover { object-fit: contain !important; background-color: #ffffff; padding: 0; box-sizing: border-box; }

/* BENTO CATEGORY GRID (EQUAL SIZES) */
.category-bento {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-bottom: 60px;
    padding: 0 10px;
}

.bento-card {
    width: calc(33.333% - 17px);
    height: 350px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.bento-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.bento-card:hover img {
    transform: scale(1.06);
}

.bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}
.bento-card:hover .bento-overlay {
    opacity: 1;
}

.bento-info {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.bento-info h3 {
    color: #fff;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 15px rgba(0,0,0,0.5);
    line-height: 1.2;
}
.bento-arrow {
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    transform: translateX(-10px);
    opacity: 0;
    transition: all 0.3s ease;
}
.bento-card:hover .bento-arrow {
    transform: translateX(0);
    opacity: 1;
}

/* Laptop inner CSS inside bento */
.bento-card:hover .bento-laptop-wrap { transform: scale(1.04); }
.bento-laptop-wrap .laptop-mockup { transform: scale(1.35); }

@media (max-width: 1024px) {
    .bento-card { width: calc(50% - 13px); height: 300px; }
    .bento-info h3 { font-size: 1.4rem; }
}
@media (max-width: 600px) {
    .bento-card { width: 100%; height: 280px; }
}

/* MAGAZINE MOCKUP */
.mini-magazine-3d {
    width: auto; height: auto; max-width: 65%; max-height: 90%; position: relative;
    transform: perspective(800px) rotateY(-10deg); transform-style: preserve-3d;
    box-shadow: -10px 15px 25px rgba(0,0,0,0.2); border-radius: 1px 3px 3px 1px;
}
.mini-magazine-3d::before {
    content: ''; position: absolute; top: 1%; right: -4px; bottom: 1%; width: 4px;
    background: #f0f0f0; transform: perspective(800px) rotateY(20deg); transform-origin: left; z-index: -1;
}
.mini-magazine-3d::after {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 15px;
    background: linear-gradient(to right, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
    border-radius: 1px 0 0 1px; pointer-events: none;
}
.mini-magazine-3d img { width: auto; height: auto; max-width: 100%; max-height: 100%; display: block; border-radius: 1px 3px 3px 1px; }

.magazine-cover-mockup {
    position: relative; max-width: 400px; margin: 0 auto 50px auto;
    border-radius: 2px 4px 4px 2px; box-shadow: -15px 20px 40px rgba(0,0,0,0.25);
    transform: perspective(1000px) rotateY(-8deg); transform-style: preserve-3d;
}
.magazine-cover-mockup::before {
    content: ''; position: absolute; top: 1%; right: -5px; bottom: 1%; width: 5px;
    background: #fdfdfd; border-radius: 0 2px 2px 0; box-shadow: inset -1px 0 3px rgba(0,0,0,0.1);
    transform: perspective(1000px) rotateY(15deg); transform-origin: left; z-index: -1;
}
.magazine-cover-mockup::after {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 35px;
    background: linear-gradient(to right, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
    border-radius: 2px 0 0 2px; pointer-events: none;
}
.magazine-cover-mockup img { width: 100%; height: auto; display: block; border-radius: 2px 4px 4px 2px; }

/* GRAFICA MOCKUPS */
.poster-mockup {
    position: relative; max-width: 500px; margin: 0 auto;
    background: #fff; padding: 15px; padding-bottom: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15), 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 2px;
}
.poster-mockup img { width: 100%; height: auto; display: block; border: 1px solid #f0f0f0; }

.rollup-mockup {
    position: relative; max-width: 300px; margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-bottom: 20px solid #dcdcdc; /* Base stand */
    border-top: 5px solid #dcdcdc; /* Top bar */
    border-radius: 2px 2px 0 0;
}
.rollup-mockup::after {
    content: ''; position: absolute; bottom: -20px; left: 10%; right: 10%; height: 5px;
    background: #aaa; border-radius: 5px 5px 0 0;
}
.rollup-mockup img { width: 100%; height: auto; display: block; }

.photocall-mockup {
    position: relative; max-width: 800px; margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-top: 2px solid #ddd;
    border-left: 2px solid #ddd;
    border-right: 2px solid #ddd;
}
.photocall-mockup::after {
    content: ''; position: absolute; bottom: -20px; left: 0; right: 0; height: 20px;
    background: radial-gradient(ellipse at top, rgba(0,0,0,0.2) 0%, transparent 70%);
}
.photocall-mockup img { width: 100%; height: auto; display: block; }

.brochure-mockup {
    position: relative; max-width: 600px; margin: 0 auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: perspective(800px) rotateY(-5deg);
}
.brochure-mockup img { width: 100%; height: auto; display: block; border-radius: 2px; }
