/* CSS Reset & Variables */
:root {
    --primary: #6C63FF;
    --primary-dark: #5a52d5;
    --secondary: #FF6584;
    --dark: #121212;
    --dark-light: #1e1e1e;
    --light: #ffffff;
    --gray: #8a8a8a;
    --gray-light: #e0e0e0;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.3);
    --border-radius: 10px;
    --navbar-height: 70px;
}

[data-theme="light"] {
    --bg: #f8f9fa;
    --bg-secondary: #ffffff;
    --text: #333333;
    --text-secondary: #666666;
    --card-bg: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --tagborder: black;
}

[data-theme="dark"] {
    --bg: #292828;
    --bg-secondary: #1e1e1e;
    --text: #ffffff;
    --text-secondary: #b0b0b0;
    --card-bg: #1e1e1e;
    --border: #333333;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --tagborder: white;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 100px 0;
    /* scroll-margin-top: calc(var(--navbar-height) + 20px); */
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Loading Screen */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: transparent;
    z-index: 1000;
    transition: var(--transition);
}

#navbar.scrolled {
    background: var(--bg-secondary);
    box-shadow: var(--shadow);
    padding: 15px 0;
    --navbar-height: 60px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);

}

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

.nav-link {
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

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

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

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.theme-toggle,
.mobile-toggle {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover,
.mobile-toggle:hover {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
}

/* Hero Section */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape2 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    bottom: 10%;
    right: 10%;
    animation-delay: 2s;
}

.shape3 {
    width: 230px;
    height: 230px;
    background: var(--primary);
    top: 1085%;
    left: 3%;
    animation-delay: 0s;
}

.shape4 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    top: 1156%;
    right: 4%;
    animation-delay: 2s;
}

@keyframes float {

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

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

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.tech-stack {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 2.5rem;
    color: var(--text-secondary);
}

.tech-icon {
    transition: var(--transition);
}

.tech-icon:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    transform: translateY(-5px);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    margin-top: 3rem;
}

.profile-img {
    width: 100%;
    max-width: 400px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.profile-img:hover {
    transform: translateY(-5px);
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.quick-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.fact-item {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.fact-item:hover {
    transform: translateY(-5px);
}

.fact-item strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

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

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 25px;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;

}

.skill-name span i {
    font-size: 30px;
}

.skill-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    width: 0;
    transition: width 1.5s ease;
    border-radius: 4px;
}

.skill-item.animate .skill-progress {
    width: var(--progress);
}

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

.project-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 1em;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-content {
    padding: 1.5rem;
}

.project-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-content h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: transparent;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--secondary)) 1;

    transition: var(--transition)
}

