/* ============================================
   PREMIUM PORTFOLIO - CORE FRAMEWORK ARCHITECTURE
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #050505;
    --bg-secondary: #0d0d0d;
    --bg-tertiary: #121212;
    --text-primary: #f5f2eb;
    --text-secondary: #b5b0a5;
    --accent-primary: #e8d5a3;
    --accent-secondary: #c4b285;
    --border-color: rgba(232, 213, 163, 0.08);
    --border-color-hover: rgba(232, 213, 163, 0.25);
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-md: 0 12px 32px rgba(0,0,0,0.7);
    --shadow-lg: 0 24px 64px rgba(0,0,0,0.9);
    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --nav-translate: -100%;
}

[data-theme="light"] {
    --bg-primary: #fcfbfa;
    --bg-secondary: #f5f3ef;
    --bg-tertiary: #ebe8e2;
    --text-primary: #1c1b18;
    --text-secondary: #5c5953;
    --accent-primary: #85734d;
    --accent-secondary: #5e5135;
    --border-color: rgba(133, 115, 77, 0.15);
    --border-color-hover: rgba(133, 115, 77, 0.4);
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

body[dir="rtl"] {
    --nav-translate: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   FLOATING ACTION COMPONENTS & CURSORS
   ============================================ */

.floating-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-md);
}

.floating-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.floating-scroll-top:hover {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-4px);
}

body[dir="rtl"] .floating-scroll-top {
    right: auto;
    left: 30px;
}

.cursor-inner, .cursor-outer {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
}
.cursor-inner {
    width: 6px;
    height: 6px;
    background-color: var(--accent-primary);
}
.cursor-outer {
    width: 36px;
    height: 36px;
    border: 1px solid var(--accent-primary);
}

/* ============================================
   NAVIGATION MECHANICS (HEADER)
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}
[data-theme="light"] .navbar {
    background: rgba(252, 251, 250, 0.75);
}
.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navbar-brand {
    cursor: pointer;
}
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.logo-image {
    width: 52px;
    height: 52px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
.brand-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.menu-list {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--accent-primary);
}
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.btn-resume-header {
    padding: 0.5rem 1.2rem;
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-resume-header:hover {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}
.btn-theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
}
.btn-theme-toggle:hover, .btn-language-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Corrected Layering Toggle Engine (Bug image_4e1170.png Fixed) */
.btn-theme-toggle svg {
    position: absolute;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
[data-theme="dark"] .icon-sun {
    transform: scale(0.5);
    opacity: 0;
    pointer-events: none;
}
[data-theme="dark"] .icon-moon {
    transform: scale(1);
    opacity: 1;
}
[data-theme="light"] .icon-sun {
    transform: scale(1);
    opacity: 1;
}
[data-theme="light"] .icon-moon {
    transform: scale(0.5);
    opacity: 0;
    pointer-events: none;
}

.btn-language-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}
.mobile-menu-toggle span {
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* ============================================
   GLOBAL PREMIUM UI BUTTONS (Fixed image_4e2055.png)
   ============================================ */

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-stack);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #050505 !important;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 213, 163, 0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary) !important;
    border: 1px solid var(--accent-primary);
}

.btn-secondary:hover {
    background-color: var(--accent-primary);
    color: #050505 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 213, 163, 0.15);
}

.btn-primary svg, 
.btn-secondary svg {
    flex-shrink: 0;
    stroke: currentColor;
}

/* ============================================
   HERO DISPLAY SECTION
   ============================================ */

.hero {
    padding: 160px 0 100px;
    min-height: 95vh;
    display: flex;
    align-items: center;
    position: relative;
}
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}
.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(232, 213, 163, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1.5rem;
}
.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}
.hero-cta {
    display: flex;
    gap: 1rem;
}
.image-container {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}
.image-frame {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    aspect-ratio: 0.85;
}
.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-glow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    box-shadow: inset 0 0 40px rgba(5,5,5,0.8);
    pointer-events: none;
}

/* ============================================
   TICKER ARCHITECTURE
   ============================================ */

.ticker-section {
    overflow: hidden;
    padding: 1.5rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.ticker-track {
    display: flex;
    gap: 4rem;
    animation: scrollAnimation 25s linear infinite;
    white-space: nowrap;
}
.ticker-item {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 1.5px;
}
@keyframes scrollAnimation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   BENTO PANELS (ABOUT MODULE)
   ============================================ */

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}
.about { padding: 100px 0; }
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.bento-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
}
.bento-large { grid-column: span 2; }
.bento-box h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}
.bento-box p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.metrics {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    justify-content: center;
}
.metric-item h4 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}
.metric-label-text { font-size: 0.9rem; color: var(--text-secondary); }
.status-widget { display: flex; align-items: center; gap: 1rem; height: 100%; }
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #2ec4b6;
    box-shadow: 0 0 12px #2ec4b6;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}
