/* style.css - Minimal & Modern Portfolio */

:root {
    --primary: #0a192f;
    --accent: #64ffda;
    --text: #b0bad8;
    --light: #112240;
    --white: #e6f1ff;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--primary);
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* جلوگیری از اسکرول افقی */
}

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

/* ===== Navigation ===== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 25, 47, 0.95);
    padding: 20px 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-decoration: none;
}

.logo img {
    width: 4.8rem;
    height: 4.8rem;
    object-fit: contain;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* ===== Hamburger Menu ===== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 2001;
    /* بالاتر از منوی موبایل */
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--accent);
    margin: 3px 0;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 400;
}

.hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-3px);
}

.btn-secondary {
    color: var(--white);
    border: 1px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* ===== Sections ===== */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    color: var(--white);
    text-align: center;
    margin-bottom: 50px;
}

/* ===== Projects ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--light);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(100, 255, 218, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.1);
}

.project-card h3 {
    color: var(--accent);
    margin-bottom: 10px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.tag {
    background: rgba(100, 255, 218, 0.1);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.view-all-link {
    text-align: center;
    margin-top: 50px;
}

/* ===== Certificates (Slider) ===== */
.certificates {
    background: var(--light);
}

.certificates-slider-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 10px;
    width: 100%;
}

.certificates-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: slideRTL 30s linear infinite;
    will-change: transform;
}

.certificates-track:hover {
    animation-play-state: paused;
}

@keyframes slideRTL {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-50%);
    }
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: var(--light);
    color: var(--text);
    border: 1px solid var(--accent);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-2px);
}

.certificate-card {
    min-width: 280px;
    width: 280px;
    height: 350px;
    background: var(--primary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(100, 255, 218, 0.1);
}

.cert-preview {
    width: 100%;
    height: 180px;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.certificate-card:hover .cert-preview img {
    transform: scale(1.05);
}

.org-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 10;
}

.certificate-card h4 {
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 8px;
    word-break: break-word;
    flex-grow: 1;
}

.cert-type {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-top: auto;
    text-align: center;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.control-btn {
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.control-btn:hover {
    background: var(--accent);
    color: var(--primary);
}

/* ===== About ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}

.profile-img {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    border: 2px solid var(--accent);
}

.about-text h3 {
    color: var(--accent);
    margin-bottom: 20px;
}

.education-item {
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid var(--accent);
}

.education-item h4 {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.education-item p {
    margin-bottom: 5px;
    color: var(--text);
    line-height: 1.5;
}

.education-item p strong {
    color: var(--white);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.skill-item {
    background: var(--light);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 500;
}

/* ===== Contact ===== */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.contact-item {
    text-align: center;
    padding: 30px;
    background: var(--light);
    border-radius: 8px;
}

.contact-item h3 {
    color: var(--accent);
    margin-bottom: 10px;
}

.contact-item a {
    color: var(--white);
    text-decoration: none;
    word-break: break-all;
}

.contact-item p {
    color: var(--white);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--light);
}

/* ===== Responsive (Mobile) ===== */
@media (max-width: 768px) {

    /* ==== FULLSCREEN MENU ==== */
    .hamburger {
        display: flex;
    }
    nav {
            padding: 1px 0;
            /* نوار باریک‌تر */
        }
    

    .nav-links {
        top: 70px;
        position: fixed;
        inset: 0;
        /* تمام صفحه: top, right, bottom, left = 0 */
        flex-direction: column;
        justify-content: center;
        /* وسط چین عمودی */
        align-items: center;
        /* وسط چین افقی */
        background: var(--primary);
        width: 100%;
        height: 100vh;
        padding: 0;
        margin: 0;
        z-index: 1500;
        /* پایین‌تر از هامبرگر (2001) */
        transform: translateX(-100%);
        /* خارج از صفحه */
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        /* انیمیشن نرم */
    }
    .nav-links.active {
        transform: translateX(0);
        /* داخل صفحه */
        opacity: 1;
    }

    .nav-links li {
        margin: 20px 0;
        /* فاصله بین آیتم‌ها */
    }

    .nav-links a {
        display: block;
        padding: 15px 30px;
        font-size: 1.3rem;
        color: var(--white);
        text-decoration: none;
        transition: color 0.3s;
    }

    /* ========================= */

    /* Typography */
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.3rem;
    }

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

    .section-title {
        font-size: 2rem;
    }

    /* Layouts */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-img {
        margin: 0 auto;
        max-width: 300px;
        /* فیکس: حذف width و height کوچک‌سازی */
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    /* Buttons */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Spacing */
    .container {
        padding: 0 15px;
    }

    section {
        padding: 60px 0;
    }

    .project-card,
    .contact-item {
        padding: 20px;
    }

    /* Certificate cards */
    .certificate-card {
        min-width: 240px;
        width: 240px;
        height: 320px;
    }

    .cert-preview {
        height: 150px;
    }

    /* Filter buttons */
    .filter-buttons {
        gap: 10px;
    }

    .filter-btn {
        padding: 6px 15px;
        font-size: 0.9rem;
    }
    body.menu-open {
        overflow: hidden;
        height: 100vh;
        position: relative;
        /* مهم: fixed نیست */
    }

}
