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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 30%, #f1f8ff 70%, #f8f9fa 100%);
    background-attachment: fixed;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-size: 16px;
}

.portfolio {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 180px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.portfolio-header {
    text-align: center;
    margin-bottom: 20px;
}

.title-svg {
    max-width: 100%;
    height: auto;
    width: 300px;
}

.contact-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    max-width: 400px;
    width: 100%;
    box-sizing: border-box;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    text-decoration: none;
    flex: 1;
    max-width: 33.333%;
}

.contact-link:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

.contact-icon {
    height: auto;
    width: 100%;
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}

/* Social Media Section - Mobile First */
.social-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    max-width: 250px;
    width: 100%;
    box-sizing: border-box;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    text-decoration: none;
    flex: 1;
    max-width: 50%;
}

.social-link:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

.social-icon {
    height: auto;
    width: 100%;
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
}

/* Masonry Grid Layout */
.portfolio-grid {
    column-count: 1;
    column-gap: 20px;
    column-fill: balance;
}

.portfolio-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.portfolio-item:active {
    transform: translateY(-2px);
}

.image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .image-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.loading {
    opacity: 0.5;
}

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

/* Tablet styles */
@media (min-width: 768px) {
    .portfolio {
        padding: 40px 24px;
    }

    .logo {
        max-width: 220px;
    }

    .title-svg {
        width: 400px;
    }

    .contact-section {
        gap: 30px;
        padding: 0 30px;
        max-width: 500px;
    }

    .contact-icon {
        max-width: 100px;
        max-height: 100px;
    }

    .social-section {
        gap: 30px;
        padding: 0 30px;
        max-width: 300px;
    }

    .social-icon {
        max-width: 120px;
        max-height: 120px;
    }

    .portfolio-grid {
        column-count: 2;
        column-gap: 24px;
    }

    .portfolio-item {
        margin-bottom: 24px;
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    .portfolio {
        padding: 50px 40px;
    }

    .logo {
        max-width: 250px;
    }

    .title-svg {
        width: 500px;
    }

    .contact-section {
        gap: 40px;
        padding: 0 40px;
        max-width: 600px;
    }

    .contact-icon {
        max-width: 120px;
        max-height: 120px;
    }

    .social-section {
        gap: 40px;
        padding: 0 40px;
        max-width: 350px;
    }

    .social-icon {
        max-width: 140px;
        max-height: 140px;
    }

    .portfolio-grid {
        column-count: 3;
        column-gap: 30px;
    }

    .portfolio-item {
        margin-bottom: 30px;
    }

    .portfolio-item:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    }
}

/* Large desktop */
@media (min-width: 1200px) {
    .social-section {
        gap: 50px;
        max-width: 400px;
    }

    .social-icon {
        max-width: 160px;
        max-height: 160px;
    }

    .portfolio-grid {
        column-count: 4;
    }
}