/* ===== VARIABLES ===== */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --light-text: #f1f5f9;
    --gray-text: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.5);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== ANIMATED BACKGROUND ===== */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
}

/* ===== MUSIC PLAYER ===== */
.music-player {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.music-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 48px rgba(99, 102, 241, 0.6);
}

.music-toggle.playing {
    animation: rotate 3s linear infinite, pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 8px 48px rgba(99, 102, 241, 0.8);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 999;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    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(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--light-text);
    transition: all 0.3s ease;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% auto;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 50px;
    position: relative;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--gray-text);
    margin-bottom: 20px;
}

.description {
    font-size: 1.1rem;
    color: var(--gray-text);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.btn {
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--light-text);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-icon:hover {
    background: var(--gradient);
    border-color: white;
    transform: translateY(-5px) rotate(360deg);
}

.hero-image {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: var(--gradient);
    filter: blur(60px);
    opacity: 0.3;
    z-index: -1;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: bounce 2s infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    position: relative;
    margin: 0 auto 10px;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 10px;
    }
    100% {
        opacity: 0;
        top: 30px;
    }
}

/* ===== FADE IN ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.fade-in-delay-1 {
    animation: fadeIn 1s ease-in 0.2s both;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.4s both;
}

.fade-in-delay-3 {
    animation: fadeIn 1s ease-in 0.6s both;
}

.fade-in-delay-4 {
    animation: fadeIn 1s ease-in 0.8s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SECTION STYLES ===== */
.section {
    padding: 100px 20px;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--gradient);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.about-image-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    z-index: -1;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--light-text);
}

.about-text p {
    color: var(--gray-text);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--gray-text);
    margin-top: 10px;
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.skill-icon {
    font-size: 4rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.skill-card h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.progress-bar {
    background: rgba(99, 102, 241, 0.1);
    height: 12px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    position: relative;
    width: 0;
    transition: width 1.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

.progress-text {
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

/* ===== TIMELINE SECTION ===== */
.timeline-container {
    position: relative;
    padding: 40px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    position: relative;
    margin-bottom: 60px;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--gradient);
    border-radius: 50%;
    border: 4px solid var(--dark-bg);
    z-index: 1;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.timeline-content {
    width: 45%;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.timeline-item:nth-child(even) .timeline-content {
    text-align: left;
}

.timeline-item:nth-child(odd) .timeline-content {
    text-align: right;
}

.timeline-content:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.timeline-content h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.timeline-content p {
    color: var(--gray-text);
    line-height: 1.6;
}

/* ===== PROJECTS SECTION ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    transform: scale(1.2) rotate(360deg);
}

.project-content {
    padding: 30px;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.project-content p {
    color: var(--gray-text);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 8px 15px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ===== CONTACT SECTION ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--gray-text);
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.contact-text h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.contact-text a,
.contact-text p {
    color: var(--gray-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-text a:hover {
    color: var(--primary-color);
}

.contact-form-wrapper {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    color: var(--light-text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
    cursor: pointer;
}

/* ===== FOOTER ===== */
.footer {
    padding: 40px 20px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    color: var(--gray-text);
}

.footer-text i {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    gap: 15px;
}

/* ===== SCROLL TO TOP ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        justify-content: flex-end;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        text-align: left !important;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        padding: 20px;
        transition: left 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

