:root {
    --primary: #6c63ff;
    --primary-dark: #564fd8;
    --primary-light: #a29bfe;
    --secondary: #2d3748;
    --dark: #1a202c;
    --light: #f7fafc;
    --gray: #e2e8f0;
    --dark-gray: #4a5568;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #f56565;
    --info: #4299e1;
}

[data-theme="light"] {
    --primary: #6c63ff;
    --primary-dark: #564fd8;
    --primary-light: #a29bfe;
    --secondary: #2d3748;
    --dark: #f7fafc;
    --light: #1a202c;
    --gray: #2d3748;
    --dark-gray: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background-color: var(--light);
    color: var(--dark);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Particle.js Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%);
}

/* Section Styling */
section {
    padding: 7rem 10%;
    position: relative;
    scroll-margin-top: 120px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-header p {
    color: var(--dark-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* Improved Floating Navigation */
.floating-nav {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    background: rgba(15, 15, 25, 0.8);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 5px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    max-width: 95vw;
    box-sizing: border-box;
}

.floating-nav:hover {
    box-shadow: 0 8px 40px rgba(108, 99, 255, 0.15);
    border-color: rgba(108, 99, 255, 0.2);
}

.nav-container {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    transition: all 0.4s ease;
}

.floating-nav li {
    margin: 0 0.5rem;
    position: relative;
}

.floating-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
    white-space: nowrap;
}

.floating-nav a span {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.floating-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 30px;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.floating-nav a::after {
    content: attr(data-hover);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.floating-nav a:hover {
    color: transparent;
}

.floating-nav a:hover::before {
    transform: scale(1);
    opacity: 1;
}

.floating-nav a:hover::after {
    transform: translateY(0);
    opacity: 1;
}

.floating-nav a:hover span {
    transform: translateY(-100%);
    opacity: 0;
}

/* Navigation Indicator */
.nav-indicator {
    position: absolute;
    bottom: -5px;
    left: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 3;
}

/* Active State */
.floating-nav a.active {
    color: white;
}

.floating-nav a.active::before {
    transform: scale(1);
    opacity: 1;
}

/* Mobile Toggle Button */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0.5rem;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    top: 6px;
}

.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .floating-nav {
        width: auto;
        padding: 0.75rem;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: 20px;
        background: rgba(15, 15, 25, 0.95);
        backdrop-filter: blur(12px);
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        flex-direction: column;
        width: auto;
        min-width: 200px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.4s ease;
    }
    
    .nav-menu.active {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        padding: 1rem 0;
    }
    
    .floating-nav li {
        margin: 0.5rem 1rem;
    }
    
    .nav-indicator {
        display: none;
    }
}

@media (max-width: 576px) {
    .floating-nav {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .nav-menu {
        top: 60px;
        right: 10px;
    }
}
  
/* Improved Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 5%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05) 0%, rgba(44, 44, 84, 0.05) 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    order: 1;
}

.hero-text h6 {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 500;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.3s forwards;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    line-height: 1.2;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.5s forwards;
}

.name-highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.name-highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s;
}

.name-highlight:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hero-text h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    min-height: 2.5rem;
}

.hero-description {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: var(--dark-gray);
    margin-bottom: 2rem;
    max-width: 600px;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.9s forwards;
}

.typing-animation {
    overflow: hidden;
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    margin: 0 0 1.5rem 0;
    letter-spacing: 2px;
    animation: 
        typing 3.5s steps(40, end) 1s forwards,
        blink-caret 0.75s step-end infinite;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 1.1s forwards;
}

.hero-social-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 1.3s forwards;
}

.hero-social {
    display: flex;
    gap: 1.5rem;
}

.hero-social a {
    width: clamp(36px, 4vw, 40px);
    height: clamp(36px, 4vw, 40px);
    border-radius: 50%;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.hero-social a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    order: 2;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

.floating-avatar {
    width: clamp(280px, 30vw, 400px);
    height: clamp(280px, 30vw, 400px);
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    display: flex;
    justify-content: center;
    align-items: center;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 20px 30px rgba(108, 99, 255, 0.3);
    position: relative;
}

.floating-avatar img {
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
}

.tech-icons {
    position: absolute;
    bottom: clamp(-25px, -3vw, -30px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: clamp(1rem, 1.5vw, 1.5rem);
    background: white;
    padding: clamp(0.6rem, 1vw, 0.8rem) clamp(1.2rem, 1.5vw, 1.5rem);
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.tech-icons i {
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s;
}

.tech-icons i:hover {
    transform: translateY(-5px) scale(1.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes typing {
    from {
        max-width: 0;
        opacity: 1;
      }
      to {
        max-width: 100%;
        opacity: 1;
      }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary) }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text {
        align-items: center;
        order: 2;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 2rem;
    }
    
    .floating-avatar {
        width: min(280px, 70vw);
        height: min(280px, 70vw);
    }
    
    .hero-social-container {
        margin-top: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 6rem 5% 3rem;
        min-height: auto;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .tech-icons {
        gap: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .tech-icons i {
        font-size: 1.2rem;
    }
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
}

.download-cv {
    position: relative;
    overflow: hidden;
}

.download-cv::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.download-cv:hover::after {
    transform: translateX(0);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(108, 99, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(108, 99, 255, 0); }
}

/* Skills Section */
.skills {
    background-color: rgba(108, 99, 255, 0.05);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skill-header i {
    width: 50px;
    height: 50px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.skill-header h3 {
    font-size: 1.3rem;
    color: var(--dark);
}

.skill-bar-container {
    margin: 1.5rem 0;
}

.skill-bar {
    height: 10px;
    background: var(--gray);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.skill-bar::after {
    content: attr(data-skill);
    position: absolute;
    top: -25px;
    left: 0;
    font-size: 0.9rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.skill-bar::before {
    content: attr(data-percent) "%";
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.9rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.skill-bar span {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--primary);
    border-radius: 5px;
    animation: fillBar 1.5s ease-in-out forwards;
}

@keyframes fillBar {
    from { width: 0 }
    to { width: var(--width, 0) }
}

/* Experience Section */
.experience {
    background-color: rgba(108, 99, 255, 0.03);
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 10px;
    z-index: 1;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 2rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -12px;
    background: white;
    border: 4px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 2;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 80px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 80px;
}

.timeline-item:nth-child(even)::after {
    left: -12px;
}

.timeline-content {
    padding: 20px 30px;
    background: white;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.timeline-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--dark-gray);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.timeline-content ul {
    margin-left: 1.5rem;
}

.timeline-content li {
    margin: 0.5rem 0;
    color: var(--dark-gray);
}

.timeline-date {
    position: absolute;
    top: 22px;
    font-weight: bold;
    color: var(--primary);
    background: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    z-index: 3;
}

.timeline-item:nth-child(odd) .timeline-date {
    right: -150px;
}

.timeline-item:nth-child(even) .timeline-date {
    left: -150px;
}

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(108, 99, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: white;
    padding: 1rem;
    text-align: center;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-overlay p {
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.project-tags span {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

.project-details {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-details h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.project-details p {
    color: var(--dark-gray);
    margin-bottom: 1rem;
    flex: 1;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1rem 0;
}

.project-features span {
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.project-features i {
    font-size: 0.7rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.view-more {
    text-align: center;
    margin-top: 3rem;
}

/* Certifications Section */
.certifications {
    background-color: rgba(108, 99, 255, 0.05);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.certification-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.certification-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.certification-logo {
    width: 80px;
    height: 80px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.certification-logo i {
    font-size: 2rem;
    color: var(--primary);
}

.certification-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.certification-card p {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    position: relative;
    padding-bottom: 0.5rem;
}

.contact-info h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.contact-info p {
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-text h4 {
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.contact-text p {
    margin: 0;
    color: var(--dark-gray);
}

.contact-social {
    margin-top: 2rem;
}

.contact-social h4 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    position: relative;
    margin: 1.5rem 0;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--gray);
    border-radius: 5px;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: var(--dark);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--dark-gray);
    pointer-events: none;
    transition: all 0.3s;
    background: white;
    padding: 0 0.5rem;
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -0.8rem;
    left: 0.8rem;
    font-size: 0.8rem;
    color: var(--primary);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

/* Footer */
footer {
    background: var(--secondary);
    color: white;
    padding: 4rem 10% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.footer-links h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-contact p {
    color: var(--gray);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-contact i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--gray);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: var(--primary);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border: none;
    outline: none;
}

.theme-toggle i {
    font-size: 1.2rem;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

.project-image {
    height: auto;
    min-height: 250px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    section {
        padding: 5rem 8%;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-image {
        margin-top: 3rem;
    }
}

@media (max-width: 992px) {
    section {
        padding: 4rem 5%;
    }
    
    .hero {
        padding-top: 8rem;
        flex-direction: column;
    }
    
    .hero-content {
        margin-bottom: 3rem;
    }
    
    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .floating-nav {
        top: 1rem;
        right: 1rem;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item::after {
        left: 18px;
    }
    
    .timeline-item:nth-child(odd) .timeline-date,
    .timeline-item:nth-child(even) .timeline-date {
        position: relative;
        right: auto;
        left: auto;
        top: auto;
        margin-bottom: 0.5rem;
    }
    
    .floating-avatar {
        width: 300px;
        height: 300px;
    }
    
    .floating-avatar img {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text h2 {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .projects-container {
        grid-template-columns: 1fr;
    }
    
    .certifications-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        margin-bottom: 2rem;
    }
    
    .project-image {
        min-height: 200px;
    }
    
    /* Mobile Navigation */
    .floating-nav {
        width: auto;
        padding: 0.5rem;
        right: 1rem;
        left: auto;
        transform: none;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(15, 15, 25, 0.95);
        backdrop-filter: blur(12px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .floating-nav li {
        margin: 1rem 0;
    }
    
    .floating-nav a {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-toggle.active .hamburger {
        background: transparent;
    }
    
    .nav-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .nav-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }
}

@media (max-width: 576px) {
    section {
        padding: 4rem 2rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .floating-avatar {
        width: 250px;
        height: 250px;
    }
    
    .floating-avatar img {
        width: 230px;
        height: 230px;
    }
    
    .tech-icons {
        padding: 0.5rem 1rem;
    }
    
    .tech-icons i {
        font-size: 1.2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
    }
    
    .btn {
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 400px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .hero-text h2 {
        font-size: 1.3rem;
    }
    
    .floating-nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    p, li {
        font-size: 0.9rem;
    }
}


@media (max-width: 767px) {
    .hero {
        padding: 1rem !important; /* تقليل الحشو */
        min-height: auto !important; /* إزالة الحد الأدنى للارتفاع */
        overflow-x: hidden !important; /* منع التمرير الأفقي */
    }

    .hero-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 15px !important; /* حشو داخلي إضافي */
    }

    .hero-text, 
    .hero-image {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px !important; /* حشو داخلي إضافي */
    }

    .floating-avatar {
        width: 250px !important;
        height: 250px !important;
        margin: 0 auto !important; /* توسيط الصورة */
    }

    .floating-avatar img {
        width: 230px !important;
        height: 230px !important;
    }

    .hero-text h1 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
        word-break: keep-all !important; /* منع قطع الكلمات */
    }

    .hero-text h2 {
        font-size: 1.3rem !important;
        white-space: normal !important; /* السماح بفصل السطور */
    }

    .hero-description {
        font-size: 0.95rem !important;
        max-width: 100% !important;
        padding: 0 5px !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }

    .btn {
        width: 100% !important;
        max-width: 250px !important;
        margin: 0 auto !important; /* توسيط الأزرار */
    }

    .tech-icons {
        bottom: -20px !important;
        padding: 0.5rem 1rem !important;
    }

    .tech-icons i {
        font-size: 1.2rem !important;
    }
}

/* تحسينات إضافية للشاشات الصغيرة جدًا */
@media (max-width: 400px) {
    .hero-text h1 {
        font-size: 1.8rem !important;
    }

    .hero-text h2 {
        font-size: 1.1rem !important;
    }

    .floating-avatar {
        width: 220px !important;
        height: 220px !important;
    }

    .floating-avatar img {
        width: 200px !important;
        height: 200px !important;
    }

    .hero-description {
        font-size: 0.9rem !important;
    }
}

/* منع العناصر من الخروج عن الشاشة */
* {
    box-sizing: border-box;
    max-width: 100%;
}

body {
    overflow-x: hidden;
}

/* تحسينات للعناوين الطويلة */
h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}