/* ============================= */
/*       CSS CUSTOM PROPERTIES   */
/* ============================= */

:root {
    /* Colors */
    --color-bg-primary: #0f1115;
    --color-bg-secondary: #1b1f27;
    --color-bg-tertiary: #1c1f26;
    --color-text-primary: #e6e6e6;
    --color-text-secondary: #ccc;
    --color-text-tertiary: #aaa;
    --color-accent-blue: #4d9cff;
    --color-accent-purple: #8a63ff;
    --color-accent-light-blue: #7aa2ff;
    --color-accent-light-purple: #9b7aff;
    --color-border: #444;
    --color-border-light: rgba(255, 255, 255, 0.08);
    
    /* Gradients */
    --gradient-primary: linear-gradient(90deg, var(--color-accent-blue), var(--color-accent-purple));
    --gradient-progress: linear-gradient(90deg, var(--color-accent-light-blue), var(--color-accent-light-purple));
    --gradient-bg: radial-gradient(circle at 20% 20%, #1a1d2b 0%, var(--color-bg-primary) 40%, #07080b 100%);
    
    /* Spacing */
    --spacing-xs: 10px;
    --spacing-sm: 20px;
    --spacing-md: 30px;
    --spacing-lg: 60px;
    --spacing-xl: 120px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.8s ease;
    
    /* Shadows */
    --shadow-card: 0 15px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow-blue: 0 0 10px rgba(112, 162, 255, 0.6);
    --shadow-glow-purple: 0 0 12px rgba(138, 99, 255, 0.6);
}

/* ============================= */
/*       GLOBAL STYLES           */
/* ============================= */

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    color: var(--color-text-primary);
    position: relative;
}

/* ============================= */
/*      ATMOSPHERIC BACKGROUND   */
/* ============================= */

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(
        circle at 40% 30%,
        #1a1d2b 0%,
        #0f1115 50%,
        #07080b 100%
    );
}

.background::before,
.background::after {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: var(--radius-full);
    filter: blur(120px);
    opacity: 0.25;
    animation: floatLight 35s ease-in-out infinite;
}

.background::before {
    background: var(--color-accent-purple);
    top: -150px;
    left: -150px;
}

.background::after {
    background: var(--color-accent-blue);
    bottom: -150px;
    right: -150px;
    animation-delay: 10s;
}

.background .particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.3);
    animation: floatParticle 30s linear infinite;
    pointer-events: none;
}

/* ============================= */
/*         ANIMATIONS            */
/* ============================= */

@keyframes floatLight {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(200px, 150px); }
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) translateX(0); opacity: 0.2; }
    50% { opacity: 0.6; }
    100% { transform: translateY(-10vh) translateX(50vw); opacity: 0; }
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================= */
/*           NAVBAR              */
/* ============================= */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 17, 21, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}


.logo {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-secondary);
    transition: var(--transition-base);
}

.nav-links a:hover {
    color: var(--color-text-primary);
}

.nav-links a.active {
    color: var(--color-accent-light-blue);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-text-primary);
    border-radius: 2px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 60px; 
        right: 0;
        background: rgba(15,17,21,0.95);
        flex-direction: column;
        width: 200px;
        padding: 20px;
        transform: translateX(100%);
        opacity: 0;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .hamburger {
        display: flex;
    }
}

/* ============================= */
/*            HERO               */
/* ============================= */

.hero {
    height: 80vh;
    padding: 0 var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
}

.hero-sub {
    opacity: 0.9;
}

