:root {
    --primary: #0f172a;
    --secondary: #1e293b;
    --accent: #3b82f6;
    --accent-dark: #2563eb;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --java: #ED1B24;
    --python: #3776ab;
    --csharp: #178600;
    --javascript: #f7df1e;
    --sql: #00758f;
    --spring: #6db33f;
    --django: #092e20;
    --data-engineering: #FF6B00;
    --full-stack: #9C27B0;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--primary);
    color: var(--text);
    overflow-x: hidden;
    direction: ltr;
}

/* Scroll Down Button - Desktop Only */
@media (min-width: 769px) {
    .scroll-down {
        position: fixed;
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 40px;
        background: rgba(30, 41, 59, 0.8);
        backdrop-filter: blur(10px);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        border: 1px solid var(--accent);
        transition: all 0.3s ease;
        z-index: 1001;
        animation: bounce 2s infinite;
    }

    .scroll-down:hover {
        background: var(--accent);
        transform: translateX(-50%) scale(1.1);
    }

    .scroll-down i {
        color: var(--text);
        font-size: 1rem;
    }

    .scroll-down:hover i {
        transform: translateY(3px);
    }

    @keyframes bounce {
        0%, 20%, 50%, 80%, 100% {
            transform: translateX(-50%) translateY(0);
        }
        40% {
            transform: translateX(-50%) translateY(-8px);
        }
        60% {
            transform: translateX(-50%) translateY(-4px);
        }
    }

    .scroll-down.hide {
        opacity: 0;
        visibility: hidden;
        animation: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
}

/* Hide on mobile devices */
@media (max-width: 768px) {
    .scroll-down {
        display: none;
    }
}

/* Section Indicators */
.section-indicators {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.section-indicator {
    position: relative;
    width: 90px; 
    height: 90px; 
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.3s ease;
    transform: scale(0.8);
}

.section-indicator.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.section-indicator::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.8) 0%, rgba(255, 147, 0, 0.3) 70%, transparent 100%);
    box-shadow:
        0 0 20px rgba(255, 204, 0, 0.8),
        0 0 40px rgba(255, 147, 0, 0.6),
        0 0 60px rgba(255, 102, 0, 0.4);
    animation: flame-pulse 1.5s ease-in-out infinite;
    z-index: -1;
}

.section-indicator:hover::before {
    box-shadow:
        0 0 30px rgba(255, 204, 0, 1),
        0 0 50px rgba(255, 147, 0, 0.8),
        0 0 70px rgba(255, 102, 0, 0.6);
    animation: flame-pulse-hover 1s ease-in-out infinite;
}

.section-indicator span {
    color: var(--text);
    font-size: 0.8rem; 
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.1; 
    padding: 0.3rem; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
}

.section-indicator:hover span {
    text-shadow:
        0 0 10px var(--text),
        0 0 20px rgba(255, 204, 0, 0.8),
        0 0 30px rgba(255, 147, 0, 0.6);
    transform: scale(1.05);
}

@keyframes flame-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes flame-pulse-hover {
    0%, 100% {
        transform: scale(1.1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* Language-specific adjustments for desktop */
html[lang="de"] .section-indicator span,
html[lang="pl"] .section-indicator span,
html[lang="fr"] .section-indicator span {
    font-size: 0.75rem; 
}

html[lang="ar"] .section-indicator span {
    font-size: 0.85rem; 
    line-height: 1.3; 
}

html[lang="tr"] .section-indicator span {
    font-size: 0.7rem; 
}

.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.5);
    pointer-events: none;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
    z-index: 9999;
    transition: transform 0.1s ease;
}

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto 2rem;
}

.profile-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    position: relative;
    z-index: 3;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.tech-orbits {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.orbit {
    position: absolute;
    border-radius: 50%;
    border: 2px dashed;
    animation: orbit-rotate linear infinite;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    opacity: 0.8;
    will-change: transform;
}

.orbit span {
    position: absolute;
    top: -1.2rem;
    left: 50%;
    transform: translateX(-50%);
    color: inherit;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(30, 41, 59, 0.7) 70%);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
    text-shadow:
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px rgba(255, 204, 0, 0.8),
        0 0 40px rgba(255, 147, 0, 0.6);
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, text-shadow 0.3s ease;
    animation:
        sun-glow 1.5s ease-in-out infinite,
        sun-shimmer 3s ease-in-out infinite,
        keep-upright linear infinite;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

@keyframes sun-glow {
    0%, 100% {
        text-shadow:
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 30px rgba(255, 204, 0, 0.8),
            0 0 40px rgba(255, 147, 0, 0.6);
        opacity: 0.9;
    }
    50% {
        text-shadow:
            0 0 15px currentColor,
            0 0 30px currentColor,
            0 0 50px rgba(255, 204, 0, 1),
            0 0 60px rgba(255, 147, 0, 0.8);
        opacity: 1;
    }
}

@keyframes sun-shimmer {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(30, 41, 59, 0.7) 70%);
    }
    25% {
        transform: translateX(-50%) translateY(-2px);
        background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(30, 41, 59, 0.7) 70%);
    }
    50% {
        transform: translateX(-50%) translateY(0);
        background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(30, 41, 59, 0.7) 70%);
    }
    75% {
        transform: translateX(-50%) translateY(2px);
        background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(30, 41, 59, 0.7) 70%);
    }
}

.label-wrapper {
    position: absolute;
    top: -1.2rem;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: center;
    will-change: transform;
}

.orbit.java {
    width: 140%;
    height: 140%;
    top: -20%;
    left: -20%;
    border-color: var(--java);
    color: var(--java);
    animation-duration: 20s;
}

.orbit.python {
    width: 170%;
    height: 170%;
    top: -35%;
    left: -35%;
    border-color: var(--python);
    color: var(--python);
    animation-duration: 25s;
    animation-direction: reverse;
}

.orbit.csharp {
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    border-color: var(--csharp);
    color: var(--csharp);
    animation-duration: 30s;
}

.orbit.javascript {
    width: 230%;
    height: 230%;
    top: -65%;
    left: -65%;
    border-color: var(--javascript);
    color: var(--javascript);
    animation-duration: 35s;
    animation-direction: reverse;
}

.orbit.sql {
    width: 260%;
    height: 260%;
    top: -80%;
    left: -80%;
    border-color: var(--sql);
    color: var(--sql);
    animation-duration: 40s;
}

.orbit.spring {
    width: 290%;
    height: 290%;
    top: -95%;
    left: -95%;
    border-color: var(--spring);
    color: var(--spring);
    animation-duration: 45s;
    animation-direction: reverse;
}

@keyframes orbit-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.orbit span {
    animation: keep-upright linear infinite;
    animation-duration: inherit;
}

@keyframes keep-upright {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(-360deg); }
}

.orbit:hover {
    border-style: solid;
    box-shadow: 0 0 15px var(--accent);
    opacity: 1;
}

.orbit:hover span {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(30, 41, 59, 0.9) 70%);
    transform: translateX(-50%) scale(1.1);
    text-shadow:
        0 0 20px currentColor,
        0 0 40px currentColor,
        0 0 60px rgba(255, 204, 0, 1),
        0 0 80px rgba(255, 147, 0, 0.9);
    border-color: rgba(255, 204, 0, 0.5);
    opacity: 1;
    animation: sun-glow-hover 1s ease-in-out infinite;
}

@keyframes sun-glow-hover {
    0%, 100% {
        text-shadow:
            0 0 20px currentColor,
            0 0 40px currentColor,
            0 0 60px rgba(255, 204, 0, 1),
            0 0 80px rgba(255, 147, 0, 0.9);
        opacity: 0.9;
    }
    50% {
        text-shadow:
            0 0 30px currentColor,
            0 0 50px currentColor,
            0 0 80px rgba(255, 204, 0, 1),
            0 0 100px rgba(255, 147, 0, 1);
        opacity: 1;
    }
}

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

.main-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
}

.title-line {
    display: block;
    position: relative;
}

.title-line:first-child::after {
    content: '';
    position: absolute;
    right: -0.5em;
    bottom: 0;
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.dynamic-title {
    position: relative;
    height: 3.5rem;
    margin: 0 auto;
    overflow: hidden;
}

.title-mask {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.title-slider {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.title-segment {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-light);
    padding: 0.5rem 1rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.title-segment.active {
color: var(--text);
}

.title-segment.java-backend::before {
    background: var(--java);
}
.title-segment.full-stack::before {
    background: var(--accent);
}
.title-segment.ai::before {
    background: var(--python);
}

.title-segment.data-engineering::before {
    background: var(--data-engineering);
}

.title-segment.full-stack::before {
    background: var(--full-stack);
}

.title-segment::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.title-underline {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--java), var(--spring), var(--python));
    margin: 0 auto;
    transition: width 1s ease;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    position: relative;
}

.contact-link:hover {
    color: var(--text);
    background: rgba(30, 41, 59, 0.5);
    transform: translateY(-3px);
}

.contact-link::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 2rem;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.contact-link:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.contact-link i {
    font-size: 1.2rem;
    transition: text-shadow 0.3s ease;
}

.contact-link:hover i {
    text-shadow:
        0 0 10px var(--accent),
        0 0 20px rgba(255, 204, 0, 0.8);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    z-index: 10;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.5);
    color: var(--text-light);
    transition: all 0.3s ease;
    position: relative;
}

.social-link:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-3px);
    box-shadow:
        0 0 15px rgba(255, 204, 0, 0.8),
        0 0 25px rgba(255, 147, 0, 0.6);
}

.social-link::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.social-link:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: bounce 2s infinite;
}

