/* =============================================================
   VARIABLES & BASE STYLES
============================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #1976d2;
    --primary-dark: #1565c0;
    --secondary: #2b4c7c;
    --secondary-dark: #1e3a5f;
    --transition: all 0.3s ease;
}

* {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

/* =============================================================
   DARK MODE (پیش‌فرض)
============================================================= */
body {
    --bg-primary: #0a1929;
    --bg-secondary: #1e2a47;
    --bg-card: #1e2a47;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --border-color: #2b4c7c;
    --hover-bg: #1976d2;
    
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

/* =============================================================
   LIGHT MODE (هماهنگ با طرح - آبی روشن)
============================================================= */
body.light-mode {
    --bg-primary: #e8f0fe;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --border-color: #bbd4f0;
    --hover-bg: #1976d2;
    
    background: linear-gradient(135deg, #e8f0fe 0%, #d4e4fc 100%);
}

body.light-mode .bg-\[\#0a1929\] {
    background: linear-gradient(135deg, #e8f0fe 0%, #d4e4fc 100%);
}

body.light-mode .bg-\[\#1e2a47\] {
    background-color: #ffffff;
    border: 1px solid #bbd4f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

body.light-mode .text-gray-300,
body.light-mode .text-gray-400 {
    color: #4b5563;
}

body.light-mode .border-\[\#2b4c7c\] {
    border-color: #bbd4f0;
}

body.light-mode .stat-card {
    background: #ffffff;
    border: 1px solid #bbd4f0;
}

body.light-mode .skill-card {
    background: #ffffff;
    border: 1px solid #bbd4f0;
}

body.light-mode .testimonial-card {
    background: #ffffff;
    border: 1px solid #bbd4f0;
}

body.light-mode .timeline-content {
    background: #f8faff;
    border: 1px solid #bbd4f0;
}

body.light-mode .info-item {
    background: #f8faff;
    border: 1px solid #bbd4f0;
}

body.light-mode .cert-badge {
    background: #f8faff;
    border: 1px solid #bbd4f0;
}

body.light-mode .cert-badge span {
    color: #1f2937;
}

body.light-mode .cert-item {
    background: #f8faff;
    border: 1px solid #bbd4f0;
}

body.light-mode .contact-info {
    background: #f8faff;
    border: 1px solid #bbd4f0;
}

body.light-mode .social-icon-small {
    background: #f8faff;
    border: 1px solid #bbd4f0;
}

body.light-mode .social-icon-white {
    background: #f8faff;
    border: 1px solid #bbd4f0;
}

body.light-mode .social-icon-white:hover {
    background: #1976d2;
}

/* =============================================================
   SECTION TITLE
============================================================= */
.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3rem;
    }
}

.section-line {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 0 auto;
    border-radius: 2px;
}

/* =============================================================
   ANIMATIONS
============================================================= */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

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

.animate-spin-slow {
    animation: spin-slow 10s linear infinite;
}

/* =============================================================
   NAVBAR STYLES
============================================================= */
#navbar {
    transition: var(--transition);
}

#navbar.navbar-scrolled {
    background-color: rgba(10, 25, 41, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 8px 0;
}

body.light-mode #navbar.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

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

/* =============================================================
   BUTTON STYLES
============================================================= */
.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-radius: 12px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.4);
}

/* =============================================================
   STATS CARDS
============================================================= */
.stat-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* =============================================================
   SKILL CARDS
============================================================= */
.skill-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 20px;
}

.skill-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.skill-bar-container {
    width: 100%;
    height: 10px;
    background: var(--bg-primary);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.skill-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 5px;
    position: relative;
    transition: width 1.5s ease;
}

.skill-percent {
    position: absolute;
    right: 0;
    top: -25px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

/* =============================================================
   TABS STYLES
============================================================= */
.tab-btn {
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    background: transparent;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    color: var(--text-secondary);
}

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

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tab-content {
    animation: fadeIn 0.5s ease;
}

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

/* =============================================================
   INFO ITEMS
============================================================= */
.info-item {
    background: var(--bg-primary);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 5px;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* =============================================================
   TIMELINE
============================================================= */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -38px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

.timeline-content {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.timeline-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* =============================================================
   CERTIFICATE ITEMS
============================================================= */
.cert-badge {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    transition: var(--transition);
}

.cert-badge:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(25, 118, 210, 0.2);
}

.cert-badge i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.cert-badge span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.cert-item i {
    font-size: 20px;
}

.cert-item span {
    color: var(--text-secondary);
}

.cert-item strong {
    color: var(--text-primary);
}

/* =============================================================
   CONTACT INFO
============================================================= */
.contact-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.contact-info i {
    font-size: 18px;
}

.social-icon-small {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon-small:hover {
    transform: scale(1.1);
    background: var(--primary);
    border-color: var(--primary);
}

.social-icon-white {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon-white:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

/* =============================================================
   TESTIMONIAL CARDS
============================================================= */
.testimonial-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin: 20px;
    border: 1px solid var(--border-color);
}

.quote-icon {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.1;
}

/* =============================================================
   BLOG CARDS
============================================================= */
.blog-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.blog-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.95), rgba(43, 76, 124, 0.95));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    padding: 20px;
    text-align: center;
}

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

.preview-link {
    display: inline-block;
    padding: 8px 20px;
    background: white;
    color: var(--primary);
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.preview-link:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* =============================================================
   SWIPER CUSTOMIZATION
============================================================= */
.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--primary) !important;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    width: 30px;
    border-radius: 5px;
}

/* =============================================================
   SCROLLUP BUTTON
============================================================= */
.scrollup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 5px 20px rgba(25, 118, 210, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 50;
}

.scrollup.show {
    opacity: 1;
    visibility: visible;
}

.scrollup:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.4);
}

/* =============================================================
   RESPONSIVE DESIGN
============================================================= */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .tab-btn {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .scrollup {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}