:root {
    --primary: #00d2ff;
    --primary-gradient: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    --bg-dark: #0a0a12;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-nav: rgba(10, 10, 18, 0.85);
    --text-main: #e6e6e6;
    --text-dim: #a0a0b0;
    --accent-pink: #f5576c;
    --accent-gold: #fddb92;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* =============================================
   LIGHT THEME — COMPLETE OVERRIDE
   ============================================= */
.light-theme {
    --bg-dark: #f8f9fc;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.92);
    --text-main: #1a1a2e;
    --text-dim: #5a5a72;
    --primary: #0891b2;
    --primary-gradient: linear-gradient(135deg, #0891b2 0%, #1d4ed8 100%);
}

/* Hero */
.light-theme .hero {
    background: radial-gradient(circle at 10% 20%, rgba(8, 145, 178, 0.06) 0%, transparent 60%);
}

/* Stats */
.light-theme .stats {
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Cards (skills, projects, timeline, education) */
.light-theme .skill-category {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.light-theme .skill-category::before {
    background: radial-gradient(circle at top left, rgba(8, 145, 178, 0.05), transparent 70%);
}

.light-theme .skill-category:hover {
    box-shadow: 0 8px 30px rgba(8, 145, 178, 0.12);
    border-color: rgba(8, 145, 178, 0.3);
}

.light-theme .project-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.light-theme .project-card:hover {
    box-shadow: 0 8px 30px rgba(8, 145, 178, 0.15);
    border-color: rgba(8, 145, 178, 0.4);
}

.light-theme .timeline::after {
    background: rgba(0, 0, 0, 0.08);
}

.light-theme .timeline-content {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.light-theme .edu-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

/* Skill tags */
.light-theme .skill-list span {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(8, 145, 178, 0.04);
}

.light-theme .skill-list span:hover {
    background: rgba(8, 145, 178, 0.08);
}

/* Project tags */
.light-theme .tags span {
    background: rgba(8, 145, 178, 0.08);
}

/* Education date badge */
.light-theme .edu-date {
    background: rgba(8, 145, 178, 0.08);
}

/* Category icons */
.light-theme .category-icon {
    background: rgba(8, 145, 178, 0.08);
    border: 1px solid rgba(8, 145, 178, 0.15);
}

/* Contact form */
.light-theme .contact-form input,
.light-theme .contact-form textarea {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

.light-theme .contact-form input:focus,
.light-theme .contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
    background: #ffffff;
}

.light-theme .contact-item i {
    background: rgba(8, 145, 178, 0.08);
}

/* Social links */
.light-theme .social-links a {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-dim);
}

.light-theme .social-links a:hover {
    color: #fff;
}

/* Hero image */
.light-theme .img-wrapper img {
    border: 5px solid rgba(0, 0, 0, 0.06);
}

.light-theme .about-card img {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Modal */
.light-theme .modal {
    background-color: rgba(255, 255, 255, 0.3);
}

.light-theme .modal-content {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.light-theme .modal-img-overlay {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 60%, rgba(255, 255, 255, 1) 100%);
}

.light-theme .modal-description {
    color: var(--text-main);
    font-weight: 500;
}

.light-theme .modal-section {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

.light-theme .close-modal {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-main);
    border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .close-modal:hover {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
}

/* Footer */
.light-theme .footer {
    background: #eef0f4;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.light-theme .footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Mouse scroll indicator */
.light-theme .mouse {
    border-color: var(--text-dim);
}

/* Floating badge */
.light-theme .floating-badge {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* Navbar scrolled state */
.light-theme .navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Loader */
.light-theme #loader {
    background: #f8f9fc;
}

/* Scroll Progress */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--primary-gradient);
    z-index: 9999;
    box-shadow: 0 0 10px var(--primary);
}

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 5%; /* Flexible padding for large screens */
}

.grid {
    display: grid;
    gap: 40px;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: inline-block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.section-title {
    font-size: 42px;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
}

.btn.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.2);
}

.btn.primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--primary);
}

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

.btn.secondary:hover {
    background: rgba(0, 210, 255, 0.1);
    transform: translateY(-5px);
}

/* Navbar */
.navbar {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: var(--bg-nav);
    backdrop-filter: blur(15px);
    height: 70px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    -webkit-text-fill-color: initial;
    /* Fix for transparent background clip */
}

.logo span {
    color: var(--text-main);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dim);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-main);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background: radial-gradient(circle at 10% 20%, rgba(0, 210, 255, 0.1) 0%, transparent 60%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    position: relative;
    z-index: 1;
    padding-bottom: 80px;
}

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

