/* ==========================================================================
1. PREMIUM LUXURY DARK & GOLD GLASSMORPHISM PALETTE
========================================================================== */
:root {
    /* Deep Midnight Navy Base */
    --bg-base: #060b19;
    --bg-gradient: radial-gradient(circle at 50% 50%, #0d1b2a 0%, #060b19 100%);

    /* Glassmorphism Specs (Dark Navy Glass) */
    --glass-bg: rgba(13, 27, 42, 0.45);
    --glass-border: rgba(255, 215, 0, 0.15); /* Subtle Gold Border Touch */
    --glass-border-pure: rgba(255, 255, 255, 0.08);

    /* Typography Colors */
    --text-light: #f4f5f7;        /* Crisp White-Gray for main titles */
    --text-muted: #94a3b8;        /* Slate Gray for high readability descriptions */

    /* Luxury Metallic Gold Accents */
    --gold-main: #ffd700;
    --gold-light: #ffe57f;
    --gold-dark: #ccac00;
    --gold-glass-glow: rgba(255, 215, 0, 0.15);

    /* UI Engineering */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shadow-blur-sm: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-gold: 0 8px 24px rgba(255, 215, 0, 0.25);
    --main-blur: blur(20px);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo-text {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

li {
    list-style: none;
}

/* ==========================================================================
   2. ULTIMATE GLASSMORPHISM CARD STYLING
   ========================================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--main-blur);
    -webkit-backdrop-filter: var(--main-blur);
    border: 1px solid var(--glass-border-pure);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-blur-sm);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    border-color: var(--glass-border);
    box-shadow: 0 12px 40px 0 rgba(255, 215, 0, 0.05), var(--shadow-blur-sm);
}

/* ==========================================================================
   3. LAYOUT & NAVIGATION (SIDEBAR)
   ========================================================================== */
/* Sidebar (Desktop Glass) */
.sidebar {
    width: 300px;
    height: calc(100vh - 40px);
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;
}

.logo .logo-text {
    font-size: 28px;
    letter-spacing: 0.5px;
}

.logo span {
    color: var(--gold-main);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-menu a {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    display: block;
}

/* Gold Tech Magazine Active States */
.nav-menu a:hover, .nav-menu a.active {
    color: var(--gold-main);
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--gold-main);
    padding-left: 24px;
}

.sidebar-footer {
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    text-align: center;
}

/* Mobile Nav Header (Glass) */
.mobile-header {
    display: none;
    width: calc(100% - 20px);
    height: 70px;
    position: fixed;
    top: 10px;
    left: 10px;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    border-radius: var(--radius-md);
}

/* Main Content Wrapper */
.main-content {
    margin-left: 340px;
    flex: 1;
    width: calc(100% - 340px);
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* ==========================================================================
   4. SECTIONS COMPONENTS
   ========================================================================== */
section {
    scroll-margin-top: 80px;
}

.section-title {
    font-size: 34px;
    margin-bottom: 35px;
    position: relative;
    display: inline-block;
    letter-spacing: 0.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gold-main);
    box-shadow: 0 0 8px var(--gold-main);
    border-radius: 2px;
}

/* --- HOME SECTION --- */
.home-container {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 50px;
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.6) 0%, rgba(6, 11, 25, 0.4) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2); /* Soft Gold Frame */
    box-shadow: var(--shadow-gold-glow), var(--shadow-blur-sm);
}

.home-image-wrapper {
    flex: 0 0 300px;
    height: 380px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.home-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-info h1 {
    font-size: 46px;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.home-info .subtitle {
    font-size: 18px;
    color: var(--gold-main);
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.home-info .description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 35px;
}

/* --- BIOGRAPHY SECTION --- */
.bio-card {
    padding: 40px;
    margin-bottom: 40px;
}

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

.tag {
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border-pure);
    color: var(--text-muted);
}

.tag:hover {
    border-color: var(--gold-main);
    color: var(--gold-main);
    background: rgba(255, 215, 0, 0.05);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.badge-info {
    background: rgba(255, 215, 0, 0.07);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    display: inline-block;
    color: var(--gold-light);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Resume Architectural Grid */
.resume-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
}

.resume-block h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--gold-main);
    letter-spacing: 0.5px;
}

.timeline-item {
    padding: 25px;
    margin-bottom: 20px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-light);
}