.arrow-down {
    width: 1rem;
    height: 1rem;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
    margin-top: 0.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

.section {
    padding: 5rem 0;
    position: relative;
}

.dark-section {
    background-color: var(--secondary);
}

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

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--java), var(--spring), var(--python));
}

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

.about-text {
    font-size: 1rem;
    line-height: 1.5;
}

.about-text h3 {
    margin-top: 1.5rem;
    color: var(--accent);
    font-size: 1.3rem;
}

.education-list {
    list-style: none;
    margin-top: 1rem;
}

.education-list li {
    margin-bottom: 1.2rem;
    background: var(--secondary);
    padding: 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.education-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.education-list strong {
    display: block;
    color: var(--text);
    font-size: 1.1rem;
}

.education-list span {
    color: var(--text-light);
    font-size: 0.85rem;
}

.education-detail {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
    border-left: 2px solid var(--accent);
}

.toggle-details {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.toggle-details:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow:
        0 5px 15px rgba(59, 130, 246, 0.3),
        0 0 15px rgba(255, 204, 0, 0.8),
        0 0 25px rgba(255, 147, 0, 0.6);
}

.toggle-details::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.toggle-details:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

/* Technical Skills Section */
.skills-container h3 {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    animation: fadeInUp 0.6s ease-out;
}

.skills-container h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.skills-container h3:hover::after {
    transform: scaleX(1);
}

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

.skill-category {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 16px;
    padding: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(4px);
    opacity: 0;
    animation: cardFadeIn 0.5s ease-out forwards;
    transform: translateY(20px);
}

.skill-category:nth-child(1) { animation-delay: 0.1s; }
.skill-category:nth-child(2) { animation-delay: 0.2s; }
.skill-category:nth-child(3) { animation-delay: 0.3s; }
.skill-category:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-category:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--accent);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(59, 130, 246, 0.3);
    background: rgba(30, 41, 59, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-category h4 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-left: 3px solid var(--accent);
    padding-left: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.skill-category h4::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

.skill-category:hover h4::before {
    transform: scale(1.5);
    box-shadow: 0 0 10px var(--accent);
}

.skill-category h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transition: width 0.4s ease;
}

.skill-category:hover h4::after {
    width: 100%;
}

.icon-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.icon-list li {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(59, 130, 246, 0.2);
    opacity: 0;
    animation: iconPopIn 0.4s ease-out forwards;
}

.icon-list li:nth-child(1) { animation-delay: 0.05s; }
.icon-list li:nth-child(2) { animation-delay: 0.1s; }
.icon-list li:nth-child(3) { animation-delay: 0.15s; }
.icon-list li:nth-child(4) { animation-delay: 0.2s; }
.icon-list li:nth-child(5) { animation-delay: 0.25s; }
.icon-list li:nth-child(6) { animation-delay: 0.3s; }
.icon-list li:nth-child(7) { animation-delay: 0.35s; }

@keyframes iconPopIn {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    60% {
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.icon-list li:hover {
    transform: translateY(-8px) scale(1.12);
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 12px 25px -8px rgba(59, 130, 246, 0.5);
    transition: all 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.icon-list li i {
    font-size: 24px;
    color: var(--text-light);
    transition: all 0.25s ease;
}

.icon-list li:hover i {
    color: white;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.icon-list li::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: var(--text);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.3px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.icon-list li:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -42px;
    transform: translateX(-50%) scale(1);
}

/* Pulse animation on first load for attention */
@keyframes subtlePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.skill-category:first-child .icon-list li:first-child {
    animation: iconPopIn 0.4s ease-out forwards, subtlePulse 0.8s ease-out 0.5s;
}

/* Extra margin between subcategories inside same card */
.skill-category h4:not(:first-of-type) {
    margin-top: 1.5rem;
    position: relative;
    animation: fadeInUp 0.4s ease-out;
}

.skill-category .icon-list + h4 {
    margin-top: 1.8rem;
}

/* Staggered animation for subcategory headers */
.skill-category h4:first-of-type {
    animation: fadeInUp 0.4s ease-out 0.05s both;
}

.skill-category h4:not(:first-of-type) {
    animation: fadeInUp 0.4s ease-out 0.15s both;
}

/* Subtle background glow on category hover */
.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(59, 130, 246, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .skill-category {
        padding: 1rem;
    }
    
    .skill-category h4 {
        font-size: 0.9rem;
    }
    
    /* Remove the black underline on mobile */
    .skill-category h4::after {
        display: none;
    }
    
    /* Remove the dot on mobile */
    .skill-category h4::before {
        display: none;
    }
    
    .icon-list li {
        width: 38px;
        height: 38px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .icon-list li i {
        font-size: 18px;
    }
    
    .skill-category h4:not(:first-of-type) {
        margin-top: 1.2rem;
    }
    
    /* Disable tooltips on mobile completely */
    .icon-list li::after {
        display: none;
    }
    
    /* Disable hover effects on mobile */
    .skill-category:hover {
        transform: none;
        border-color: rgba(59, 130, 246, 0.2);
        box-shadow: none;
    }
    
    .icon-list li:hover {
        transform: none;
        background: var(--primary);
    }
    
    .icon-list li:hover i {
        color: var(--text-light);
        text-shadow: none;
    }
}
/* Services Section Specific Styles */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: linear-gradient(145deg, #1a243a, #1e293b);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #FF4500, #32CD32, #1E90FF);
    opacity: 0.8;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                0 0 20px rgba(255, 204, 0, 0.6),
                0 0 15px rgba(255, 147, 0, 0.4);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
    text-align: center;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-weight: 600;
}

.service-price {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent);
    text-align: center;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
}

.service-features {
    margin-bottom: 2rem;
    flex-grow: 1;
}

.service-features li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    color: var(--text-light);
}

.service-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: bold;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.service-cta {
    margin-top: auto;
}

.services-note {
    text-align: center;
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    color: var(--text-light);
}

/* Dark mode adjustment for services section */
.dark-section .service-card {
    background: linear-gradient(145deg, #0f172a, #1a243a);
}

/* Project Section Styles */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    position: relative; 
}

.project-card {
    background: linear-gradient(145deg, #1a243a, #1e293b);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1; 
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #FF4500, #32CD32, #1E90FF);
    opacity: 0.8;
}

.project-card:hover {
    transform: translateY(-10px) !important; 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                0 0 20px rgba(255, 204, 0, 0.6),
                0 0 15px rgba(255, 147, 0, 0.4);
    z-index: 2; 
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.project-details {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-details h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 1.3rem;
}

.project-details p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

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

.project-tech span {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.project-tech span:hover {
    background-color: rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.6),
                0 0 15px rgba(255, 147, 0, 0.4);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.project-duration {
    color: var(--text-light);
    font-size: 0.9rem;
}

.project-impact {
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    position: relative;
    transition: all 0.3s ease;
}

.project-impact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    opacity: 0;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.project-impact:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.project-impact strong {
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-impact span {
    font-size: 0.9rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    display: block;
}

/* RTL Support */
html[lang="ar"] .project-impact {
    border-left: none;
    border-right: 4px solid var(--accent);
    text-align: right;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .project-impact {
        margin: 0.8rem 0;
        padding: 0.6rem;
    }
    
    .project-impact strong {
        font-size: 0.85rem;
    }
    
    .project-impact span {
        font-size: 0.85rem;
    }
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--accent);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
}

.btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3),
                0 0 15px rgba(255, 204, 0, 0.8),
                0 0 25px rgba(255, 147, 0, 0.6);
}

.btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

/* Dark mode adjustment for project section */
.dark-section .project-card {
    background: linear-gradient(145deg, #0f172a, #1a243a);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-info ul {
    list-style: none;
    margin-bottom: 2rem;
}

.contact-info li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
}

.contact-info i {
    color: var(--accent);
    width: 1.5rem;
    text-align: center;
    transition: text-shadow 0.3s ease;
}

.contact-info i:hover {
    text-shadow:
        0 0 10px var(--accent),
        0 0 20px rgba(255, 204, 0, 0.8);
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--secondary);
    border: 1px solid var(--secondary);
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    transition: all 0.3s ease;
    position: relative;
}

.form-group input::before,
.form-group textarea::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.8) 0%, rgba(255, 147, 0, 0.3) 70%, transparent 100%);
    box-shadow:
        0 0 20px rgba(255, 204, 0, 0.8),
        0 0 40px rgba(255, 147, 0, 0.6),
        0 0 60px rgba(255, 102, 0, 0.4);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-group input:hover::before,
.form-group textarea:hover::before,
.form-group input:focus::before,
.form-group textarea:focus::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border: 1px solid var(--secondary);
    transform: scale(1.02);
    box-shadow:
        0 0 15px rgba(255, 204, 0, 0.6),
        0 0 25px rgba(255, 147, 0, 0.4);
}

/* Handle browser autofill to prevent blue background */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group textarea:-webkit-autofill,
.form-group textarea:-webkit-autofill:hover,
.form-group textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--secondary) inset;
    -webkit-text-fill-color: var(--text);
    border: 1px solid var(--secondary);
}

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

.form-message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    text-align: center;
}

.form-message.success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.form-message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.hidden {
    opacity: 0;
    visibility: hidden;
}

footer {
    background-color: var(--secondary);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
}

.back-to-top {
    position: fixed !important;
    bottom: 2rem !important;
    right: 2rem !important;
    left: auto !important;
    width: 3rem;
    height: 3rem;
    background-color: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    position: relative;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow:
        0 5px 15px rgba(59, 130, 246, 0.3),
        0 0 15px rgba(255, 204, 0, 0.8),
        0 0 25px rgba(255, 147, 0, 0.6);
}

.back-to-top::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.back-to-top:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.thank-you-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    z-index: 2;
}

