* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    padding: 20px;
    color: #cbd5e1;
}

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



/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(10px);
}

.global-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    z-index: 1010;
    backdrop-filter: blur(5px);
}

.global-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
    border-color: rgba(255, 255, 255, 0.3);
}

.popup-content {
    background-color: #1f2029;
    width: 85%;
    max-width: 1100px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    animation: popupAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #fff;
    padding: 40px;
    position: relative;
}

.popup-content::-webkit-scrollbar {
    display: none;
}

@keyframes popupAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Filter Navigation */
.portfolio-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 90px;
    position: relative;
    z-index: 10;
}

.filter-btn {
    background: #232935;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #8b9bb4;
    padding: 10px 30px;
    border-radius: 50px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    z-index: 10;
}

.filter-btn:hover {
    color: white;
    background: #2e3542;
}

.filter-btn.active {
    background-color: #aeb6c4;
    color: #fff;
    font-weight: 500;
    border-color: transparent;
}

/* Gallery Grid - Single Row */
.portfolio-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 500px;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.portfolio-item {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    transition: all 0.3s ease;
    opacity: 1;
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

.portfolio-item.hidden {
    display: none;
}

/* Images Row - 2 Images Side by Side with FULL HEIGHT */
.images-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Individual Image Container - SCROLLABLE with FULL WIDTH */
.image-container {
    width: 100%;
    background: #2a2d3a;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* Custom Scrollbar for Image Container */
.image-container::-webkit-scrollbar {
    width: 8px;
    display: none;
}

.image-container::-webkit-scrollbar-track {
    background: #1a1d28;
    border-radius: 4px;
}

.image-container::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.image-container::-webkit-scrollbar-thumb:hover {
    background: #5dade2;
}

/* Image Link - Full Clickable Area */
.image-link {
    display: block;
    width: 100%;
    height: auto;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.image-link:hover {
    opacity: 0.9;
}

.image-container img {
    width: 100%;
    height: auto;
    min-height: 600px;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: transform 0.3s ease;
}

.image-link:hover img {
    transform: scale(1.02);
}

.portfolio-info {
    text-align: center;
    padding: 10px 0;
}

.portfolio-info h3 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* Modern footer */
.footer {
    text-align: center;
    padding: 30px;
    color: #64748b;
    margin-top: 60px;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            #60a5fa,
            #a78bfa,
            transparent);
}

.footer p {
    font-size: 1rem;
    letter-spacing: 1px;
    font-weight: 300;
}

/* Stats showcase */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(30, 41, 59, 0.6);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    min-width: 180px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: rgba(124, 58, 237, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Features showcase */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.feature-card {
    background: rgba(30, 41, 59, 0.6);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
}

.feature-card h3 {
    color: #f1f5f9;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive Design for All Screens */

/* Large Desktop (1920px and above) */
@media (min-width: 1920px) {
    .popup-content {
        max-width: 1600px;
        padding: 60px;
    }

    .image-container {
        height: 700px;
    }

    .image-container img {
        min-height: 700px;
    }

    .portfolio-info h3 {
        font-size: 24px;
    }

    .filter-btn {
        padding: 12px 35px;
        font-size: 16px;
    }
}

/* Desktop (1440px - 1919px) */
@media (min-width: 1440px) and (max-width: 1919px) {
    .popup-content {
        max-width: 1100px;
    }

    .image-container {
        height: 650px;
    }

    .image-container img {
        min-height: 650px;
    }
}

/* Standard Desktop (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .popup-content {
        max-width: 1000px;
        padding: 45px;
    }

    .image-container {
        height: 600px;
    }

    .image-container img {
        min-height: 600px;
    }
}

/* Laptop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .popup-content {
        max-width: 1000px;
        padding: 40px;
    }

    .image-container {
        height: 550px;
    }

    .image-container img {
        min-height: 550px;
    }

    h1 {
        font-size: 3rem;
    }

    .portfolio-info h3 {
        font-size: 18px;
    }
}

/* Tablet Landscape (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .popup-content {
        max-width: 750px;
        padding: 35px;
    }

    .images-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .image-container {
        height: 500px;
    }

    .image-container img {
        min-height: 500px;
    }

    h1 {
        font-size: 2.8rem;
    }

    .portfolio-nav {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 20px;
        font-size: 14px;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-container {
        gap: 25px;
    }
}

/* Tablet Portrait (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    .container {
        padding: 15px;
    }

    .popup-content {
        width: 95%;
        padding: 30px 25px;
    }

    .images-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .image-container {
        height: 450px;
    }

    .image-container img {
        min-height: 450px;
    }

    h1 {
        font-size: 2.5rem;
    }

    header,
    .content-area {
        padding: 30px 20px;
        margin: 20px 0;
    }

    #openPopup {
        padding: 20px 40px;
        font-size: 1.1rem;
    }

    .portfolio-nav {
        gap: 8px;
        margin-bottom: 30px;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 13px;
    }

    .portfolio-info h3 {
        font-size: 17px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stats-container {
        gap: 20px;
    }

    .stat-item {
        min-width: 140px;
        padding: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .global-close-btn {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 22px;
    }
}

/* Mobile Landscape (480px - 599px) */
@media (min-width: 480px) and (max-width: 599px) {
    .popup-content {
        width: 95%;
        padding: 25px 20px;
        max-height: 85vh;
    }

    .images-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .image-container {
        height: 400px;
    }

    .image-container img {
        min-height: 400px;
    }

    h1 {
        font-size: 2.2rem;
    }

    .description {
        font-size: 1rem;
    }

    header,
    .content-area {
        padding: 25px 15px;
        margin: 15px 0;
    }

    #openPopup {
        padding: 18px 35px;
        font-size: 1rem;
    }

    .button-container::after {
        font-size: 0.9rem;
    }

    .portfolio-nav {
        gap: 6px;
        margin-bottom: 25px;
    }

    .filter-btn {
        padding: 7px 15px;
        font-size: 12px;
    }

    .portfolio-info h3 {
        font-size: 16px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature-card {
        padding: 25px;
    }

    .stats-container {
        gap: 15px;
    }

    .stat-item {
        min-width: 120px;
        padding: 18px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .global-close-btn {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
}

/* Mobile Portrait (320px - 479px) */
@media (max-width: 479px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 5px;
    }

    .popup-content {
        width: 98%;
        padding: 20px 15px;
        max-height: 90vh;
        border-radius: 8px;
    }

    .images-row {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 15px;
    }

    .image-container {
        height: 350px;
    }

    .image-container img {
        min-height: 350px;
    }

    h1 {
        font-size: 1.8rem;
        letter-spacing: 0;
    }

    .description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    header {
        padding: 25px 15px;
        margin-bottom: 30px;
    }

    .content-area {
        padding: 30px 20px;
        margin: 15px 0;
    }

    .content-area p {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    #openPopup {
        padding: 16px 30px;
        font-size: 0.95rem;
        letter-spacing: 1px;
    }

    .button-container {
        margin: 40px 0 20px;
    }

    .button-container::after {
        font-size: 0.85rem;
        margin-top: 15px;
    }

    .portfolio-nav {
        gap: 6px;
        margin-bottom: 20px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 30px;
    }

    .portfolio-info {
        padding: 8px 0;
    }

    .portfolio-info h3 {
        font-size: 15px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 30px 0;
    }

    .feature-card {
        padding: 20px;
    }

    .feature-icon {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .feature-card h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .feature-card p {
        font-size: 0.9rem;
    }

    .stats-container {
        gap: 12px;
        margin: 30px 0;
    }

    .stat-item {
        min-width: 100px;
        padding: 15px 10px;
    }

    .stat-number {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .footer {
        padding: 20px;
        margin-top: 40px;
    }

    .footer p {
        font-size: 0.9rem;
    }

    .global-close-btn {
        top: 5px;
        right: 5px;
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
}

/* Extra Small Devices (below 320px) */
@media (max-width: 319px) {
    .popup-content {
        padding: 15px 10px;
    }

    .image-container {
        height: 300px;
    }

    .image-container img {
        min-height: 300px;
    }

    h1 {
        font-size: 1.5rem;
    }

    #openPopup {
        padding: 14px 25px;
        font-size: 0.9rem;
    }

    .filter-btn {
        padding: 5px 10px;
        font-size: 10px;
    }

    .portfolio-info h3 {
        font-size: 14px;
    }
}

/* Floating CV Download Button */
.cv-download-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #232935;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cv-download-btn:hover {
    background-color: #aeb6c4;
    color: #1f2029;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.cv-download-btn i {
    transition: transform 0.3s ease;
}

.cv-download-btn:hover i {
    transform: translateY(2px);
}

/* Ensure it doesn't overlap with return-to-top button if it exists */
#return-to-top {
    right: 100px;
    /* Shift return-to-top slightly to the left */
}

@media (max-width: 767px) {
    .cv-download-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    #return-to-top {
        right: 80px;
    }
}