/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0ea5a4;
    --secondary-color: #f59e0b;
    --dark-bg: #0b1220;
    --light-bg: #121b2d;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent: #f59e0b;
    --gradient: linear-gradient(135deg, #0ea5a4, #f59e0b);
}

html[data-theme="light"] {
    --primary-color: #0ea5a4;
    --secondary-color: #f59e0b;
    --dark-bg: #f8fafc;
    --light-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #f59e0b;
    --gradient: linear-gradient(135deg, #0ea5a4, #f59e0b);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Sora', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(14, 165, 164, 0.15), transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.12), transparent 35%),
        radial-gradient(circle at 20% 80%, rgba(14, 165, 164, 0.08), transparent 45%);
}

html[data-theme="light"] body {
    background-image:
        radial-gradient(circle at 10% 20%, rgba(14, 165, 164, 0.08), transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.08), transparent 35%),
        radial-gradient(circle at 20% 80%, rgba(14, 165, 164, 0.05), transparent 45%);
}

body.lang-ar {
    font-family: 'Tajawal', 'Sora', sans-serif;
    letter-spacing: 0;
    word-spacing: 0.5px;
}

body.lang-ar h1,
body.lang-ar h2,
body.lang-ar h3,
body.lang-ar .logo h2 {
    font-family: 'Tajawal', 'Sora', sans-serif;
    letter-spacing: 0;
    font-weight: 700;
}

body.lang-ar p,
body.lang-ar li,
body.lang-ar a,
body.lang-ar span,
body.lang-ar input,
body.lang-ar textarea,
body.lang-ar button {
    letter-spacing: 0;
    line-height: 1.9;
}

body.lang-ar .greeting {
    letter-spacing: 0;
    text-transform: none;
    font-size: 1.2rem;
}

body.lang-ar .description,
body.lang-ar .about-text p,
body.lang-ar .portfolio-info p,
body.lang-ar .service-card p,
body.lang-ar .skill-card p,
body.lang-ar .contact-form-wrapper p,
body.lang-ar .experience-card ul li,
body.lang-ar .cert-card li {
    line-height: 2;
}

body.lang-ar .section-header h2 {
    font-size: clamp(2rem, 4.2vw, 3rem);
}

body.lang-ar .section-subtitle {
    font-size: 1.15rem;
}

body.lang-ar .btn {
    font-weight: 700;
    letter-spacing: 0;
}

body.lang-ar .contact-item h3,
body.lang-ar .experience-card h3,
body.lang-ar .portfolio-info h3,
body.lang-ar .service-card h3,
body.lang-ar .skill-card h3,
body.lang-ar .education-card h3,
body.lang-ar .cert-card h3 {
    font-weight: 700;
    line-height: 1.5;
}

body.lang-ar .nav-menu li a,
body.lang-ar .footer-section ul li a {
    font-weight: 600;
}

body.lang-ar .form-group input,
body.lang-ar .form-group textarea {
    text-align: right;
}

