@font-face {
    font-family: 'Persian';
    src: url('fa.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'English';
    src: url('en.woff2') format('woff2');
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #00ff88;
    --accent-dim: #00ff8820;
    --border: #2a2a2a;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Persian', 'English', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

html[lang="fa"] body {
    font-family: 'Persian', sans-serif;
}

html[lang="en"] body {
    font-family: 'English', sans-serif;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
}

.hidden {
    display: none;
}

/* Language Toggle */
.lang-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    gap: 8px;
    z-index: 1000;
    background: var(--bg-card);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Header */
.header {
    margin-bottom: 60px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-dim);
}

.name {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Contact Section */
.contact-section {
    margin-bottom: 60px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-dim);
}

.contact-item .icon {
    font-size: 20px;
}

/* Sections */
.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
}

html[dir="rtl"] .section-title::after {
    left: auto;
    right: 0;
}

/* Skills */
.skills-grid {
    display: grid;
    gap: 24px;
}

.skill-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.skill-name {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #00cc6a);
    border-radius: 4px;
    transition: width 1s ease;
}

.skill-level {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Experience */
.experience-list {
    display: grid;
    gap: 24px;
}

.experience-item {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.experience-item:hover {
    border-color: var(--accent);
    transform: translateX(-4px);
}

html[dir="rtl"] .experience-item:hover {
    transform: translateX(4px);
}

.experience-item h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--accent);
}

.company {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--accent-dim);
}

.project-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-card p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.project-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    transform: translateX(4px);
}

html[dir="rtl"] .project-link:hover {
    transform: translateX(-4px);
}

/* Responsive */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
    }

    .name {
        font-size: 36px;
    }

    .title {
        font-size: 18px;
    }

    .section-title {
        font-size: 28px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .lang-toggle {
        top: 20px;
        right: 20px;
    }
}
