/* 
==============================================
   CSS VARIABLES & RESET
============================================== 
*/
:root {
    /* Primary Color Palette - Dark Mode Default */
    --bg-body: #0a0f16;
    --bg-card: #161e2b;
    --bg-nav: rgba(10, 15, 22, 0.95);

    --text-main: #e2e8f0;
    --text-muted: #94a3b8;

    --accent-primary: #38bdf8;
    /* Light Blue */
    --accent-secondary: #818cf8;
    /* Indigo */

    --border-color: #334155;
    --shadow-main: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-speed: 0.3s;
}

[data-theme="light"] {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-nav: rgba(248, 250, 252, 0.95);

    --text-main: #0f172a;
    --text-muted: #475569;

    --accent-primary: #0284c7;
    /* Darker Blue */
    --accent-secondary: #4f46e5;
    /* Indigo */

    --border-color: #e2e8f0;
    --shadow-main: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed), opacity 0.3s ease, filter 0.3s ease;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

@supports not (overflow: clip) {
    html,
    body {
        overflow-x: hidden;
    }
}

body.lang-switching {
    opacity: 0;
    filter: blur(5px);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.25;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* 
==============================================
   UTILITIES & COMPONENTS
============================================== 
*/
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 100px 0;
}

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

.section-title {
    font-size: 2.25rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

.center-text .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #ffffff;
    border-radius: 5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px 0 rgba(0, 118, 255, 0.39);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 118, 255, 0.5);
}

.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--accent-primary);
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-2px);
}

/* 
==============================================
   NAVIGATION
============================================== 
*/
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: var(--bg-nav);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    transition: background-color var(--transition-speed);
}

.nav-container {
    display: flex;
    align-items: center;
    width: 100%;
    /* justify-content: space-between; Removed to allow manual spacing */
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    z-index: 1001; /* Ensure logo stays above mobile menu if needed */
}

.site-logo-img {
    display: block;
    height: 40px;
    width: auto;
}

.logo .dot {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto; /* Push to the right on Desktop */
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem; /* Spacing between links and controls */
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}

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

.nav-links .btn-primary.small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.2rem;
    padding: 5px; /* Improved hit area */
    transition: transform 0.3s ease;
}

#theme-toggle:hover {
    transform: rotate(15deg);
    color: var(--accent-secondary);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    margin-left: 1rem;
    z-index: 1001; /* Above mobile menu */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-main);
}

/* 
==============================================
   HERO SECTION
============================================== 
*/
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px;
    /* Increased to account for navbar */
    padding-bottom: 60px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

.hero-text-area {
    flex: 1;
    max-width: 650px;
}

.hero-image-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 450px;
}

/* Wavy Blob Animation */
.blob-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    margin: 0 auto;
    animation: blob-bounce 8s ease-in-out infinite;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(56, 189, 248, 0.3);
    background-color: var(--bg-card);
    /* Fallback */
    z-index: 10;
}

.hero-blob-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    /* Slight zoom to avoid gaps during wobble */
    transition: transform 0.5s ease;
}

.blob-image-wrapper:hover .hero-blob-img {
    transform: scale(1.2);
}

@keyframes blob-bounce {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: translateY(0);
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
        transform: translateY(-10px);
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: translateY(0);
    }
}

/* Background decorative glow behind blob */
.hero-image-area::before {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.2;
    z-index: 1;
    animation: pulse-glow 4s infinite alternate;
}

@keyframes pulse-glow {
    0% {
        opacity: 0.2;
        transform: scale(0.9);
    }

    100% {
        opacity: 0.4;
        transform: scale(1.1);
    }
}

/* Greeting */
.greeting {
    color: var(--accent-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--text-main), var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2rem;
}

.hero-subtitle .divider {
    color: var(--accent-secondary);
    margin: 0 0.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

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

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--text-muted);
    font-size: 1.5rem;
}