.thank-you-container h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1.5rem;
    position: relative;
}

.thank-you-container h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--java), var(--spring), var(--python));
}

.thank-you-container p {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.thank-you-container .btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    background-color: var(--accent);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.thank-you-container .btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow:
        0 5px 15px rgba(59, 130, 246, 0.3),
        0 0 15px rgba(255, 204, 0, 0.8),
        0 0 25px rgba(255, 147, 0, 0.6);
}

.thank-you-container .btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.thank-you-container .btn:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

/* Scrollbar styling global */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--primary);
}

html::-webkit-scrollbar {
    width: 8px;
}

html::-webkit-scrollbar-track {
    background: var(--primary);
}

html::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 4px;
}

html::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-dark);
}

/* Email Validation */
.validation-message {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    min-height: 0;
    line-height: 1rem; 
    height: auto; 
    overflow: hidden; 
}

.validation-message:empty {
    margin-top: 0; 
    height: 0; 
}

.validation-message.valid {
    color: #22c55e;
}

.validation-message.invalid {
    color: #ef4444;
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 3px;
  border-radius: 4px;
  transition: outline-color 0.2s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 10000;
}

.skip-link:focus {
  top: 6px;
}

/* Video Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    background: transparent;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    z-index: 10001;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 1);
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .video-container {
        padding-bottom: 56.25%;
    }

    .close-btn {
        top: -45px;
        right: 10px;
        font-size: 28px;
    }

    /* Prevent body scroll when modal is open */
    body.modal-open {
        position: fixed;
        width: 100%;
        overflow: hidden;
    }
}

/* Modal is above everything */
.modal[style*="display: block"] {
    display: block !important;
}

/* Video button styles */
.video-btn {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    text-decoration: none !important;
    cursor: pointer;
    background: #007bff;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.video-btn:hover {
    background: #0056b3;
}

/* Video Showcase / Highest Resolution Player Styles */
.video-showcase {
    max-width: 1100px;
    width: 100%;
    margin: 3rem auto;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 2rem;
    padding: 1.8rem;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
    gap: 0.8rem;
}

.title-section h2 {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #f0f9ff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.title-section p {
    color: #7e8aa8;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.resolution-badge {
    background: #1e293b;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #334155;
}

.badge-label {
    color: #94a3b8;
}

.badge-value {
    color: #3b82f6;
    font-weight: 700;
    background: #0f172a;
    padding: 0.2rem 0.7rem;
    border-radius: 40px;
    font-family: monospace;
}

.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 1.2rem;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.video-wrapper video {
    width: 100%;
    display: block;
    cursor: pointer;
}

.video-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.play-pause {
    background: #3b82f6;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 3rem;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.play-pause:hover {
    background: #2563eb;
    transform: scale(1.02);
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.4);
}

.info-panel {
    background: #11182780;
    backdrop-filter: blur(4px);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    color: #cbd5e6;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-panel i {
    color: #3b82f6;
}

.quality-selector {
    background: #0f172a;
    border: 1px solid #2d3a5e;
    padding: 0.45rem 1rem;
    border-radius: 2rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
    font-family: monospace;
    transition: 0.2s;
}

.quality-selector:hover {
    background: #1e2a4a;
    border-color: #3b82f6;
}

.footnote {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.7rem;
    color: #5b6e8c;
}

@media (max-width: 640px) {
    .video-showcase {
        padding: 1rem;
        margin: 2rem auto;
    }
    .title-section h2 {
        font-size: 1.2rem;
    }
    .resolution-badge {
        padding: 0.3rem 0.8rem;
    }
    .video-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .play-pause {
        justify-content: center;
    }
    .info-panel {
        justify-content: center;
    }
}

/* Weather Widget Styles */
/* .weather-widget {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border-radius: 16px;
    padding: 1rem;
    margin-top: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.weather-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(59, 130, 246, 0.2);
}

.weather-loading,
.weather-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.weather-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-icon {
    font-size: 2.5rem;
    color: var(--accent);
    min-width: 60px;
    text-align: center;
}

.weather-info {
    flex: 1;
}

.weather-temp {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.temp-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.temp-unit {
    font-size: 0.9rem;
    color: var(--text-light);
}

.weather-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.weather-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.weather-location i {
    font-size: 0.7rem;
} */

/* Mobile responsiveness */
/* @media (max-width: 768px) {
    .weather-widget {
        max-width: 250px;
        padding: 0.8rem;
        margin-top: 1rem;
    }
    
    .weather-icon {
        font-size: 2rem;
        min-width: 50px;
    }
    
    .temp-value {
        font-size: 1.3rem;
    }
    
    .weather-content {
        gap: 0.8rem;
    }
}
.weather-demo-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
} */

/* Weather Widget Location Styles */
/* .weather-widget .location-name::before {
    content: '🌍 ';
    font-size: 0.7em;
}

.weather-widget.user-location .location-name::before {
    content: '📍 ';
} */

/* Weather Widget Styles with proper z-index */
/* .weather-widget {
    position: relative;
    z-index: 10; 
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-radius: 16px;
    padding: 1rem;
    margin-top: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
} */

/* Hero content */
/* .hero-content {
    position: relative;
    z-index: 5; 
} */

/* Particles.js Background */
/* #particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1; 
} */

/* Arabic RTL Specific Styles - DESKTOP ONLY */
@media (min-width: 1025px) {
    html[lang="ar"] {
        direction: rtl;
        font-family: 'Noto Naskh Arabic', 'Tahoma', 'Arial', sans-serif;
    }

    html[lang="ar"] body {
        direction: rtl;
    }

    /* ARABIC TEXT ORDER ON DESKTOP - ONLY FOR TITLES */
    html[lang="ar"] .title-segment,
    html[lang="ar"] .education-list strong {
        unicode-bidi: plaintext !important;
    }

    /* MOVED TO LEFT SIDE FOR ARABIC ONLY - DESKTOP */
    html[lang="ar"] .section-indicators {
        left: 2rem !important;
        right: auto !important;
    }

    /* Scroll indicator moved to LEFT for Arabic - DESKTOP ONLY */
    html[lang="ar"] .hero .scroll-indicator,
    html[lang="ar"] header.hero .scroll-indicator {
        left: 2rem !important;
        right: auto !important;
        transform: none !important;
        align-items: flex-start !important;
    }

    /* Language Toggle MOVED TO LEFT SIDE FOR ARABIC - DESKTOP */
    html[lang="ar"] .language-toggle {
        left: 1rem !important;
        right: auto !important;
    }

    /* BACK-TO-TOP MOVED TO LEFT SIDE FOR ARABIC - DESKTOP */
    html[lang="ar"] .back-to-top {
        left: 2rem !important;
        right: auto !important;
    }

    /* Arabic title styles for desktop */
    html[lang="ar"] .title-segment {
        font-size: 1.3rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-light);
        padding: 0.5rem 2.5rem 0.5rem 1rem;
        height: 3.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
        min-width: max-content;
        width: 100%;
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
        unicode-bidi: plaintext !important;
    }

    html[lang="ar"] .main-title .title-line[data-i18n="name.last"] {
        display: inline-block;
        transform: translateY(0.8rem);
    }

    html[lang="ar"] .title-segment.active {
        color: var(--text);
        font-weight: 700;
    }

    html[lang="ar"] .dynamic-title {
        width: 100%;
        max-width: 90vw;
        margin: 0 auto;
        height: 3.5rem;
    }

    html[lang="ar"] .title-mask {
        width: 100%;
        overflow: visible;
        height: 100%;
    }

    html[lang="ar"] .title-slider {
        width: 100%;
        height: 100%;
    }

    html[lang="ar"] .title-segment::before {
        content: '' !important;
        position: absolute;
        left: auto !important;
        right: 1rem !important;
        top: 50%;
        transform: translateY(-50%);
        width: 0.6rem;
        height: 0.6rem;
        border-radius: 50%;
    }

    html[lang="ar"] .title-segment.java-backend::before {
        background: var(--java);
    }

    html[lang="ar"] .title-segment.full-stack::before {
        background: var(--full-stack);
    }

    html[lang="ar"] .title-segment.ai::before {
        background: var(--python);
    }

    html[lang="ar"] .title-segment.data-engineering::before {
        background: var(--data-engineering);
    }
    

    html[lang="ar"] .contact-link[href*="tel"] span {
        direction: ltr !important;
        unicode-bidi: embed !important;
        display: inline-block;
    }

    /* Arabic title transitions to prevent layout shift - DESKTOP */
    html[lang="ar"] .title-slider {
        position: relative;
        height: 3.5rem;
        width: 100%;
    }

    html[lang="ar"] .title-segment {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transition: opacity 0.5s ease, visibility 0.5s ease;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    html[lang="ar"] .title-segment:not(.active) {
        opacity: 0;
        visibility: hidden;
    }

    html[lang="ar"] .title-segment.active {
        opacity: 1;
        visibility: visible;
    }

    html[lang="ar"] .about-content {
        text-align: right;
    }

    html[lang="ar"] .education-list li {
        text-align: right;
    }

    html[lang="ar"] .education-detail {
        border-left: none;
        border-right: 2px solid var(--accent);
        padding-left: 0;
        padding-right: 1.2rem;
    }

    html[lang="ar"] .skills-grid {
        text-align: right;
    }

    html[lang="ar"] .project-details {
        text-align: right;
    }

    html[lang="ar"] .form-group input,
    html[lang="ar"] .form-group textarea {
        text-align: right;
        direction: rtl;
    }

    html[lang="ar"] .main-title {
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
        letter-spacing: normal;
    }

    html[lang="ar"] .section-title {
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
    }

    html[lang="ar"] .service-title,
    html[lang="ar"] .project-details h3,
    html[lang="ar"] .skill-category h4 {
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
    }

    html[lang="ar"] .contact-link[href*="tel"],
    html[lang="ar"] .contact-link[href*="mailto"] {
        direction: ltr;
        unicode-bidi: isolate;
        flex-direction: row;
    }

    html[lang="ar"] .contact-link i {
        margin-left: 0.5rem;
        margin-right: 0;
    }

    html[lang="ar"] .contact-link.phone span {
        direction: ltr !important;
        unicode-bidi: embed !important;
        display: inline-block;
    }

    /* RTL layout for other elements */
    html[lang="ar"] .about-text,
    html[lang="ar"] .service-card,
    html[lang="ar"] .contact-info {
        text-align: right;
    }

    html[lang="ar"] .toggle-details {
        margin-right: 0;
        margin-left: 0.5rem;
    }

    html[lang="ar"] .contact-link {
        justify-content: flex-end;
        text-align: right;
    }
}

