@font-face {
    font-family: 'VazirMatn';
    src: url('fonts/Vazirmatn-Regular.woff2') format('woff2'),
         url('fonts/Vazirmatn-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'VazirMatn';
    src: url('fonts/Vazirmatn-Bold.woff2') format('woff2'),
         url('fonts/Vazirmatn-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'VazirMatn', Tahoma, Arial, sans-serif !important;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
}
.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}
header {
    background-color: #0a478e;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(10, 71, 142, 0.25);
    position: relative;
    z-index: 200;
}
header h1 {
    font-size: 2.8rem;
    margin-bottom: 5px;
}
header .subtitle {
    font-weight: 400;
    font-size: 1.2rem;
    opacity: 0.85;
    margin-bottom: 15px;
}
/* دکمه همبرگر */
#menu-toggle {
    display: none;
    font-size: 2.4rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    user-select: none;
    padding: 5px 10px;
    transition: transform 0.3s ease;
    position: absolute;
    top: 25px;
    right: 20px;
    z-index: 210;
}
#menu-toggle.active {
    transform: rotate(90deg);
}
header nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    transition: all 0.3s ease;
    position: static;
}
@media (max-width: 768px) {
    #menu-toggle {
        display: block;
    }
    header nav {
        display: none;
        flex-direction: column;
        background-color: #0a478e;
        position: absolute;
        top: 60px;
        right: 0;
        width: 80%;
        max-width: 250px;
        border-radius: 0 0 0 12px;
        box-shadow: -3px 8px 15px rgba(10, 71, 142, 0.5);
        padding: 12px 0;
        z-index: 200;
        opacity: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    header nav.active {
        display: flex;
        opacity: 1;
        transform: translateX(0);
    }
    header nav a {
        padding: 12px 25px;
        border-bottom: 1.2px solid rgba(255,255,255,0.2);
        font-size: 1.15rem;
    }
    header nav a:last-child {
        border-bottom: none;
    }
}
header nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 15px;
    border-radius: 6px;
    transition: background-color 0.4s ease, color 0.3s ease, transform 0.3s ease;
}
header nav a:hover,
header nav a:focus {
    background-color: #08356a;
    color: #aad8ff;
    transform: scale(1.05);
    outline: none;
}
header.scrolled {
    background-color: #08356a;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}
.section {
    background-color: white;
    margin-top: 30px;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.05);
}
.section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #0a478e;
    border-bottom: 3px solid #0a478e;
    display: inline-block;
    padding-bottom: 4px;
}
.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}
.profile-img {
    width: 220px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(10, 71, 142, 0.2);
}
.about-text {
    flex: 1;
    font-size: 1.1rem;
    color: #444;
    line-height: 1.5;
}
section#services ul {
    list-style: none;
    padding-right: 0;
}
section#services ul li {
    background-color: #e9f0fa;
    padding: 12px 18px;
    margin-bottom: 10px;
    border-radius: 7px;
    font-size: 1.1rem;
    color: #075aab;
    box-shadow: inset 0 0 8px rgba(7, 90, 171, 0.15);
}
.job {
    background-color: #f1f5f9;
    border-radius: 7px;
    padding: 15px 20px;
    margin-bottom: 15px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}
.job h3 {
    color: #072f6f;
    margin-bottom: 7px;
}
section#projects article {
    background-color: #f9fafb;
    padding: 15px 18px;
    margin-bottom: 15px;
    border-left: 5px solid #0a478e;
    border-radius: 5px;
}
section#projects article h3 {
    color: #0a478e;
    margin-bottom: 6px;
}
section#publications ul {
    list-style: disc inside;
    padding-right: 20px;
}
section#publications ul li {
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: #2f2f2f;
}
section#contact ul {
    list-style: none;
    padding-right: 0;
    margin-bottom: 20px;
}
section#contact ul li {
    font-size: 1.1rem;
    margin-bottom: 8px;
}
section#contact ul li a {
    color: #0a478e;
    text-decoration: none;
}
section#contact ul li a:hover {
    text-decoration: underline;
}
/* فرم تماس */
.contact-form {
    max-width: 500px;
    background-color: #f5f8ff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(10, 71, 142, 0.15);
}
.contact-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #122e68;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1.8px solid #aac9ff;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'VazirMatn', Tahoma, Arial, sans-serif;
    resize: vertical;
    transition: border-color 0.3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #0a478e;
    outline: none;
}
.contact-form button {
    background-color: #0a478e;
    color: white;
    font-weight: 700;
    padding: 12px 20px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
    box-shadow: 0 4px 12px rgba(10, 71, 142, 0.35);
}
.contact-form button:hover,
.contact-form button:focus {
    background-color: #08407a;
    outline: none;
    box-shadow: 0 6px 16px rgba(10, 71, 142, 0.55);
    transform: translateY(-2px);
}
footer {
    background-color: #0a478e;
    color: white;
    text-align: center;
    padding: 12px 0;
    margin-top: 40px;
    font-size: 0.9rem;
}
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .profile-img {
        width: 180px;
        margin: 0 auto;
    }
    body {
        font-size: 16px;
    }
    header h1 {
        font-size: 2.2rem;
    }
    header .subtitle {
        font-size: 1rem;
    }
}
.track-btn {
    display: inline-block;
    background-color: #e9f2ff;
    color: #0a478e;
    border: 1.5px solid #0a478e;
    font-family: 'Vazir', Tahoma, Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 7px;
    padding: 12px 20px;
    margin-top: 0;
    margin-bottom: 0;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(10, 71, 142, 0.10);
    transition: background 0.23s, color 0.19s, box-shadow 0.21s, transform 0.2s;
    cursor: pointer;
    vertical-align: middle;
    outline: none;
}
.track-btn:hover, .track-btn:focus {
    background-color: #0a478e;
    color: #fff;
    box-shadow: 0 6px 16px rgba(10, 71, 142, 0.23);
    transform: translateY(-2px);
    text-decoration: none;
}
/* دکمه بازگشت به بالا */
#backToTop {
    position: fixed;
    left: 26px;
    bottom: 36px;
    background: #08407a;
    color: #fff;
    border-radius: 48%;
    padding: 10px 15px 13px 15px;
    font-size: 36px;
    cursor: pointer;
    box-shadow: 0 2px 11px rgba(42,61,174,0.19);
    z-index: 2222;
    display: none;
    text-decoration: none;
    transition: background .15s;
}
#backToTop:hover { background: #2c69df; }
