* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Bot protection overlay */
.bot-protection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-align: center;
    padding: 20px;
    color: #2c3e50;
}

.bot-protection.hidden {
    display: none;
}

header {
    padding: 1.4rem 5%;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f1f3f4 100%);
    border-bottom: 1px solid #e1e5e9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 300;
    letter-spacing: 1px;
}

.portfolio-container {
    padding: 3rem 5%;
    max-width: 1800px;
    margin: 0 auto;
}

.masonry-grid {
    column-count: 3;
    column-gap: 20px;
    margin-top: 20px;
}

.grid-item {
    break-inside: avoid;
    margin-bottom: 20px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.grid-item:hover img {
    transform: scale(1.03);
    filter: brightness(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.grid-item:hover .image-overlay {
    opacity: 1;
}

.image-title {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #2c3e50;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease;
    user-select: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: #e74c3c;
    background: rgba(255, 255, 255, 1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #2c3e50;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 15px;
    transition: all 0.3s ease;
    user-select: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(44, 62, 80, 0.1);
    line-height: 1;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 1);
    color: #2c3e50;
    border-color: rgba(44, 62, 80, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-info {
    position: absolute;
    bottom: -70px;
    left: 0;
    right: 0;
    color: #2c3e50;
    text-align: center;
}

.lightbox-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.lightbox-counter {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #e1e5e9;
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .masonry-grid {
        column-count: 3;
    }

    h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 2;
        column-gap: 15px;
    }

    .grid-item {
        margin-bottom: 15px;
    }

    header {
        padding: 1.5rem 5%;
    }

    h1 {
        font-size: 2rem;
    }

    .portfolio-container {
        padding: 2rem 5%;
    }

    .lightbox-nav {
        display: none;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 85vh;
    }

    .lightbox-close {
        top: -40px;
        font-size: 1.5rem;
    }

    .lightbox-info {
        bottom: -50px;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }

    .portfolio-container {
        padding: 1.5rem 3%;
    }

    header {
        padding: 1rem 3%;
    }

    h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .subtitle {
        font-size: 1rem;
    }
}

/* Anti-bot protection styles */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Hide from screen readers and accessibility tools that bots might use */
[aria-hidden="true"] {
    visibility: hidden;
}

/* Disable right-click context menu */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}