.timeline-item p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Premium Tech Progress Bars */
.skills-container {
    padding: 35px 30px;
}

.skill-item {
    margin-bottom: 24px;
}

.skill-item h4 {
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-weight: 500;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-main));
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* --- PORTFOLIO SECTION --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.portfolio-item {
    overflow: hidden;
}

.portfolio-image {
    width: 100%;
    height: 220px;
    background: #000;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-image {
    opacity: 1;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-desc {
    padding: 24px;
    background: rgba(6, 11, 25, 0.3);
}

.portfolio-desc h4 {
    font-size: 18px;
    margin-bottom: 6px;
}

.portfolio-desc p {
    font-size: 14px;
    color: var(--text-muted);
}

/* --- CONTACT SECTION --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
}

.contact-form {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border-pure);
    background: rgba(0, 0, 0, 0.2);
    font-family: inherit;
    font-size: 15px;
    color: var(--text-light);
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--gold-main);
    background: rgba(13, 27, 42, 0.8);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.form-group textarea {
    height: 140px;
    resize: none;
}

.contact-info-card {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.info-block h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold-main);
    margin-bottom: 6px;
    font-weight: 700;
}

.info-block p {
    font-size: 17px;
    font-weight: 600;
}

/* SOLID METALLIC GOLD BUTTONS WITH GLOW */
.btn-primary {
    background: linear-gradient(135deg, var(--gold-main) 0%, var(--gold-dark) 100%);
    color: #060b19; /* High contrast dark text on gold */
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-gold);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(255, 215, 0, 0.45);
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-main) 100%);
}

/* ==========================================================================
   5. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    .main-content {
        padding: 40px 30px;
        margin-left: 320px;
        width: calc(100% - 320px);
    }
    .resume-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        display: none;
    }
    .mobile-header {
        display: flex;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 100px 16px 40px 16px;
        gap: 60px;
    }
    .home-container {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }
    .home-image-wrapper {
        flex: 0 0 280px;
        width: 240px;
        height: 300px;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}
/* ==========================================================================
   6. HAMBURGER MENU STYLES (MOBILE)
   ========================================================================== */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    z-index: 1100;
}

.hamburger-btn span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger Animation to 'X' */
.hamburger-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--gold-main);
}
.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--gold-main);
}

/* Dropdown Mobile Menu styling */
.mobile-nav-menu {
    display: none;
    position: absolute;
    top: 75px;
    left: 0;
    width: 100%;
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: var(--main-blur);
    -webkit-backdrop-filter: var(--main-blur);
    border: 1px solid var(--glass-border-pure);
    border-radius: var(--radius-md);
    padding: 20px;
    flex-direction: column;
    gap: 15px;
    box-shadow: var(--shadow-blur-sm);
}

.mobile-nav-menu.show {
    display: flex;
}

.mobile-nav-menu a {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    text-align: center;
    transition: all 0.2s ease;
}

.mobile-nav-menu a:hover {
    color: var(--gold-main);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-nav-menu a:hover, .mobile-nav-menu a:active {
    color: var(--gold-main); /* تبدیل رنگ متن به طلایی درخشان */
    background: rgba(255, 215, 0, 0.08); /* یک هاله طلایی بسیار ملایم در پس‌زمینه کادر */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); /* درخشش نئونی ملایم روی نوشته طلایی */
}

/* استایل آیتم فعال در منوی موبایل (کادر زرد درخشان) */
.mobile-nav-menu a.mobile-active {
    color: var(--gold-main) !important;
    border: 2px solid var(--gold-main);
    background: rgba(255, 215, 0, 0.12);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.25), inset 0 0 10px rgba(255, 215, 0, 0.1);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* ==========================================================================
           ROYAL DIAMOND IMAGE FRAME (Multi-layered Metallic Glow)
           ========================================================================== */