.status-label { font-size: 0.75rem !important; text-transform: uppercase; letter-spacing: 0.5px; }
.status-value { font-size: 1.1rem; font-weight: 600; margin-top: 2px; }

/* ============================================
   TECHNICAL ARSENAL - CARD LAYOUT ENGINE
   ============================================ */

.skills {
    padding: 100px 0;
    background-color: var(--bg-primary);
}

.skills-modern-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
    width: 100%;
}

.skills-row {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 2.2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.skills-row:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-hover);
}

.skills-category-lbl {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-primary);
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

/* Elegant bottom accent line under card titles */
.skills-category-lbl::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 1.5px;
    background-color: var(--accent-primary);
    opacity: 0.4;
}

body[dir="rtl"] .skills-category-lbl::after {
    left: auto;
    right: 0;
}

.skills-badges-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.modern-badge {
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    background-color: var(--bg-tertiary);
    border: 1px solid rgba(232, 213, 163, 0.04);
    color: var(--text-primary);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modern-badge:hover {
    border-color: var(--accent-primary);
    background-color: rgba(232, 213, 163, 0.02);
}

/* ============================================
   PROJECT MATRIX PANELS
   ============================================ */

.projects { padding: 100px 0; }

.projects-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.projects-tab-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: 2px solid rgba(232, 213, 163, 0.3);
    background-color: rgba(232, 213, 163, 0.06);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.projects-tab-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background-color: rgba(232, 213, 163, 0.12);
}

.projects-tab-btn.active {
    background-color: var(--accent-primary);
    color: #0d0d0d;
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(232, 213, 163, 0.3);
}

[data-theme="light"] .projects-tab-btn {
    border-color: rgba(133, 115, 77, 0.3);
    background-color: rgba(133, 115, 77, 0.08);
}

[data-theme="light"] .projects-tab-btn:hover {
    background-color: rgba(133, 115, 77, 0.15);
    border-color: var(--accent-primary);
}

[data-theme="light"] .projects-tab-btn.active {
    background-color: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.project-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-hover);
}
.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.project-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}
.project-title { font-size: 1.2rem; margin-bottom: 0.75rem; }
.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.project-tags span {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 2px;
}
.project-links .social-link {
    font-size: 0.85rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   THEMATIC TIMELINE LAYOUT (EDUCATION)
   ============================================ */

.education-timeline-section {
    padding: 100px 0;
    background-color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
}
.timeline-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}
.timeline-main-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}
.timeline-title-underline {
    width: 40px;
    height: 2px;
    background: var(--accent-primary);
    margin: 0 auto 50px;
}
.main-timeline-track { position: relative; max-width: 1000px; margin: 0 auto; }
.main-timeline-track::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}
.timeline-node-item {
    padding: 10px 40px;
    position: relative;
    background-color: transparent;
    width: 50%;
    margin-bottom: 20px;
}
.left-node { left: 0; text-align: right; }
.right-node { left: 50%; text-align: left; }
.node-indicator-dot {
    width: 12px;
    height: 12px;
    position: absolute;
    background-color: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    z-index: 10;
    top: 42px;
}
.left-node .node-indicator-dot { right: -6px; }
.right-node .node-indicator-dot { left: -6px; }
.node-card-content {
    padding: 2rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
}
.node-card-content:hover { border-color: var(--border-color-hover); }
.node-card-content h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.node-card-content .institution-name { font-size: 0.9rem; font-weight: 600; color: var(--accent-primary); margin-bottom: 4px; }
.node-card-content .timeline-duration-date { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 10px; }
.node-card-content .timeline-card-details { font-size: 0.85rem; color: var(--text-secondary); }

/* ============================================
   LEADERSHIP ARCHITECTURE
   ============================================ */

.leadership { padding: 100px 0; }
.leadership-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.leadership-card { background-color: var(--bg-secondary); border: 1px solid var(--border-color); padding: 2rem; border-radius: 10px; }
.leadership-org { font-size: 0.85rem; color: var(--accent-primary); margin: 0.25rem 0; }
.leadership-period { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.leadership-description { font-size: 0.9rem; color: var(--text-secondary); }

/* ============================================
   EXPLICIT BOX CONTACT FORM (image_4e0e48.png Fixed Size Alignment)
   ============================================ */

.contact { padding: 100px 0 140px; }

.contact-content {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
    align-items: stretch; /* Forces both components to have matching heights */
}

/* Height Size Harmonization Configured (Fixes image_4e0e48.png) */
.contact-details-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Evenly spreads sections */
    height: 100%; 
}

.contact-form-modern {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    height: 100%;
}

.info-item {
    margin-bottom: 0.5rem;
}

.info-details h4 { font-size: 0.75rem; text-transform: uppercase; color: var(--accent-primary); letter-spacing: 1px; margin-bottom: 0.25rem; }
.info-details p, .info-details a { font-size: 1rem; color: var(--text-primary); text-decoration: none; }
.unified-social-links-wrap { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.25rem; }
.social-separator { color: rgba(232, 213, 163, 0.2); font-size: 0.9rem; }

