:root {
    --primary: #0f111a;
    --accent: #1e90ff;
    --background: #0b0d17;
    --text: #e0e0e0;
    --muted: #aaa;
    --card-bg: rgba(20, 25, 50, 0.8);
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'LMU Vazir', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--text);
}

/* Container Flex */
.container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    flex-wrap: nowrap;
}

/* Sidebar */
.sidebar {
    width: 300px;
    min-width: 250px;
    background: var(--primary);
    padding: 25px;
    border-right: 2px solid var(--accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;  /* وسط چین کردن عکس و متن */
    text-align: center;
    margin-bottom: 15px;
}

.profile .photo {
    width: 130px;
    height: 130px;
    margin-bottom: 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent);
    transition: transform 0.4s, box-shadow 0.4s;
    cursor: pointer;
    /* اضافه شده برای وسط چین کردن خود عکس */
    margin-left: auto;
    margin-right: auto;
}


.profile .photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.profile .photo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--accent);
}

.profile .name {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    margin-bottom: 5px;
}

.profile .title {
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 15px;
}

.sidebar .meta {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 5px;
    text-align: center;
}

.sidebar a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar a:hover {
    color: #00bfff;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.badge {
    background: linear-gradient(135deg, #1e90ff, #00bfff);
    color: #fff;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
}

.badge:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px var(--accent);
}

.sidebar-section {
    width: 100%;
    margin-top: 25px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 35px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    transition: transform 0.4s, box-shadow 0.4s;
    opacity: 0;
    transform: translateY(30px);
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.8);
}

.card.show {
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* Headings */
h2 {
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 22px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: var(--accent);
    bottom: -5px;
    left: 0;
    border-radius: 2px;
}

/* Timeline */
.timeline .item {
    display: flex;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.timeline .item.show {
    opacity: 1;
    transform: translateX(0);
}

.timeline .dot {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 15px;
    margin-top: 5px;
}

.item-content .job-title {
    font-weight: 700;
}

/* Skills */
.skill {
    margin-bottom: 20px;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.bar {
    background: #2c2f50;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
}

.bar i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #1e90ff, #00bfff);
    border-radius: 10px;
    transition: width 1.2s ease-in-out;
}


/* ------------------ Responsive ------------------ */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--accent);
        flex-direction: column;
        justify-content: center;
        align-items: center; /* وسط چین کل محتوا */
        padding: 20px 10px;
    }
    .profile {
        display: flex;
        flex-direction: column;
        align-items: center; /* وسط چین عکس و نام */
        text-align: center;
        margin-bottom: 15px;
    }
    .sidebar-section {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }
    .main-content {
        padding: 20px;
    }
}

.description {
    margin-top: 6px;
    line-height: 1.6;
}

.description .en {
    display: block;
    text-align: left;
    direction: ltr;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-bottom: 4px; /* فاصله بین انگلیسی و فارسی */
}

.description .fa {
    display: block;
    text-align: right;
    direction: rtl;
    font-family: 'LMU Vazir', sans-serif;
}


@media (max-width: 576px) {
    .profile .photo {
        width: 100px;
        height: 100px;
        margin: 0 auto; /* وسط چین عکس */
    }
    h2 {
        font-size: 18px;
    }
    .skill-name {
        font-size: 14px;
    }
    .badge {
        padding: 4px 8px;
        font-size: 11px;
    }
}
/* Achievements Card */
.achievements {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.achievement-item {
    display: flex;
    background: rgba(20, 25, 50, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px; /* فاصله بین هر آیتم */
}

.achievement-item:last-child {
    margin-bottom: 0; /* آیتم آخر فاصله نداشته باشد */
}


.achievement-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.7);
}

.achievement-photo {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    margin-right: 15px;
}

.achievement-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.achievement-photo img:hover {
    transform: scale(1.1);
}

.achievement-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.achievement-title {
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.achievement-date {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.achievement-desc .en {
    display: block;
    text-align: left;
    direction: ltr;
    margin-bottom: 4px;
}

.achievement-desc .fa {
    display: block;
    text-align: right;
    direction: rtl;
}

/* Responsive */
@media (max-width: 900px) {
    .achievement-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .achievement-photo {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
.achievement-photo {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    margin-right: 15px;
    display: block;
    cursor: pointer;
}

.achievement-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.achievement-photo:hover img {
    transform: scale(1.1);
}

.app-item {
    display: flex;
    background: rgba(20, 25, 50, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.app-item:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.7);
}

.app-photo {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    margin-right: 15px;
    display: block;
    cursor: pointer;
}

.app-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.app-photo:hover img {
    transform: scale(1.1);
}

.app-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-title {
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}

.app-desc {
    font-size: 14px;
    color: var(--text);
}

.app-desc .en {
    display: block;
    margin-bottom: 3px;
}

.app-desc .fa {
    display: block;
    color: var(--muted);
}