/*  NON-DESKTOP DEVICES (Tablet & Mobile)  */
@media (max-width: 1024px) {
    html[lang="ar"] { direction: rtl; }

    html[lang="ar"] .title-segment,
    html[lang="ar"] .education-list strong {
        unicode-bidi: plaintext !important;
    }

    html[lang="ar"] .about-text p {
        line-height: 1.8 !important;
        text-align: right !important;
        word-spacing: normal !important;
        letter-spacing: normal !important;
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif !important;
        hyphens: manual !important;
        -webkit-hyphens: manual !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
    }

    html[lang="ar"] .about-text {
        text-align: right !important;
        line-height: 1.8 !important;
        word-break: keep-all !important;
    }

    html[lang="ar"] .about-text p br { display: none !important; }

    html[lang="ar"] .hero .scroll-indicator,
    html[lang="ar"] header.hero .scroll-indicator,
    html[lang="ar"] .back-to-top,
    html[lang="ar"] .section-indicators {
        left: 0.8rem !important;
        right: auto !important;
        transform: none !important;
    }

    .hero .scroll-indicator,
    header.hero .scroll-indicator {
        left: 50%;
        transform: translateX(-50%);
        align-items: center;
    }

    html[lang="ar"] .title-underline { display: block !important; }

    html[lang="ar"] .title-segment {
        font-size: clamp(0.7rem, 3vw, 1rem) !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        line-height: 1.4 !important;
        height: auto !important;
        min-height: 3.2rem;
        padding: 0.5rem 2rem 0.5rem 1.2rem !important;
        text-align: right !important;
        word-break: keep-all;
        word-wrap: normal;
        max-width: 100vw !important;
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
        position: static;
        box-sizing: border-box !important;
        unicode-bidi: plaintext !important;
        letter-spacing: 0.02em;
    }

    html[lang="ar"] .title-segment.active {
        color: var(--text);
        font-weight: 600;
    }

    html[lang="ar"] .dynamic-title {
        height: auto !important;
        min-height: 3.2rem;
        max-width: 95vw !important;
        overflow: visible !important;
        width: 100%;
        box-sizing: border-box !important;
    }

    html[lang="ar"] .title-mask {
        overflow: visible !important;
        height: auto !important;
    }

    html[lang="ar"] .title-slider {
        position: relative !important;
        height: auto !important;
        transform: none !important;
        width: 100%;
    }

    html[lang="ar"] .title-segment:not(.active) {
        opacity: 0 !important;
        visibility: hidden !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }

    html[lang="ar"] .title-segment.active {
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
    }

    html[lang="ar"] .title-segment span {
        display: block;
        width: 100%;
        text-align: right;
        unicode-bidi: plaintext !important;
    }

    html[lang="ar"] .title-segment.java-backend::before,
    html[lang="ar"] .title-segment.full-stack::before,
    html[lang="ar"] .title-segment.ai::before {
        content: '' !important;
        position: absolute !important;
        right: 1rem !important;
        left: auto !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 0.5rem !important;
        height: 0.5rem !important;
        border-radius: 50% !important;
        margin: 0 !important;
        pointer-events: none !important;
        z-index: 1 !important;
    }

    html[lang="ar"] .title-segment.java-backend::before { background: var(--java) !important; }
    html[lang="ar"] .title-segment.full-stack::before { background: var(--accent) !important; }
    html[lang="ar"] .title-segment.ai::before       { background: var(--python) !important; }

    html[lang="ar"] .about-content,
    html[lang="ar"] .education-list li,
    html[lang="ar"] .skills-grid,
    html[lang="ar"] .project-details,
    html[lang="ar"] .about-text,
    html[lang="ar"] .service-card,
    html[lang="ar"] .contact-info,
    html[lang="ar"] .contact-link {
        text-align: right !important;
        direction: rtl !important;
        unicode-bidi: embed;
    }

    html[lang="ar"] .education-detail {
        border-left: none;
        border-right: 2px solid var(--accent);
        padding-left: 0;
        padding-right: 1.2rem;
    }

    html[lang="ar"] .education-list li,
    html[lang="ar"] .education-list strong {
        text-align: right !important;
        direction: rtl !important;
        unicode-bidi: embed !important;
        display: block !important;
    }

    html[lang="ar"] .education-list li span,
    html[lang="ar"] .education-list li strong {
        text-align: right !important;
        direction: rtl !important;
        unicode-bidi: embed !important;
    }

    html[lang="ar"] .form-group input,
    html[lang="ar"] .form-group textarea {
        text-align: right !important;
        direction: rtl !important;
        unicode-bidi: embed;
    }

    html[lang="ar"] .toggle-details { margin-right: 0; margin-left: 0.5rem; }
    html[lang="ar"] .contact-link { justify-content: flex-end; }

    html[lang="ar"] .section-title,
    html[lang="ar"] .service-title,
    html[lang="ar"] .project-details h3,
    html[lang="ar"] .skill-category h4 {
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
        text-align: center !important;
        unicode-bidi: embed;
    }

    html[lang="ar"] .contact-link[href*="tel"] span {
        direction: ltr !important;
        unicode-bidi: embed !important;
    }

    html[lang="ar"] .contact-link[href^="tel"],
    html[lang="ar"] .contact-link[href^="mailto"],
    html[lang="ar"] a.contact-link[href^="tel"],
    html[lang="ar"] a.contact-link[href^="mailto"] {
        direction: ltr !important;
        unicode-bidi: isolate-override !important;
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        text-align: left !important;
        white-space: nowrap !important;
        padding-inline-start: 0.25rem !important;
        padding-inline-end: 0.25rem !important;
    }

    html[lang="ar"] .contact-link[href^="tel"] span,
    html[lang="ar"] .contact-link[href^="mailto"] span {
        direction: ltr !important;
        unicode-bidi: embed !important;
        white-space: nowrap !important;
    }

    html[lang="ar"] .contact-link .icon,
    html[lang="ar"] .contact-link svg,
    html[lang="ar"] .contact-link i {
        flex-shrink: 0 !important;
        order: -1 !important;
        margin-inline-end: 0.35rem !important;
        margin-inline-start: 0 !important;
    }

    html[lang="ar"] .contact-link[href^="tel"] span::before {
        content: '\200E' !important;
        display: inline-block !important;
        width: 0 !important;
    }
}

html[lang="ar"] {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--primary);
}

html[lang="ar"]::-webkit-scrollbar {
    width: 8px;
}

html[lang="ar"]::-webkit-scrollbar-track {
    background: var(--primary);
}

html[lang="ar"]::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 4px;
}
html[lang="ar"]::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-dark);
}

/*  SAFARI SPECIFIC */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 1024px) {
        html[lang="ar"] .title-segment,
        html[lang="ar"] .title-mask,
        html[lang="ar"] .title-slider {
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
            will-change: transform !important;
        }

        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top {
            position: fixed !important;
            left: 0.8rem !important;
            right: auto !important;
            bottom: 1rem !important;
            z-index: 999 !important;
        }

        html[lang="ar"] .education-list li,
        html[lang="ar"] .education-list strong {
            text-align: right !important;
            direction: rtl !important;
            unicode-bidi: embed !important;
        }
    }

    @media (max-width: 768px) {
        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top {
            bottom: 0.8rem !important;
            left: 0.8rem !important;
        }
    }

    @media (max-width: 480px) {
        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top {
            bottom: 0.6rem !important;
            left: 0.6rem !important;
        }
    }
}

