/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.nav-logo .logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

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

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

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

.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
}

.lang-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover,
.lang-btn.active {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    transform: scale(1.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* RTL Support for Arabic */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .nav-container,
.rtl .hero-container,
.rtl .about-content,
.rtl .contact-content {
    flex-direction: row-reverse;
}

.rtl .nav-menu {
    flex-direction: row-reverse;
}

.rtl .language-switcher {
    margin-left: 0;
    margin-right: 1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="90" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
    z-index: 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.2s;
}

.highlight {
    color: #f39c12;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #f39c12;
    animation: slideIn 1s ease forwards 0.8s;
    transform: scaleX(0);
    transform-origin: left;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #ecf0f1;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.4s;
}

.hero-description {
    font-size: 1.1rem;
    color: #bdc3c7;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.6s;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.8s;
}

.cv-download-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #333;
    transform: translateY(-2px);
}

.btn-download {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.btn-download i {
    font-size: 0.9rem;
}

.profile-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    opacity: 0;
    animation: fadeInRight 1s ease forwards 0.4s;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 3rem;
    color: white;
}

.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.tech-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

.tech-icon.js {
    top: 20%;
    left: 10%;
    color: #f7df1e;
    animation-delay: 0s;
}

.tech-icon.angular {
    top: 15%;
    right: 15%;
    color: #dd0031;
    animation-delay: 1s;
}

.tech-icon.python {
    bottom: 25%;
    left: 15%;
    color: #3776ab;
    animation-delay: 2s;
}

.tech-icon.node {
    bottom: 20%;
    right: 10%;
    color: #339933;
    animation-delay: 1.5s;
}

/* Section Styles */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: #3498db;
}

/* About Section */
.about {
    background: #f8f9fa;
    position: relative;
    z-index: 1;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.experience-timeline {
    position: relative;
    padding-left: 2rem;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #3498db;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: #3498db;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.timeline-content h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: #666;
    font-size: 0.9rem;
}

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

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.skill-category h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
}

.skill-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.skill-item i {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

/* Language skill icons colors */
.skill-item .fa-globe-africa {
    color: #2ecc71;
}

.skill-item .fa-flag-fr {
    color: #0055a4;
}

.skill-item .fa-flag-usa {
    color: #e74c3c;
}

.skill-item .fa-flag-de {
    color: #ffce00;
}

/* Spring Boot icon color */
.skill-item .fa-leaf {
    color: #6db33f;
}

/* API & Web Services icons colors */
.skill-item .fa-exchange-alt {
    color: #f39c12;
}

.skill-item .fa-project-diagram {
    color: #e91e63;
}

.skill-item .fa-soap {
    color: #9b59b6;
}

/* Team & Leadership icons colors */
.skill-item .fa-users {
    color: #3498db;
}

.skill-item .fa-handshake {
    color: #2ecc71;
}

.skill-item .fa-comments {
    color: #e67e22;
}

/* Systems & Virtualization icons colors */
.skill-item .fa-linux {
    color: #f7941e;
}

.skill-item .fa-cube {
    color: #184d87;
}

.skill-item .fa-server {
    color: #607c97;
}

.skill-item span {
    flex: 1;
    font-weight: 500;
}

.skill-bar {
    flex: 2;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease;
}

/* Projects Section */
.projects {
    background: #f8f9fa;
}

.projects-accordion {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.project-card.active {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    cursor: pointer;
    background: white;
    transition: background 0.3s ease;
    user-select: none;
}

.project-header:hover {
    background: #f8f9fa;
}

.project-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.project-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.project-icon {
    font-size: 2rem;
    color: white;
    opacity: 0.9;
}

.project-title-wrapper h3 {
    color: #2c3e50;
    margin: 0 0 0.3rem 0;
    font-size: 1.3rem;
}

.project-summary {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

.accordion-toggle {
    font-size: 1.2rem;
    color: #667eea;
    transition: transform 0.3s ease;
}

.project-card.active .accordion-toggle {
    transform: rotate(180deg);
}

.project-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 2rem;
}

.project-card.active .project-content {
    max-height: 500px;
    padding: 0 2rem 2rem 2rem;
}

.project-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.tech-tag {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

.project-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #2980b9;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-info p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-items {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #666;
}

.contact-item i {
    color: #3498db;
    width: 20px;
    text-align: center;
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

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

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideIn {
    to {
        transform: scaleX(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

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

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

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .cv-download-group {
        width: 100%;
        flex-direction: column;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

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

    .projects-accordion {
        padding: 0 1rem;
    }

    .project-header {
        padding: 1rem 1.5rem;
    }

    .project-header-content {
        gap: 1rem;
    }

    .project-icon-wrapper {
        width: 50px;
        height: 50px;
    }

    .project-icon {
        font-size: 1.5rem;
    }

    .project-title-wrapper h3 {
        font-size: 1.1rem;
    }

    .project-summary {
        font-size: 0.8rem;
    }

    .project-card.active .project-content {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }

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

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .container {
        padding: 0 15px;
    }

    .skill-category,
    .contact-form {
        padding: 1.5rem;
    }
}