* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #2d3748;
    --text-light: #718096;
    --background-dark: #1a202c;
    --background-light: #f7fafc;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --text-dark: #e2e8f0;
    --text-light: #a0aec0;
    --background-dark: #1a202c;
    --background-light: #2d3748;
    --white: #2d3748;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.5);
    --navbar-bg: rgba(45, 55, 72, 0.95);
    --card-bg: #2d3748;
    --border-color: #4a5568;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: var(--background-light);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Cursor - Improved */
.cursor {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, background-color 0.15s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.25s ease, border-color 0.25s ease;
    background: transparent;
    opacity: 0.7;
}

.cursor.hover {
    transform: scale(1.5);
    background: var(--accent-color);
}

.cursor-follower.hover {
    transform: scale(1.8);
    border-color: var(--accent-color);
    opacity: 1;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    background: var(--navbar-bg);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-text {
    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-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    cursor: pointer;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    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%;
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.dark-mode-toggle:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff08" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    color: var(--white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.typing-text {
    position: relative;
}

.typing-text::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Profile Card */
.profile-card {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.profile-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 50px auto;
    position: relative;
    z-index: 2;
}

.profile-avatar i {
    font-size: 4rem;
    color: var(--white);
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.floating-element {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 4s ease-in-out infinite;
}

.floating-element i {
    font-size: 1.5rem;
    color: var(--white);
}

.floating-element.java {
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.floating-element.html {
    top: 20px;
    right: 20px;
    animation-delay: 0.8s;
}

.floating-element.css {
    bottom: 20px;
    left: 20px;
    animation-delay: 1.6s;
}

.floating-element.js {
    bottom: 20px;
    right: 20px;
    animation-delay: 2.4s;
}

.floating-element.python {
    top: 50%;
    left: 0;
    animation-delay: 3.2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
    40% { transform: translateY(-10px) rotate(45deg); }
    60% { transform: translateY(-5px) rotate(45deg); }
}

/* Common Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--background-light);
    position: relative;
    z-index: 10;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.contact-info {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.achievements {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.achievements h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.achievement-item i {
    color: #f6ad55;
    font-size: 1.5rem;
}

.languages {
    margin-top: 2rem;
}

.languages h4 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.language-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.proficiency {
    width: 100px;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.proficiency.native::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
}

.proficiency.professional::before {
    content: '';
    display: block;
    width: 80%;
    height: 100%;
    background: var(--gradient-primary);
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background: var(--card-bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.skill-category:hover {
    transform: translateY(-10px);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.skill-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-dark);
}

.skill-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.skill-item span {
    font-weight: 500;
    color: var(--text-dark);
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--background-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.project-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-dark);
}

.project-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.project-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.project-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.academic-projects h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-dark);
}

.academic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.academic-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.academic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-dark);
}

.academic-card h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.academic-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-type {
    background: var(--gradient-accent);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Education Section */
.education {
    padding: 100px 0;
    background: var(--card-bg);
}

.education-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 80px;
}

.timeline-marker {
    position: absolute;
    left: 20px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--card-bg);
    box-shadow: var(--shadow);
}

.timeline-content {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-dark);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.institution {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.field {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.year {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.grade {
    font-weight: 600;
    color: var(--secondary-color);
}

.certifications h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-dark);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.cert-card {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-dark);
}

.cert-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cert-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.cert-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--background-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info-section h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-info-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.contact-method:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-dark);
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-method h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--text-dark);
}

.contact-method p {
    color: var(--text-light);
    margin: 0;
}

.interests-section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.interest-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.interest-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-dark);
}

.interest-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.interest-item span {
    font-weight: 500;
    color: var(--text-dark);
}

/* Footer */
.footer {
    background: var(--background-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

[data-theme="dark"] .footer {
    background: #1a1a1a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--navbar-bg);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        height: calc(100vh - 70px);
        overflow-y: auto;
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 80px 20px 40px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .profile-card {
        width: 250px;
        height: 250px;
    }
    
    .profile-avatar {
        width: 150px;
        height: 150px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .academic-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .interests-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        padding-left: 60px;
    }
    
    .education-timeline::before {
        left: 20px;
    }
    
    .timeline-marker {
        left: 10px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .skill-items {
        grid-template-columns: 1fr;
    }
    
    .project-tech {
        justify-content: center;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .dark-mode-toggle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--primary-color);
    color: var(--white);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-light);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: scale(1.1);
}

/* Performance optimizations */
* {
    backface-visibility: hidden;
    perspective: 1000px;
}

.container {
    transform: translateZ(0);
}