@media (max-width: 768px) {
    html[lang="ar"] .about-text p,
    html[lang="ar"] .education-list li {
        unicode-bidi: plaintext !important;
        text-align: justify !important;
    }

    html[lang="ar"] .section-indicators,
    html[lang="ar"] .back-to-top { left: 0.8rem; right: auto; }

    .hero .scroll-indicator,
    header.hero .scroll-indicator {
        left: 50%;
        bottom: 0.8rem;
    }

    html[lang="ar"] .title-segment {
        font-size: clamp(0.8rem, 3.5vw, 1.1rem) !important;
        padding: 0.6rem 1.8rem 0.6rem 0.8rem !important;
        letter-spacing: 0.02em !important;
        line-height: 1.5 !important;
    }

    html[lang="ar"] .dynamic-title {
        max-width: 98vw !important;
        margin: 0 auto !important;
    }

    html[lang="ar"] .title-segment.java-backend::before,
    html[lang="ar"] .title-segment.full-stack::before,
    html[lang="ar"] .title-segment.ai::before {
        right: 0.8rem !important;
        width: 0.4rem !important;
        height: 0.4rem !important;
    }

    html[lang="ar"] .hero-content {
        padding-left: 0.3rem !important;
        padding-right: 0.3rem !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    html[lang="ar"] .section-indicators,
    html[lang="ar"] .back-to-top { left: 1.5rem; right: auto; }

    .hero .scroll-indicator,
    header.hero .scroll-indicator { left: 50%; }
}

@media (max-width: 480px) {
    html[lang="ar"] .about-text p {
        font-size: 0.9rem !important;
        line-height: 1.9 !important;
        text-align: justify !important;
        padding: 0 0.2rem !important;
        unicode-bidi: plaintext !important;
        word-spacing: normal !important;
    }

    html[lang="ar"] .title-segment {
        font-size: clamp(0.75rem, 4vw, 1rem) !important;
        padding: 0.5rem 1.5rem 0.5rem 0.5rem !important;
        line-height: 1.5 !important;
    }

    html[lang="ar"] .dynamic-title {
        max-width: 100vw !important;
    }

    html[lang="ar"] .title-segment.java-backend::before,
    html[lang="ar"] .title-segment.full-stack::before,
    html[lang="ar"] .title-segment.ai::before {
        right: 0.5rem !important;
        width: 0.3rem !important;
        height: 0.3rem !important;
    }
}

/*  SAFARI SPECIFIC FOR ARABIC NON-DESKTOP  */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 1024px) {
        html[lang="ar"] .title-segment {
            position: relative !important;
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
            will-change: transform !important;
        }

        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top {
            position: fixed !important;
            left: 0.8rem !important;
            right: auto !important;
            bottom: 1rem !important;
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
            will-change: transform !important;
            z-index: 999 !important;
        }

        html[lang="ar"] .title-mask {
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
        }

        html[lang="ar"] .title-slider {
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
        }

        html[lang="ar"] .education-list li,
        html[lang="ar"] .education-detail {
            text-align: right !important;
            direction: rtl !important;
            unicode-bidi: embed !important;
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
        }

        html[lang="ar"] .education-list strong {
            display: block !important;
            text-align: right !important;
            direction: rtl !important;
        }

        html[lang="ar"] .education-detail {
            border-right: 2px solid var(--accent) !important;
            border-left: none !important;
            padding-right: 1.2rem !important;
            padding-left: 0 !important;
        }

        html[lang="ar"] .education-list li::marker {
            text-align: right !important;
            direction: rtl !important;
        }

        html[lang="ar"] .title-segment span {
            text-align: right !important;
            direction: rtl !important;
        }
    }

    @media (max-width: 768px) {
        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top {
            bottom: 0.8rem !important;
            left: 0.8rem !important;
        }

        html[lang="ar"] .education-list strong {
            text-align: right !important;
        }
    }

    @media (max-width: 480px) {
        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top {
            bottom: 0.6rem !important;
            left: 0.6rem !important;
        }
    }
}

/* Arabic & Hebrew RTL Specific Styles - DESKTOP ONLY */
@media (min-width: 1025px) {
    html[lang="ar"], html[lang="he"] {
        direction: rtl;
        font-family: 'Noto Naskh Arabic', 'Tahoma', 'Arial', sans-serif;
    }

    html[lang="ar"] body, html[lang="he"] body {
        direction: rtl;
    }

    /* ARABIC & HEBREW TEXT ORDER ON DESKTOP - ONLY FOR TITLES */
    html[lang="ar"] .title-segment,
    html[lang="ar"] .education-list strong,
    html[lang="he"] .title-segment,
    html[lang="he"] .education-list strong {
        unicode-bidi: plaintext !important;
    }

    /* MOVED TO LEFT SIDE FOR ARABIC & HEBREW ONLY - DESKTOP */
    html[lang="ar"] .section-indicators,
    html[lang="he"] .section-indicators {
        left: 2rem !important;
        right: auto !important;
    }

    /* Scroll indicator moved to LEFT for Arabic & Hebrew - DESKTOP ONLY */
    html[lang="ar"] .hero .scroll-indicator,
    html[lang="ar"] header.hero .scroll-indicator,
    html[lang="he"] .hero .scroll-indicator,
    html[lang="he"] header.hero .scroll-indicator {
        left: 2rem !important;
        right: auto !important;
        transform: none !important;
        align-items: flex-start !important;
    }

    /* Language Toggle MOVED TO LEFT SIDE FOR ARABIC & HEBREW - DESKTOP */
    html[lang="ar"] .language-toggle,
    html[lang="he"] .language-toggle {
        left: 1rem !important;
        right: auto !important;
    }

    /* BACK-TO-TOP MOVED TO LEFT SIDE FOR ARABIC & HEBREW - DESKTOP */
    html[lang="ar"] .back-to-top,
    html[lang="he"] .back-to-top {
        left: 2rem !important;
        right: auto !important;
    }

    /* Arabic & Hebrew title styles for desktop */
    html[lang="ar"] .title-segment,
    html[lang="he"] .title-segment {
        font-size: 1.3rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-light);
        padding: 0.5rem 2.5rem 0.5rem 1rem;
        height: 3.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
        min-width: max-content;
        width: 100%;
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
        unicode-bidi: plaintext !important;
    }

    html[lang="ar"] .main-title .title-line[data-i18n="name.last"],
    html[lang="he"] .main-title .title-line[data-i18n="name.last"] {
        display: inline-block;
        transform: translateY(0.8rem);
    }

    html[lang="ar"] .title-segment.active,
    html[lang="he"] .title-segment.active {
        color: var(--text);
        font-weight: 700;
    }

    html[lang="ar"] .dynamic-title,
    html[lang="he"] .dynamic-title {
        width: 100%;
        max-width: 90vw;
        margin: 0 auto;
        height: 3.5rem;
    }

    html[lang="ar"] .title-mask,
    html[lang="he"] .title-mask {
        width: 100%;
        overflow: visible;
        height: 100%;
    }

    html[lang="ar"] .title-slider,
    html[lang="he"] .title-slider {
        width: 100%;
        height: 100%;
    }

    html[lang="ar"] .title-segment::before,
    html[lang="he"] .title-segment::before {
        content: '' !important;
        position: absolute;
        left: auto !important;
        right: 1rem !important;
        top: 50%;
        transform: translateY(-50%);
        width: 0.6rem;
        height: 0.6rem;
        border-radius: 50%;
    }

    html[lang="ar"] .title-segment.java-backend::before,
    html[lang="he"] .title-segment.java-backend::before {
        background: var(--java);
    }

    html[lang="ar"] .title-segment.full-stack::before,
    html[lang="he"] .title-segment.full-stack::before {
        background: var(--accent);
    }

    html[lang="ar"] .title-segment.ai::before,
    html[lang="he"] .title-segment.ai::before {
        background: var(--python);
    }

    html[lang="ar"] .contact-link[href*="tel"] span,
    html[lang="he"] .contact-link[href*="tel"] span {
        direction: ltr !important;
        unicode-bidi: embed !important;
        display: inline-block;
    }

    /* Arabic & Hebrew title transitions to prevent layout shift - DESKTOP */
    html[lang="ar"] .title-slider,
    html[lang="he"] .title-slider {
        position: relative;
        height: 3.5rem;
        width: 100%;
    }

    html[lang="ar"] .title-segment,
    html[lang="he"] .title-segment {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transition: opacity 0.5s ease, visibility 0.5s ease;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    html[lang="ar"] .title-segment:not(.active),
    html[lang="he"] .title-segment:not(.active) {
        opacity: 0;
        visibility: hidden;
    }

    html[lang="ar"] .title-segment.active,
    html[lang="he"] .title-segment.active {
        opacity: 1;
        visibility: visible;
    }

    html[lang="ar"] .about-content,
    html[lang="he"] .about-content {
        text-align: right;
    }

    html[lang="ar"] .education-list li,
    html[lang="he"] .education-list li {
        text-align: right;
    }

    html[lang="ar"] .education-detail,
    html[lang="he"] .education-detail {
        border-left: none;
        border-right: 2px solid var(--accent);
        padding-left: 0;
        padding-right: 1.2rem;
    }

    html[lang="ar"] .skills-grid,
    html[lang="he"] .skills-grid {
        text-align: right;
    }

    html[lang="ar"] .project-details,
    html[lang="he"] .project-details {
        text-align: right;
    }

    html[lang="ar"] .form-group input,
    html[lang="ar"] .form-group textarea,
    html[lang="he"] .form-group input,
    html[lang="he"] .form-group textarea {
        text-align: right;
        direction: rtl;
    }

    html[lang="ar"] .main-title,
    html[lang="he"] .main-title {
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
        letter-spacing: normal;
    }

    html[lang="ar"] .section-title,
    html[lang="he"] .section-title {
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
    }

    html[lang="ar"] .service-title,
    html[lang="ar"] .project-details h3,
    html[lang="ar"] .skill-category h4,
    html[lang="he"] .service-title,
    html[lang="he"] .project-details h3,
    html[lang="he"] .skill-category h4 {
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
    }

    html[lang="ar"] .contact-link[href*="tel"],
    html[lang="ar"] .contact-link[href*="mailto"],
    html[lang="he"] .contact-link[href*="tel"],
    html[lang="he"] .contact-link[href*="mailto"] {
        direction: ltr;
        unicode-bidi: isolate;
        flex-direction: row;
    }

    html[lang="ar"] .contact-link i,
    html[lang="he"] .contact-link i {
        margin-left: 0.5rem;
        margin-right: 0;
    }

    html[lang="ar"] .contact-link.phone span,
    html[lang="he"] .contact-link.phone span {
        direction: ltr !important;
        unicode-bidi: embed !important;
        display: inline-block;
    }

    /* RTL layout for other elements */
    html[lang="ar"] .about-text,
    html[lang="ar"] .service-card,
    html[lang="ar"] .contact-info,
    html[lang="he"] .about-text,
    html[lang="he"] .service-card,
    html[lang="he"] .contact-info {
        text-align: right;
    }

    html[lang="ar"] .toggle-details,
    html[lang="he"] .toggle-details {
        margin-right: 0;
        margin-left: 0.5rem;
    }

    html[lang="ar"] .contact-link,
    html[lang="he"] .contact-link {
        justify-content: flex-end;
        text-align: right;
    }
}