.greeting {
    font-size: 18px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.hero h1 {
    font-size: clamp(48px, 8vw, 76px);
    margin-bottom: 10px;
    line-height: 1.1;
}

.hero .dynamic-text {
    font-size: clamp(24px, 4vw, 32px);
    color: var(--text-dim);
    margin-bottom: 30px;
}

.hero-description {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--primary-gradient);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.2);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.img-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: var(--primary-gradient);
    border: 5px solid rgba(255, 255, 255, 0.1);
    animation: morph 8s ease-in-out infinite alternate;
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

.floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: float 4s ease-in-out infinite;
}

.badge-1 {
    top: 50px;
    right: -20px;
}

.badge-2 {
    bottom: 50px;
    left: -20px;
    animation-delay: 2s;
}

@keyframes float {

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

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

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 14px;
}

.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid var(--text-dim);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
}

/* Stats Section */
.stats {
    background: var(--bg-card);
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats .grid {
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.stat-item .number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.stat-item .label {
    color: var(--text-dim);
    font-size: 16px;
    font-weight: 500;
}

/* About Section */
.about .grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 80px;
    align-items: center;
}

.about-card {
    position: relative;
}

.about-card img {
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100%;
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--primary-gradient);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 180px;
    box-shadow: 0 15px 30px rgba(0, 210, 255, 0.3);
}

.experience-badge h3 {
    font-size: 36px;
    margin-bottom: 5px;
}

.experience-badge p {
    font-size: 14px;
    font-weight: 500;
}

.personal-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item .prop {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 5px;
}

.info-item .val {
    font-size: 16px;
    color: var(--text-dim);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.skill-category {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(0, 210, 255, 0.1), transparent 70%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.skill-category:hover::before {
    opacity: 1;
}

.skill-category:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 210, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 210, 255, 0.15);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.category-icon {
    font-size: 28px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(0, 210, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.skill-category h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.skill-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.skill-list span {
    background: transparent;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-list span:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 210, 255, 0.05);
    transform: translateY(-2px);
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 210, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0);
    }
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
    animation: pulseGlow 2s infinite;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.date {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}

.timeline-content h3 {
    margin: 10px 0 5px;
}

.timeline-content h4 {
    color: var(--text-dim);
    margin-bottom: 15px;
    font-weight: 500;
}

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

.project-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 210, 255, 0.5);
    box-shadow: 0 15px 40px rgba(0, 210, 255, 0.2);
}

.project-img {
    height: 220px;
    overflow: hidden;
}

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

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

.project-info {
    padding: 30px;
}

.project-info h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-dim);
    font-size: 15px;
    margin-bottom: 20px;
    height: 60px;
    overflow: hidden;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    font-size: 12px;
    padding: 4px 12px;
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
}

/* Education Section */
.edu-timeline {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.edu-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    transition: var(--transition);
}

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

.edu-content {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 40px;
    align-items: flex-start;
}

.edu-date {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(0, 210, 255, 0.1);
    padding: 10px 20px;
    border-radius: 15px;
    text-align: center;
}

.edu-details h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.edu-details .institution {
    font-size: 16px;
    color: var(--text-dim);
    margin-bottom: 15px;
    display: block;
}

.grade {
    margin-bottom: 15px;
    font-size: 15px;
}

.grade strong {
    color: var(--primary);
}