@keyframes bounce {

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

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* 
==============================================
   ABOUT SECTION
============================================== 
*/
.about-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 20px;
    padding: 10px;
    background: linear-gradient(135deg, var(--bg-card), var(--border-color));
    box-shadow: var(--shadow-main);
    animation: levitate 4s ease-in-out infinite;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    padding: 2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.image-wrapper:hover::before {
    opacity: 1;
}

.profile-pic {
    width: 100%;
    height: auto;
    border-radius: 15px;
    display: block;
    filter: grayscale(20%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.image-wrapper:hover .profile-pic {
    filter: grayscale(0%);
    transform: scale(1.02);
}

@keyframes levitate {

    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    }

    50% {
        transform: translateY(-15px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    }
}

.about-text .lead-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

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

.about-text .quote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 1rem;
    font-style: italic;
    color: var(--text-main);
    margin: 2rem 0;
}

.certifications-preview h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.cert-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.8rem;
}

.cert-list li {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.cert-list i {
    color: var(--accent-secondary);
    margin-right: 0.75rem;
}

/* 
==============================================
   SKILLS SECTION
============================================== 
*/
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-category h3 i {
    color: var(--accent-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tags span {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent-primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

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

.project-card {
    background-color: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-main);
    border-color: var(--accent-secondary);
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

.project-link {
    color: var(--accent-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.2s ease;
}

.project-link:hover {
    gap: 0.8rem;
}

/* 
==============================================
   EXPERIENCE SECTION (TIMELINE)
============================================== 
*/
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 2px;
    background-color: var(--border-color);
}

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

.timeline-dot {
    position: absolute;
    top: 5px;
    left: -5px;
    width: 12px;
    height: 12px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-body);
}

.timeline-date {
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(129, 140, 248, 0.1);
    color: var(--accent-secondary);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.timeline-content ul {
    list-style-type: disc;
    padding-left: 1.2rem;
}

.timeline-content li {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* 
==============================================
   SERVICES SECTION
============================================== 
*/
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.service-card:hover {
    background-color: rgba(56, 189, 248, 0.05);
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.service-card .icon-box {
    font-size: 2.5rem;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
}

/* 
==============================================
   OBJECTIVE SECTION
============================================== 
*/
.objective-container {
    text-align: center;
    max-width: 900px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(79, 70, 229, 0.1));
    padding: 4rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.objective-container h2 {
    margin-bottom: 2rem;
    color: var(--accent-primary);
}

.objective-container p {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 2rem;
    color: var(--text-main);
}

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

.keywords span {
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 
==============================================
   CONTACT SECTION
============================================== 
*/
.contact-intro {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

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

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background-color: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-method:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateX(10px);
    border-color: var(--accent-primary);
}

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

.contact-form {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-main);
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

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

.full-width {
    width: 100%;
}

.form-status {
    margin-bottom: 1.5rem;
    padding: 12px;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
}

.form-status.success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-status.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.form-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* 
==============================================
   FOOTER
============================================== 
*/
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 5rem;
}

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

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
}

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

.copy {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* 
==============================================
   ANIMATIONS & MEDIA QUERIES
============================================== 
*/
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .hero-text-area {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .blob-image-wrapper {
        max-width: 280px;
    }

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

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

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: 0;
        top: 80px;
        flex-direction: column;
        background-color: var(--bg-nav);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        transform: translateX(-100%);
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
        margin-left: 0; /* Reset desktop margin */
    }

    .nav-controls {
        margin-left: auto;
        margin-right: 1rem; /* Spacing from hamburger */
    }

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

    .nav-links li {
        margin: 1.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .objective-container p {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }

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

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

    .hero-description {
        font-size: 1rem;
    }

    .blob-image-wrapper {
        max-width: 220px;
    }

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

    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        width: 100%;
        text-align: center;
    }

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

/* 
==============================================
   RTL SUPPORT (ARABIC)
============================================== 
*/
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
    font-family: 'Cairo', sans-serif;
}

/* Navigation */
/* Navigation */
html[dir="rtl"] #theme-toggle {
    margin-right: 0; /* Updated to rely on flex gap */
}

html[dir="rtl"] .logo {
    text-align: right;
}

html[dir="rtl"] .nav-links {
    padding-inline-start: 0;
    margin-left: 0;
    margin-right: auto; /* Push to left in RTL */
}

html[dir="rtl"] .nav-controls {
    margin-left: 0;
    margin-right: 2rem;
}

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

    html[dir="rtl"] .nav-controls {
        margin-right: auto; /* Push to left on mobile */
        margin-left: 1rem;
    }
}

/* About Section */
html[dir="rtl"] .about-text .quote {
    border-left: none;
    border-right: 4px solid var(--accent-primary);
    padding-left: 0;
    padding-right: 1rem;
}

html[dir="rtl"] .cert-list i {
    margin-right: 0;
    margin-left: 0.75rem;
}

/* Timeline/Experience */
html[dir="rtl"] .timeline::before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .timeline-item {
    padding-left: 0;
    padding-right: 2.5rem;
}

html[dir="rtl"] .timeline-dot {
    left: auto;
    right: -5px;
}

html[dir="rtl"] .timeline-content ul {
    padding-left: 0;
    padding-right: 1.2rem;
}

/* Forms */
html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea {
    text-align: right;
}

/* Contact Methods */
html[dir="rtl"] .contact-method:hover {
    transform: translateX(-10px);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--accent-primary);
  color: var(--bg-body);
  border-radius: 0.5rem;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