.hero p {
    color: var(--color-text-tertiary);
    margin-bottom: var(--spacing-sm);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

@media screen and (max-width: 600px) {
    .hero {
        padding: 1.5rem 3%; 
        text-align: center; 
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-sub {
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

/* ============================= */
/*           BUTTONS             */
/* ============================= */

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-secondary {
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

/* ============================= */
/*          SECTIONS             */
/* ============================= */

.section {
    padding: var(--spacing-xl) var(--spacing-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

/* ============================= */
/*        PROJECT CARDS          */
/* ============================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: 40px;
}

.project-card {
    background: var(--color-bg-secondary);
    padding: var(--spacing-sm);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-base);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card);
}

.project-media {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.project-media img {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* Mobile screens */
@media screen and (max-width: 600px) {
    .main-media {
        display: flex;
        justify-content: center; /* horizontal center */
        align-items: center;
    }

    .main-media img {
        max-width: 90%;  /* smaller than container */
        height: auto;
    }
}


/* ============================= */
/*            ABOUT              */
/* ============================= */

.about-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.about-photo {
    width: 150px;
    height: 150px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--color-text-primary);
}

.about-text {
    flex: 1;
    min-width: 250px;
}

/* ============================= */
/*            MODAL              */
/* ============================= */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #111;
    width: 80%;
    max-width: 900px;
    max-height: auto;
    overflow-y: auto;
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
    border-radius: var(--radius-lg);
    position: relative;
    animation: modalPop 0.35s ease;
}

.modal-content ul {
    padding-left: 20px;
    list-style-type: disc;
}

.modal-content h3 {
    padding-top: 20px;
    font-size: 18px;
    /* color: #8a63ff;  */
}


.play-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: #8a63ff;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.2s, background 0.2s;
}

.play-btn:hover {
    background: #7a52ef;
    transform: scale(1.05);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: var(--spacing-sm);
    font-size: 28px;
    cursor: pointer;
    color: var(--color-text-primary);
    z-index: 10;
    transition: var(--transition-fast);
}

.download-btn {
    display: inline-block;
    margin: 10px 15px 0 0;
    padding: 12px 24px;
    background: #8a63ff;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.2s, background 0.2s;
}

.download-btn:hover {
    background: #7a52e6;
    transform: scale(1.05);
}


.close-btn:hover {
    color: #f00;
    transform: scale(1.2);
}

.modal-content h3 {
    margin-top: 0;
}

.modal iframe {
    width: 100%;
    height: 400px;
    margin-top: var(--spacing-sm);
    border-radius: var(--radius-md);
}

/* ============================= */
/*       PROJECT GALLERY         */
/* ============================= */

.project-gallery {
    position: relative;
    margin-bottom: 25px;
}

.main-media {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-media img,
.main-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: white;
    /* background: rgba(0, 0, 0, 0.5); */
    border-radius: var(--radius-full);
    padding: var(--spacing-xs) 14px;
    cursor: pointer;
    user-select: none;
    z-index: 10;
    transition: var(--transition-base);
}

.arrow:hover {
    /* background: rgba(0, 0, 0, 0.8); */
}

.arrow.left { left: var(--spacing-xs); }
.arrow.right { right: var(--spacing-xs); }

.media-controls {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: 15px;
    flex-wrap: wrap;
}

.media-controls button {
    padding: 8px 14px;
    background: #1f1f1f;
    border: 1px solid #333;
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
}

.media-controls button:hover {
    background: #00bfff;
    color: black;
}

/* ============================= */
/*           SKILLS              */
/* ============================= */

#skills {
    max-width: 1000px;
    margin: auto;
}

#skills h2 {
    margin-bottom: 40px;
}

.skill {
    margin-bottom: 40px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    font-size: 1rem;
}

.skill-header span:first-child {
    color: var(--color-text-primary);
}

.skill-level {
    font-size: 0.85rem;
    color: var(--color-accent-purple);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.progress-bar.labeled {
    position: relative;
    width: 100%;
    height: 14px;
    background: var(--color-bg-tertiary);
    border-radius: 30px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0;
    border-radius: 30px;
    background: var(--gradient-progress);
    box-shadow: var(--shadow-glow-blue);
    transition: width 1.6s ease;
}

.skill:hover .progress {
    box-shadow: var(--shadow-glow-purple);
}

/* ============================= */
/*           CONTACT             */
/* ============================= */

#contact a {
    color: var(--color-accent-blue);
    text-decoration: none;
}

.contact-icons {
    display: flex;
    gap: var(--spacing-md);
    font-size: 2rem;
}

.contact-icons a {
    color: var(--color-text-secondary);
    transition: var(--transition-base);
}

.contact-icons a:hover {
    color: var(--color-accent-purple);
    transform: scale(1.2);
}

/* ============================= */
/*       FADE ANIMATIONS         */
/* ============================= */

.fade-in {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

.fade-in.hide {
    opacity: 0;
    transform: translateY(20px);
}

/* ============================= */
/*            FOOTER             */
/* ============================= */

.footer {
    text-align: center;
    padding: var(--spacing-md) var(--spacing-sm);
    color: var(--color-text-primary);
    font-size: 14px;
    background: transparent;
}

.footer p {
    margin: 0;
    letter-spacing: 0.5px;
}

/* ============================= */
/*       RESPONSIVE DESIGN       */
/* ============================= */

@media (max-width: 600px) {
    .skill-header {
        font-size: 0.9rem;
    }

    .skill-level {
        font-size: 0.75rem;
    }
}
