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

:root {
    --primary-color: #14b8a6;
    --primary-dark: #0d9488;
    --secondary-color: #06b6d4;
    --accent-color: #22d3ee;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --bg-primary: #ffffff;
    --bg-secondary: #f0fdfa;
    --bg-dark: #0f172a;
    --border-color: #cbd5e1;
    --shadow: 0 4px 6px -1px rgba(20, 184, 166, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(20, 184, 166, 0.2);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Vazirmatn', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html[dir="ltr"] body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

/* 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 .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
    transition: all 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.nav-brand h2 {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 1rem;
}

.lang-switcher {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 20px;
    margin-right: 10px;
}

.lang-switcher:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.lang-switcher::after {
    display: none;
}

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

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

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

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 30%, #06b6d4 60%, #22d3ee 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        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.4;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(2deg);
    }
}

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

@media (max-width: 1200px) {
    .hero-content {
        gap: 3rem;
    }
}

.hero-text {
    color: white;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease-out;
}

.hero-title .greeting {
    display: block;
    font-size: 2.2rem;
    font-weight: 500;
    opacity: 0.95;
    margin-bottom: 0.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-title .name {
    display: block;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 50%, #fce7f3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    font-size: 4.5rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    animation: fadeInUp 1s ease-out 0.4s both, glow 3s ease-in-out infinite;
    position: relative;
}

@keyframes glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.hero-title .title {
    display: block;
    font-size: 2rem;
    font-weight: 400;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    opacity: 0.98;
    font-weight: 600;
    animation: fadeInUp 1s ease-out 0.8s both;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 2;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 1s both;
    max-width: 600px;
}

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

.btn {
    padding: 16px 40px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out 1.2s both;
}

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

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

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 3px solid white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.2);
}

.hero-image {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.hero-photo-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
    z-index: 2;
}

@media (max-width: 1200px) {
    .hero-photo-wrapper {
        width: 240px;
        height: 240px;
    }
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-photo-wrapper:hover .hero-photo {
    transform: scale(1.1);
}

.photo-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    animation: rotate 8s linear infinite;
    pointer-events: none;
}

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

.code-animation {
    width: 100%;
    max-width: 500px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 0;
    border: 2px solid rgba(20, 184, 166, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: float 6s ease-in-out infinite;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    font-family: 'Courier New', monospace;
    direction: ltr;
    text-align: left;
}

.code-animation::-webkit-scrollbar {
    height: 8px;
}

.code-animation::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 0 0 16px 16px;
}

.code-animation::-webkit-scrollbar-thumb {
    background: rgba(20, 184, 166, 0.6);
    border-radius: 0 0 16px 16px;
    transition: background 0.3s;
}

.code-animation::-webkit-scrollbar-thumb:hover {
    background: rgba(20, 184, 166, 0.8);
}

.code-animation {
    scrollbar-width: thin;
    scrollbar-color: rgba(20, 184, 166, 0.6) rgba(15, 23, 42, 0.5);
}

.code-header {
    background: rgba(15, 23, 42, 0.95);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(20, 184, 166, 0.2);
    direction: ltr;
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red {
    background: #ef4444;
}

.code-dot.yellow {
    background: #f59e0b;
}

.code-dot.green {
    background: #10b981;
}

.code-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-left: auto;
    margin-right: 0;
    font-weight: 500;
}

.code-content {
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #e2e8f0;
    direction: ltr;
    text-align: left;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}

.code-content::-webkit-scrollbar {
    height: 8px;
}

.code-content::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}

.code-content::-webkit-scrollbar-thumb {
    background: rgba(20, 184, 166, 0.6);
    border-radius: 4px;
    transition: background 0.3s;
}

.code-content::-webkit-scrollbar-thumb:hover {
    background: rgba(20, 184, 166, 0.8);
}

.code-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(20, 184, 166, 0.6) rgba(15, 23, 42, 0.5);
}

.code-line {
    margin-bottom: 8px;
    white-space: pre;
    word-break: normal;
    overflow-x: visible;
    overflow-wrap: normal;
    min-width: fit-content;
    opacity: 0;
    animation: fadeInCode 0.6s ease forwards;
    direction: ltr;
    text-align: left;
    display: block;
}

@keyframes fadeInCode {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.code-line.animate {
    animation: typewriter 0.8s steps(50) forwards;
}

@keyframes typewriter {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

.code-keyword {
    color: #c792ea;
    font-weight: 600;
}

.code-class {
    color: #82aaff;
}

.code-type {
    color: #ffcb6b;
}

.code-var {
    color: #c3e88d;
}

.code-method {
    color: #ff5370;
}

.code-property {
    color: #89ddff;
}

.code-number {
    color: #f78c6c;
}

.code-string {
    color: #c3e88d;
}

.code-indent {
    display: inline-block;
    width: 20px;
}

.code-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s infinite;
}

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

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}


.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

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

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-primary);
    position: relative;
    font-family: 'Vazirmatn', sans-serif;
    letter-spacing: -0.5px;
}

.section-title::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 6px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    border-radius: 3px;
    opacity: 0.5;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    border-radius: 3px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

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

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(20, 184, 166, 0.2);
    animation: fadeInLeft 1s ease-out;
}

.about-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-image-wrapper:hover .about-image {
    transform: scale(1.05);
}

.about-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(6, 182, 212, 0.1));
    pointer-events: none;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.about-text p {
    font-size: 1.2rem;
    line-height: 2.2;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: justify;
    font-weight: 400;
    font-family: 'Vazirmatn', sans-serif;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, white, #f9fafb);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.4s;
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

.stat-item h3 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
    font-weight: 900;
    font-family: 'Vazirmatn', sans-serif;
}

.stat-item p {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.1rem;
    font-family: 'Vazirmatn', sans-serif;
}

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

.skill-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 5px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

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

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

.skill-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.2);
    border-top-color: var(--secondary-color);
}

.skill-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
    display: inline-block;
}

.skill-card:hover .skill-icon {
    transform: scale(1.2) rotate(5deg);
    color: var(--secondary-color);
}

.skill-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-weight: 700;
    font-family: 'Vazirmatn', sans-serif;
}

.skill-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
}

.skill-level {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.skill-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%;
    }
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

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

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.4s;
}

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

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.25);
}

.project-image {
    height: 220px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 200%;
    position: relative;
    overflow: hidden;
    animation: gradientShift 5s ease infinite;
}

.project-image[style*="background-image"] {
    background-size: cover !important;
    background-position: center !important;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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 {
    color: white;
    font-size: 1.5rem;
    padding: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}

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

.project-content {
    padding: 1.5rem;
}

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

.project-content h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-weight: 700;
    font-family: 'Vazirmatn', sans-serif;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    line-height: 1.8;
    font-size: 1.05rem;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
}

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

.tag {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--bg-secondary), #f3f4f6);
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tag:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 800;
    font-family: 'Vazirmatn', sans-serif;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 2;
    font-size: 1.1rem;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.contact-item:hover {
    transform: translateX(-10px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.4s ease;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.contact-details h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
    font-family: 'Vazirmatn', sans-serif;
}

.contact-details p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group input,
.form-group textarea {
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    font-weight: 400;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.8;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.footer-logo-wrapper {
    margin-bottom: 1rem;
}

.footer-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

.footer-logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 40px rgba(20, 184, 166, 0.4);
    border-color: var(--primary-color);
}

.footer p {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    opacity: 0.9;
}

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

.social-link {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-5px) scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    border-color: transparent;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image-wrapper {
        max-width: 500px;
        margin: 0 auto;
    }

    .about-image {
        height: 400px;
    }

    .hero-content {
        gap: 3rem;
    }

    .code-animation {
        max-width: 100%;
        font-size: 0.8rem;
        direction: ltr;
        text-align: left;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .code-content {
        padding: 15px;
        direction: ltr;
        text-align: left;
        overflow-x: auto;
        overflow-y: hidden;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
    }

    html[dir="ltr"] .nav-menu {
        right: auto;
        left: -100%;
    }

    .nav-menu.active {
        right: 0;
    }

    html[dir="ltr"] .nav-menu.active {
        left: 0;
        right: auto;
    }

    .nav-logo {
        width: 40px;
        height: 40px;
    }

    .nav-brand h2 {
        font-size: 1.4rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-image {
        flex-direction: column;
        width: 100%;
    }

    .hero-photo-wrapper {
        width: 220px;
        height: 220px;
    }

    .code-animation {
        max-width: 100%;
        font-size: 0.75rem;
        direction: ltr;
        text-align: left;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .code-content {
        padding: 12px;
        font-size: 0.8rem;
        direction: ltr;
        text-align: left;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .code-line {
        white-space: pre;
        word-break: normal;
        direction: ltr;
        text-align: left;
        overflow-x: visible;
        min-width: fit-content;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-title .greeting {
        font-size: 1.5rem;
    }

    .hero-title .name {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image-wrapper {
        max-width: 100%;
    }

    .about-image {
        height: 300px;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .footer-logo {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 15px 40px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-title .name {
        font-size: 2.5rem;
    }

    .hero-title .greeting {
        font-size: 1.2rem;
    }

    .hero-photo-wrapper {
        width: 180px;
        height: 180px;
    }

    .code-animation {
        font-size: 0.7rem;
        direction: ltr;
        text-align: left;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .code-content {
        padding: 10px;
        font-size: 0.75rem;
        direction: ltr;
        text-align: left;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-stats {
        gap: 1rem;
    }

    .stat-item {
        padding: 1.5rem;
    }

    .about-image {
        height: 250px;
    }

    .hero-buttons {
        gap: 0.8rem;
    }

    .btn {
        padding: 14px 30px;
        font-size: 1rem;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Additional Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Particle Effect for Hero */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200% 200%;
    animation: particleMove 20s linear infinite;
    pointer-events: none;
}

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

