/* Main Stylesheet for Portfolio */
:root {
    /* Modern color scheme with improved contrast */
    --primary-color: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #4834d4;
    --accent-color: #00cec9;
    --text-light: #f5f6fa;
    --text-dark: #2d3436;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-hover: rgba(51, 65, 85, 0.9);
    --gradient-bg: linear-gradient(135deg, var(--primary-dark), var(--bg-dark));
    
    /* Improved Typography */
    --font-main: 'Poppins', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --fs-xl: 4rem;
    --fs-lg: 2.75rem;
    --fs-md: 1.75rem;
    --fs-sm: 1.125rem;
    --fs-xs: 0.875rem;
    
    /* Refined Spacing */
    --spacing-xs: 0.75rem;
    --spacing-sm: 1.25rem;
    --spacing-md: 2.5rem;
    --spacing-lg: 5rem;
    --spacing-xl: 10rem;
    
    /* Enhanced Border radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Improved Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Common Classes */
.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: var(--spacing-md) 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    position: relative;
    color: var(--text-light);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-full);
}

section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: var(--fs-sm);
    box-shadow: var(--shadow-sm);
}

.primary-btn {
    background: var(--primary-color);
    color: var(--text-light);
}

.primary-btn:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.secondary-btn {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background: rgba(94, 53, 177, 0.15);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Particles background */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Cursor */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 61, 127, 0.5);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.5s ease;
}

.loader-content {
    text-align: center;
}

.loader-content h2 {
    font-size: var(--fs-xl);
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    letter-spacing: 4px;
    font-family: var(--font-heading);
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Header */
header {
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all 0.3s ease;
    background: rgba(10, 25, 47, 0.8);
    backdrop-filter: blur(10px);
}

header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    font-family: var(--font-heading);
}

.logo-text {
    color: var(--primary-light);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link:focus {
    color: var(--primary-light);
}

.nav-link:hover::after, .nav-link:focus::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: var(--text-light);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.95)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: var(--fs-xl);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
    font-family: var(--font-heading);
}

.highlight {
    color: var(--primary-light);
}

.hero-content p {
    font-size: var(--fs-md);
    margin-bottom: var(--spacing-md);
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* About Section */
.about {
    background: var(--bg-darker);
    position: relative;
    overflow: hidden;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-text {
    z-index: 1;
}

.about-info h3 {
    font-size: var(--fs-md);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-light);
    font-weight: 600;
}

.about-info p {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding: 1rem;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--card-hover);
}

.info-item h4 {
    margin-right: 1rem;
    font-weight: 600;
    color: var(--text-light);
    width: 60px;
}

.info-item p {
    margin-bottom: 0 !important;
    font-weight: 500;
    color: var(--primary-light) !important;
}

#age {
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
}

.age-updated {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: var(--accent-color);
    }
    100% {
        transform: scale(1);
    }
}

.hobbies-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.hobbies-list li {
    background: var(--card-bg);
    padding: 1.2rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    gap: 10px;
}

.hobbies-list li:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: var(--card-hover);
}

.hobbies-list i {
    font-size: 2rem;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.animated-bg {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(94, 53, 177, 0.3) 0%, rgba(10, 25, 47, 0) 70%);
    animation: pulse-bg 4s infinite alternate;
    border-radius: 50%;
}

@keyframes pulse-bg {
    0% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1.1);
    }
}

.avatar-frame {
    position: relative;
    width: 200px;
    height: 200px;
    background: linear-gradient(120deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-lg);
    z-index: 1;
}

.avatar-content {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-content span {
    font-size: 5rem;
    color: var(--primary-light);
    font-weight: 800;
    font-family: var(--font-heading);
}

/* Skills Section */
.skills {
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.skills::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(94, 53, 177, 0.15) 0%, rgba(10, 25, 47, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.skills-container {
    position: relative;
    z-index: 1;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: attr(data-skill);
    position: absolute;
    bottom: -20px;
    right: -10px;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    z-index: 0;
    pointer-events: none;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: var(--card-hover);
}

.skill-icon {
    font-size: 2rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-light);
}

.skill-level {
    display: flex;
    flex-direction: column;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-full);
}

.skill-percentage {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-light);
    align-self: flex-end;
}

/* Projects Section */
.projects {
    background: var(--bg-darker);
    position: relative;
    overflow: hidden;
}

.projects-filter {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(94, 53, 177, 0.1);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
    border-radius: var(--radius-full);
}

.filter-btn:hover::before, .filter-btn.active::before {
    transform: scaleX(1);
    transform-origin: left;
}

.filter-btn.active {
    color: var(--primary-light);
    font-weight: 600;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

.projects-loading {
    text-align: center;
    padding: var(--spacing-lg);
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(94, 53, 177, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.project-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.project-img {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.project-content p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    background: rgba(94, 53, 177, 0.2);
    color: var(--primary-light);
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    text-decoration: none;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--primary-light);
}

/* Contact Section */
.contact {
    background: var(--bg-dark);
}

.contact-content {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-info h3 {
    font-size: var(--fs-md);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-light);
}

.contact-info p {
    margin-bottom: var(--spacing-md);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.social-link i {
    font-size: 1.5rem;
}

.discord {
    color: #5865F2;
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: var(--card-hover);
}

/* Footer */
footer {
    background: var(--bg-darker);
    text-align: center;
    padding: 2rem 0;
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.7);
}

/* Error and No Content States */
.error-message, .no-projects {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--card-bg);
    border-radius: var(--radius-md);
    grid-column: 1 / -1;
}

.error-message i, .no-projects i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Media Queries */
@media screen and (max-width: 992px) {
    :root {
        --fs-xl: 3rem;
        --fs-lg: 2.2rem;
        --fs-md: 1.3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .about-image {
        order: -1;
    }
    
    .image-container {
        margin-bottom: var(--spacing-md);
    }
    
    .avatar-frame {
        margin: 0 auto;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --fs-xl: 2.5rem;
        --fs-lg: 2rem;
        --fs-md: 1.2rem;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: var(--bg-darker);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1.5rem 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-container {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --fs-xl: 2.2rem;
        --fs-lg: 1.8rem;
        --fs-md: 1.1rem;
    }
    
    .projects-filter {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .hobbies-list {
        grid-template-columns: 1fr;
    }
}
