/* ---------- Root Colors ---------- */
:root {
    --primary: #4A90E2;
    --primary-light: #7FBFFF;
    --dark: #1A202C;
    --darker: #0F111A;
    --light: #F0F4F8;
    --gray: #9AAABF;
    --gradient: linear-gradient(135deg, #4A90E2 0%, #306ABF 100%);
}

/* ---------- Start Global Rules ---------- */

::selection {
    background-color: var(--primary);
    color: var(--dark);
}

/* ---------- Body ---------- */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

/* ---------- Particles ---------- */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
    pointer-events: none;
}

/* ---------- Preloader ---------- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 32, 44, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    position: relative;
    width: 80px;
    height: 80px;
    border: 6px solid transparent;
    border-top-color: #4A90E2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader::before,
.loader::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #7FBFFF;
    border-radius: 50%;
    top: -10px;
    left: -10px;
    animation: orbit 1s linear infinite;
}

.loader::after {
    background: #fff;
    animation-delay: 0.5s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(50px) rotate(0deg);
    }

    100% {
        transform: rotate(360deg) translateX(50px) rotate(-360deg);
    }
}

/* ---------- Header ---------- */
.header {
    margin-top: 90px;
    text-align: center;
    color: var(--light);
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: translateY(-50px);
    animation: fadeInDown 1s forwards;
    animation-delay: 0.3s;
}

@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header i {
    font-size: 30px;
    color: var(--light);
    display: block;
    animation: bounce 2s infinite;
    margin: 5px 0 10px;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(10px);
    }

    60% {
        transform: translateY(5px);
    }
}

/* ---------- CV Image Slider ---------- */
.cv_file {
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 16px;
}

.slider-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 5px solid var(--primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s forwards;
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
    min-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Slider Buttons */
.slider-btn {
    background: rgba(74, 144, 226, 0.85);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.slider-btn:hover {
    background: var(--primary-light);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

.slider-btn:active {
    transform: scale(0.95);
}

/* Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 6px;
    background: rgba(15, 17, 26, 0.8);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

/* Counter */
.slider-counter {
    text-align: center;
    color: var(--gray);
    font-size: 0.82rem;
    padding-bottom: 8px;
    background: rgba(15, 17, 26, 0.8);
    font-weight: 500;
    letter-spacing: 1px;
}

#currentPage {
    color: var(--primary-light);
    font-weight: 700;
}

/* ---------- Download Button ---------- */
.download_file {
    margin-bottom: 10px;
    position: relative;
    z-index: 10;
}

.download-btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-50px);
    animation: fadeInDown 1s forwards;
    animation-delay: 0.3s;
}

.download-btn:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* ---------- NavBar ---------- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 32, 44, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    z-index: 1000;
    border-bottom: 1px solid rgba(240, 244, 248, 0.1);
    opacity: 0;
    transform: translateY(-50px);
    animation: fadeInDown 1s forwards;
    animation-delay: 0.3s;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

nav a:hover {
    color: var(--primary-light);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
    height: 3px;
}

.github-btn i {
    font-size: 1.5rem;
}

/* ---------- Mobile Menu ---------- */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ---------- Footer ---------- */
footer {
    background: rgba(26, 32, 44, 0.95);
    width: 100%;
    padding: 0.5rem 0;
    text-align: center;
    position: relative;
    z-index: 10;
    margin-top: 30px;
}

.social-links {
    display: inline-flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    margin-top: 5px;
}

.social-link {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(240, 244, 248, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.copyright {
    color: var(--gray);
    font-size: 0.9rem;
}

.copyright a {
    color: inherit;
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding-bottom: 0.05em;
}

.copyright a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0em;
    width: 0;
    height: 3px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.copyright a:hover::after {
    width: 100%;
}

@media (max-width: 992px) {
    .cv_file {
        gap: 10px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {

    body,
    html {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    .cv_file {
        width: 95%;
        gap: 8px;
        margin: 20px auto;
    }

    .slider-btn {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--dark);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3rem;
        transition: all 0.5s ease;
    }

    .nav-links.active {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    footer {
        padding: 0.8rem 0;
    }

    .social-link {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        text-decoration: none;
    }
}

@media (max-width: 480px) {
    .cv_file {
        gap: 6px;
    }

    .slider-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

/* ---------- Background Wrapper ---------- */
.bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    opacity: 1;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(127, 191, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    background-size: 100px 100px;
    animation: float 20s ease-in-out infinite;
}

.bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bg-shape {
    position: absolute;
    background: var(--primary-light);
    opacity: 0.1;
    border-radius: 50%;
    animation: drift 15s linear infinite;
}

.bg-shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.bg-shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 20%;
    animation-delay: 5s;
    background: var(--primary);
}

.bg-shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 30%;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

@keyframes drift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(100px, -100px) rotate(360deg);
    }
}