.home-image-wrapper {
    flex: 0 0 300px;
    height: 380px;
    border-radius: var(--radius-lg);
    position: relative;
    padding: 8px; /* ایجاد فاصله برای لایه تزئینی داخلی */
    background: rgba(6, 11, 25, 0.6);

    /* لایه اول بردر: طلایی متالیک ضخیم و سلطنتی */
    border: 3px solid transparent;
    background-image: linear-gradient(rgba(13, 27, 42, 0.95), rgba(13, 27, 42, 0.95)),
    linear-gradient(135deg, #ffe57f 0%, #ffd700 50%, #b39700 100%);
    background-origin: border-box;
    background-clip: content-box, border-box;

    /* باکس شدو چندلایه امپراطوری (سایه مات، عمیق و نئونی قوی) */
    box-shadow:
            0 0 0 1px rgba(255, 215, 0, 0.3),                 /* خط نوری بیرونی */
            0 0 30px 0 rgba(255, 215, 0, 0.25),               /* هاله نوری اصلی */
            0 20px 50px -10px rgba(0, 0, 0, 0.9),             /* سایه عمیق مشکی برای ایجاد عمق */
            inset 0 0 20px rgba(255, 215, 0, 0.2);            /* درخشش طلایی از داخل به سمت عکس */

    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

/* لایه دوم تزئینی: خط فریم داخلی ظریف (Inner Royal Border) */
.home-image-wrapper::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: calc(var(--radius-lg) - 4px);
    pointer-events: none;
    z-index: 2;
}

/* لایه سوم: ایجاد افکت انعکاس نوری روی شیشه الماس (Diamond Sheen Action) */
.home-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: -75%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255, 229, 127, 0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: 0.75s;
    z-index: 3;
}

/* رندر و انیمیشن عکس داخل الماس */
.home-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 6px);
    filter: contrast(1.05) brightness(1.02); /* افزایش وضوح و درخشش عکس */
    transition: all 0.5s ease;
}

/* ==========================================================================
   ROYAL HOVER EFFECTS (انیمیشن خیره‌کننده هنگام هاور)
   ========================================================================== */
.home-image-wrapper:hover {
    transform: translateY(-8px) scale(1.03) rotate(1deg); /* حرکت ملایم و زنده */

    /* انفجار نوری مات و سلطنتی در پشت عکس */
    box-shadow:
            0 0 5px 2px rgba(255, 215, 0, 0.4),
            0 0 50px 10px rgba(255, 215, 0, 0.45),
            0 30px 60px -5px rgba(0, 0, 0, 0.95),
            inset 0 0 30px rgba(255, 215, 0, 0.4);
}

/* رد شدن برقِ الماس از روی عکس هنگام هاور */
.home-image-wrapper:hover::after {
    left: 125%;
    transition: 0.75s ease-in-out;
}

/* زوم سه بعدی روی عکس */
.home-image-wrapper:hover img {
    transform: scale(1.06);
    filter: contrast(1.1) brightness(1.05);
}

/* تنظیم مجدد ترنزیشن به حالت صاف، مرتب و بدون چرخش */

.home-image-wrapper:hover,
.home-image-wrapper:active {
    transform: translateY(-6px) scale(1.02) rotate(0deg) !important; /* حذف زاویه کج */

    /* حفظ درخشش فوق‌العاده طلایی ولی با ابعاد بهینه‌شده برای اسکرین موبایل */
    box-shadow:
            0 0 5px 1px rgba(255, 215, 0, 0.4),
            0 0 35px 5px rgba(255, 215, 0, 0.35),
            0 20px 40px -5px rgba(0, 0, 0, 0.9),
            inset 0 0 25px rgba(255, 215, 0, 0.3) !important;
}
