:root {
    --background: hsl(35, 30%, 98%);
    --foreground: hsl(20, 40%, 15%);
    --card: hsl(35, 30%, 98%);
    --card-foreground: hsl(20, 40%, 15%);
    --primary: hsl(25, 95%, 53%);
    --primary-foreground: hsl(35, 40%, 98%);
    --secondary: hsl(30, 20%, 92%);
    --secondary-foreground: hsl(20, 40%, 15%);
    --muted: hsl(30, 20%, 92%);
    --muted-foreground: hsl(20, 30%, 40%);
    --accent: hsl(30, 20%, 92%);
    --accent-foreground: hsl(20, 40%, 15%);
    --destructive: hsl(0, 84.2%, 60.2%);
    --destructive-foreground: hsl(35, 40%, 98%);
    --border: hsl(30, 20%, 88%);
    --input: hsl(30, 20%, 88%);
    --ring: hsl(25, 95%, 53%);
    --radius: 0.5rem;
    --primary-rgb: 236, 102, 28;
}

.dark {
    --background: hsl(220, 20%, 12%);
    --foreground: hsl(210, 20%, 98%);
    --card: hsl(220, 20%, 15%);
    --card-foreground: hsl(210, 20%, 98%);
    --primary: hsl(25, 90%, 55%);
    --primary-foreground: hsl(220, 20%, 12%);
    --secondary: hsl(220, 15%, 20%);
    --secondary-foreground: hsl(210, 20%, 98%);
    --muted: hsl(220, 15%, 20%);
    --muted-foreground: hsl(210, 10%, 70%);
    --accent: hsl(220, 15%, 20%);
    --accent-foreground: hsl(210, 20%, 98%);
    --destructive: hsl(0, 62.8%, 30.6%);
    --destructive-foreground: hsl(210, 20%, 98%);
    --border: hsl(220, 15%, 20%);
    --input: hsl(220, 15%, 20%);
    --ring: hsl(25, 90%, 55%);
    --primary-rgb: 240, 114, 40;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* RTL Support */
html[dir="rtl"] {
    /* Update font for RTL */
    font-family: 'Vazirmatn', sans-serif;
}

html[dir="rtl"] body {
    font-family: 'Vazirmatn', sans-serif;
    text-align: right;
}

html[dir="rtl"] .section-header,
html[dir="rtl"] .card-content,
html[dir="rtl"] .skill-info,
html[dir="rtl"] .experience-header,
html[dir="rtl"] .education-header,
html[dir="rtl"] .project-content,
html[dir="rtl"] .contact-info,
html[dir="rtl"] .contact-form,
html[dir="rtl"] .form-group,
html[dir="rtl"] .footer-content {
    text-align: right;
}

html[dir="rtl"] .hero-text {
    text-align: right;
}

@media (max-width: 767px) {
    html[dir="rtl"] .hero-content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    html[dir="rtl"] .hero-text {
        text-align: center;
    }

    html[dir="rtl"] .hero-buttons {
        flex-direction: row-reverse;
        justify-content: center;
        align-items: center;
    }

    html[dir="rtl"] .section-header {
        justify-content: center;
    }

    html[dir="rtl"] .social-links,
    html[dir="rtl"] .project-links {
        justify-content: center;
    }

    html[dir="rtl"] .location {
        justify-content: center;
    }
}

html[dir="rtl"] .hero-buttons,
html[dir="rtl"] .social-links,
html[dir="rtl"] .project-links {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-link::after {
    right: 0;
    left: auto;
}

html[dir="rtl"] .skill-info {
    flex-direction: row-reverse;
    justify-content: space-between;
}

html[dir="rtl"] .contact-item i,
html[dir="rtl"] .section-header i,
html[dir="rtl"] .btn i,
html[dir="rtl"] .project-date i,
html[dir="rtl"] .location i {
    margin-left: 0.5rem;
    margin-right: 0;
}

html[dir="rtl"] .achievements ul {
    padding-right: 1.5rem;
    padding-left: 0;
}

html[dir="rtl"] .tab-btn i {
    margin-left: 0.5rem;
    margin-right: 0;
}

html[dir="rtl"] .desktop-nav {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .header-actions {
    margin-right: 0;
    margin-left: 0;
}

html[dir="rtl"] .logo {
    margin-right: 0;
    margin-left: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style-position: inside;
}

html[dir="rtl"] ul {
    list-style-type: arabic-indic;
}

img {
    max-width: 100%;
    height: auto;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
    rgba(var(--primary-rgb), 0.03) 0%,
    rgba(var(--primary-rgb), 0.01) 20%,
    rgba(var(--primary-rgb), 0) 70%);
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 3rem 0;
    scroll-margin-top: 5rem;
}

@media (min-width: 768px) {
    .section {
        padding: 4rem 0;
    }
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    height: 4rem;
    border-bottom: 1px solid var(--border);
    background-color: var(--background);
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

html[dir="rtl"] .header .container {
    flex-direction: row-reverse;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
}

.desktop-nav {
    display: none;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }
}

html[dir="rtl"] .desktop-nav {
    margin-right: auto;
    margin-left: 0;
    padding-right: 2rem;
    flex-direction: row-reverse;
}

.nav-link {
    color: var(--muted-foreground);
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

html[dir="rtl"] .header-actions {
    flex-direction: row-reverse;
    margin-right: 0;
    margin-left: 0;
}

/* Language Toggle */
.language-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: transparent;
    color: var(--foreground);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    position: relative;
}

.lang-en, .lang-fa {
    position: absolute;
    transition: transform 0.5s, opacity 0.5s;
}

html[dir="rtl"] .lang-en {
    opacity: 1;
    transform: rotate(0) scale(1);
}

html[dir="rtl"] .lang-fa {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

html[dir="ltr"] .lang-en {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

html[dir="ltr"] .lang-fa {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: transparent;
    color: var(--foreground);
    cursor: pointer;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    width: 100%;
    height: 100%;
    background-color: var(--background);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu.open {
    display: block;
    opacity: 1;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 2rem;
    font-size: 1.125rem;
}

html[dir="rtl"] .mobile-menu-content {
    text-align: right;
    flex-direction: column-reverse;
}

html[dir="rtl"] .mobile-menu .nav-link {
    padding-right: 1rem;
    padding-left: 0;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: transparent;
    color: var(--foreground);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.light-icon,
.dark-icon {
    position: absolute;
    transition: transform 0.5s, opacity 0.5s;
}

.dark .light-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.dark .dark-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.light-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.dark-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

/* Hero Section */
.hero-section {
    padding: 3rem 0 5rem;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 5rem 0 7rem;
    }
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .hero-content {
        flex-direction: row;
        gap: 4rem;
    }

    html[dir="rtl"] .hero-content {
        flex-direction: row-reverse;
    }
}

.profile-image {
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(var(--primary-rgb), 0.2);
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.15);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(var(--primary-rgb), 0.25);
}

@media (min-width: 768px) {
    .profile-image {
        width: 16rem;
        height: 16rem;
    }
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-image:hover img {
    transform: scale(1.1);
}

.hero-text {
    text-align: center;
}

@media (min-width: 768px) {
    .hero-text {
        text-align: left;
    }

    html[dir="rtl"] .hero-text {
        text-align: right;
    }
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .hero-text h1 {
        font-size: 3.75rem;
    }
}

.hero-text h2 {
    font-size: 1.5rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .hero-text h2 {
        font-size: 1.875rem;
    }
}

.hero-text p {
    max-width: 28rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-buttons {
        justify-content: flex-start;
    }

    html[dir="rtl"] .hero-buttons {
        justify-content: flex-end;
    }
}

html[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

html[dir="rtl"] .section-header {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.section-header i {
    color: var(--primary);
    font-size: 1.5rem;
}

.section-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
}

/* Cards */
.card {
    border-radius: var(--radius);
    background-color: var(--card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.card-content {
    padding: 1.5rem;
}

html[dir="rtl"] .card-content {
    text-align: right;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300%;
    height: 300%;
}

.btn i {
    margin-right: 0.5rem;
}

html[dir="rtl"] .btn i {
    margin-right: 0;
    margin-left: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.btn-full {
    width: 100%;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.skill-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

html[dir="rtl"] .skills-list {
    flex-direction: column-reverse;
}

.skill-item {
    position: relative;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.skill-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.skill-percentage {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.skill-bar {
    height: 8px;
    border-radius: 4px;
    background-color: var(--muted);
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary);
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1);
    width: 0;
}

/* Tooltip */
.tooltip {
    position: absolute;
    z-index: 10;
    background-color: var(--card);
    color: var(--card-foreground);
    border-radius: var(--radius);
    padding: 0.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    font-size: 0.75rem;
    max-width: 200px;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tooltip-title {
    font-weight: 600;
}

/* Tabs */
.tabs {
    margin-top: 1.5rem;
}

.tab-header {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

html[dir="rtl"] .tab-header {
    flex-direction: row-reverse;
}

.tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
}

html[dir="rtl"] .tab-btn {
    flex-direction: row-reverse;
}

.tab-btn:hover {
    transform: translateY(-2px);
}

.tab-btn.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.tab-text {
    display: none;
}

@media (min-width: 640px) {
    .tab-text {
        display: inline;
    }
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease forwards;
}

html[dir="rtl"] .tab-pane {
    text-align: right;
}

.tab-pane.active {
    display: block;
}

.tab-pane > * + * {
    margin-top: 1.5rem;
}

/* Experience & Education Items */
.experience-header,
.education-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .experience-header,
    .education-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    html[dir="rtl"] .experience-header,
    html[dir="rtl"] .education-header {
        flex-direction: row-reverse;
    }
}

.experience-header h3,
.education-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.3s;
}

.card:hover .experience-header h3,
.card:hover .education-header h3 {
    color: var(--primary);
}

.company,
.institution {
    color: var(--primary);
    font-weight: 500;
}

.period {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    white-space: nowrap;
}

html[dir="rtl"] .period {
    text-align: left;
}

.description {
    margin-top: 1rem;
    color: var(--muted-foreground);
}

html[dir="rtl"] .description {
    text-align: right;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

html[dir="rtl"] .skills-tags {
    justify-content: flex-end;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
}

html[dir="rtl"] .tag {
    margin-left: 0.5rem;
    margin-right: 0;
}

.tag:hover {
    background-color: var(--primary);
    color: var(--primary-foreground);
    transform: translateY(-2px);
}

.achievements {
    margin-top: 1rem;
}

html[dir="rtl"] .achievements {
    text-align: right;
}

.achievements h4 {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.achievements ul {
    color: var(--muted-foreground);
}

.achievements li {
    transition: color 0.3s, transform 0.3s;
    padding: 0.25rem 0;
}

.achievements li:hover {
    color: var(--foreground);
    transform: translateX(5px);
}

html[dir="rtl"] .achievements li:hover {
    transform: translateX(-5px);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

html[dir="rtl"] .projects-grid {
    flex-direction: row-reverse;
}

.project-card {
    border-radius: var(--radius);
    background-color: var(--card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.project-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-10px);
}

.project-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 1rem;
}

html[dir="rtl"] .project-content {
    text-align: right;
}

.project-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.project-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

html[dir="rtl"] .project-date {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.project-content p {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

html[dir="rtl"] .project-tags {
    justify-content: flex-end;
}

.project-links {
    display: flex;
    gap: 0.5rem;
}

html[dir="rtl"] .project-links {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

html[dir="rtl"] .contact-grid {
    flex-direction: row-reverse;
}

.contact-info h3,
.contact-form h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

html[dir="rtl"] .contact-info,
html[dir="rtl"] .contact-form {
    text-align: right;
}

.contact-info p {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

html[dir="rtl"] .contact-details {
    flex-direction: column-reverse;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

html[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.contact-item i {
    color: var(--primary);
    transition: transform 0.3s;
}

.contact-item:hover i {
    transform: scale(1.1);
}

.contact-item a {
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--primary);
}

.connect h4 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.social-links {
    display: flex;
    gap: 0.5rem;
}

html[dir="rtl"] .social-links {
    flex-direction: row-reverse;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: transparent;
    color: var(--foreground);
    transition: background-color 0.3s, transform 0.3s, color 0.3s;
}

.social-links a:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    transform: translateY(-3px);
}

.social-links a i {
    transition: transform 0.3s;
}

.social-links a:hover i {
    transform: scale(1.1);
}

/* Form */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

html[dir="rtl"] .form-group {
    text-align: right;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea {
    text-align: right;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(var(--ring-rgb), 0.3);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
}

@media (min-width: 768px) {
    .footer {
        padding: 2rem 0;
    }
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    html[dir="rtl"] .footer-content {
        flex-direction: row-reverse;
        text-align: right;
    }
}

.footer p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Animations */
.animate__animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.animate__fadeIn {
    animation-name: fadeIn;
}

.animate__fadeInUp {
    animation-name: fadeInUp;
}

.animate__delay-1s {
    animation-delay: 0.2s;
}

.animate__delay-2s {
    animation-delay: 0.4s;
}

.animate__delay-3s {
    animation-delay: 0.6s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animations */
.scroll-animation {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animation.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Utility Classes */
.location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    margin-top: 1rem;
}

html[dir="rtl"] .location {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* Pulse Animation for Skill Bars on Hover */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
    }
}

.skill-item:hover .skill-progress {
    animation: pulse 1.5s infinite;
}

/* RTL Specific Styles */
html[dir="rtl"] .experience-header,
html[dir="rtl"] .education-header {
    text-align: right;
}

/* Contact form RTL fixes */
html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea {
    text-align: right;
}

/* Tags RTL spacing fix */
html[dir="rtl"] .tag {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Fix for RTL animations */
html[dir="rtl"] .animate__fadeInRight {
    animation-name: fadeInLeft;
}

html[dir="rtl"] .animate__fadeInLeft {
    animation-name: fadeInRight;
}

@media (min-width: 768px) {
    html[dir="rtl"] .hero-content {
        flex-direction: row-reverse;
        gap: 4rem;
    }

    html[dir="rtl"] .hero-text {
        text-align: right;
    }

    html[dir="rtl"] .hero-buttons {
        justify-content: flex-end;
    }

    html[dir="rtl"] .experience-header,
    html[dir="rtl"] .education-header {
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: flex-start;
    }

    html[dir="rtl"] .social-links,
    html[dir="rtl"] .project-links {
        justify-content: flex-end;
    }

    html[dir="rtl"] .location {
        justify-content: flex-end;
    }
}