/* --------------------------------------------------- */
/* بخش ۱: استایل‌های عمومی و اصلی (از صفحه شخصی)       */
/* --------------------------------------------------- */
@import url('https://cdn.fontcdn.ir/Font/Persian/Vazirmatn/Vazirmatn-Regular.css');

:root {
    --main-bg-dark: #0f0c29;
    --main-bg-light: #1a1a2e;
    --accent-color: #5d5dff;
    --text-color: #e0e0ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, var(--main-bg-dark) 0%, var(--main-bg-light) 100%);
    color: var(--text-color);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* افکت نور زمینه */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(93, 93, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* هدر صفحه شخصی */
header {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
}

h1 {
    font-size: 2.5em;
    font-weight: 900;
    margin-bottom: 5px;
}

.subtitle {
    color: #aaaaff;
    font-size: 1.1em;
}

.university {
    color: #cccccc;
    margin-top: 10px;
    font-size: 0.9em;
}

/* منوی سایت‌ها */
.sites-nav {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    max-width: 90%;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.sites-nav h2 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.site-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-card:hover:not(.active):not(.coming-soon) {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.site-card.active {
    background: rgba(93, 93, 255, 0.3);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}

.site-card i {
    font-size: 2em;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.site-card span {
    font-size: 0.9em;
}

.coming-soon {
    opacity: 0.6;
    cursor: default;
}

.coming-soon .coming-soon-badge {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    margin-top: 5px;
}

.live-badge {
    background: #2ecc71;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    margin-top: 5px;
}

/* بخش‌های اصلی (Main Content) */
main {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
}

.content-section:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.content-section h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(93, 93, 255, 0.3);
    padding-bottom: 10px;
    display: inline-block;
}

/* بخش درباره من */
.about-text {
    line-height: 1.8;
    color: #c0c0ff;
}

/* بخش دستاوردها */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.cert-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cert-card .number {
    font-size: 2.5em;
    font-weight: bold;
    color: #ffdd57; /* زرد کم‌رنگ */
    display: block;
    margin-bottom: 5px;
}

.cert-card .label {
    font-size: 0.95em;
    color: #e0e0ff;
}

/* بخش مهارت‌ها */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.skill-category {
    background: rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(93, 93, 255, 0.2);
}

.skill-category h4 {
    color: #ff8a8a;
    margin-bottom: 15px;
    border-bottom: 1px dashed rgba(255, 138, 138, 0.5);
    padding-bottom: 5px;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.3s;
}

.skill-category li:hover {
    color: #ffffff;
}

/* فوتر */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    font-size: 0.9em;
}

footer strong {
    color: var(--accent-color);
}

/* --------------------------------------------------- */
/* بخش ۲: استایل‌های صفحه نمونه کارها (Portfolio)      */
/* --------------------------------------------------- */

.portfolio-container {
    padding-top: 20px;
}

.portfolio-category {
    margin-bottom: 40px;
}

.portfolio-category h2 {
    color: #aaffff;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 3px double rgba(170, 255, 255, 0.3);
    padding-bottom: 10px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    perspective: 1000px;
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.portfolio-card:hover:not(.coming-soon-card) {
    transform: rotateY(5deg) translateZ(10px);
    box-shadow: 0 15px 40px rgba(93, 93, 255, 0.5);
}

.portfolio-image {
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    color: white;
    background-size: cover;
    background-position: center;
}

.portfolio-info {
    padding: 15px;
}

.portfolio-info h3 {
    color: #ffffff;
    margin-bottom: 5px;
    font-size: 1.4em;
}

.portfolio-desc {
    color: #b0b0e0;
    font-size: 0.9em;
    margin-bottom: 15px;
    min-height: 40px;
}

.portfolio-tech {
    margin-bottom: 15px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(93, 93, 255, 0.2);
    color: var(--accent-color);
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.75em;
    border: 1px solid rgba(93, 93, 255, 0.4);
}

.portfolio-links {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.view-link, .info-btn, .soon-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: background-color 0.3s;
    flex-grow: 1;
    text-align: center;
    font-size: 0.85em;
}

.view-link {
    background-color: #2ecc71;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.view-link:hover { background-color: #27ae60; }

.info-btn {
    background-color: #3498db;
    color: white;
}
.info-btn:hover { background-color: #2980b9; }

.soon-btn {
    background-color: #95a5a6;
    color: #ecf0f1;
    cursor: not-allowed;
}

.portfolio-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.status-badge {
    padding: 3px 8px;
    border-radius: 15px;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}
.status-badge i { font-size: 0.7em; }
.live { background-color: #2ecc71; }
.dev { background-color: #f39c12; }
.planning { background-color: #9b59b6; }

/* حالت کارد در حال توسعه */
.coming-soon-card {
    opacity: 0.8;
    cursor: default;
}
.coming-soon-card:hover {
    transform: none;
    box-shadow: none;
}

/* مودال */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: var(--main-bg-light);
    margin: 10% auto;
    padding: 30px;
    border: 1px solid var(--accent-color);
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    position: relative;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: white;
    text-decoration: none;
}

#modalContent h2 {
    color: #ffffff;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

#modalContent h3 {
    color: #ffdd57;
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-features li {
    list-style: none;
    padding: 5px 0;
    color: #e0e0ff;
}
.modal-features i { margin-left: 10px; color: #2ecc71; }

.modal-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
/* تگ‌های تکنولوژی در مودال از استایل‌های اصلی تبعیت می‌کنند */

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-status, .modal-date {
    font-size: 0.8em;
    color: #aaaaff;
}

/* --------------------------------------------------- */
/* بخش ۳: قوانین ریسپانسیو (Responsive)                 */
/* --------------------------------------------------- */
@media (max-width: 992px) {
    h1 { font-size: 2em; }
    .subtitle { font-size: 1em; }
    
    main { padding: 30px 15px; }
    
    .certificates-grid, .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .content-section { padding: 20px; }
}

@media (max-width: 768px) {
    header { padding: 15px 0; }
    
    .sites-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .site-card { padding: 10px; }
    .site-card i { font-size: 1.5em; }
    .site-card span { font-size: 0.75em; }

    .content-section h2 { font-size: 1.4em; }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* انیمیشن Keyframes (برای JS صفحه شخصی) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --------------------------------------------------- */
/* بخش ۴: استایل‌های بخش نمونه کارها در صفحه اصلی       */
/* --------------------------------------------------- */
.projects-showcase {
    scroll-margin-top: 20px; /* برای اسکرول دقیق‌تر */
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.project-item {
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(93, 93, 255, 0.3);
}

.project-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 0;
}

.project-thumbnail {
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4em;
    color: white;
}

.project-info {
    padding: 20px;
}

.project-info h4 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.project-info p {
    color: #b0b0e0;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.project-tech {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.project-tech span {
    background: rgba(93, 93, 255, 0.2);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    border: 1px solid rgba(93, 93, 255, 0.4);
}

.project-status {
    display: flex;
    justify-content: flex-start;
}

.status-badge.live {
    background-color: #2ecc71;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-badge.live i {
    font-size: 0.7em;
}
/* ===== استایل پروژه دقیقاً مثل عکس ===== */
.project-section {
    grid-column: 1 / -1;
    margin-top: 30px;
}

.project-card-exact {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.project-card-exact:hover {
    transform: translateY(-5px);
    border-color: #40e0d0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.image-placeholder {
    text-align: center;
    color: #40e0d0;
}

.image-placeholder i {
    font-size: 4rem;
    margin-bottom: 10px;
    display: block;
}

.image-placeholder span {
    color: #cbd5e0;
    font-size: 1rem;
}

.project-content {
    padding: 30px;
}

.project-content h3 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 5px;
    font-family: 'Vazirmatn', 'Vazir', sans-serif;
}

.project-subtitle {
    color: #cbd5e0;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.project-tech-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(64, 224, 208, 0.15);
    color: #40e0d0;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(64, 224, 208, 0.3);
    font-family: 'Vazirmatn', 'Vazir', sans-serif;
}

.view-site-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #40e0d0, #2c3e50);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.view-site-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(64, 224, 208, 0.4);
    background: linear-gradient(135deg, #40e0d0, #40e0d0);
}

.online-badge {
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: normal;
    margin-right: 5px;
    font-family: 'Vazirmatn', 'Vazir', sans-serif;
}

.project-description {
    color: #a0aec0;
    line-height: 1.7;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
}

/* ===== ریسپانسیو برای موبایل ===== */
@media (max-width: 768px) {
    .project-card-exact {
        flex-direction: column;
        margin: 0 10px;
    }
    
    .project-image {
        height: 150px;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .project-content h3 {
        font-size: 1.6rem;
    }
    
    .view-site-btn {
        padding: 12px 25px;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    .project-tech-tags {
        justify-content: center;
    }
}

/* ===== انیمیشن برای ظاهر شدن ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card-exact {
    animation: fadeInUp 0.6s ease-out;
}
/* ===== استایل پروژه دقیقاً مثل عکس ===== */
.project-section {
    grid-column: 1 / -1;
    margin-top: 30px;
}

.project-card-exact {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.project-card-exact:hover {
    transform: translateY(-5px);
    border-color: #40e0d0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.image-placeholder {
    text-align: center;
    color: #40e0d0;
}

.image-placeholder i {
    font-size: 4rem;
    margin-bottom: 10px;
    display: block;
}

.image-placeholder span {
    color: #cbd5e0;
    font-size: 1rem;
}

.project-content {
    padding: 30px;
    text-align: center;
}

.project-content h3 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 5px;
    font-family: 'Vazirmatn', 'Vazir', sans-serif;
}

.project-subtitle {
    color: #cbd5e0;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.view-site-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #40e0d0, #2c3e50);
    color: white;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.view-site-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(64, 224, 208, 0.4);
    background: linear-gradient(135deg, #40e0d0, #40e0d0);
}

.online-badge {
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: normal;
    margin-right: 5px;
    font-family: 'Vazirmatn', 'Vazir', sans-serif;
}

.project-description {
    color: #a0aec0;
    line-height: 1.7;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ریسپانسیو برای موبایل ===== */
@media (max-width: 768px) {
    .project-card-exact {
        flex-direction: column;
        margin: 0 10px;
    }
    
    .project-image {
        height: 150px;
    }
    
    .project-content {
        padding: 25px 20px;
    }
    
    .project-content h3 {
        font-size: 1.6rem;
    }
    
    .view-site-btn {
        padding: 15px 30px;
        font-size: 1.1rem;
        width: 100%;
        justify-content: center;
    }
}

/* ===== انیمیشن برای ظاهر شدن ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card-exact {
    animation: fadeInUp 0.6s ease-out;
}