/* root variables defined below */
:root {
    --bar-padding: 12px 20px;
    --bar-radius: 12px;
    --bar-max-width: 110000px;
    --accent-start: #ff9aa2;
    --accent-end: #ff6b6b;
    --glass-bg: rgba(255, 255, 255, 0.06);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('./img/wall.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    align-items: center;
    height: 100%;
}

.bar {
    display: flex;
    justify-content: space-between; 
    padding: 8px 12px;
    color: #fff;
    /* glassmorphism */
    background: linear-gradient(135deg, var(--glass-bg), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--bar-radius);
    margin: 18px 18px 0 18px;
    align-self: stretch;
    font-family: "Pacifico", cursive;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    font-size: clamp(18px, 3.2vw, 40px);
    font-weight: 600;
}

.bar-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; 
    align-items: center;
    width: 100%;
}

.middle {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.right {
    display: flex;
    justify-content: flex-end;
    text-align: right;
    width: 100%;
}

.date {
    margin: 0; 
    white-space: nowrap; 
}

@media (max-width: 900px) {
    .bar-inner {
        display: grid;
        grid-template-columns: 1fr 1fr; 
        grid-template-areas: 
            "gio ngay"
            "weather weather";
        gap: 8px;
        align-items: center;
    }

    .left {
        grid-area: gio;
        justify-content: flex-start;
        display: flex;
    }

    .middle {
        grid-area: ngay;
        justify-content: flex-end; 
        display: flex;
        flex: none;
    }

    .right {
        grid-area: weather;
        justify-content: center;
        display: flex;
        margin-top: 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.1); 
        padding-top: 4px;
    }

    #clock, .date, #weather {
        font-size: clamp(14px, 4vw, 20px);
    }
}
@media (max-width: 480px) {
    .bar-inner {
        display: flex;
        flex-direction: column; 
        gap: 4px;
        align-items: center;
        text-align: center;
    }

    .left, .middle, .right {
        justify-content: center; 
        width: 100%;
    }

    .bar {
        font-size: 16px; 
        padding: 12px;
    }
    
    #weather-icon {
        width: 24px;
        height: 24px;
    }
}

/* Profile styling */

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;
    gap: 12px;
    width: min(90%, 640px);
    overflow: hidden;
    position: relative;
}

.profile .avt {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    border: 3px solid rgba(255, 255, 255, 0.12);
}

.profile .name {
    font-size: clamp(20px, 4.5vw, 48px);
    font-weight: 700;
    color: #fff;
    text-align: center;
}

.profile .avt img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 480px) {
    .profile .avt {
        width: 72px;
        height: 72px
    }

    .profile .name {
        font-size: 28px
    }
}

/* Card variant */
.profile.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border-radius: 12px;
    padding: 24px 2vw;
    max-width: 420px;
    box-shadow: 0 14px 48px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    /* ensure vertical stacking */
    align-items: center;
    justify-content: center;
}

.profile.card .profile-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center
}

.profile.card .links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    gap: 24px
}

.profile.card .icon-link {
    color: #fff;
    font-size: 40px;
    text-decoration: none
}

.profile.card .icon-link:hover {
    color: #ffd1d1
}

.terminal {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 20px;
    right: 20px;
}