* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0a0a0a;
    --secondary-color: #ffffff;
    --accent-color: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #ec4899;
    --text-color: #ffffff;
    --text-light: #a1a1aa;
    --text-muted: #71717a;
    --bg-color: #111111;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #262626;
    --border-color: #333333;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-tertiary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-dark: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    --shadow: 0 25px 50px rgba(0,0,0,0.5);
    --shadow-colored: 0 25px 50px rgba(99, 102, 241, 0.3);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --glow: 0 0 30px rgba(99, 102, 241, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--primary-color);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 70%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 70%),
        radial-gradient(circle at 40% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

#cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    opacity: 0;
}

#cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: all 0.15s ease;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--primary-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 70%),
        radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    z-index: 1;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hero-content {
    text-align: center;
    z-index: 3;
    position: relative;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: 1rem;
    overflow: hidden;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.hero-title .line {
    display: block;
    transform: translateY(100%);
    opacity: 0;
    position: relative;
}

.hero-title .line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    z-index: -1;
    border-radius: 10px;
    transform: skew(-15deg);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-light);
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 30px;
    background: var(--gradient-primary);
    animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(50px);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.contact .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.about {
    padding: 8rem 0;
    background: var(--primary-color);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 80%),
        radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.06) 0%, transparent 80%);
    z-index: 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    transform: scale(0.8);
    opacity: 0;
    box-shadow: var(--shadow-colored);
    border: 1px solid var(--border-color);
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.image-wrapper:hover::before {
    opacity: 0.2;
}

.profile-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: brightness(1.1) contrast(1.1);
}

.image-wrapper:hover .profile-img {
    transform: scale(1.05);
    filter: brightness(1) contrast(1.2);
}

.about-content {
    opacity: 0;
    transform: translateX(50px);
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.skill-item {
    background: var(--bg-tertiary);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    color: var(--text-color);
    z-index: 1;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.skill-item:hover::before {
    left: 0;
}

.skill-item:hover {
    color: #ffffff !important;
    transform: translateY(-5px);
    box-shadow: var(--shadow-colored);
    border-color: transparent;
}

.skill-item span {
    position: relative;
    z-index: 2;
}

.skill-item:hover span {
    color: #ffffff !important;
}

.projects {
    padding: 8rem 0;
    background: var(--primary-color);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 50%, rgba(75, 172, 254, 0.06) 0%, transparent 80%),
        radial-gradient(circle at 70% 20%, rgba(0, 242, 254, 0.06) 0%, transparent 80%);
    z-index: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg-tertiary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    opacity: 0;
    transform: translateY(50px);
    border: 1px solid var(--border-color);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 0.05;
}

.project-card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: var(--shadow-colored);
    border-color: var(--accent-color);
}

.project-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: brightness(0.9) contrast(1.1);
}

.project-card:hover .project-thumb {
    transform: scale(1.1);
    filter: brightness(1) contrast(1.2);
}

.project-info {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tag {
    background: var(--bg-color);
    padding: 0.4rem 1rem;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.project-tag:hover {
    background: var(--accent-color);
    color: var(--secondary-color);
    border-color: var(--accent-color);
}

.contact {
    padding: 8rem 0;
    background: var(--primary-color);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 80%),
        var(--gradient-dark);
    z-index: 0;
}

.contact .section-title {
    color: var(--text-color);
}

.contact-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.contact-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    opacity: 0;
    transform: translateY(30px);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 1.2rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: 0;
}

.contact-link:hover::before {
    left: 0;
}

.contact-link:hover {
    color: var(--secondary-color);
    transform: translateY(-8px);
    box-shadow: var(--shadow-colored);
    border-color: transparent;
}

.contact-link span {
    position: relative;
    z-index: 1;
}

.contact-icon {
    font-size: 1.3rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: var(--bg-tertiary);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90%;
    overflow: hidden;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-colored);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent-color);
    color: var(--secondary-color);
    border-color: var(--accent-color);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-tertiary);
}

.modal-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.modal-description {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1.05rem;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
}

.modal-tag {
    background: var(--bg-color);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.modal-link {
    background: var(--gradient-primary);
    color: var(--secondary-color);
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
    align-self: flex-start;
    box-shadow: var(--shadow-colored);
}

.modal-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
        border-right: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .about-image {
        order: 2;
    }

    .about-content {
        order: 1;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image {
        height: 250px;
    }

    .modal-info {
        padding: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    #cursor,
    #cursor-follower {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .project-card {
        margin-bottom: 1rem;
    }
}