/*  NON-DESKTOP DEVICES (Tablet & Mobile)  */
@media (max-width: 1024px) {
    html[lang="ar"], html[lang="he"] { direction: rtl; }

    html[lang="ar"] .title-segment,
    html[lang="ar"] .education-list strong,
    html[lang="he"] .title-segment,
    html[lang="he"] .education-list strong {
        unicode-bidi: plaintext !important;
    }

    html[lang="ar"] .language-toggle,
    html[lang="he"] .language-toggle {
        left: 0.8rem !important;
        right: auto !important;
    }

    html[lang="ar"] .about-text p,
    html[lang="he"] .about-text p {
        line-height: 1.8 !important;
        text-align: right !important;
        word-spacing: normal !important;
        letter-spacing: normal !important;
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif !important;
        hyphens: manual !important;
        -webkit-hyphens: manual !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
    }

    html[lang="ar"] .about-text,
    html[lang="he"] .about-text {
        text-align: right !important;
        line-height: 1.8 !important;
        word-break: keep-all !important;
    }

    html[lang="ar"] .about-text p br,
    html[lang="he"] .about-text p br { display: none !important; }

    html[lang="ar"] .hero .scroll-indicator,
    html[lang="ar"] header.hero .scroll-indicator,
    html[lang="ar"] .back-to-top,
    html[lang="ar"] .section-indicators,
    html[lang="he"] .hero .scroll-indicator,
    html[lang="he"] header.hero .scroll-indicator,
    html[lang="he"] .back-to-top,
    html[lang="he"] .section-indicators {
        left: 0.8rem !important;
        right: auto !important;
        transform: none !important;
    }

    .hero .scroll-indicator,
    header.hero .scroll-indicator {
        left: 50%;
        transform: translateX(-50%);
        align-items: center;
    }

    html[lang="ar"] .title-underline,
    html[lang="he"] .title-underline { display: block !important; }

    html[lang="ar"] .title-segment,
    html[lang="he"] .title-segment {
        font-size: clamp(0.7rem, 3vw, 1rem) !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        line-height: 1.4 !important;
        height: auto !important;
        min-height: 3.2rem;
        padding: 0.5rem 2rem 0.5rem 1.2rem !important;
        text-align: right !important;
        word-break: keep-all;
        word-wrap: normal;
        max-width: 100vw !important;
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
        position: static;
        box-sizing: border-box !important;
        unicode-bidi: plaintext !important;
        letter-spacing: 0.02em;
    }

    html[lang="ar"] .title-segment.active,
    html[lang="he"] .title-segment.active {
        color: var(--text);
        font-weight: 600;
    }

    html[lang="ar"] .dynamic-title,
    html[lang="he"] .dynamic-title {
        height: auto !important;
        min-height: 3.2rem;
        max-width: 95vw !important;
        overflow: visible !important;
        width: 100%;
        box-sizing: border-box !important;
    }

    html[lang="ar"] .title-mask,
    html[lang="he"] .title-mask {
        overflow: visible !important;
        height: auto !important;
    }

    html[lang="ar"] .title-slider,
    html[lang="he"] .title-slider {
        position: relative !important;
        height: auto !important;
        transform: none !important;
        width: 100%;
    }

    html[lang="ar"] .title-segment:not(.active),
    html[lang="he"] .title-segment:not(.active) {
        opacity: 0 !important;
        visibility: hidden !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }

    html[lang="ar"] .title-segment.active,
    html[lang="he"] .title-segment.active {
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
    }

    html[lang="ar"] .title-segment span,
    html[lang="he"] .title-segment span {
        display: block;
        width: 100%;
        text-align: right;
        unicode-bidi: plaintext !important;
    }

    html[lang="ar"] .title-segment.java-backend::before,
    html[lang="ar"] .title-segment.full-stack::before,
    html[lang="ar"] .title-segment.ai::before,
    html[lang="ar"] .title-segment.data-engineering::before {
        content: '' !important;
        position: absolute !important;
        right: 1rem !important;
        left: auto !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 0.5rem !important;
        height: 0.5rem !important;
        border-radius: 50% !important;
        margin: 0 !important;
        pointer-events: none !important;
        z-index: 1 !important;
    }

    html[lang="ar"] .title-segment.java-backend::before { background: var(--java) !important; }
    html[lang="ar"] .title-segment.full-stack::before { background: var(--full-stack) !important; }
    html[lang="ar"] .title-segment.ai::before       { background: var(--python) !important; }
    html[lang="ar"] .title-segment.data-engineering::before { background: var(--data-engineering) !important; }
        

    html[lang="ar"] .about-content,
    html[lang="ar"] .education-list li,
    html[lang="ar"] .skills-grid,
    html[lang="ar"] .project-details,
    html[lang="ar"] .about-text,
    html[lang="ar"] .service-card,
    html[lang="ar"] .contact-info,
    html[lang="ar"] .contact-link,
    html[lang="he"] .about-content,
    html[lang="he"] .education-list li,
    html[lang="he"] .skills-grid,
    html[lang="he"] .project-details,
    html[lang="he"] .about-text,
    html[lang="he"] .service-card,
    html[lang="he"] .contact-info,
    html[lang="he"] .contact-link {
        text-align: right !important;
        direction: rtl !important;
        unicode-bidi: embed;
    }

    html[lang="ar"] .education-detail,
    html[lang="he"] .education-detail {
        border-left: none;
        border-right: 2px solid var(--accent);
        padding-left: 0;
        padding-right: 1.2rem;
    }

    html[lang="ar"] .education-list li,
    html[lang="ar"] .education-list strong,
    html[lang="he"] .education-list li,
    html[lang="he"] .education-list strong {
        text-align: right !important;
        direction: rtl !important;
        unicode-bidi: embed !important;
        display: block !important;
    }

    html[lang="ar"] .education-list li span,
    html[lang="ar"] .education-list li strong,
    html[lang="he"] .education-list li span,
    html[lang="he"] .education-list li strong {
        text-align: right !important;
        direction: rtl !important;
        unicode-bidi: embed !important;
    }

    html[lang="ar"] .form-group input,
    html[lang="ar"] .form-group textarea,
    html[lang="he"] .form-group input,
    html[lang="he"] .form-group textarea {
        text-align: right !important;
        direction: rtl !important;
        unicode-bidi: embed;
    }

    html[lang="ar"] .toggle-details,
    html[lang="he"] .toggle-details { margin-right: 0; margin-left: 0.5rem; }
    html[lang="ar"] .contact-link,
    html[lang="he"] .contact-link { justify-content: flex-end; }

    html[lang="ar"] .section-title,
    html[lang="ar"] .service-title,
    html[lang="ar"] .project-details h3,
    html[lang="ar"] .skill-category h4,
    html[lang="he"] .section-title,
    html[lang="he"] .service-title,
    html[lang="he"] .project-details h3,
    html[lang="he"] .skill-category h4 {
        font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', sans-serif;
        text-align: center !important;
        unicode-bidi: embed;
    }

    html[lang="ar"] .contact-link[href*="tel"] span,
    html[lang="he"] .contact-link[href*="tel"] span {
        direction: ltr !important;
        unicode-bidi: embed !important;
    }

    html[lang="ar"] .contact-link[href^="tel"],
    html[lang="ar"] .contact-link[href^="mailto"],
    html[lang="ar"] a.contact-link[href^="tel"],
    html[lang="ar"] a.contact-link[href^="mailto"],
    html[lang="he"] .contact-link[href^="tel"],
    html[lang="he"] .contact-link[href^="mailto"],
    html[lang="he"] a.contact-link[href^="tel"],
    html[lang="he"] a.contact-link[href^="mailto"] {
        direction: ltr !important;
        unicode-bidi: isolate-override !important;
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        text-align: left !important;
        white-space: nowrap !important;
        padding-inline-start: 0.25rem !important;
        padding-inline-end: 0.25rem !important;
    }

    html[lang="ar"] .contact-link[href^="tel"] span,
    html[lang="ar"] .contact-link[href^="mailto"] span,
    html[lang="he"] .contact-link[href^="tel"] span,
    html[lang="he"] .contact-link[href^="mailto"] span {
        direction: ltr !important;
        unicode-bidi: embed !important;
        white-space: nowrap !important;
    }

    html[lang="ar"] .contact-link .icon,
    html[lang="ar"] .contact-link svg,
    html[lang="ar"] .contact-link i,
    html[lang="he"] .contact-link .icon,
    html[lang="he"] .contact-link svg,
    html[lang="he"] .contact-link i {
        flex-shrink: 0 !important;
        order: -1 !important;
        margin-inline-end: 0.35rem !important;
        margin-inline-start: 0 !important;
    }

    html[lang="ar"] .contact-link[href^="tel"] span::before,
    html[lang="he"] .contact-link[href^="tel"] span::before {
        content: '\200E' !important;
        display: inline-block !important;
        width: 0 !important;
    }
}

html[lang="ar"], html[lang="he"] {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--primary);
}

html[lang="ar"]::-webkit-scrollbar,
html[lang="he"]::-webkit-scrollbar {
    width: 8px;
}

html[lang="ar"]::-webkit-scrollbar-track,
html[lang="he"]::-webkit-scrollbar-track {
    background: var(--primary);
}

