body {
    box-sizing: border-box;
    margin: 0;
    padding: 2vh 2vw;
    font-family:
        -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
        sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

::selection {
    background: rgba(255, 58, 50, 50%);
    color: #000;
}

.dynamic-background {
    position: absolute;
    inset: 0;
    z-index: 0;

    background: url(assets/background.jpg) fixed center no-repeat;
    background-size: cover;
}

/*@keyframes backgroundShift {
    0%,
    100% {
        transform: scale(1.1) rotate(-1deg);
        filter: blur(70px);
    }
    50% {
        transform: scale(1.2) rotate(1deg);
        filter: blur(90px);
    }
}*/

.portfolio-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.125);
    border-radius: 32px;
    width: 90%;
    max-width: 1000px;
    height: auto;
    max-height: 80vh;
    overflow-y: hidden;
    padding: 30px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    /*animation: cardFloat 6s ease-in-out infinite;*/
}

@media (max-width: 768px) {
    .portfolio-card {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .portfolio-item {
        width: 100%;
        margin-bottom: -130px;
        border: 2px solid #ffaaaa !important;
        box-shadow: 0 0px 10px #ffaaaa;
    }

    .featured-project {
        margin-top: 154px;
    }
}

/* Custom scrollbar for webkit browsers */
.portfolio-card::-webkit-scrollbar {
    width: 8px;
}
.portfolio-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.portfolio-card::-webkit-scrollbar-track {
    background: transparent;
}

/*@keyframes cardFloat {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}*/

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    user-select: none;
    pointer-events: none;
}

.tab-icon {
    width: 20px;
    height: 20px;
    background: #444;
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    user-select: none;
    pointer-events: none;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.follow-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.follow-btn:hover,
.action-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* Profile section */
.profile-section {
    text-align: center;
    margin-bottom: 30px;
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 28px;
    background: #ff3a32;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0px 70px #000;
    position: relative;
    overflow: hidden;
    user-select: none;
    pointer-events: none;
    color: white;
}

.name {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.tagline {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    font-weight: 400;
}

/* Skills section */
.skills-section {
    margin-bottom: 30px;
    user-select: none;
}

.skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px;
}

.skill-tag {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Portfolio section */
.portfolio-section {
    margin-bottom: 32px;
    user-select: none;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.portfolio-item {
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block; /* Remove extra space below image */
    transition: filter 0.3s ease; /* Add transition for blur effect */
}

.portfolio-item:hover img {
    filter: blur(5px); /* Apply blur on hover */
}

.project-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align content to the bottom */
    padding: 20px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0) 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allows clicks to pass through when hidden */
    border-radius: 16px;
}

.portfolio-item:hover .project-info {
    opacity: 1;
    pointer-events: auto; /* Re-enable pointer events on hover */
}

.project-info .project-title {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px; /* Space between title and arrow */
    align-self: flex-start; /* Align title to the bottom-left */
}

.project-info .project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    align-self: flex-end; /* Align arrow to the bottom-right */
    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.project-info .project-link:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Featured project bar */
.featured-project {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-project:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.project-title {
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.view-project {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 1024px) {
    /* tablets/laptops */
    .portfolio-card {
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px 10px;
        align-items: flex-start;
    }
    .portfolio-card {
        width: 95%;
        padding: 30px 24px;
        max-height: 90vh;
    }

    .name {
        font-size: 30px;
    }

    .tagline {
        font-size: 18px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .featured-project {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 20px;
    }

    .top-bar {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .portfolio-card {
        padding: 24px 20px;
    }

    .avatar {
        width: 120px;
        height: 120px;
        font-size: 48px;
    }

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