.form-box-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    width: 100%;
}
.form-box-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-box-input,
.form-box-textarea {
    width: 100%;
    background-color: #050505;
    border: 1px solid rgba(232, 213, 163, 0.15);
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
[data-theme="light"] .form-box-input,
[data-theme="light"] .form-box-textarea {
    background-color: #ffffff;
}
.form-box-textarea { resize: vertical; min-height: 140px; flex-grow: 1; }
.form-box-input:focus,
.form-box-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(232, 213, 163, 0.1);
}
.form-box-input::placeholder,
.form-box-textarea::placeholder {
    color: rgba(181, 176, 165, 0.35);
    font-size: 0.95rem;
}
.input-icon-wrapper { position: relative; width: 100%; }
.input-icon-wrapper .form-box-input { padding-right: 3.5rem; }

.email-validation-icon {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 196, 182, 0.1);
    padding: 0.3rem 0.4rem;
    border-radius: 4px;
    pointer-events: none;
}

.btn-box-submit {
    width: 100%;
    padding: 1.1rem;
    background-color: var(--accent-primary);
    color: #050505;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    margin-top: 0.5rem;
}
.btn-box-submit:hover { background-color: var(--accent-secondary); transform: translateY(-2px); }
.btn-box-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.center-btn-wrapper { display: flex; justify-content: center; width: 100%; }

/* ============================================
   FOOTER LAYER & MODALS (SANDBOX PREVIEW FIX)
   ============================================ */

.footer { border-top: 1px solid var(--border-color); padding: 3rem 0; background-color: var(--bg-secondary); }
.footer-bottom { text-align: center; font-size: 0.85rem; color: var(--text-secondary); }
.love-line { margin-top: 0.5rem; font-weight: 500; letter-spacing: 0.5px; color: var(--text-primary); }

/* ============================================
   RESUME HUB OVERLAY FRAME - LIVE VIEW ENGINE FIX
   ============================================ */

.modal { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 2000; 
    align-items: center; 
    justify-content: center; 
}

.modal.active { 
    display: flex; 
}

.modal-overlay { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    background: rgba(5, 5, 5, 0.85); 
    backdrop-filter: blur(8px); 
}

.modal-content { 
    position: relative; 
    background: var(--bg-secondary); 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    max-width: 900px; 
    width: 90%; 
    height: 85vh; 
    padding: 2.5rem; 
    z-index: 2001; 
    display: flex; 
    flex-direction: column; 
}

.modal-close { 
    position: absolute; 
    top: 1rem; 
    right: 1rem; 
    background: transparent; 
    border: none; 
    color: var(--text-primary); 
    font-size: 1.75rem; 
    cursor: pointer; 
}

.modal-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1.5rem; 
}

.modal-body { 
    flex-grow: 1; 
    width: 100%; 
    height: calc(100% - 60px); 
    position: relative; 
}

/* Clear View PDF Render Target Rules */
.resume-viewer { 
    width: 100%; 
    height: 100%; 
    border: 1px solid var(--border-color); 
    border-radius: 6px; 
    background-color: #ffffff; /* Forces white baseline canvas behind PDF render engine */
    display: block;
}

/* ============================================
   RESPONSIVE LAYOUT ENGINE (MEDIA QUERIES)
   ============================================ */

@media (max-width: 992px) {
    .hero-container { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
    .hero-description { margin: 0 auto 2.5rem; }
    .hero-cta { justify-content: center; }
    .skills-modern-container { padding: 2rem; }
    .skills-row { grid-template-columns: 1fr; gap: 0.75rem; }
    .contact-content { grid-template-columns: 1fr; gap: 2rem; }
    .contact-details-box { height: auto; }
}

@media (max-width: 768px) {
    .navbar-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background-color: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        padding: 6rem 2rem;
        transform: translateX(var(--nav-translate));
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
    }
    body[dir="rtl"] .navbar-menu { left: auto; right: 0; border-right: none; border-left: 1px solid var(--border-color); }
    .navbar-menu.active { transform: translateX(0) !important; }
    .menu-list { flex-direction: column; gap: 2rem; }
    .mobile-menu-toggle { display: flex; }
    .btn-resume-header { display: none; }
    .leadership-grid { grid-template-columns: 1fr; }
    .main-timeline-track::after { left: 16px; }
    .timeline-node-item { width: 100%; padding-left: 45px; padding-right: 10px; }
    .left-node, .right-node { left: 0; text-align: left; }
    .left-node .node-indicator-dot, .right-node .node-indicator-dot { left: 10px; right: auto; }
}

body[dir="rtl"] .form-box-label { text-align: right; }
body[dir="rtl"] .email-validation-icon { right: auto; left: 1.2rem; }
body[dir="rtl"] .input-icon-wrapper .form-box-input { padding-right: 1.2rem; padding-left: 3.5rem; }