h1, h2, h3, .logo h2 {
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.2px;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(11, 18, 32, 0.8);
    backdrop-filter: blur(14px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar.scrolled {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    background: rgba(11, 18, 32, 0.95);
}

html[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.9);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .navbar.scrolled {
    background: rgba(248, 250, 252, 0.98);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo,
.nav-actions {
    flex: 0 0 auto;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-toggle {
    height: 40px;
    min-width: 44px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .lang-toggle {
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.04);
}

body.lang-ar .navbar .container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .navbar .container {
    flex-direction: row;
}

.logo h2 {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    flex: 1;
    justify-content: center;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

body.lang-ar .nav-menu {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

body.lang-ar .nav-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .logo {
    order: 3;
    margin-left: 0;
}

html[dir="rtl"] .nav-menu {
    order: 2;
    padding-inline: 14px;
}

html[dir="rtl"] .nav-actions {
    order: 1;
    margin-right: 0;
}

html[dir="rtl"] .navbar .container {
    padding-right: 24px;
    padding-left: 20px;
}

.nav-menu li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

body.lang-ar .nav-menu li a::after {
    left: auto;
    right: 0;
}

.nav-menu li a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .theme-toggle {
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.04);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: linear-gradient(135deg, rgba(14, 165, 164, 0.12) 0%, rgba(245, 158, 11, 0.12) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 60px;
    align-items: center;
}

body.lang-ar .hero .container {
    grid-template-columns: 0.95fr 1.05fr;
}
body.lang-ar .hero-content,
body.lang-ar .about-text,
body.lang-ar .contact-form-wrapper,
body.lang-ar .contact-info {
    text-align: right;
}

body.lang-ar .hero-buttons {
    justify-content: flex-end;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    animation: fadeInLeft 1s ease;
}

.greeting {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.name {
    font-size: clamp(2.6rem, 6vw, 4.8rem);
    margin-bottom: 10px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    color: var(--text-primary);
    margin-bottom: 20px;
}

.description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease;
}

.profile-frame {
    position: relative;
    width: clamp(320px, 42vw, 560px);
    height: clamp(320px, 42vw, 560px);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 24px 70px rgba(14, 165, 164, 0.35);
}

.profile-frame::before {
    content: "";
    position: absolute;
    inset: -25px;
    background-size: cover;
    background-position: center;
    filter: blur(18px);
    transform: scale(1.1);
    opacity: 0.5;
}

.profile-frame--hero::before {
    background-image: url('assets/images/profile-hero.jpg');
}

.profile-frame--about::before {
    background-image: url('assets/images/profile-about.jpg');
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1;
}

.profile-image--about {
    border-radius: 20px;
}

.profile-frame--about {
    width: min(100%, clamp(240px, 28vw, 360px));
    height: min(100%, clamp(240px, 28vw, 360px));
    border-radius: 22px;
    box-shadow: 0 15px 40px rgba(14, 165, 164, 0.25);
}

.image-placeholder {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.8;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.underline {
    width: 80px;
    height: 4px;
    background: var(--gradient);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* About Section */
.about {
    background: var(--light-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-areas: "image text";
    gap: 50px;
    align-items: center;
}

body.lang-ar .about-content {
    grid-template-columns: 2fr 1fr;
    grid-template-areas: "text image";
}

html[dir="rtl"] .about-content {
    grid-template-columns: 2fr 1fr;
    grid-template-areas: "text image";
}

html[dir="rtl"] .about-text {
    text-align: right;
}

.about-image {
    grid-area: image;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-text {
    grid-area: text;
}

.about-image .image-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 20px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.8;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.skill-card {
    background: rgba(18, 27, 45, 0.9);
    padding: 36px;
    border-radius: 18px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .skill-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.skill-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.skill-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Services Section */
.services {
    background: var(--light-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(11, 18, 32, 0.9);
    padding: 36px;
    border-radius: 18px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .service-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Experience Section */
.experience {
    background: var(--dark-bg);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.experience-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 15px;
    border-left: 4px solid var(--accent);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

html[data-theme="light"] .experience-card,
html[data-theme="light"] .experience-subcard,
html[data-theme="light"] .cert-card,
html[data-theme="light"] .portfolio-item,
html[data-theme="light"] .education-card {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.experience-card h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
}

.experience-period {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
}

.experience-company {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.experience-card ul {
    list-style: none;
}

.experience-card ul li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 18px;
    position: relative;
}

.experience-card ul li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
}

body.lang-ar .experience-card ul li,
body.lang-ar .cert-card li {
    padding-left: 0;
    padding-right: 18px;
}

body.lang-ar .experience-card ul li::before,
body.lang-ar .cert-card li::before {
    left: auto;
    right: 0;
}

.experience-extra {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.experience-subcard {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.experience-subcard h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.experience-subcard ul {
    list-style: none;
}

.experience-subcard li {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Education Section */
.education {
    background: var(--light-bg);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.education-card {
    background: var(--dark-bg);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.education-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.25);
}

.education-card h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.education-card p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.education-card span {
    color: var(--accent);
    font-weight: 600;
}

/* Certifications Section */
.certifications {
    background: var(--dark-bg);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.cert-card {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cert-card h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.cert-card ul {
    list-style: none;
}

.cert-card li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}

.cert-card li::before {
    content: "▸";
    color: var(--accent);
    position: absolute;
    left: 0;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: rgba(18, 27, 45, 0.9);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.3);
}

.portfolio-image {
    height: 240px;
    background: linear-gradient(135deg, rgba(14, 165, 164, 0.4), rgba(245, 158, 11, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.portfolio-info {
    padding: 30px;
}

.portfolio-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.portfolio-info p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--primary-color);
}

.project-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(5px);
}

html[data-theme="light"] .portfolio {
    background: #f8fafc;
}

html[data-theme="light"] .portfolio-item {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .portfolio-item:hover {
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .portfolio-image {
    background: linear-gradient(135deg, rgba(14, 165, 164, 0.16), rgba(245, 158, 11, 0.18));
    color: #0f172a;
}

/* Reviews Section */
.reviews {
    background: var(--light-bg);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background: var(--dark-bg);
    padding: 40px;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.review-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.3);
}

.stars {
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.review-text {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.8;
    font-style: italic;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviewer-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.reviewer-info h4 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.reviewer-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

html[dir="rtl"] .contact-info {
    order: 2;
    padding-right: 6px;
}

html[dir="rtl"] .contact-form-wrapper {
    order: 1;
    padding-left: 6px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

body.lang-ar .contact-item {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
    text-align: right;
    gap: 16px;
}

html[dir="rtl"] .contact-content {
    direction: rtl;
}

html[dir="rtl"] .contact-info,
html[dir="rtl"] .contact-form-wrapper {
    text-align: right;
}

html[dir="rtl"] .social-links {
    justify-content: flex-end;
    flex-direction: row-reverse;
    margin-top: 26px;
}

html[lang="ar"] .navbar,
html[lang="ar"] .about,
html[lang="ar"] .contact {
    direction: rtl;
}

html[lang="ar"] .navbar .container,
html[lang="ar"] .about-content,
html[lang="ar"] .contact-content {
    direction: rtl;
}

html[lang="ar"] .about-text,
html[lang="ar"] .contact-info,
html[lang="ar"] .contact-form-wrapper {
    text-align: right;
}

html[lang="ar"] .contact-form {
    direction: rtl;
}

html[lang="ar"] .contact-form input,
html[lang="ar"] .contact-form textarea {
    text-align: right;
}

html[dir="rtl"] .contact-item h3 {
    margin-bottom: 8px;
}

html[dir="rtl"] .contact-item p {
    line-height: 1.9;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-item h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.contact-item p {
    color: var(--text-secondary);
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

html[data-theme="light"] .social-link {
    border-color: rgba(15, 23, 42, 0.1);
    background: #ffffff;
}

.social-link:hover {
    background: var(--gradient);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.contact-form-wrapper h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.contact-form-wrapper p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(18, 27, 45, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

html[data-theme="light"] .form-group input,
html[data-theme="light"] .form-group textarea {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.contact-form button {
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

/* Footer */
.footer {
    background: var(--light-bg);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

html[data-theme="light"] .footer-bottom {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/* Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--light-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 30px 0;
        justify-content: flex-start;
    }

    .nav-menu li {
        justify-content: center;
    }

    .nav-menu.active {
        left: 0;
    }

    body.lang-ar .nav-menu {
        left: auto;
        right: -100%;
        text-align: right;
    }

    html[dir="rtl"] .nav-menu {
        left: auto;
        right: -100%;
        text-align: right;
    }

    html[dir="rtl"] .nav-menu li {
        justify-content: flex-end;
        padding-right: 20px;
    }

    body.lang-ar .nav-menu.active {
        right: 0;
    }

    html[dir="rtl"] .nav-menu.active {
        right: 0;
    }

    html[dir="rtl"] .logo,
    html[dir="rtl"] .nav-menu,
    html[dir="rtl"] .nav-actions {
        order: initial;
    }

    html[dir="rtl"] .contact-info,
    html[dir="rtl"] .contact-form-wrapper {
        order: initial;
    }

    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-image {
        order: -1;
    }

    .profile-frame {
        width: clamp(260px, 70vw, 420px);
        height: clamp(260px, 70vw, 420px);
    }

    .profile-frame--about {
        width: clamp(220px, 60vw, 320px);
        height: clamp(220px, 60vw, 320px);
    }

    .name {
        font-size: 2.5rem;
    }

    .title {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    body.lang-ar .hero-buttons {
        align-items: stretch;
    }

    body.lang-ar .name {
        font-size: clamp(2.1rem, 9vw, 3.2rem);
        line-height: 1.3;
    }

    body.lang-ar .title {
        font-size: clamp(1.3rem, 5.4vw, 2rem);
        line-height: 1.5;
    }

    .about-content {
        grid-template-columns: 1fr;
        grid-template-areas:
            "image"
            "text";
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .skills-grid,
    .services-grid,
    .portfolio-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    section {
        padding: 60px 0;
    }
}