html[lang="ar"]::-webkit-scrollbar-thumb,
html[lang="he"]::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 4px;
}
html[lang="ar"]::-webkit-scrollbar-thumb:hover,
html[lang="he"]::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-dark);
}

/*  SAFARI SPECIFIC  */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 1024px) {
        html[lang="ar"] .title-segment,
        html[lang="ar"] .title-mask,
        html[lang="ar"] .title-slider,
        html[lang="he"] .title-segment,
        html[lang="he"] .title-mask,
        html[lang="he"] .title-slider {
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
            will-change: transform !important;
        }

        html[lang="ar"] .language-toggle,
        html[lang="he"] .language-toggle {
            left: 0.8rem !important;
            right: auto !important;
        }

        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top,
        html[lang="he"] .section-indicators,
        html[lang="he"] .back-to-top {
            position: fixed !important;
            left: 0.8rem !important;
            right: auto !important;
            bottom: 1rem !important;
            z-index: 999 !important;
        }

        html[lang="ar"] .education-list li,
        html[lang="ar"] .education-list strong,
        html[lang="he"] .education-list li,
        html[lang="he"] .education-list strong {
            text-align: right !important;
            direction: rtl !important;
            unicode-bidi: embed !important;
        }
    }

    @media (max-width: 768px) {
        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top,
        html[lang="he"] .section-indicators,
        html[lang="he"] .back-to-top {
            bottom: 0.8rem !important;
            left: 0.8rem !important;
        }
    }

    @media (max-width: 480px) {
        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top,
        html[lang="he"] .section-indicators,
        html[lang="he"] .back-to-top {
            bottom: 0.6rem !important;
            left: 0.6rem !important;
        }
    }
}

@media (max-width: 768px) {
    html[lang="ar"] .about-text p,
    html[lang="ar"] .education-list li,
    html[lang="he"] .about-text p,
    html[lang="he"] .education-list li {
        unicode-bidi: plaintext !important;
        text-align: justify !important;
    }

    html[lang="ar"] .section-indicators,
    html[lang="ar"] .back-to-top,
    html[lang="he"] .section-indicators,
    html[lang="he"] .back-to-top { left: 0.8rem; right: auto; }

    .hero .scroll-indicator,
    header.hero .scroll-indicator {
        left: 50%;
        bottom: 0.8rem;
    }

    html[lang="ar"] .title-segment,
    html[lang="he"] .title-segment {
        font-size: clamp(0.8rem, 3.5vw, 1.1rem) !important;
        padding: 0.6rem 1.8rem 0.6rem 0.8rem !important;
        letter-spacing: 0.02em !important;
        line-height: 1.5 !important;
    }

    html[lang="ar"] .dynamic-title,
    html[lang="he"] .dynamic-title {
        max-width: 98vw !important;
        margin: 0 auto !important;
    }

    html[lang="ar"] .title-segment.java-backend::before,
    html[lang="ar"] .title-segment.full-stack::before,
    html[lang="ar"] .title-segment.ai::before,
    html[lang="he"] .title-segment.java-backend::before,
    html[lang="he"] .title-segment.full-stack::before,
    html[lang="he"] .title-segment.ai::before {
        right: 0.8rem !important;
        width: 0.4rem !important;
        height: 0.4rem !important;
    }

    html[lang="ar"] .hero-content,
    html[lang="he"] .hero-content {
        padding-left: 0.3rem !important;
        padding-right: 0.3rem !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    html[lang="ar"] .section-indicators,
    html[lang="ar"] .back-to-top,
    html[lang="he"] .section-indicators,
    html[lang="he"] .back-to-top { left: 1.5rem; right: auto; }

    .hero .scroll-indicator,
    header.hero .scroll-indicator { left: 50%; }
}

@media (max-width: 480px) {
    html[lang="ar"] .about-text p,
    html[lang="he"] .about-text p {
        font-size: 0.9rem !important;
        line-height: 1.9 !important;
        text-align: justify !important;
        padding: 0 0.2rem !important;
        unicode-bidi: plaintext !important;
        word-spacing: normal !important;
    }

    html[lang="ar"] .title-segment,
    html[lang="he"] .title-segment {
        font-size: clamp(0.75rem, 4vw, 1rem) !important;
        padding: 0.5rem 1.5rem 0.5rem 0.5rem !important;
        line-height: 1.5 !important;
    }

    html[lang="ar"] .dynamic-title,
    html[lang="he"] .dynamic-title {
        max-width: 100vw !important;
    }

    html[lang="ar"] .title-segment.java-backend::before,
    html[lang="ar"] .title-segment.full-stack::before,
    html[lang="ar"] .title-segment.ai::before,
    html[lang="he"] .title-segment.java-backend::before,
    html[lang="he"] .title-segment.full-stack::before,
    html[lang="he"] .title-segment.ai::before {
        right: 0.5rem !important;
        width: 0.3rem !important;
        height: 0.3rem !important;
    }
}

/*  SAFARI FOR ARABIC & HEBREW NON-DESKTOP  */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 1024px) {
        html[lang="ar"] .title-segment,
        html[lang="he"] .title-segment {
            position: relative !important;
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
            will-change: transform !important;
        }

        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top,
        html[lang="he"] .section-indicators,
        html[lang="he"] .back-to-top {
            position: fixed !important;
            left: 0.8rem !important;
            right: auto !important;
            bottom: 1rem !important;
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
            will-change: transform !important;
            z-index: 999 !important;
        }

        html[lang="ar"] .title-mask,
        html[lang="he"] .title-mask {
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
        }

        html[lang="ar"] .title-slider,
        html[lang="he"] .title-slider {
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
        }

        html[lang="ar"] .education-list li,
        html[lang="ar"] .education-detail,
        html[lang="he"] .education-list li,
        html[lang="he"] .education-detail {
            text-align: right !important;
            direction: rtl !important;
            unicode-bidi: embed !important;
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
        }

        html[lang="ar"] .education-list strong,
        html[lang="he"] .education-list strong {
            display: block !important;
            text-align: right !important;
            direction: rtl !important;
        }

        html[lang="ar"] .education-detail,
        html[lang="he"] .education-detail {
            border-right: 2px solid var(--accent) !important;
            border-left: none !important;
            padding-right: 1.2rem !important;
            padding-left: 0 !important;
        }

        html[lang="ar"] .education-list li::marker,
        html[lang="he"] .education-list li::marker {
            text-align: right !important;
            direction: rtl !important;
        }

        html[lang="ar"] .title-segment span,
        html[lang="he"] .title-segment span {
            text-align: right !important;
            direction: rtl !important;
        }
    }

    @media (max-width: 768px) {
        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top,
        html[lang="he"] .section-indicators,
        html[lang="he"] .back-to-top {
            bottom: 0.8rem !important;
            left: 0.8rem !important;
        }

        html[lang="ar"] .education-list strong,
        html[lang="he"] .education-list strong {
            text-align: right !important;
        }
    }

    @media (max-width: 480px) {
        html[lang="ar"] .section-indicators,
        html[lang="ar"] .back-to-top,
        html[lang="he"] .section-indicators,
        html[lang="he"] .back-to-top {
            bottom: 0.6rem !important;
            left: 0.6rem !important;
        }
    }
}


