:root {
    --bg-primary: #f9f9f9;
    --bg-secondary: #ffffff;
    --text-primary: #2d2e32;
    --text-secondary: #555555;
    --accent-color: #3158c9;
    --accent-hover: #2746a1;
    --card-bg: #ffffff;
    --progress-bg: #e0e0e0;
    --progress-fill: #3158c9;
    --badge-bg: #edf1fc;
    --badge-text: #1e367d;
    --footer-bg: #f0f2f5;
    --footer-text: #555555;
    --btn-bg: #3158c9;
    --btn-text: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
}

body.dark {
    --bg-primary: #1a1b1e;
    --bg-secondary: #2c2d31;
    --text-primary: #f1f1f1;
    --text-secondary: #b0b0b0;
    --accent-color: #81a1f0;
    --accent-hover: #a5bdf5;
    --card-bg: #2c2d31;
    --progress-bg: #3a3b3f;
    --progress-fill: #81a1f0;
    --badge-bg: #1e367d;
    --badge-text: #e2eafc;
    --footer-bg: #141518;
    --footer-text: #b0b0b0;
    --btn-bg: #81a1f0;
    --btn-text: #1a1b1e;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: Vazirmatn;
    src: url(Vazirmatn-Regular.woff2);
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

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


header {
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(var(--bg-secondary-rgb), 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark header {
    background-color: rgba(44, 45, 49, 0.9);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

svg {
    height: 24px;
    width: 24px;
}

.hero svg {
    color: var(--text-primary);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

#theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

#theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark #theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.hero .subheadline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

section {
    padding: 60px 0;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    color: var(--text-primary);
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.skill-item {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.7s, box-shadow 0.3s;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 500;
}

.skill-name {
    color: var(--text-primary);
}

.skill-percent {
    color: var(--accent-color);
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--progress-bg);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--progress-fill);
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
    gap: 30px;
    margin-top: 20px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.project-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.project-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.badge {
    background-color: var(--badge-bg);
    color: var(--badge-text);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 8px;
    line-height: 1.5;
}

footer {
    background-color: var(--bg-secondary);
    color: var(--footer-text);
    padding: 20px 0 20px;
    margin-top: 40px;
    box-shadow: var(--shadow);
}

footer .container{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-links a {
    color: var(--footer-text);
    font-size: 1.5rem;
    transition: color 0.3s, transform 0.3s;
    height: 24px;
    max-height: 24px;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

.copyright i {
    margin: 0 4px;
}

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

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

    section {
        padding: 40px 0;
    }

    section h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .skills-grid,
    .projects-grid {
        gap: 20px;
    }
    footer .container {
        flex-direction: column-reverse;
        gap: 10px;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .header-content {
        height: 60px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .hero {
        padding: 40px 0 30px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .project-card .project-info h3 {
        font-size: 1.1rem;
    }
}