        /* CSS Variables for easy theme management */
        :root,
        html[data-theme="dark"] {
            --primary-color: #00e676; /* Bright Green - Tech/Growth */
            --secondary-color: #00b0ff; /* Bright Blue - Innovation */
            --accent-color: #ff3d00; /* Orange-Red - Energy */
            --text-light: #e8e8e8; /* Main text */
            --text-gray: #a0a0a0; /* Secondary text */
            --dark-bg: #0a0a0a; /* Page background */
            --card-bg: #1a1a1a; /* Cards / elevated surfaces */
            --page-bg: #0a0a0a;
            --nav-bg: rgba(10, 10, 10, 0.95);
            --nav-bg-scrolled: rgba(10, 10, 10, 0.98);
            --surface-bg: #000000;
            --input-bg: #374151;
            --input-border: #4b5563;
            --chip-bg: #1f2937;
            --text-primary: #f9fafb;
            --text-secondary: #d1d5db;
            --text-muted: #9ca3af;
            --text-faint: #6b7280;
            --heading: #ffffff;
            --border-color: #1f2937;
            --border-strong: #374151;
            --profile-border: #ffffff;
            --link-accent: #60a5fa;
            --link-accent-hover: #93c5fd;
            --skill-bg: rgba(255, 255, 255, 0.06);
            --btn-secondary-bg: #374151;
            --btn-secondary-hover: #1f2937;
            --btn-secondary-text: #ffffff;
            --icon-btn-color: #f9fafb;
            --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.45);
            --gradient-1: linear-gradient(135deg, #00e676 0%, #00b0ff 100%); /* Green to Blue */
            --gradient-2: linear-gradient(135deg, #00b0ff 0%, #00e676 100%); /* Blue to Green */
            --gradient-3: linear-gradient(135deg, #ff3d00 0%, #ffc107 100%); /* Orange-Red to Yellow */
            color-scheme: dark;
        }

        html[data-theme="light"] {
            --primary-color: #059669;
            --secondary-color: #0284c7;
            --accent-color: #ea580c;
            --text-light: #1f2937;
            --text-gray: #4b5563;
            --dark-bg: #f3f5f9;
            --card-bg: #ffffff;
            --page-bg: #f3f5f9;
            --nav-bg: rgba(255, 255, 255, 0.92);
            --nav-bg-scrolled: rgba(255, 255, 255, 0.98);
            --surface-bg: #f8fafc;
            --input-bg: #ffffff;
            --input-border: #cbd5e1;
            --chip-bg: #eef2f7;
            --text-primary: #111827;
            --text-secondary: #374151;
            --text-muted: #4b5563;
            --text-faint: #6b7280;
            --heading: #0f172a;
            --border-color: #e5e7eb;
            --border-strong: #d1d5db;
            --profile-border: #2563eb;
            --link-accent: #2563eb;
            --link-accent-hover: #1d4ed8;
            --skill-bg: #ffffff;
            --btn-secondary-bg: #e5e7eb;
            --btn-secondary-hover: #d1d5db;
            --btn-secondary-text: #111827;
            --icon-btn-color: #111827;
            --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
            --gradient-1: linear-gradient(135deg, #059669 0%, #0284c7 100%);
            --gradient-2: linear-gradient(135deg, #0284c7 0%, #059669 100%);
            --gradient-3: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
            color-scheme: light;
        }

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

        html {
            background-color: var(--page-bg);
        }

        body {
            font-family: 'Poppins', sans-serif; /* Poppins for English */
            background-color: var(--page-bg);
            color: var(--text-primary);
            overflow-x: hidden;
            scroll-behavior: smooth;
            line-height: 1.7;
        }

        /* Animated background particles (global) */
        .bg-animation {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            background: radial-gradient(circle, rgba(0,230,118,0.05) 0%, rgba(0,0,0,0.8) 70%); /* Subtle green glow */
        }

        .bg-animation::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* Unique code-like pattern with subtle lines and dots */
            background-image:
                radial-gradient(1px 1px at 10px 10px, rgba(0,230,118,0.1), transparent),
                radial-gradient(1px 1px at 50px 50px, rgba(0,176,255,0.1), transparent),
                linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
                linear-gradient(180deg, rgba(255,255,255,0.02) 1px, transparent 1px);
            background-size: 100px 100px; /* Adjust size for density */
            animation: float 25s infinite linear; /* Slower float */
        }

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

        /* Navigation */
        .navbar,
        .navbar-main {
            background: var(--nav-bg) !important;
            backdrop-filter: blur(15px); /* More blur */
            border-bottom: 1px solid var(--border-color);
            transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
            padding: 1rem 0;
        }

        .navbar-main {
            padding: 0;
        }

        .navbar-brand {
            font-weight: 700;
            font-size: 1.7rem;
            color: var(--primary-color) !important;
            text-shadow: 0 0 5px rgba(0,230,118,0.5); /* Subtle glow */
        }

        .navbar-nav .nav-link {
            color: var(--text-light) !important;
            font-weight: 500;
            margin: 0 18px; /* More spacing */
            transition: color 0.3s ease, transform 0.2s ease;
            position: relative;
        }

        .navbar-nav .nav-link::after { /* Underline effect */
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 0%;
            height: 2px;
            background-color: var(--secondary-color);
            transition: width 0.3s ease;
        }

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

        .navbar-nav .nav-link:hover {
            color: var(--secondary-color) !important;
            transform: translateY(-2px);
        }

        /* Hero Section */
        .hero {
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            position: relative;
            padding: 0 20px; /* Add some horizontal padding */
            /* Base background for hero - a simple gradient */
            background: linear-gradient(135deg, #1a2a3a 0%, #0a1a2a 100%); /* Original hero gradient */
            overflow: hidden; /* Ensure pseudo-element doesn't overflow */
            z-index: 0; /* Keep it above bg-animation */
        }
        .hero::before { /* Ensure no other patterns conflict */
            content: none;
        }
        /* NEW: Animated overlay for hero section */
        .hero::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 150%; /* Larger than container to ensure full coverage on transform */
            height: 150%;
            background: radial-gradient(circle at center, rgba(0,230,118,0.2) 0%, transparent 50%); /* Primary color glow */
            transform: translate(-50%, -50%) scale(0); /* Start scaled down */
            border-radius: 50%; /* Make it circular */
            animation: heroPulse 10s infinite ease-in-out; /* Pulse animation */
            z-index: -1; /* Below hero content, above hero base background */
        }

        @keyframes heroPulse {
            0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
            50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
            100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
        }


        /* Profile Picture Styling */
        .hero-profile-pic {
            width: 180px; /* Size of the profile picture */
            height: 180px;
            border-radius: 50%; /* Circular shape */
            object-fit: cover; /* Ensures image covers the area */
            border: 5px solid var(--primary-color); /* Border with primary color */
            box-shadow: 0 0 20px rgba(0, 230, 118, 0.6), 0 0 40px rgba(0, 230, 118, 0.3); /* Double glow effect */
            margin-bottom: 30px; /* Space below the image */
            animation: fadeInScale 1s ease-out; /* Existing animation */
        }

        .hero-content h1 {
            font-size: 4.5rem; /* Larger font */
            font-weight: 700;
            margin-bottom: 25px;
            background: var(--gradient-1); /* Green to Blue gradient */
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: glow 2.5s ease-in-out infinite alternate; /* Slower glow */
            letter-spacing: 2px; /* More spacing */
        }

        @keyframes glow {
            from { text-shadow: 0 0 25px var(--primary-color); }
            to { text-shadow: 0 0 40px var(--secondary-color); }
        }

        .hero-content p {
            font-size: 1.8rem; /* Larger font */
            color: var(--text-gray);
            margin-bottom: 40px;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
        }

        .btn-custom {
            background: var(--gradient-3); /* Orange-Red to Yellow gradient */
            border: none;
            padding: 15px 40px; /* Larger padding */
            border-radius: 50px;
            color: white;
            font-weight: 600;
            text-decoration: none;
            display: inline-block;
            transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
            box-shadow: 0 5px 15px rgba(255, 61, 0, 0.4); /* Initial shadow */
        }

        .btn-custom:hover {
            transform: translateY(-5px); /* More lift */
            box-shadow: 0 15px 40px rgba(255, 61, 0, 0.6); /* Stronger shadow on hover */
            background: var(--gradient-2); /* Change gradient on hover */
            color: white;
        }

        /* Section Styling */
        .section {
            padding: 100px 0; /* More vertical padding */
            position: relative;
            background-color: var(--card-bg); /* Use card background for sections */
            border-radius: 25px; /* More rounded corners */
            margin: 40px auto; /* Center sections with margin */
            max-width: 1200px; /* Max width for content */
            box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* Deeper shadow for sections */
            border: 1px solid rgba(255,255,255,0.05); /* Subtle border */
        }

        .section-title {
            font-size: 3.5rem; /* Larger title */
            font-weight: 700;
            text-align: center;
            margin-bottom: 60px; /* More space below title */
            background: var(--gradient-1);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-shadow: 0 0 10px rgba(0,230,118,0.3); /* Subtle glow */
        }
        /* Straighten the underline for section titles */
        .section-title::after {
            content: '';
            width: 100px;
            height: 5px;
            background-color: var(--primary-color); /* Vibrant green accent */
            position: absolute;
            bottom: -20px;
            left: 50%;
            transform: translateX(-50%); /* Removed rotation */
            border-radius: 3px;
        }


        /* About Section */
        .about-text {
            font-size: 1.2rem;
            line-height: 2;
            text-align: justify;
            max-width: 900px;
            margin: 0 auto;
            color: var(--text-gray);
        }

        /* Skills Section */
        .skills-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* Larger min width for items */
            gap: 30px;
            margin-top: 50px;
        }

        .skill-item {
            background: rgba(255,255,255,0.05); /* Very subtle background */
            border-radius: 15px; /* Consistent rounded corners */
            padding: 25px 15px; /* Adjusted padding */
            text-align: center;
            transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
            border: 2px solid transparent;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 180px; /* Fixed height for uniformity */
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        }

        .skill-item:hover {
            transform: translateY(-15px) scale(1.05); /* More pronounced lift and scale */
            box-shadow: 0 25px 50px rgba(0,230,118,0.4); /* Stronger glow from primary color */
            border-color: var(--primary-color);
            background-color: rgba(0,230,118,0.1); /* Subtle background tint on hover */
        }

        .skill-item img {
            width: 70px; /* Larger skill image */
            height: 70px;
            object-fit: contain;
            margin-bottom: 15px;
            filter: drop-shadow(0 0 5px rgba(255,255,255,0.3)); /* Subtle glow for icons */
            transition: transform 0.3s ease;
        }

        .skill-item:hover img {
            transform: scale(1.1);
        }

        .skill-name {
            font-size: 1.2rem; /* Larger font */
            font-weight: 600;
            color: var(--text-light);
        }

        /* Projects Section - REMOVED */
        /* This section was removed as per user request */

        /* Timeline Section (Experience & Education) */
        .timeline-section {
            padding: 100px 0;
            position: relative;
            background-color: var(--card-bg);
            border-radius: 25px;
            margin: 40px auto;
            max-width: 1200px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            border: 1px solid rgba(255,255,255,0.05);
        }

        .timeline {
            position: relative;
            padding: 0;
            list-style: none;
            max-width: 900px; /* Max width for timeline content */
            margin: 0 auto;
        }
        .timeline:before {
            content: '';
            position: absolute;
            top: 0;
            bottom: 0;
            left: 50%;
            width: 4px; /* Thicker line */
            margin-left: -2px;
            background-color: rgba(255,255,255,0.1); /* Subtle timeline line */
            border-radius: 2px;
        }
        .timeline-item {
            margin-bottom: 60px;
            position: relative;
        }
        .timeline-item:before, .timeline-item:after {
            content: '';
            display: table;
        }
        .timeline-item:after {
            clear: both;
        }
        .timeline-item .timeline-panel {
            width: 45%;
            float: left;
            border: 1px solid rgba(255,255,255,0.1); /* Subtle border */
            border-radius: 15px;
            padding: 25px;
            background: rgba(255,255,255,0.05); /* Slightly lighter background for panels */
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
            position: relative;
            transition: all 0.3s ease;
        }
        .timeline-item .timeline-panel:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.5);
            border-color: var(--primary-color); /* Accent border on hover */
        }
        .timeline-item .timeline-panel:before { /* Arrow */
            right: auto;
            left: -16px;
            border-right-width: 16px;
            border-left-width: 0;
            border-bottom: 16px solid transparent;
            border-top: 16px solid transparent;
            border-right: 16px solid rgba(255,255,255,0.1); /* Arrow matching border */
            content: " ";
            height: 0;
            position: absolute;
            top: 28px;
            width: 0;
        }
        .timeline-item .timeline-panel:after { /* Inner arrow */
            right: auto;
            left: -15px;
            border-right-width: 15px;
            border-left-width: 0;
            border-bottom: 15px solid transparent;
            border-top: 15px solid transparent;
            border-right: 15px solid rgba(255,255,255,0.05); /* Arrow matching panel background */
            content: " ";
            height: 0;
            position: absolute;
            top: 29px;
            width: 0;
        }
        .timeline-item .timeline-badge {
            color: var(--dark-bg); /* Dark text for badge */
            width: 60px; /* Larger badge */
            height: 60px;
            line-height: 60px;
            font-size: 1.6em; /* Larger icon */
            text-align: center;
            position: absolute;
            top: 18px;
            left: 50%;
            margin-left: -30px;
            background-color: var(--primary-color); /* Primary color badge */
            border-radius: 50%;
            z-index: 100;
            box-shadow: 0 0 0 6px var(--card-bg); /* Ring around badge matching section background */
            transition: all 0.3s ease;
        }
        .timeline-item .timeline-badge:hover {
            background-color: var(--secondary-color); /* Secondary color on hover */
            transform: scale(1.1);
        }
        .timeline-item.timeline-inverted .timeline-panel {
            float: right;
        }
        .timeline-item.timeline-inverted .timeline-panel:before {
            right: -16px;
            left: auto;
            border-right-width: 0;
            border-left-width: 16px;
            border-right: none;
            border-left: 16px solid rgba(255,255,255,0.1);
        }
        .timeline-item.timeline-inverted .timeline-panel:after {
            right: -15px;
            left: auto;
            border-right-width: 0;
            border-left-width: 15px;
            border-right: none;
            border-left: 15px solid rgba(255,255,255,0.05);
        }
        .timeline-heading h4 {
            margin-top: 0;
            color: var(--text-light); /* Light text */
            font-weight: 600;
            font-size: 1.5rem;
        }
        .timeline-body p {
            margin-bottom: 0;
            color: var(--text-gray); /* Softer gray text */
            font-size: 1rem;
        }
        .timeline-date {
            font-size: 1rem;
            color: var(--text-gray); /* Softer gray text for date */
            margin-bottom: 10px;
            display: block;
            font-weight: 400;
        }

        /* Responsive adjustments for timeline */
        @media (max-width: 767px) {
            .timeline:before {
                left: 30px; /* Adjust line position */
            }
            .timeline-item .timeline-badge {
                left: 30px;
                margin-left: -30px; /* Center badge on the line */
            }
            .timeline-item .timeline-panel {
                width: calc(100% - 90px); /* Adjust panel width */
                float: right;
            }
            .timeline-item .timeline-panel:before {
                right: auto;
                left: -16px;
                border-right-width: 16px;
                border-left-width: 0;
                border-right: 16px solid rgba(255,255,255,0.1);
            }
            .timeline-item .timeline-panel:after {
                right: auto;
                left: -15px;
                border-right-width: 15px;
                border-left-width: 0;
                border-right: 15px solid rgba(255,255,255,0.05);
            }
            .timeline-item.timeline-inverted .timeline-panel {
                float: right;
            }
            .timeline-item.timeline-inverted .timeline-panel:before {
                right: auto;
                left: -16px;
                border-right-width: 16px;
                border-left-width: 0;
                border-right: 16px solid rgba(255,255,255,0.1);
            }
            .timeline-item.timeline-inverted .timeline-panel:after {
                right: auto;
                left: -15px;
                border-right-width: 15px;
                border-left-width: 0;
                border-right: 15px solid rgba(255,255,255,0.05);
            }
        }

        /* Contact Section */
        .contact-form {
            background: var(--card-bg);
            border-radius: 20px;
            padding: 50px; /* More padding */
            max-width: 700px; /* Wider form */
            margin: 0 auto;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            border: 1px solid rgba(255,255,255,0.05);
        }

        .form-control {
            background: rgba(255, 255, 255, 0.08); /* Lighter input background */
            border: 1px solid rgba(255, 255, 255, 0.15); /* Softer border */
            border-radius: 12px;
            color: var(--text-light);
            padding: 15px 20px;
            margin-bottom: 25px; /* More space between inputs */
        }

        .form-control:focus {
            background: rgba(255, 255, 255, 0.1);
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.25rem rgba(0, 230, 118, 0.25);
            color: var(--text-light);
        }

        .form-control::placeholder {
            color: var(--text-gray);
        }

        .form-label {
            color: var(--text-light);
            font-weight: 500;
            margin-bottom: 8px;
        }

        /* Footer */
        .footer {
            background: var(--card-bg);
            padding: 50px 0;
            text-align: center;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            margin-top: 60px;
        }

        .social-links {
            display: flex;
            justify-content: center;
            gap: 25px; /* More spacing */
            margin-bottom: 30px;
        }

        .social-link {
            width: 60px; /* Larger social icons */
            height: 60px;
            background: var(--gradient-1); /* Green to Blue gradient */
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.8rem; /* Larger icon size */
            transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
            box-shadow: 0 5px 15px rgba(0,230,118,0.3);
        }

        .social-link:hover {
            transform: scale(1.15) rotate(10deg); /* More pronounced scale and slight rotation */
            box-shadow: 0 10px 25px rgba(0,176,255,0.5); /* Glow from secondary color */
            background: var(--gradient-2); /* Change gradient on hover */
            color: white;
        }

        /* Responsive Design */
        @media (max-width: 992px) {
            .hero-content h1 {
                font-size: 3.5rem;
            }
            .hero-content p {
                font-size: 1.3rem;
            }
            .section-title {
                font-size: 2.8rem;
            }
            .section {
                margin: 30px 20px;
                padding: 60px 0;
            }
            .skills-grid {
                grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
            }
            .skill-item {
                height: 160px;
            }
            .skill-item img {
                width: 60px;
                height: 60px;
            }
            .skill-name {
                font-size: 1.1rem;
            }
            .project-image-container {
                height: 200px;
            }
            .project-title {
                font-size: 1.6rem;
            }
            .contact-form {
                padding: 30px;
            }
        }

        @media (max-width: 768px) {
            .hero-content h1 {
                font-size: 2.8rem;
            }
            .hero-content p {
                font-size: 1.1rem;
            }
            .section-title {
                font-size: 2.2rem;
            }
            .section {
                margin: 20px 15px;
                padding: 40px 0;
            }
            .skills-grid {
                grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
                gap: 15px;
            }
            .skill-item {
                height: 140px;
                padding: 15px 10px;
            }
            .skill-item img {
                width: 50px;
                height: 50px;
            }
            .skill-name {
                font-size: 0.9rem;
            }
            .project-image-container {
                height: 180px;
            }
            .project-title {
                font-size: 1.4rem;
            }
            .project-content {
                padding: 20px;
            }
            .tech-tag {
                padding: 5px 12px;
                font-size: 0.85rem;
            }
            .contact-form {
                padding: 25px;
            }
            .form-control {
                padding: 12px 15px;
            }
            .btn-custom {
                padding: 12px 30px;
                font-size: 1rem;
            }
            .social-link {
                width: 45px;
                height: 45px;
                font-size: 1.3rem;
            }
        }

        /* Site logo */
        .site-brand {
            display: inline-flex;
            align-items: center;
            flex-shrink: 0;
        }

        .site-logo {
            display: block;
            height: 40px;
            width: auto;
            max-width: 96px;
            object-fit: contain;
        }

        .site-logo-hero {
            display: block;
            height: 88px;
            width: auto;
            max-width: 200px;
            margin: 0 auto 1.25rem;
            object-fit: contain;
        }

        @media (min-width: 768px) {
            .site-logo {
                height: 46px;
                max-width: 110px;
            }

            .site-logo-hero {
                height: 108px;
                max-width: 240px;
            }
        }

        /* Language switcher */
        .lang-switcher-form {
            display: inline-flex;
            align-items: center;
        }

        .lang-flags {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.12);
        }

        .lang-flag {
            width: 34px;
            height: 24px;
            padding: 0;
            border: 2px solid transparent;
            border-radius: 6px;
            overflow: hidden;
            cursor: pointer;
            background: transparent;
            opacity: 0.55;
            line-height: 0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
            transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        }

        .lang-flag svg {
            display: block;
            width: 100%;
            height: 100%;
        }

        .lang-flag.is-active {
            opacity: 1;
            border-color: rgba(255, 255, 255, 0.9);
            box-shadow: 0 0 0 1px rgba(0, 230, 118, 0.45), 0 4px 12px rgba(0, 0, 0, 0.45);
        }

        .lang-flag:hover {
            opacity: 1;
            transform: translateY(-1px) scale(1.08);
        }

        /* Persian RTL layout */
        html[dir="rtl"] body {
            font-family: 'Vazirmatn', Tahoma, sans-serif;
        }

        html[dir="rtl"] section h2,
        html[dir="rtl"] section h3,
        html[dir="rtl"] section p,
        html[dir="rtl"] section label,
        html[dir="rtl"] section li {
            text-align: right;
        }

        html[dir="rtl"] header,
        html[dir="rtl"] header h1,
        html[dir="rtl"] header p,
        html[dir="rtl"] .site-tagline,
        html[dir="rtl"] footer {
            text-align: center;
        }

        html[dir="rtl"] input,
        html[dir="rtl"] textarea {
            text-align: right;
        }

        html[dir="rtl"] input[dir="ltr"] {
            text-align: left;
        }

        html[dir="rtl"] .typewriter {
            direction: rtl;
            border-right: 0;
            border-left: 0.15em solid var(--text-primary);
        }

        .typewriter {
            border-right-color: var(--text-primary);
        }

        /* Theme-aware layout surfaces */
        .theme-page {
            background-color: var(--page-bg);
            color: var(--text-primary);
        }

        .theme-muted {
            color: var(--text-muted);
        }

        .theme-secondary {
            color: var(--text-secondary);
        }

        .theme-heading {
            color: var(--heading);
        }

        .theme-section-title {
            color: var(--heading);
            border-bottom-color: var(--border-strong);
        }

        .theme-card {
            background-color: var(--card-bg);
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow-soft);
        }

        .theme-surface {
            background-color: var(--surface-bg);
            color: var(--text-primary);
        }

        .theme-chip {
            background-color: var(--chip-bg);
            color: var(--text-secondary);
            border: 1px solid var(--border-strong);
        }

        .tech-chip {
            display: inline-flex;
            align-items: center;
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.01em;
            line-height: 1.4;
            border-radius: 999px;
            padding: 0.28rem 0.8rem;
            border: 1px solid transparent;
            white-space: nowrap;
        }

        .tech-chip-django { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.4); }
        .tech-chip-tailwind { background: rgba(6, 182, 212, 0.18); color: #67e8f9; border-color: rgba(34, 211, 238, 0.4); }
        .tech-chip-woocommerce { background: rgba(168, 85, 247, 0.2); color: #e9d5ff; border-color: rgba(192, 132, 252, 0.42); }
        .tech-chip-openrouter { background: rgba(245, 158, 11, 0.18); color: #fcd34d; border-color: rgba(251, 191, 36, 0.42); }
        .tech-chip-celery { background: rgba(132, 204, 22, 0.18); color: #bef264; border-color: rgba(163, 230, 53, 0.42); }
        .tech-chip-redis { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border-color: rgba(248, 113, 113, 0.42); }
        .tech-chip-postgres { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border-color: rgba(96, 165, 250, 0.45); }
        .tech-chip-wordpress { background: rgba(99, 102, 241, 0.22); color: #c7d2fe; border-color: rgba(129, 140, 248, 0.45); }
        .tech-chip-docker { background: rgba(14, 165, 233, 0.2); color: #7dd3fc; border-color: rgba(56, 189, 248, 0.45); }
        .tech-chip-nginx { background: rgba(34, 197, 94, 0.18); color: #86efac; border-color: rgba(74, 222, 128, 0.4); }
        .tech-chip-python { background: rgba(234, 179, 8, 0.18); color: #fde047; border-color: rgba(250, 204, 21, 0.42); }
        .tech-chip-fastapi { background: rgba(20, 184, 166, 0.2); color: #5eead4; border-color: rgba(45, 212, 191, 0.42); }
        .tech-chip-violet { background: rgba(139, 92, 246, 0.2); color: #ddd6fe; border-color: rgba(167, 139, 250, 0.42); }
        .tech-chip-rose { background: rgba(244, 63, 94, 0.2); color: #fda4af; border-color: rgba(251, 113, 133, 0.42); }
        .tech-chip-teal { background: rgba(13, 148, 136, 0.2); color: #5eead4; border-color: rgba(45, 212, 191, 0.4); }
        .tech-chip-amber { background: rgba(217, 119, 6, 0.2); color: #fcd34d; border-color: rgba(251, 191, 36, 0.42); }
        .tech-chip-sky { background: rgba(2, 132, 199, 0.2); color: #7dd3fc; border-color: rgba(56, 189, 248, 0.42); }
        .tech-chip-fuchsia { background: rgba(192, 38, 211, 0.2); color: #f0abfc; border-color: rgba(232, 121, 249, 0.42); }
        .tech-chip-lime { background: rgba(101, 163, 13, 0.2); color: #bef264; border-color: rgba(163, 230, 53, 0.4); }
        .tech-chip-indigo { background: rgba(79, 70, 229, 0.22); color: #a5b4fc; border-color: rgba(129, 140, 248, 0.45); }

        html[data-theme="light"] .tech-chip-django { background: #d1fae5; color: #047857; border-color: #6ee7b7; }
        html[data-theme="light"] .tech-chip-tailwind { background: #cffafe; color: #0e7490; border-color: #67e8f9; }
        html[data-theme="light"] .tech-chip-woocommerce { background: #f3e8ff; color: #7e22ce; border-color: #d8b4fe; }
        html[data-theme="light"] .tech-chip-openrouter { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
        html[data-theme="light"] .tech-chip-celery { background: #ecfccb; color: #3f6212; border-color: #bef264; }
        html[data-theme="light"] .tech-chip-redis { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
        html[data-theme="light"] .tech-chip-postgres { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
        html[data-theme="light"] .tech-chip-wordpress { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }
        html[data-theme="light"] .tech-chip-docker { background: #e0f2fe; color: #0369a1; border-color: #7dd3fc; }
        html[data-theme="light"] .tech-chip-nginx { background: #dcfce7; color: #166534; border-color: #86efac; }
        html[data-theme="light"] .tech-chip-python { background: #fef9c3; color: #a16207; border-color: #fde047; }
        html[data-theme="light"] .tech-chip-fastapi { background: #ccfbf1; color: #0f766e; border-color: #5eead4; }
        html[data-theme="light"] .tech-chip-violet { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
        html[data-theme="light"] .tech-chip-rose { background: #ffe4e6; color: #be123c; border-color: #fda4af; }
        html[data-theme="light"] .tech-chip-teal { background: #ccfbf1; color: #0f766e; border-color: #5eead4; }
        html[data-theme="light"] .tech-chip-amber { background: #ffedd5; color: #c2410c; border-color: #fdba74; }
        html[data-theme="light"] .tech-chip-sky { background: #e0f2fe; color: #075985; border-color: #7dd3fc; }
        html[data-theme="light"] .tech-chip-fuchsia { background: #fae8ff; color: #a21caf; border-color: #f0abfc; }
        html[data-theme="light"] .tech-chip-lime { background: #ecfccb; color: #3f6212; border-color: #bef264; }
        html[data-theme="light"] .tech-chip-indigo { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }

        .theme-footer {
            color: var(--text-faint);
            border-top-color: var(--border-color);
        }

        .theme-accent-link {
            color: var(--link-accent);
        }

        .theme-accent-link:hover {
            color: var(--link-accent-hover);
        }

        .theme-hr {
            border-color: var(--border-color);
        }

        .nav-link-item {
            color: var(--text-secondary);
            transition: color 0.2s ease;
        }

        .nav-link-item:hover {
            color: var(--heading);
        }

        .theme-icon-btn {
            color: var(--icon-btn-color);
        }

        .btn-secondary-theme {
            background-color: var(--btn-secondary-bg);
            color: var(--btn-secondary-text);
        }

        .btn-secondary-theme:hover {
            background-color: var(--btn-secondary-hover);
            color: var(--btn-secondary-text);
        }

        .form-input-theme {
            background-color: var(--input-bg) !important;
            border: 1px solid var(--input-border) !important;
            color: var(--text-primary) !important;
        }

        .form-input-theme::placeholder {
            color: var(--text-muted);
        }

        .form-input-theme:focus {
            background-color: var(--input-bg) !important;
            border-color: var(--secondary-color) !important;
            color: var(--text-primary) !important;
        }

        .profile-photo {
            border: 2px solid var(--profile-border);
        }

        .skill-icon-card {
            background: var(--skill-bg);
            border: 1px solid var(--border-color);
            border-radius: 14px;
            padding: 12px 8px;
            width: 100%;
            box-shadow: var(--shadow-soft);
        }

        .skill-icon-card img {
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
        }

        html[data-theme="light"] .site-logo,
        html[data-theme="light"] .site-logo-hero {
            filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.16));
        }

        html[data-theme="light"] .lang-flags {
            background: rgba(15, 23, 42, 0.05);
            border-color: rgba(15, 23, 42, 0.12);
        }

        html[data-theme="light"] .lang-flag.is-active {
            border-color: rgba(15, 23, 42, 0.85);
            box-shadow: 0 0 0 1px rgba(2, 132, 199, 0.35), 0 4px 12px rgba(15, 23, 42, 0.12);
        }

        /* Theme toggle */
        .theme-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            padding: 0;
            border-radius: 999px;
            border: 1px solid var(--border-color);
            background: var(--skill-bg);
            color: var(--icon-btn-color);
            cursor: pointer;
            flex-shrink: 0;
            transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
        }

        .theme-toggle:hover {
            transform: translateY(-1px);
            border-color: var(--secondary-color);
            color: var(--secondary-color);
        }

        .theme-toggle svg {
            width: 20px;
            height: 20px;
        }

        .theme-toggle .icon-moon {
            display: none;
        }

        html[data-theme="light"] .theme-toggle .icon-sun {
            display: none;
        }

        html[data-theme="light"] .theme-toggle .icon-moon {
            display: block;
        }
      