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

:root {
    --primary-color: #232F3E;
    --secondary-color: #FF9900;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --contact-accent: #ffb347;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

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

.navbar {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.lang-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

body.rtl {
    direction: rtl;
}

body.rtl .hero-content {
    flex-direction: row-reverse;
}

body.rtl .contact-info p {
    direction: ltr;
    text-align: right;
}

body.rtl .contact-info i {
    margin-left: 0.5rem;
    margin-right: 0;
}

body.rtl .timeline-item {
    grid-template-columns: 180px 1fr;
}

body.rtl .timeline-date {
    text-align: left;
    direction: ltr;
}

body.rtl .timeline-content {
    direction: rtl;
    text-align: start;
}

body.rtl .timeline-content h3,
body.rtl .timeline-content h4 {
    text-align: start;
}

body.rtl .timeline-content li {
    text-align: start;
}

body.rtl .timeline-content li:before {
    content: "◂";
}

body.rtl .skill-category li:before {
    left: auto;
    right: 0;
}

body.rtl .skill-category li {
    padding-left: 0;
    padding-right: 1.5rem;
}

body.rtl .cert-column li:before {
    left: auto;
    right: 0;
}

body.rtl .cert-column li {
    padding-left: 0;
    padding-right: 1.5rem;
}

body.rtl .hero-buttons {
    direction: ltr;
}

body.rtl .project-card h3 {
    text-align: right;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a242f 100%);
    color: var(--white);
    padding: 150px 0 100px;
    margin-top: 60px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-text {
    flex: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero-name {
    background: linear-gradient(135deg, var(--white) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.hero h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

#typed {
    color: var(--secondary-color);
    font-weight: 600;
}

.tagline {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-weight: 300;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--contact-accent, var(--white));
}

.contact-info i {
    color: var(--secondary-color);
    width: 20px;
}
.contact-info a {
    color: inherit;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #e88b00;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

.section {
    padding: 80px 0;
}

.bg-light {
    background: var(--light-bg);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.about-content p {
    margin-bottom: 1.5rem;
}

.cert-badges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 2rem;
    justify-items: center;
    align-items: center;
}

.cert-badges img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    transition: transform 0.3s;
    cursor: pointer;
}

.cert-badges img:hover {
    transform: scale(1.1);
}

.cert-list {
    margin-top: 4rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.cert-list > h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.cert-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.cert-column h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.cert-column ul {
    list-style: none;
    padding: 0;
}

.cert-column li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
}

.cert-column li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
}

.timeline-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #ddd;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-date {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1rem;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.timeline-content h4 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
    padding-inline-start: 0;
}

.timeline-content li {
    padding: 0.5rem 0;
    padding-inline-start: 1.5rem;
    position: relative;
}

.timeline-content li:before {
    content: "▸";
    position: absolute;
    inset-inline-start: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

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

.project-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.project-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #1a242f);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.project-icon i {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

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

.project-card p {
    color: var(--text-color);
    line-height: 1.6;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

.skill-category i {
    color: var(--secondary-color);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.skill-category li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

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

.contact-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.contact-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.contact-link i {
    font-size: 1.5rem;
}

.footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin: 0.5rem 0;
}

@media (max-width: 768px) {
    .nav-right {
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--primary-color);
        width: 100%;
        padding: 1rem;
        display: none;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .nav-right.active {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        text-align: center;
    }

    .language-selector {
        justify-content: center;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    body.rtl .hero-content {
        flex-direction: column;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 1.3rem;
    }

    .contact-info {
        align-items: center;
    }

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

    body.rtl .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .timeline-item {
        grid-template-columns: 1fr;
    }
    
    .cert-badges {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 1rem;
    }

    .cert-badges img {
        width: 80px;
        height: 80px;
    }

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

    .contact-links {
        flex-direction: column;
    }
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.menu-toggle:active {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
}


/* Featured Project Styles */
.featured-project {
    border: 2px solid var(--secondary-color);
    background: linear-gradient(135deg, #fff9f0 0%, #ffffff 100%);
}

.featured-project h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.github-link {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.github-link:hover {
    color: var(--secondary-color);
}

.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}