.desc {
    color: var(--text-dim);
    font-size: 15px;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(5, 5, 8, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background: rgba(15, 15, 25, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    margin: 50px auto;
    margin-bottom: 50px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    width: 90%;
    max-width: 950px;
    border-radius: 30px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes modalScale {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }

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

.close-modal {
    position: absolute;
    right: 30px;
    top: 25px;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.close-modal:hover {
    background: var(--primary);
    color: #fff;
    transform: rotate(90deg) scale(1.1);
    border-color: transparent;
}

/* Modal Details Specifics */
.modal-img-group {
    position: relative;
    width: 100%;
    height: 380px;
}

.modal-header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 15, 25, 0) 0%, rgba(15, 15, 25, 0.4) 60%, rgba(15, 15, 25, 1) 100%);
    pointer-events: none;
}

.modal-body {
    padding: 0 50px 50px;
    position: relative;
    z-index: 2;
    margin-top: -30px;
}

.modal-title {
    font-size: 48px;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.modal-tech-tags {
    margin-bottom: 35px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.modal-tech-tags .tech-pill {
    font-size: 13px;
    padding: 6px 16px;
    background: rgba(0, 210, 255, 0.08);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid rgba(0, 210, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.modal-description {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 45px;
    color: #fff;
    font-weight: 300;
}

.modal-section {
    margin-bottom: 35px;
    background: rgba(255, 255, 255, 0.02);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-section h4 {
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-section p {
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1.7;
}

.modal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.6;
    padding: 0;
}

.modal-list li::before {
    display: none;
}

.modal-list li i {
    color: var(--primary);
    font-size: 18px;
    margin-top: 3px;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

/* Contact Section */
.contact-grid {
    grid-template-columns: 0.8fr 1.2fr;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-item i {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

/* Footer */
.footer {
    padding: 60px 0 40px;
    background: #050508;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a {
    font-size: 20px;
    color: var(--text-dim);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    font-size: 14px;
}

.footer-bottom i {
    color: #f5576c;
}

/* =============================================================================
   RESPONSIVE DESIGN SYSTEM
   Breakpoints: 1440 → 1024 → 991 → 768 → 600 → 480 → 400 → 360 → 320
   ============================================================================= */

/* ── 1440px: Large Desktops ── */
@media (max-width: 1440px) {
    .container {
        max-width: 1100px;
    }
}

/* ── 1024px: Tablets Landscape / Small Desktops ── */
@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-bottom: 40px;
    }

    .hero-btns,
    .social-links {
        justify-content: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
        max-width: 600px;
    }

    .img-wrapper {
        width: 320px;
        height: 320px;
        margin: 0 auto;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── 991px: Tablets Portrait ── */
@media (max-width: 991px) {
    .stats .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .about .grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-img {
        max-width: 500px;
        margin: 0 auto;
    }

    .timeline::after {
        left: 40px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 80px;
    }

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

    .timeline-dot {
        left: 30px !important;
    }

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

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

    .personal-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── 768px: Mobile Menu + Major Layout Shift ── */
@media (max-width: 768px) {
    .menu-btn {
        display: block;
        min-width: 44px;
        min-height: 44px;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        right: 0;
        transform: translateX(100%);
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--bg-nav);
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        gap: 0;
        transition: var(--transition);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        overflow-y: auto;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 16px 20px;
        font-size: 18px;
        min-height: 44px;
    }

    .nav-controls {
        justify-content: center;
        padding: 20px 0;
        gap: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        margin-top: 10px;
    }

    .light-theme .nav-controls {
        border-top-color: rgba(0, 0, 0, 0.08);
    }

    .section-title {
        font-size: 30px;
    }

    .section-subtitle {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .section {
        padding: 60px 0;
    }

    .input-group {
        grid-template-columns: 1fr;
    }

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

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

    .hero-btns {
        flex-wrap: wrap;
        gap: 12px;
    }

    .hero-btns .btn {
        min-width: 160px;
        justify-content: center;
    }

    .img-wrapper {
        width: 260px;
        height: 260px;
    }

    .scroll-down {
        display: none;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-body {
        padding: 30px 25px;
    }

    .modal-img-group {
        height: 240px;
    }

    .modal-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .close-modal {
        top: 10px;
        right: 15px;
        font-size: 28px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .experience-badge {
        position: absolute;
        right: -10px;
        bottom: -20px;
        margin: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        max-width: 150px;
        z-index: 2;
    }

    .footer-top {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 46px;
        height: 46px;
    }
}

/* ── 600px: Education + Modal Full-Screen ── */
@media (max-width: 600px) {
    .edu-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .edu-date {
        display: inline-block;
        font-size: 14px;
        padding: 6px 14px;
    }

    .edu-item {
        padding: 20px;
    }

    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        min-height: 100vh;
    }

    .modal-img-group {
        height: 180px;
    }

    .modal-header-img {
        border-radius: 0;
    }

    .modal-body {
        padding: 25px 20px;
        margin-top: -20px;
    }

    .modal-title {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .modal-tech-tags {
        gap: 8px;
        margin-bottom: 25px;
    }

    .modal-tech-tags .tech-pill,
    .tags span {
        font-size: 11px;
        padding: 4px 12px;
    }

    .modal-description {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 30px;
    }

    .modal-section {
        padding: 20px;
        margin-bottom: 25px;
        border-radius: 15px;
    }

    .modal-section h4 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .modal-section p,
    .modal-list li {
        font-size: 14px;
    }

    .personal-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .contact-item {
        padding: 15px;
    }

    .contact-item i {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .stat-item .number {
        font-size: 36px;
    }

    .stat-item .label {
        font-size: 13px;
    }
}

/* ── 480px: Small Phones ── */
@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .img-wrapper {
        width: 220px;
        height: 220px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .dynamic-text {
        font-size: 18px;
    }

    .hero-description {
        font-size: 14px;
        line-height: 1.7;
    }

    .greeting {
        font-size: 14px;
    }

    .section-title {
        font-size: 26px;
    }

    .section-subtitle {
        font-size: 11px;
    }

    .skill-category {
        padding: 22px;
    }

    .skill-category h3 {
        font-size: 16px;
    }

    .skill-list span {
        font-size: 12px;
        padding: 5px 10px;
    }

    .project-info {
        padding: 18px;
    }

    .project-info h3 {
        font-size: 18px;
    }

    .project-info p {
        font-size: 13px;
    }

    .stats .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-item {
        padding: 20px 10px;
    }

    .stat-item .number {
        font-size: 32px;
    }

    .stat-item .label {
        font-size: 12px;
    }

    /* Timeline */
    .timeline::after {
        left: 18px;
    }

    .timeline-item {
        padding-left: 48px;
        padding-right: 5px;
    }

    .timeline-dot {
        left: 10px !important;
        width: 16px;
        height: 16px;
    }

    .timeline-content {
        padding: 18px;
    }

    .timeline-content h3 {
        font-size: 17px;
    }

    .timeline-content h4 {
        font-size: 14px;
    }

    .timeline-content time {
        font-size: 12px;
    }

    .timeline-content p {
        font-size: 13px;
    }

    .btn {
        padding: 12px 22px;
        font-size: 14px;
        min-width: 140px;
    }

    .social-links a {
        width: 44px;
        height: 44px;
    }

    .about-content p {
        font-size: 14px;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 14px;
        font-size: 14px;
    }

    .contact-form button {
        width: 100%;
    }

    .modal-list li {
        font-size: 13px;
    }
}

/* ── 400px: Compact Phones (iPhone SE, Galaxy S series) ── */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 32px;
    }

    .dynamic-text {
        font-size: 16px;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .hero-btns .btn {
        width: 100%;
    }

    .section-title {
        font-size: 24px;
    }

    .img-wrapper {
        width: 200px;
        height: 200px;
    }

    .project-img {
        height: 160px;
    }

    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .experience-badge h3 {
        font-size: 26px;
    }

    .experience-badge p {
        font-size: 12px;
    }
}

/* ── 360px: Very Small Phones ── */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .dynamic-text {
        font-size: 15px;
    }

    .section-title {
        font-size: 22px;
    }

    .img-wrapper {
        width: 180px;
        height: 180px;
    }

    .skill-list {
        grid-template-columns: 1fr;
    }

    .skill-list span {
        font-size: 11px;
    }

    .project-img {
        height: 140px;
    }

    .project-info h3 {
        font-size: 16px;
    }

    .timeline-content {
        padding: 15px;
    }

    .timeline-content h3 {
        font-size: 15px;
    }

    .stat-item .number {
        font-size: 28px;
    }

    .stat-item .label {
        font-size: 11px;
    }

    .about-content p {
        font-size: 13px;
    }

    .info-item {
        font-size: 13px;
    }

    #back-to-top {
        width: 44px;
        height: 44px;
        bottom: 16px;
        right: 16px;
        font-size: 16px;
    }

    .nav-links a {
        font-size: 16px;
        padding: 14px 16px;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-list li {
        font-size: 12px;
        margin-bottom: 8px;
    }
}

/* ── 320px: Absolute Minimum (Old devices / Galaxy Fold) ── */
@media (max-width: 320px) {
    .container {
        padding: 0 10px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .dynamic-text {
        font-size: 14px;
    }

    .greeting {
        font-size: 12px;
    }

    .section-title {
        font-size: 20px;
    }

    .section-subtitle {
        font-size: 10px;
    }

    .img-wrapper {
        width: 160px;
        height: 160px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 13px;
        min-width: unset;
    }

    .stat-item .number {
        font-size: 24px;
    }

    .stat-item .label {
        font-size: 10px;
    }

    .skill-category {
        padding: 16px;
    }

    .skill-category h3 {
        font-size: 14px;
    }

    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .project-info {
        padding: 14px;
    }

    .project-info h3 {
        font-size: 15px;
    }

    .project-info p {
        font-size: 12px;
    }

    .tags span {
        font-size: 10px;
        padding: 3px 8px;
    }

    .timeline-content h3 {
        font-size: 14px;
    }

    .timeline-content p {
        font-size: 12px;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 12px;
        font-size: 13px;
    }

    .footer-bottom p {
        font-size: 12px;
    }

    .nav-avatar {
        width: 32px;
        height: 32px;
    }

    .logo span {
        font-size: 18px;
    }
}

/* =============================================
   CUSTOM CURSOR (desktop only)
   ============================================= */
.custom-cursor {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    display: none;
}

.custom-cursor-ring {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, transform 0.1s ease-out;
    display: none;
    mix-blend-mode: difference;
}

/* Show cursor only on devices with a precise pointer (mouse) */
@media (pointer: fine) {

    .custom-cursor,
    .custom-cursor-ring {
        display: block;
    }
}

/* Hide cursor on touch devices explicitly */
@media (hover: none) and (pointer: coarse) {

    .custom-cursor,
    .custom-cursor-ring {
        display: none !important;
    }
}

.custom-cursor.expand {
    width: 0px;
    height: 0px;
}

.custom-cursor-ring.expand {
    width: 70px;
    height: 70px;
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--accent-pink);
    mix-blend-mode: normal;
}

.modal-list li {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* =============================================
   NAV CONTROLS (Theme + Language buttons)
   ============================================= */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

#theme-toggle,
#lang-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
}

#theme-toggle:hover,
#lang-toggle:hover {
    color: var(--primary);
    transform: scale(1.1);
    background: rgba(0, 210, 255, 0.08);
}

#theme-toggle.spinning i {
    animation: toggleSpin 0.5s ease;
}

@keyframes toggleSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.3);
    }

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

#lang-toggle {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.light-theme #lang-toggle {
    border-color: rgba(0, 0, 0, 0.12);
}

/* =============================================
   BACK TO TOP BUTTON
   ============================================= */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.3);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.4);
}

/* =============================================
   RTL (Arabic) SUPPORT
   ============================================= */
[dir="rtl"] body {
    font-family: 'Noto Kufi Arabic', 'Plus Jakarta Sans', sans-serif;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] .logo {
    font-family: 'Noto Kufi Arabic', 'Outfit', sans-serif;
}

[dir="rtl"] #scroll-progress {
    left: auto;
    right: 0;
}

[dir="rtl"] .nav-links a.active::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .experience-badge {
    right: auto;
    left: -30px;
}

[dir="rtl"] .badge-1 {
    right: auto;
    left: -20px;
}

[dir="rtl"] .badge-2 {
    left: auto;
    right: -20px;
}

[dir="rtl"] .edu-item:hover {
    transform: translateX(-10px);
}

[dir="rtl"] .close-modal {
    right: auto;
    left: 25px;
}

[dir="rtl"] .modal-list li {
    padding-left: 0;
    padding-right: 25px;
}

[dir="rtl"] .modal-list li::before {
    left: auto;
    right: 0;
    content: '←';
}

[dir="rtl"] #back-to-top {
    right: auto;
    left: 30px;
}

/* RTL Timeline (desktop) */
[dir="rtl"] .timeline::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[dir="rtl"] .timeline-item:nth-child(odd) {
    left: auto;
    right: 0;
}

[dir="rtl"] .timeline-item:nth-child(even) {
    left: auto;
    right: 50%;
}

[dir="rtl"] .timeline-item:nth-child(odd) .timeline-dot {
    right: auto;
    left: -10px;
}

[dir="rtl"] .timeline-item:nth-child(even) .timeline-dot {
    left: auto;
    right: -10px;
}

/* RTL responsive */
@media (max-width: 991px) {
    [dir="rtl"] .timeline::after {
        left: auto;
        right: 40px;
    }

    [dir="rtl"] .timeline-item {
        padding-left: 10px;
        padding-right: 80px;
    }

    [dir="rtl"] .timeline-item:nth-child(even) {
        left: auto;
        right: 0;
    }

    [dir="rtl"] .timeline-dot {
        left: auto !important;
        right: 30px !important;
    }
}

@media (max-width: 768px) {
    [dir="rtl"] .nav-links {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }

    [dir="rtl"] .nav-links.active {
        transform: translateX(0);
    }

    [dir="rtl"] #back-to-top {
        left: 20px;
    }
}

@media (max-width: 480px) {
    [dir="rtl"] .timeline::after {
        left: auto;
        right: 18px;
    }

    [dir="rtl"] .timeline-item {
        padding-left: 5px;
        padding-right: 48px;
    }

    [dir="rtl"] .timeline-dot {
        left: auto !important;
        right: 10px !important;
    }

    [dir="rtl"] .experience-badge {
        left: auto;
        right: auto;
    }

    [dir="rtl"] .close-modal {
        right: auto;
        left: 15px;
    }
}

@media (max-width: 360px) {
    [dir="rtl"] #back-to-top {
        left: 16px;
    }
}