@font-face {
    font-family: "Outfit Regular";
    src: url("/assets/fonts/Outfit-Regular.ttf") format("truetype");
    font-weight: 400;
}
@font-face {
    font-family: "NCL Blessing Gloomy";
    src: url("/assets/fonts/NCLBlessingGloomy.otf") format("opentype");
    font-weight: 600;
}
@font-face {
    font-family: "Fahim Sans";
    src: url("/assets/fonts/FahimSans-Regular.ttf") format("truetype");
    font-weight: 800;
}
@font-face {
    font-family: "PixelMix Regular";
    src: url("/assets/fonts/pixelmix.ttf");
    font-weight: 500;
}

:root {
    --white: #f0f0f0;

    --black-bg: #0d100e;

    --grey-100: #29332b;
    --grey-400: #444444;
    --grey-500: #555555;

    --green-200: #375c40;
    --green-400: #398f4f;
    --green-500: #32a850;
    --green-700: #16db47;

    --font-regular: "Outfit Regular", sans-serif;
    --font-special: "NCL Blessing Gloomy", sans-serif;
    --font-bold: "Fahim Sans", sans-serif;
    --font-pixel: "PixelMix Regular", sans-serif;

    --text-color: var(--white);
    --text-color-black: var(--grey-100);
}

/* --- RESET & GLOBAL STYLES --- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    font-family: var(--font-regular);
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--black-bg);
    box-sizing: border-box;
    height: 100dvh;
}

/* --- BUTTONS --- */
button {
    border: none;
    cursor: pointer;
    background-color: transparent;
    color: var(--green-500);
    font-family: var(--font-regular);
    font-weight: 500;
}

button:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* --- HEADER --- */
header {
    padding: 20px 20px;
    position: sticky;
    top: 0;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
}

.theme-toggle {
    padding: 0.5rem 0.5rem;
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
}
.theme-toggle:disabled {
    opacity: 0.7;
}
.theme-toggle.selected {
    background-color: var(--green-400);
    border-radius: 5px;
}
.theme-toggle.selected svg {
    color: var(--black-bg);
}

/* --- Language Menu --- */
#lang-menu {
    position: absolute;
    top: 3rem;
    left: 1rem;
    list-style: none;
    padding: 0.5rem 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

#lang-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    animation: popIn 0.25s ease forwards;
}
#lang-menu.hidden {
    animation: popIn 0.25s ease backwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#lang-menu li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--text-color);
    transition: background 0.2s ease;
}

.lang-btn #lang-menu li:hover {
    color: var(--black-bg);
    background-color: var(--green-500);
}

/* --- CONTAINER --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100dvh - 75px - 76px);
}

.name {
    font-size: 3rem;
    text-align: center;
    color: var(--white);
}
.name h1 {
    font-family: var(--font-pixel);
    color: var(--white);
}
.name a {
    text-decoration: none;
    color: var(--white);
}

/* --- LINKS --- */
.btns {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    color: var(--green-700);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1.1rem;
    text-decoration: none;
}
.btn:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* --- FOOTER --- */
footer {
    color: var(--green-200);
    text-align: center;
    width: 100%;
    padding: 1rem 0;
    height: auto;
    bottom: 0;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
}

.links {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    justify-content: center;
    color: var(--green-200);
}
.links svg {
    width: 24px;
    height: 24px;
    fill: var(--grey-400);
}
.links a:hover svg {
    fill: var(--white);
    transition: fill 0.3s ease;
    scale: 110%;
}

/* --- LIGHT THEME --- */
body.light-theme {
    background-color: var(--white);
    color: var(--text-color-black);
}
body.light-theme .btn {
    color: var(--green-500);
}
body.light-theme .links svg {
    fill: var(--green-500);
}
body.light-theme .theme-toggle {
    color: var(--grey-500);
}
body.light-theme .theme-toggle.selected svg {
    color: var(--white);
}
body.light-theme .name h1 {
    color: var(--black-bg);
}
body.light-theme #lang-menu li {
    color: var(--text-color-black);
}

/* --- SMOOTH THEME TRANSITION --- */
body,
button,
a,
header,
footer,
.container,
.name,
.btns,
.links {
    transition: background-color 0.4s ease, color 0.4s ease, fill 0.4s ease;
}

/* --- MEDIA QUERY ---*/
@media (max-width: 575px) {
    .name a h1 {
        font-size: 4rem;
    }
}

/* --- VIEW TRANSITIONS ---*/
@view-transition {
    navigation: auto;
    animation-duration: 0.6s;
}

#name {
    view-transition-name: title;
}
#rights {
    view-timeline-name: rights;
}
#github-ft {
    view-timeline-name: github-svg;
}
#linkedin-ft {
    view-timeline-name: linkedin-svg;
}
#linktree-ft {
    view-timeline-name: linktree-svg;
}
