/* --- GLOBALS --- */
:root {
    --color-bg-dark: #1a1a1a;
    --color-text-white: white;
    --color-text-muted: #ccc;
    --color-glass-bg: rgba(255, 255, 255, 0.1);
    --color-glass-border: rgba(255, 255, 255, 0.2);
    --color-footer-bg: rgba(15, 15, 15, 0.95);
    --color-footer-border: rgba(255, 255, 255, 0.15);
    --color-accordion-bg: rgba(0, 0, 0, 0.4);
    --color-shadow-glass: rgba(31, 38, 135, 0.37);
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100dvh;
    overflow: hidden;
}

/* --- PARALLAX BACKGROUND --- */
#background-parallax {
    position: fixed;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    z-index: -1;
    background: url(/assets/images/LandingPage.webp) no-repeat center center;
    background-size: cover;
    transition: transform 0.1s ease-out;
}

/* --- TYPOGRAPHY & ICONS --- */
h1,
h4 {
    color: var(--color-text-white);
    text-align: center;
    width: 100%;
}

.bi {
    padding: 10px;
    font-size: 30px;
    width: 50px;
    text-align: center;
    text-decoration: none;
    border-radius: 50%;
    color: var(--color-text-white);
}

/* --- MAIN CONTAINER --- */
.container {
    background: var(--color-glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-glass-border);
    border-radius: 20px;
    padding: 3rem;
    margin-top: 10dvh;
    margin-bottom: 5dvh;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 8px 32px 0 var(--color-shadow-glass);
    color: var(--color-text-white);
}

/* --- CURSOR ANIMATION --- */
#tagline::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- FOOTER STYLES --- */
.glass-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--color-footer-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--color-footer-border);
    color: var(--color-text-white);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    display: flex;
    flex-direction: column;
}

.glass-footer.minimized {
    transform: translateY(calc(100% - 50px));
}

.footer-handle {
    height: 50px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-handle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.footer-content {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

#toggle-icon {
    transition: transform 0.3s ease;
}

.glass-footer:not(.minimized) #toggle-icon {
    transform: rotate(180deg);
}

/* --- BS5 ACCORDION OVERRIDES --- */
.accordion-item {
    background-color: transparent;
    border: none;
}

.accordion-button {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--color-text-white);
    box-shadow: none !important;
    /* Remove blue focus ring */
    border-radius: 8px !important;
    margin-bottom: 5px;
    border: 1px solid var(--color-footer-border);
}

.accordion-button:not(.collapsed) {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--color-text-white);
}

/* Invert the default dropdown icon to make it white */
.accordion-button::after {
    filter: invert(1);
}

.accordion-body {
    color: var(--color-text-muted);
    background: var(--color-accordion-bg);
    border-radius: 8px;
    margin-top: 5px;
    margin-bottom: 15px;
}

.accordion-body p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

#tech-stack-container {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.footer-handle span {
    font-size: 0.9rem;
    margin-left: 10px;
}

#techAccordion {
    max-width: 800px;
}

/* --- RESPONSIVENESS --- */

/* Tablet */
@media (max-width: 992px) {
    .container {
        width: 85%;
        margin-top: 4rem;
        padding: 2.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {

    body {
        overflow-y: auto;
        height: auto;
        display: block;
        padding-bottom: calc(250px + env(safe-area-inset-bottom));
    }

    .container {
        margin-top: 2rem;
        margin-bottom: 1rem;
        padding: 1.5rem;
        width: 95%;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    h1 {
        font-size: 2rem;
        text-align: center;
    }

    h4 {
        font-size: 1rem;
        text-align: center;
        line-height: 1.4;
    }

    .btn-lg {
        width: 100%;
    }

    #tech-stack-container {
        font-size: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .tech-group,
    #tech-stack-container h4,
    #tech-stack-container span,
    #tech-stack-container div {
        font-size: 1rem;
    }

    #tech-stack-container h4 {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }

    .separator {
        display: none !important;
    }

    .tech-group {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    /* --- FIX FOR SOCIAL ICONS --- */
    .social-wrapper {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 1rem;
        padding-bottom: 150px;
        position: relative;
        z-index: 5;
    }

    .glass-footer {
        position: fixed;
        bottom: 0;
        background: #0f0f0f;
        padding-bottom: env(safe-area-inset-bottom);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .row.justify-content-center {
        margin-top: 0;
    }

}

/* Small Mobile */
@media (max-width: 380px) {
    h1 {
        font-size: 1.7rem;
    }

    .container {
        padding: 1.2rem;
    }

    #tagline {
        font-size: 0.85rem;
    }
}

/* --- DYNAMIC JS CONTENT STYLES --- */

/* Tech Stack (Generated by JS) */
.tech-stack-header {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-weight: 300;
    margin: 0;
}

.separator {
    color: var(--color-glass-border);
    margin: 0 0.5rem;
}

/* GitHub Stats (Generated by JS) */
.github-box {
    width: 100%;
}

.lang-bar-container {
    display: flex;
    height: 10px;
    width: 100%;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.lang-list {
    display: flex;
    gap: 15px;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    flex-wrap: wrap;
}

.lang-dot {
    margin-right: 5px;
}

.last-updated {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.5rem;
}

.stats-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    border: 1px solid #ff6b6b;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 107, 107, 0.1);
}

/* --- INTRO CARD (Readability & Alignment Fix) --- */
.intro-glass-card {
    /* Darker background (75% opacity) for maximum contrast */
    background: rgba(0, 0, 0, 0.75); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    /* Styling */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    margin-top: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    
    /* CENTERING */
    text-align: center; /* Centers text lines */
    display: flex;      /* Enables Flexbox */
    flex-direction: column; /* Stacks items vertically */
    align-items: center;    /* Centers items horizontally */
}

/* FORCE THE TEXT TO BE WHITE */
.intro-glass-card p {
    color: #ffffff !important; /* Overrides any gray/muted defaults */
    opacity: 1 !important;     /* Removes any transparency */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); /* Adds a shadow behind text to make it pop */
    font-weight: 400;
    margin-bottom: 1.5rem; /* Space between text and button */
}

/* --- GLASS CTA BUTTON --- */
.btn-glass-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 2.5rem; /* Wider padding looks better centered */
    justify-content: center;
    background: rgba(255, 255, 255, 0.15); 
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    min-width: 360px;
    max-width: 100%;
    color: #ffffff !important; /* Force white text */
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-shadow: none; /* Clean text for button */
}

.btn-glass-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}