.tag:hover {
    transform: translateY(-5px);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.link-demo,
.link-code {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.link-demo {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.link-demo:hover {
    background: var(--primary-dark);
}

.link-code {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.link-code:hover {
    background: var(--primary);
    color: white;
}

/* Experience Section */
.timeline {
    max-width: 800px;
    margin: 3rem auto 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--primary);
    transform: translateX(-50%);
}

.timeline-item {
    width: calc(50% - 30px);
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    margin-right: auto;
}

.timeline-item:nth-child(even) {
    margin-left: auto;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    transition: all 0.1s ease-in-out;
}

.timeline-item::before:hover {
    transform: translateY(-5px);
}

.timeline-item:nth-child(odd)::before {
    right: -40px;
}

.timeline-item:nth-child(even)::before {
    left: -40px;
}

.timeline-item fade-in visible {
    transition: all 0.1s ease-in-out;
}

.timeline-item fade-in visible:hover {
    transform: translateY(-5px);
}


.timeline-year {
    background: var(--primary);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: 600;
}

.timeline-item h3 {
    margin-bottom: 0.5rem;
}

.timeline-item h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

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

/* Testimonials Section */
.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--primary);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.testimonial-author {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.testimonial-position {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-size: 1rem;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}


.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.info-icon:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    border: 2px solid var(--primary)
}

/* From Uiverse.io by gharsh11032000 */
.button1 {
    cursor: pointer;
    position: relative;
    padding: 10px 24px;
    font-size: 18px;
    color: var(--secondary);
    border: 2px solid var(--primary);
    border-radius: 34px;
    background-color: transparent;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    overflow: hidden;
}

.button1::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 50px;
    height: 50px;
    border-radius: inherit;
    scale: 0;
    z-index: -1;

    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.button1:hover::before {
    scale: 3;
}

.button1:hover {
    color: whitesmoke;
    scale: 1.1;
    box-shadow: 0 0px 20px rgba(233, 191, 229, 0.4);
}

.button1:active {
    scale: 1;
}




.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: translateY(-3px);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 3rem 0;
    text-align: center;
}

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

.footer-links a {
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    color: var(--text-secondary);
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: translateY(-3px);
}



/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        width: 95%;
        max-width: 1140px;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .profile-img {
        max-width: 300px;
        margin: 0 auto;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: calc(100% - 60px);
        margin-left: 60px;
    }

    .timeline-item:nth-child(odd)::before,
    .timeline-item:nth-child(even)::before {
        left: -40px;
    }

    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .testimonials-slider {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--navbar-height);
        right: -100%;
        flex-direction: column;
        background: var(--bg-secondary);
        width: 80%;
        height: calc(100vh - var(--navbar-height));
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow);
        z-index: 1000;
    }

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

    .mobile-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn {
        width: 200px;
        text-align: center;
    }

    .quick-facts {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tech-stack {
        font-size: 2rem;
        gap: 1.5rem;
        flex-wrap: wrap;
    }

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

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

    .project-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .link-demo,
    .link-code {
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    section {
        padding: 80px 0;
    }
}

@media (max-width: 576px) {
    .container {
        width: 90%;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    .subtitle {
        font-size: 1rem;
    }

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

    .section-subtitle {
        font-size: 1rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .project-content {
        padding: 1rem;
    }

    .tech-tags {
        gap: 0.3rem;
    }

    .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .timeline-item {
        padding: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .info-item {
        padding: 0.5rem;

        gap: 0.5rem;
    }

    .social-links {
        justify-content: center;
    }

    .floating-shapes .shape1 {
        width: 200px;
        height: 200px;
    }

    .floating-shapes .shape2 {
        width: 150px;
        height: 150px;
    }

    .loader-logo {
        font-size: 3rem;
    }

    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 400px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

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

    .skill-category {
        padding: 1rem;
    }

    .project-card {
        margin: 0 -10px;
    }

    .tech-stack {
        font-size: 1.8rem;
        gap: 1rem;
    }

    .nav-menu {
        width: 100%;
    }

    .logo {
        font-size: 1.5rem;
    }

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

/* Mobile Landscape */
@media (max-height: 500px) and (orientation: landscape) {
    #home {
        min-height: 120vh;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .nav-menu {
        height: calc(100vh - 70px);
        overflow-y: auto;
    }
}

/* High-resolution displays */
@media (min-resolution: 192dpi) {
    .profile-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {

    #navbar,
    #backToTop,
    .theme-toggle,
    .mobile-toggle,
    .cta-buttons,
    .project-links {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .section-title::after {
        background: black !important;
    }

    a {
        color: black !important;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in,
    .slide-in-left,
    .slide-in-right {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .skill-progress {
        transition: none;
    }
}

/* Dark mode preference */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --bg: #121212;
        --bg-secondary: #1e1e1e;
        --text: #ffffff;
        --text-secondary: #b0b0b0;
        --card-bg: #1e1e1e;
        --border: #333333;
        --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
}

/* Light mode preference */
@media (prefers-color-scheme: light) {
    [data-theme="auto"] {
        --bg: #f8f9fa;
        --bg-secondary: #ffffff;
        --text: #333333;
        --text-secondary: #666666;
        --card-bg: #ffffff;
        --border: #e0e0e0;
        --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .project-card:hover {
        transform: none;
    }

    .skill-category:hover {
        transform: none;
    }

    .testimonial-card:hover {
        transform: none;
    }

    .fact-item:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .social-link:hover {
        transform: none;
    }

    #backToTop:hover {
        transform: none;
    }

    .nav-link::after {
        display: none;
    }
}

/* Large screens */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }

    .hero-content h1 {
        font-size: 4rem;
    }

    .subtitle {
        font-size: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Ultra-wide screens */
@media (min-width: 2000px) {
    .container {
        max-width: 1800px;
    }

    section {
        padding: 150px 0;
    }

    .hero-content h1 {
        font-size: 5rem;
    }
}

/* Animation codes */
.section-animate,
.fade-in,
.slide-in-left,
.slide-in-right {
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-animate {
    transform: translateY(24px);
}

.fade-in {
    transform: translateY(12px);
}

.slide-in-left {
    transform: translateX(-24px);
}



.section-animate.visible,
.fade-in.visible,
.slide-in-left.visible,
.slide-in-right.visible {
    opacity: 1;
    transform: none;
}





/* Testimonial Cards Animation */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s ease;
}

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


/* Experience Section animation */
/* Modern Experience Section Animations - Responsive Fixed */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: linear-gradient(to bottom,
            transparent,
            var(--primary) 20%,
            var(--primary) 80%,
            transparent);
    transform: translateX(-50%);
    opacity: 0;
    animation: timelineReveal 1.5s ease-out 0.5s forwards;
}

@keyframes timelineReveal {
    0% {
        opacity: 0;
        transform: translateX(-50%) scaleY(0);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) scaleY(1);
    }
}

/* Timeline Items with Glass Morphism */
.timeline-item {
    width: calc(50% - 40px);
    padding: 2rem;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-bottom: 3rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-item:nth-child(odd) {
    margin-right: auto;
}

.timeline-item:nth-child(even) {
    margin-left: auto;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline Connector Dots */
.timeline-item::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 4px solid var(--bg-secondary);
    border-radius: 50%;
    box-shadow:
        0 0 0 2px var(--primary),
        0 0 15px rgba(108, 99, 255, 0.5);
    z-index: 2;
    opacity: 0;
    transform: scale(0);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-item:nth-child(odd)::before {
    right: -42px;
}

.timeline-item:nth-child(even)::before {
    left: -42px;
}

.timeline-item.visible::before {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.4s;
}

/* Year Badge with Gradient */
.timeline-year {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.timeline-year::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.6s ease;
}

.timeline-item:hover .timeline-year::before {
    left: 100%;
}

/* Hover Effects */
.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(108, 99, 255, 0.3);
}

/* Content Animations */
.timeline-item h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline-item h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s ease 0.2s;
}

.timeline-item p {
    color: var(--text-secondary);
    line-height: 1.7;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.3s;
}

.timeline-item.visible h4,
.timeline-item.visible p {
    opacity: 1;
    transform: translate(0);
}

/* Enhanced Background Effects */
.timeline-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(108, 99, 255, 0.05) 0%,
            transparent 50%,
            rgba(255, 101, 132, 0.05) 100%);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-item:hover::after {
    opacity: 1;
}

/* Staggered Animation for Multiple Items */
.timeline-item:nth-child(1) {
    transition-delay: 0.1s;
}

.timeline-item:nth-child(2) {
    transition-delay: 0.2s;
}

/* Mobile Responsive - Fixed */
@media (max-width: 992px) {
    .timeline::before {
        left: 30px;
        animation: timelineRevealMobile 1.5s ease-out 0.5s forwards;
    }

    @keyframes timelineRevealMobile {
        0% {
            opacity: 0;
            transform: translateX(-30px) scaleY(0);
        }

        100% {
            opacity: 1;
            transform: translateX(-30px) scaleY(1);
        }
    }

    .timeline-item {
        width: calc(100% - 60px);
        margin-left: 60px;
        margin-right: 0;
        transform: translateX(-20px) translateY(30px);
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        margin-left: 60px;
        margin-right: 0;
    }

    .timeline-item.visible {
        transform: translateX(0) translateY(0);
    }

    .timeline-item::before {
        left: -46px !important;
        right: auto !important;
        top: 30px;
    }

    /* Remove complex transforms on mobile */
    .timeline-item:hover {
        transform: translateY(-3px);
    }

    .timeline-item h4 {
        transform: translateX(-5px);
    }

    .timeline-item p {
        transform: translateY(5px);
    }
}

/* Small Mobile Devices */
@media (max-width: 576px) {
    .timeline-item {
        width: calc(100% - 50px);
        margin-left: 50px;
        padding: 1.5rem;
    }

    .timeline-item::before {
        left: -40px !important;
        width: 16px;
        height: 16px;
    }

    .timeline::before {
        left: 25px;
    }

    .timeline-item h3 {
        font-size: 1.2rem;
    }

    .timeline-item h4 {
        font-size: 1rem;
    }
}

/* Remove problematic animations for mobile */
@media (max-width: 768px) {

    /* Remove scale transforms on mobile */
    .timeline-item {
        transform: translateY(20px);
    }

    .timeline-item.visible {
        transform: translateY(0);
    }

    /* Simplify hover effects on mobile */
    .timeline-item:hover {
        transform: translateY(-2px);
    }

    /* Remove complex background effects on mobile for performance */
    .timeline-item::after {
        display: none;
    }

    /* Reduce blur effect on mobile */
    .timeline-item {
        backdrop-filter: blur(5px);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .timeline-item:hover {
        transform: none;
    }

    .timeline-item:hover .timeline-year::before {
        left: -100%;
    }

    .timeline-item::before {
        animation: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .timeline::before {
        animation: none;
        opacity: 1;
        transform: translateX(-50%) scaleY(1);
    }

    .timeline-item {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .timeline-item::before {
        opacity: 1;
        transform: scale(1);
        transition: none;
    }

    .timeline-item h4,
    .timeline-item p {
        opacity: 1;
        transform: none;
        transition: none;
    }
}