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

:root {
    --primary-color: #0a0a0a;
    --accent-color: #00ff88;
    --text-light: #ffffff;
    --text-gray: #a0a0a0;
    --background-dark: #0f0f0f;
    --card-bg: rgba(255, 255, 255, 0.02);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-color) 1.5px, transparent 1px);
    background-size: 50px 50px;
    animation: float 60s linear infinite;
}

.bg-animation::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, #00ffff 0.5px, transparent 0.5px);
    background-size: 80px 80px;
    animation: float-reverse 25s linear infinite;
    opacity: 0.6;
}

/* Floating geometric shapes */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.bg-shape-1 {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--accent-color), transparent);
    top: 20%;
    left: 10%;
    animation: float-shape 15s ease-in-out infinite;
}

.bg-shape-2 {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00ffff, transparent);
    top: 60%;
    right: 15%;
    animation: float-shape 12s ease-in-out infinite reverse;
}

.bg-shape-3 {
    width: 80px;
    height: 80px;
    background: linear-gradient(225deg, var(--accent-color), transparent);
    bottom: 30%;
    left: 20%;
    animation: float-shape 18s ease-in-out infinite;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-50px, -50px) rotate(360deg);
    }
}

@keyframes float-reverse {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(30px, 30px) rotate(-360deg);
    }
}

@keyframes float-shape {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translateY(-20px) rotate(90deg) scale(1.1);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-40px) rotate(180deg) scale(0.9);
        opacity: 0.4;
    }

    75% {
        transform: translateY(-20px) rotate(270deg) scale(1.1);
        opacity: 0.5;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    z-index: 1001;
    position: relative;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    transition: all 0.3s ease;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile menu toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: none;
    z-index: 1002;
    position: relative;
    width: 30px;
    height: 30px;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    transition: all 0.3s ease;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: var(--accent-color);
}

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

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: var(--accent-color);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translate(-50%, -50%) scale(1);
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li {
    margin: 2rem 0;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active .mobile-nav-links li {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-links li:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-nav-links li:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-nav-links li:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-nav-links li:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-nav-links li:nth-child(5) {
    transition-delay: 0.5s;
}

.mobile-nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 2rem;
    font-weight: 600;
    display: block;
    padding: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    transition: left 0.5s ease;
}

.mobile-nav-links a:hover::before {
    left: 100%;
}

.mobile-nav-links a:hover {
    color: var(--accent-color);
    transform: scale(1.05);
}

/* Main content */
main {
    margin-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero section */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-light) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.code-snippet {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 3rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    animation: fadeInUp 1s ease 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-light);
}

/* Skills grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.skill-category {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    transition: left 0.5s ease;
}

.skill-category:hover::before {
    left: 100%;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.1);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

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

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

/* Education & Experience */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(10px);
    border-color: var(--accent-color);
}

.timeline-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.timeline-item p {
    color: var(--text-gray);
}

/* Projects grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #00ffff);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.1);
}

.project-card h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Contact section */
.contact {
    text-align: center;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 4rem 2rem;
    border: 1px solid var(--border-color);
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), #00ffff);
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-gray);
}

/* Custom cursor trail effect */
body {
    cursor: none;
}

.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 1;
    box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
    transition: opacity 0.3s ease;
}

.cursor-main {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 5px #ffffff;
}

/* Profile photo */
.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    position: relative;
    overflow: hidden;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
    animation: float-photo 6s ease-in-out infinite;
}

.profile-photo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, var(--accent-color), transparent);
    /* animation: rotate-border 3s linear infinite; */
    z-index: -1;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-photo:hover img {
    transform: scale(1.1);
}

@keyframes float-photo {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate-border {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Social links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    transition: left 0.5s ease;
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.2);
}

.github-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--border-color);
    z-index: 9999;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #00ffff);
    width: 0%;
    transition: width 0.1s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

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

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

    .container {
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .code-snippet {
        font-size: 1rem;
        padding: 0.8rem;
    }

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

    .social-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }

    /* Hide desktop background elements on mobile for better performance */
    .bg-shape {
        display: none;
    }

    /* Optimize mobile animations */
    .bg-animation::after {
        animation-duration: 30s;
    }
}