:root {
    --bgColor: #1e3448;
    --bgColor2: #3a5a7a;
    --accentColor: #FFF;
    --font: 'Karla', sans-serif;
}

body {
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #3a5a7a, #1e3448 60%, #12243a);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    box-sizing: border-box;
}

#profilePicture, #profilePicture img {
    position: relative;
    width: 96px;
    height: 96px;
    display: block;
    margin: 0 auto 20px;
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
    #profilePicture:hover img {
        transform: scale(1.05);
        box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
    }
}

#userName {
    color: var(--accentColor);
    display: block;
    font-family: var(--font);
    width: 100%;
    text-align: center;
    text-decoration: none;
    margin-bottom: 8px;
}

.handle {
    display: block;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    font-weight: normal;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.realName {
    display: block;
    color: var(--accentColor);
    font-size: 1.35rem;
    font-weight: bold;
    line-height: 1.3;
    font-family: var(--font);
    margin-top: 2px;
}

#bio {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    font-weight: normal;
    font-family: var(--font);
    text-align: center;
    margin: 8px 0 0 0;
    padding: 0;
    letter-spacing: 0.03em;
}

#links {
    max-width: 480px;
    width: 100%;
    display: block;
    margin: 24px auto 0;
}

.link {
    position: relative;
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--accentColor);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    font-family: var(--font);
    text-align: center;
    display: block;
    margin-bottom: 10px;
    padding: 12px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

@media (hover: hover) {
    .link:hover {
        background-color: rgba(255, 255, 255, 0.92);
        color: var(--bgColor);
        border-color: transparent;
        transform: translateY(-1px);
    }
}

.link:active {
    background-color: var(--accentColor);
    color: var(--bgColor);
    transform: translateY(0);
}

/*-------------------------popup------------------------*/
/* credits: https://www.youtube.com/watch?v=lAS2glU0xlc */
.overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2;
    visibility: hidden;
    opacity: 0;
    overflow: hidden;
    transition: .5s ease-in-out;
}

.popup {
    position: relative;
    top: -43%;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    width: auto;
    height: auto;
    margin: 56px;
    background-color: var(--bgColor);
    transform: scale(0);
    transition: .5s ease-in-out;
}

.popup-photo {
    display: flex;
    width: 100%;
    height: 100%;
}

.popup-photo img {
    width: 100%;
    height: 100%;
}

.overlay:target {
    visibility: visible;
    opacity: 1;
}

.overlay:target .popup {
    transform: scale(1);
    top: 0;
}

.popup-close {
    position: absolute;
    right: -1rem;
    top: -1rem;
    width: 3rem;
    height: 3rem;
    font-size: 1.7rem;
    font-weight: 400;
    border-radius: 100%;
    background-color: var(--bgColor);
    z-index: 4;
    color: var(--accentColor);
    line-height: 2.7rem;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) {
    .popup-close:hover {
        background-color: var(--accentColor);
        color: var(--bgColor);
    }
}

.popup-close:active {
    background-color: var(--accentColor);
    color: var(--bgColor);
}

/*-------------------------projects page------------------------*/
.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--accentColor);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-family: var(--font);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    z-index: 10;
}

@media (hover: hover) {
    .back-button:hover {
        background-color: rgba(255, 255, 255, 0.92);
        color: var(--bgColor);
        transform: translateX(-2px);
    }
}

.back-button:active {
    background-color: var(--accentColor);
    color: var(--bgColor);
}

.link-featured {
    background: linear-gradient(135deg, rgba(58, 90, 122, 0.4), rgba(30, 52, 72, 0.4));
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-weight: bold;
}

@media (hover: hover) {
    .link-featured:hover {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.92));
        border-color: transparent;
    }
}

#projects-container {
    max-width: 900px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
    margin: 24px auto 0;
    padding: 0 20px;
}

@media (max-width: 768px) {
    #projects-container {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 0;
    color: var(--accentColor);
    font-family: var(--font);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.project-image--contain {
    object-fit: contain;
    background-color: #dfe2e6;
    padding: 16px;
}

@media (hover: hover) {
    .project-card:hover {
        transform: translateY(-4px);
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
}

.project-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 24px 16px 24px;
    padding: 24px 0 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.project-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accentColor);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-title i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}

.project-tech {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: normal;
    letter-spacing: 0.03em;
}

.project-description {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 24px 16px 24px;
    text-align: justify;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 24px 16px 24px;
}

.tag {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 24px 24px 24px;
}

.project-link {
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.88rem;
    color: var(--accentColor);
    text-decoration: none;
    font-family: var(--font);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .project-link:hover {
        background-color: rgba(255, 255, 255, 0.92);
        color: var(--bgColor);
        transform: translateY(-2px);
    }
}

.project-link:active {
    background-color: var(--accentColor);
    color: var(--bgColor);
    transform: translateY(0);
}

.back-to-home {
    max-width: 480px;
    width: 100%;
    margin: 32px auto 0;
}

.back-to-home .link {
    font-weight: bold;
}
