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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: #f5f5f5;
            
        }

        .portfolio-container {
            max-width: 1200px;
            margin: 0 auto;
        }

        .portfolio-title {
            text-align: center;
            font-size: 2.5rem;
            margin-bottom: 40px;
            color: #333;
        }

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

        .masonry-item {
            opacity: 0;
            animation: fadeIn 0.5s forwards;
        }

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

        .masonry-item img {
            width: 100%;
            display: block;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
        }

        .masonry-item img:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
        }

        .caption {
            padding: 15px 10px;
            background: white;
            border-radius: 0 0 8px 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            margin-top: -4px;
            font-size: 0.9rem;
            color: #555;
            line-height: 1.5;
        }

        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin: 40px auto;
            flex-wrap: wrap;
        }

        .page-btn {
            padding: 10px 15px;
            background: white;
            color: #333;
            border: 2px solid #333;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 45px;
        }

        .page-btn:hover {
            background: #f0f0f0;
            transform: translateY(-2px);
        }

        .page-btn.active {
            background: #333;
            color: white;
        }

        .page-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        @media (max-width: 768px) {
            .masonry-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 15px;
            }

            .portfolio-title {
                font-size: 2rem;
            }

            .caption {
                font-size: 0.8rem;
                padding: 12px 8px;
            }
        }

        @media (max-width: 480px) {
            .masonry-grid {
                grid-template-columns: 1fr;
            }
        }