@media (max-width: 768px) {
    body {
        font-size: 16px;
        overflow-x: hidden;
    }

    .section-indicators {
        right: 0.5rem;
        gap: 0.8rem;
        transform: translateY(-50%);
    }

    .section-indicator {
        width: 70px;
        height: 70px;
    }

    .section-indicator span {
        font-size: 0.7rem;
        line-height: 1.1;
        padding: 0.15rem;
    }

    .section-indicator::before {
        box-shadow:
            0 0 12px rgba(255, 204, 0, 0.8),
            0 0 20px rgba(255, 147, 0, 0.6);
    }

    .section-indicator:hover::before {
        box-shadow:
            0 0 18px rgba(255, 204, 0, 1),
            0 0 30px rgba(255, 147, 0, 0.8);
    }

    .section-indicator:hover span {
        text-shadow:
            0 0 10px var(--text),
            0 0 20px rgba(255, 204, 0, 0.8);
        transform: scale(1.08);
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding: 1rem 0.5rem;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .hero-content {
        gap: 1.5rem;
        padding: 1rem 0.5rem;
        max-width: 100%;
    }

    .profile-container {
        width: 160px;
        height: 160px;
        margin-bottom: 1rem;
    }

    .profile-image {
        border-width: 2px;
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    }

    .orbit {
        font-size: 0.55rem;
        border-width: 1px;
        animation-duration: 15s;
    }

    .orbit span {
        font-size: 0.55rem;
        padding: 0.2rem 0.4rem;
        top: -0.7rem;
        border-width: 1px;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(30, 41, 59, 0.6) 70%);
        text-shadow:
            0 0 5px currentColor,
            0 0 10px rgba(255, 204, 0, 0.6);
        animation: sun-glow 2s ease-in-out infinite;
    }

    .orbit.java {
        width: 120%;
        height: 120%;
        top: -10%;
        left: -10%;
    }

    .orbit.python {
        width: 135%;
        height: 135%;
        top: -17.5%;
        left: -17.5%;
    }

    .orbit.csharp {
        width: 150%;
        height: 150%;
        top: -25%;
        left: -25%;
    }

    .orbit.javascript {
        width: 165%;
        height: 165%;
        top: -32.5%;
        left: -32.5%;
    }

    .orbit.sql {
        width: 180%;
        height: 180%;
        top: -40%;
        left: -40%;
    }

    .orbit.spring {
        width: 195%;
        height: 195%;
        top: -47.5%;
        left: -47.5%;
    }

    .orbit:hover {
        box-shadow: none;
    }

    .orbit:hover span {
        transform: translateX(-50%);
        text-shadow:
            0 0 10px currentColor,
            0 0 20px rgba(255, 204, 0, 0.8);
    }

    .main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        line-height: 1.2;
    }

    .dynamic-title {
        height: 3.2rem;
        max-width: 80vw;
        overflow: hidden;
        margin: 0 auto;
        position: relative;
    }

    .title-mask {
        max-width: 100%;
        height: 3.2rem;
        overflow: hidden;
    }

    .title-slider {
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: absolute;
        top: 0;
        left: 0;
        transition: transform 0.8s ease-in-out;
    }

    .title-segment {
        font-size: clamp(0.6rem, 2.5vw, 0.8rem);
        height: 3.2rem;
        padding: 0 0.3rem;
        letter-spacing: 0.02em;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        line-height: 3.2rem;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-light);
    }

    .title-segment.active {
        color: var(--text);
    }

    .title-segment::before {
        content: '';
        width: 0.2rem;
        height: 0.2rem;
        margin-right: 0.2rem;
        border-radius: 50%;
        position: static;
    }

    .title-segment.java-backend::before {
        background: var(--java);
    }
    .title-segment.full-stack::before {
        background: var(--accent);
    }
    .title-segment.ai::before {
        background: var(--python);
    }

    .title-underline {
        height: 1px;
        background: linear-gradient(90deg, var(--java), var(--spring), var(--python));
        width: 0;
        margin: 0 auto;
        transition: width 0.8s ease;
    }

    /* Turkish */
    html[lang="tr"] .title-segment {
        font-size: clamp(0.55rem, 2.3vw, 0.75rem);
    }

    .contact-links {
        gap: 0.5rem;
        max-width: 90vw;
    }

    .contact-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        border-radius: 1.5rem;
    }

    .contact-link::before {
        border-radius: 1.5rem;
    }

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

    .contact-link:hover i {
        text-shadow:
            0 0 5px var(--accent),
            0 0 10px rgba(255, 204, 0, 0.6);
    }

    .social-links {
        gap: 0.8rem;
        margin-top: 1rem;
    }

    .social-link {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.1rem;
    }

    .social-link:hover {
        box-shadow:
            0 0 10px rgba(255, 204, 0, 0.8),
            0 0 15px rgba(255, 147, 0, 0.6);
    }

    .scroll-indicator {
        bottom: 0.8rem;
        font-size: 0.65rem;
    }

    .arrow-down {
        width: 0.7rem;
        height: 0.7rem;
        border-width: 1px;
    }

    .section {
        padding: 2.5rem 0;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .container {
        padding: 0 0.8rem;
        max-width: 100%;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .section-title::after {
        width: 60px;
        height: 2px;
    }

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

    .about-text {
    font-size: 0.85rem;
    }

    .about-text h3 {
    font-size: 1rem;
    }

    .education-list li {
    padding: 0.7rem;
    margin-bottom: 0.7rem;
    }

    .education-list strong {
    font-size: 0.95rem;
    }

    .education-list span {
    font-size: 0.75rem;
    display: block; 
    }

    .education-detail {
    font-size: 0.75rem;
    padding-left: 0.8rem;
    display: block;
    }

    .toggle-details {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    display: block;
    margin-top: 0.3rem;
}

    .toggle-details:hover {
    box-shadow:
        0 0 10px rgba(255, 204, 0, 0.8),
        0 0 15px rgba(255, 147, 0, 0.6);
    }

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

    .skills-container h3 {
        font-size: 1rem;
    }

    .skill-category h4 {
        font-size: 0.95rem;
    }

    .icon-list {
        justify-content: center;
        gap: 0.5rem;
    }

    .icon-list li {
        width: 34px;
        height: 34px;
    }

    .icon-list li i {
        font-size: 18px;
    }

    .icon-list li:hover {
        box-shadow:
            0 3px 10px rgba(59, 130, 246, 0.2),
            0 0 10px rgba(255, 204, 0, 0.8);
    }

    .icon-list li::after {
        font-size: 0.65rem;
        top: -1.6rem;
    }

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

    .project-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        max-width: 100%;
    }

    .project-card:hover {
        box-shadow:
            0 10px 20px rgba(0, 0, 0, 0.2),
            0 0 15px rgba(255, 204, 0, 0.6);
    }

    .project-image {
        height: 140px;
    }

    .project-details {
        padding: 0.8rem;
    }

    .project-details h3 {
        font-size: 1rem;
    }

    .project-details p {
        font-size: 0.85rem;
    }

    .project-tech span {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    .project-tech span:hover {
        box-shadow:
            0 0 5px rgba(255, 204, 0, 0.6),
            0 0 10px rgba(255, 147, 0, 0.4);
    }

    .project-duration {
        font-size: 0.75rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .btn:hover {
        box-shadow:
            0 3px 10px rgba(59, 130, 246, 0.2),
            0 0 10px rgba(255, 204, 0, 0.8);
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-info h3 {
        font-size: 1.2rem;
    }

    .contact-info li {
        font-size: 0.85rem;
        gap: 0.7rem;
    }

    .contact-info i {
        font-size: 1.1rem;
    }

    .contact-info i:hover {
        text-shadow:
            0 0 5px var(--accent),
            0 0 10px rgba(255, 204, 0, 0.6);
    }

    .contact-form {
        gap: 0.8rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.7rem;
        font-size: 0.85rem;
    }

    .form-group input::before,
    .form-group textarea::before {
        border-radius: 4px;
        box-shadow:
            0 0 10px rgba(255, 204, 0, 0.8),
            0 0 20px rgba(255, 147, 0, 0.6);
    }

    .form-group input:focus,
    .form-group textarea:focus {
        border: 1px solid var(--secondary);
        transform: scale(1.02);
        box-shadow:
            0 0 10px rgba(255, 204, 0, 0.6),
            0 0 15px rgba(255, 147, 0, 0.4);
    }

    .form-group input:-webkit-autofill,
    .form-group input:-webkit-autofill:hover,
    .form-group input:-webkit-autofill:focus,
    .form-group textarea:-webkit-autofill,
    .form-group textarea:-webkit-autofill:hover,
    .form-group textarea:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 1000px var(--secondary) inset;
        -webkit-text-fill-color: var(--text);
        border: 1px solid var(--secondary);
    }

    .form-group textarea {
        min-height: 100px;
    }

    .form-message {
        font-size: 0.85rem;
        padding: 0.7rem;
    }

    footer {
        padding: 1.2rem 0;
        font-size: 0.85rem;
    }

    .back-to-top {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.1rem;
        bottom: 0.8rem !important;
        right: 0.8rem !important;
        left: auto !important;
    }

    .back-to-top:hover {
        box-shadow:
            0 3px 10px rgba(59, 130, 246, 0.2),
            0 0 10px rgba(255, 204, 0, 0.8);
    }

    .thank-you-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        padding: 1.2rem;
        text-align: center;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .thank-you-container h2 {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
        margin-bottom: 1rem;
    }

    .thank-you-container p {
        font-size: 0.85rem;
        max-width: 95%;
        margin-bottom: 1.5rem;
    }

    .thank-you-container .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .thank-you-container .btn:hover {
        box-shadow:
            0 3px 10px rgba(59, 130, 246, 0.2),
            0 0 10px rgba(255, 204, 0, 0.8);
    }

    html[lang="ar"] .section-indicators {
        left: 0.3rem;
    }

    html[lang="ar"] .back-to-top {
        left: 0.8rem !important;
    }
}

/* Language Toggle Styling */
.language-toggle {
    position: fixed;
    top: 1rem;
    right: 1.5rem; 
    z-index: 1000;
}

html[lang="ar"] .language-toggle {
    right: auto;
    left: 1.5rem; 
}

#language-select {
    padding: 0.5rem;
    background: var(--secondary);
    color: var(--text);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-family: 'Space Grotesk', 'Noto Naskh Arabic', sans-serif;
    cursor: pointer;
}

#language-select:focus {
    outline: none;
    border-color: var(--accent-dark);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Base container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}


/* Nest Hub Max (1280x800) */
@media (max-width: 1280px) and (max-height: 800px) {
  body {
    overflow-x: hidden;
  }

  .hero {
    padding: 40px 20px !important;
    min-height: auto !important;
  }

  .profile-container {
    transform: scale(0.9);
    transform-origin: top center;
  }

  .projects-grid,
  .contact-container {
    gap: 1rem !important;
  }

  .section {
    padding: 40px 0 !important;
  }
}

/* Nest Hub (1280x600) */
@media (max-width: 1280px) and (max-height: 600px) {
  body {
    overflow-x: hidden;
  }

  .hero {
    padding: 40px 20px !important;
    min-height: auto !important;
  }

  .profile-container {
    transform: scale(0.9);
    transform-origin: top center;
  }

  .projects-grid,
  .contact-container {
    gap: 1rem !important;
  }

  .section {
    padding: 40px 0 !important;
  }
}


/* Mobile (up to 768px) */
@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }
  .contact-container { grid-template-columns: 1fr; }
}

/* Tablet / small laptops (769px – 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .contact-container { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Mid-desktop (1200px – 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
  .contact-container { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Large desktop (1400px and up) */
@media (min-width: 1400px) {
  .contact-container { grid-template-columns: 2fr 3fr; gap: 3rem; }
}

/* Additional adjustments for screens (Nest Hub) */
@media (max-height: 650px) {
  .hero-content {
    padding-top: 20px !important;
  }

  .scroll-indicator {
    display: none;
  }

  .title-container {
    margin: 15px 0 !important;
  }

  .section-title {
    margin-bottom: 20px !important;
  }
}

/* Prevent horizontal scrolling on all devices */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
