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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', 'IRANSansX', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    direction: rtl;
}

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

/* ===== Loading Screen ===== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.loader-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-content p {
    font-size: 1.2rem;
    margin-top: 10px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-inline-start: 1rem;
    user-select: none;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.lang-btn[aria-pressed="true"] {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.lang-btn:hover {
    border-color: var(--primary-color);
}

.lang-sep {
    color: var(--text-light);
    font-weight: 600;
}

/* Force LTR for specific inline elements even in RTL context */
.force-ltr {
    direction: ltr !important;
    unicode-bidi: bidi-override;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

[dir="ltr"] .nav-link::after {
    right: auto;
    left: 0;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-text {
    color: white;
    text-align: right;
}

[dir="ltr"] .hero-text {
    text-align: left;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-title .greeting {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.hero-title .name {
    display: block;
    color: #fbbf24;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-title .title {
    display: block;
    font-size: 2rem;
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}


.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fbbf24;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-avatar {
    position: relative;
    width: 400px;
    height: 400px;
}

/* افکت نور درخشان پشت آواتار */
.avatar-glow {
    position: absolute;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
    z-index: 0;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* حلقه‌های متحدالمرکز */
.avatar-rings {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 4px solid;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ringRotate 20s linear infinite;
    box-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
    /* لاین سفید برای جداسازی از بکگراند */
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: -2px;
}

.ring-1 {
    width: 120%;
    height: 120%;
    animation-duration: 15s;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6), 0 0 30px rgba(255, 255, 255, 0.4), 0 0 50px rgba(255, 255, 255, 0.2);
    outline: 2px solid rgba(255, 255, 255, 1);
    outline-offset: -2px;
}

.ring-2 {
    width: 140%;
    height: 140%;
    animation-duration: 20s;
    animation-direction: reverse;
    border-color: rgba(139, 92, 246, 0.9);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.7), 0 0 30px rgba(139, 92, 246, 0.5), 0 0 50px rgba(139, 92, 246, 0.3);
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: -2px;
}

.ring-3 {
    width: 160%;
    height: 160%;
    animation-duration: 25s;
    border-color: rgba(99, 102, 241, 0.85);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.6), 0 0 30px rgba(99, 102, 241, 0.4), 0 0 50px rgba(99, 102, 241, 0.2);
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: -2px;
}

@keyframes ringRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.avatar-circle {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    backdrop-filter: blur(15px);
    border: 4px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
    animation: float 6s ease-in-out infinite;
    z-index: 2;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4), inset 0 0 40px rgba(255, 255, 255, 0.1);
}

.avatar-circle i {
    position: relative;
    z-index: 3;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.avatar-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 3;
}

.float-icon {
    position: absolute;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    backdrop-filter: blur(15px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    animation: floatIcon 5s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 20px rgba(99, 102, 241, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.float-icon:hover {
    transform: scale(1.2) !important;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5), 0 0 30px rgba(99, 102, 241, 0.5);
    z-index: 10;
}

.float-icon::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.float-icon:hover::before {
    opacity: 1;
}

/* رنگ‌های خاص برای هر آیکون */
.float-icon-1 { color: #e34c26; } /* HTML5 */
.float-icon-2 { color: #264de4; } /* CSS3 */
.float-icon-3 { color: #f7df1e; } /* JavaScript */
.float-icon-4 { color: #3776ab; } /* Python */
.float-icon-5 { color: #61dafb; } /* React */
.float-icon-6 { color: #339933; } /* Node.js */
.float-icon-7 { color: #21759b; } /* WordPress */
.float-icon-8 { color: #f29111; } /* Database */

/* موقعیت‌های جدید برای 8 آیکون */
.float-icon-1 {
    top: 5%;
    right: 15%;
    animation-delay: 0s;
}

.float-icon-2 {
    top: 15%;
    left: 5%;
    animation-delay: 0.5s;
}

.float-icon-3 {
    top: 50%;
    right: 0%;
    transform: translateY(-50%);
    animation-delay: 1s;
}

.float-icon-4 {
    bottom: 15%;
    right: 10%;
    animation-delay: 1.5s;
}

.float-icon-5 {
    top: 50%;
    left: 0%;
    transform: translateY(-50%);
    animation-delay: 2s;
}

.float-icon-6 {
    top: 30%;
    right: 5%;
    animation-delay: 2.5s;
}

.float-icon-7 {
    bottom: 5%;
    left: 15%;
    animation-delay: 3s;
}

.float-icon-8 {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 3.5s;
}

@keyframes floatIcon {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) rotate(0deg) scale(1); 
    }
    25% { 
        transform: translateY(-20px) translateX(10px) rotate(90deg) scale(1.05); 
    }
    50% { 
        transform: translateY(-10px) translateX(-10px) rotate(180deg) scale(1.1); 
    }
    75% { 
        transform: translateY(-25px) translateX(5px) rotate(270deg) scale(1.05); 
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

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

.scroll-indicator i {
    display: block;
    margin-top: 5px;
    font-size: 1.2rem;
}

/* ===== Section Styles ===== */
section {
    padding: 5rem 0;
    scroll-margin-top: 100px; /* prevent content from hiding under fixed navbar on anchor scroll */
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== About Section ===== */
.about {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.about-text p strong {
    color: var(--text-color);
    font-weight: 700;
}

.about-features {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.feature-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.feature-item p {
    color: var(--text-light);
    margin: 0;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
    box-shadow: var(--shadow-xl);
}

.profile-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.02);
}

.image-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.image-badge span {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.image-badge small {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

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

.skill-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.skill-progress {
    position: relative;
    height: 30px;
    background: var(--bg-light);
    border-radius: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1rem;
    width: 0;
    transition: width 1s ease;
}

.progress-value {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== Courses Section ===== */
.courses {
    background: var(--bg-light);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.course-image {
    position: relative;
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.course-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.course-content {
    padding: 1.5rem;
}

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

.course-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.course-features {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.course-features span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.course-btn:hover {
    gap: 1rem;
}

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

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    height: 250px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 50px;
    height: 50px;
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.project-link:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
}

.project-content {
    padding: 1.5rem;
}

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

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

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--bg-light);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.contact-item p {
    color: var(--text-light);
    margin: 0;
}

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

.social-link {
    width: 45px;
    height: 45px;
    background: white;
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

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

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

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 20px;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    display: block;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
    padding-right: 5px;
}

.footer-section ul li i {
    margin-left: 0.5rem;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

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

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-avatar {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        gap: 1rem;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-title .name {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skills-grid,
    .courses-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-avatar {
        width: 250px;
        height: 250px;
    }
    
    .avatar-circle {
        font-size: 6rem;
    }
    
    .float-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== Utility Classes ===== */
.hidden-field {
    position: absolute;
    left: -5000px;
    height: 0;
    width: 0;
    opacity: 0;
    overflow: hidden;
}

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

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ============================================
   پیشرفته: انیمیشن‌ها و افکت‌های جذاب
   ============================================ */

/* 1. انیمیشن‌های ورود برای بخش‌ها (Stagger Animation) */
/* section‌ها در ابتدا visible هستند، فقط با JavaScript انیمیشن اعمال می‌شود */
section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* فقط برای انیمیشن‌های ورود - استثنا: صفحات جزئیات */
section.fade-in:not(.visible):not(.courses-list-section):not(.projects-list-section):not(.page-header) {
    opacity: 0;
    transform: translateY(30px);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Course Detail (صفحات جزئیات دوره/پروژه) - نباید مخفی باشند */
.course-detail,
.project-detail {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.skill-card,
.course-card,
.project-card,
.about-text,
.about-image,
.contact-form,
.contact-info {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.skill-card.animate,
.course-card.animate,
.project-card.animate,
.course-detail.animate,
.project-detail.animate,
.about-text.animate,
.about-image.animate,
.contact-form.animate,
.contact-info.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay برای کارت‌ها */
.skill-card.animate:nth-child(1) { transition-delay: 0.1s; }
.skill-card.animate:nth-child(2) { transition-delay: 0.2s; }
.skill-card.animate:nth-child(3) { transition-delay: 0.3s; }
.skill-card.animate:nth-child(4) { transition-delay: 0.4s; }
.skill-card.animate:nth-child(5) { transition-delay: 0.5s; }
.skill-card.animate:nth-child(6) { transition-delay: 0.6s; }

.course-card.animate:nth-child(1) { transition-delay: 0.1s; }
.course-card.animate:nth-child(2) { transition-delay: 0.2s; }
.course-card.animate:nth-child(3) { transition-delay: 0.3s; }
.course-card.animate:nth-child(4) { transition-delay: 0.4s; }
.course-card.animate:nth-child(5) { transition-delay: 0.5s; }
.course-card.animate:nth-child(6) { transition-delay: 0.6s; }

.project-card.animate:nth-child(1) { transition-delay: 0.1s; }
.project-card.animate:nth-child(2) { transition-delay: 0.2s; }
.project-card.animate:nth-child(3) { transition-delay: 0.3s; }
.project-card.animate:nth-child(4) { transition-delay: 0.4s; }

/* 2. افکت 3D Tilt برای کارت‌ها */
.course-card,
.project-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover,
.project-card:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(-5deg) translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

/* 3. بهبود بخش Skills */
.skill-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4), 0 0 30px rgba(99, 102, 241, 0.2);
}

.skill-icon {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.6));
}

/* Progress Bar Animation */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 4. گرادیان‌های متحرک در پس‌زمینه - اضافه کردن به ::before موجود */
.hero-background::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        rgba(99, 102, 241, 0.2) 0%, 
        rgba(139, 92, 246, 0.2) 25%,
        rgba(236, 72, 153, 0.2) 50%,
        rgba(99, 102, 241, 0.2) 75%,
        rgba(139, 92, 246, 0.2) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Particles Effect */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: floatParticle 20s infinite linear;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* 5. بهبود Navigation - Underline Animation */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Mobile Menu Animation */
.nav-menu {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-menu.active {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 6. بخش Contact - Focus Animations */
.form-group {
    position: relative;
}

.form-group input:focus,
.form-group textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2), 0 0 0 3px rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

.form-group label {
    transition: transform 0.3s ease, color 0.3s ease;
}

.form-group input:focus + label,
.form-group textarea:focus + label {
    transform: translateY(-5px) scale(0.9);
    color: var(--primary-color);
}

/* Typing Effect برای Placeholder */
@keyframes typing {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    animation: typing 2s infinite;
}

/* Success Animation */
.form-message.success {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.form-message.success::before {
    content: '✓';
    display: inline-block;
    margin-left: 10px;
    animation: checkmark 0.5s ease;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
    }
    50% {
        transform: scale(1.2) rotate(45deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* 7. بهبود Footer */
.footer {
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%23f9fafb' d='M0,50 Q360,0 720,50 T1440,50 L1440,100 L0,100 Z'/%3E%3C/svg%3E") no-repeat;
    background-size: cover;
    opacity: 0.1;
    animation: wave 10s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(-50px) translateY(10px);
    }
}

.social-links a {
    position: relative;
    transition: all 0.3s ease;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.social-links a:hover::before {
    width: 100px;
    height: 100px;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    color: var(--primary-color);
}

/* 8. Custom Cursor (فقط برای دسکتاپ) */
@media (min-width: 1024px) {
    .custom-cursor {
        position: fixed;
        width: 20px;
        height: 20px;
        border: 2px solid var(--primary-color);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease;
        transform: translate(-50%, -50%);
    }

    .custom-cursor.active {
        width: 40px;
        height: 40px;
        background: rgba(99, 102, 241, 0.1);
    }

    .custom-cursor-trail {
        position: fixed;
        width: 8px;
        height: 8px;
        background: var(--primary-color);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        opacity: 0.5;
        transition: transform 0.2s ease;
    }
}

/* Parallax Effect برای تصاویر */
.parallax-image {
    transition: transform 0.3s ease;
}

/* Counter Animation بهبود یافته */
.stat-number {
    transition: transform 0.3s ease;
}

.stat-number.animating {
    animation: numberPulse 0.5s ease;
}

@keyframes numberPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Ripple Effect بهبود یافته */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* Loading Animation بهبود یافته */
.loader-content {
    animation: loaderFade 0.5s ease;
}

@keyframes loaderFade {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .course-card:hover,
    .project-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .skill-card:hover {
        transform: translateY(-5px) scale(1.02);
    }
}

/* ============================================
   صفحات Courses و Projects
   ============================================ */

/* Page Header */
.page-header {
    background: var(--gradient-primary);
    padding: 120px 0 60px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.breadcrumb span {
    opacity: 0.7;
}

/* Courses List Section */
.courses-list-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.courses-list-section .container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Sidebar */
.courses-sidebar {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 120px;
    height: fit-content;
}

.courses-content {
    /* Grid item - no need for flex */
    min-width: 0; /* Prevent grid blowout */
}

.courses-sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.course-nav {
    list-style: none;
}

.course-nav li {
    margin-bottom: 0.5rem;
}

.course-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
}

.course-nav-link:hover,
.course-nav-link.active {
    background: var(--bg-light);
    color: var(--primary-color);
    border-right-color: var(--primary-color);
    transform: translateX(-5px);
}

/* Course Detail */
.course-detail {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

.course-detail-header {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem;
    text-align: center;
    position: relative;
}

.course-badge-large {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.project-badge-large {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.course-icon-large {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.course-detail-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.course-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
}

.course-detail-body {
    padding: 2.5rem;
}

.course-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--bg-light);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.meta-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.meta-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.meta-item span {
    font-weight: 600;
    color: var(--text-color);
}

.course-description h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.course-description p {
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.course-topics,
.course-audience {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.course-topics li,
.course-audience li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-right: 3px solid var(--primary-color);
    transition: transform 0.3s ease;
}

html[dir="ltr"] .course-topics li, html[dir="ltr"]
.course-audience li {
    border-left: 3px solid var(--primary-color);
    border-right: none;
}


.course-topics li:hover,
.course-audience li:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow);
}

.course-topics li::before,
.course-audience li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    margin-left: 0.5rem;
}

.course-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--bg-light);
    flex-wrap: wrap;
}

.course-cta .btn {
    flex: 1;
    min-width: 200px;
    justify-content: center;
}

/* Projects Detail (similar structure) */
.projects-list-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.projects-list-section .container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

.projects-sidebar {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 120px;
    height: fit-content;
}

.projects-content {
    /* Grid item - no need for flex */
    min-width: 0; /* Prevent grid blowout */
}

.projects-sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.project-nav {
    list-style: none;
}

.project-nav li {
    margin-bottom: 0.5rem;
}

.project-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
}

.project-nav-link:hover,
.project-nav-link.active {
    background: var(--bg-light);
    color: var(--primary-color);
    border-right-color: var(--primary-color);
    transform: translateX(-5px);
}

.project-detail {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

.project-detail-header {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem;
    text-align: center;
    position: relative;
}

.project-icon-large {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.project-detail-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.project-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
}

.project-detail-body {
    padding: 2.5rem;
}

.project-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--bg-light);
}

.project-description h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.project-description p {
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.project-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.project-features li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-right: 3px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.project-features li:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow);
}

.project-features li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    margin-left: 0.5rem;
}

.project-features-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

html[dir="ltr"] .project-features-list li {
    border-left: 3px solid var(--primary-color);
    border-right: none;
}

.project-features-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-right: 3px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.project-features-list li:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow);
}

.project-features-list li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    margin-left: 0.5rem;
}

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

.tech-tag {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.project-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--bg-light);
    flex-wrap: wrap;
}

.project-cta .btn {
    flex: 1;
    min-width: 200px;
    justify-content: center;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.project-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.project-gallery img:hover {
    transform: scale(1.05);
}

/* Responsive for Courses/Projects Pages */
@media (max-width: 1024px) {
    .courses-list-section .container,
    .projects-list-section .container {
        grid-template-columns: 1fr;
    }

    .courses-sidebar,
    .projects-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .course-nav,
    .project-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .course-detail-header,
    .project-detail-header {
        padding: 2rem 1.5rem;
    }

    .course-detail-header h2,
    .project-detail-header h2 {
        font-size: 1.8rem;
    }

    .course-icon-large,
    .project-icon-large {
        font-size: 3rem;
    }

    .course-detail-body,
    .project-detail-body {
        padding: 1.5rem;
    }

    .course-meta,
    .project-meta {
        grid-template-columns: 1fr;
    }

    .course-cta,
    .project-cta {
        flex-direction: column;
    }

    .course-cta .btn,
    .project-cta .btn {
        width: 100%;
    }
}

