/* Custom variables for premium design */
:root {
    --bg-black: #000000;
    --bg-dark-1: #070708;
    --bg-dark-2: #0f0f12;
    --bg-dark-3: #16161c;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0ab;
    --text-muted: #6b6b76;
    
    /* Accent Branding Colors */
    --pr-color: #ea00d9; /* Premiere Purple-Magenta */
    --ae-color: #9000ff; /* After Effects Deep Purple */
    --ps-color: #00b7ff; /* Photoshop Blue */
    --accent-glow: rgba(144, 0, 255, 0.15);
    
    /* Layout Constants */
    --container-width: 1200px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font-fa: 'Vazirmatn', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-black);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-tap-highlight-color: transparent; /* Smooth touch interactions on mobile */
}

/* Multilingual Font and Layout Direction */
body[dir="rtl"] {
    font-family: var(--font-fa);
    text-align: right;
}

body[dir="ltr"] {
    font-family: var(--font-en);
    text-align: left;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-black);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-dark-3);
    border-radius: 4px;
    border: 2px solid var(--bg-black);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.english-num {
    font-family: var(--font-en);
    direction: ltr;
    display: inline-block;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glowing Backgrounds */
.bg-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    opacity: 0.15;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    top: 20%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
    animation: pulseGlow 15s infinite alternate;
}

/* Liquid Glassmorphism Background Blobs */
.liquid-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.35;
    z-index: -2;
    pointer-events: none;
    mix-blend-mode: screen;
}

.blob-1 {
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(144, 0, 255, 0.45) 0%, rgba(234, 0, 217, 0.1) 50%, rgba(0, 0, 0, 0) 70%);
    top: -10%;
    left: -10%;
    animation: floatBlob1 30s infinite alternate ease-in-out;
}

.blob-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(234, 0, 217, 0.4) 0%, rgba(0, 183, 255, 0.1) 50%, rgba(0, 0, 0, 0) 70%);
    bottom: -10%;
    right: -10%;
    animation: floatBlob2 25s infinite alternate ease-in-out;
}

.blob-3 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(0, 183, 255, 0.35) 0%, rgba(144, 0, 255, 0.1) 50%, rgba(0, 0, 0, 0) 70%);
    top: 40%;
    left: 40%;
    animation: floatBlob3 35s infinite alternate ease-in-out;
}

@keyframes floatBlob1 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(150px, 120px) scale(1.2) rotate(180deg); }
}

@keyframes floatBlob2 {
    0% { transform: translate(0, 0) scale(1.1) rotate(0deg); }
    100% { transform: translate(-150px, -100px) scale(0.9) rotate(-180deg); }
}

@keyframes floatBlob3 {
    0% { transform: translate(0, 0) scale(0.9) rotate(0deg); }
    100% { transform: translate(-100px, 150px) scale(1.1) rotate(120deg); }
}

@keyframes pulseGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

/* Header & Navbar */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background-color: rgba(7, 7, 8, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-en);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo-m {
    color: var(--text-primary);
}

.logo-d {
    color: var(--ae-color);
    text-shadow: 0 0 15px rgba(144, 0, 255, 0.6);
}

.nav-menu ul {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0%;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--pr-color), var(--ae-color));
    box-shadow: 0 0 10px rgba(234, 0, 217, 0.6);
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    opacity: 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
    opacity: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 3px;
    gap: 2px;
    backdrop-filter: blur(10px);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 50px;
    font-family: var(--font-en);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--ae-color) 0%, var(--pr-color) 100%);
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(144, 0, 255, 0.4);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--ae-color) 0%, var(--pr-color) 100%);
    color: var(--text-primary);
    box-shadow: 0 5px 20px rgba(144, 0, 255, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.btn-primary:hover::after {
    transform: rotate(45deg) translate(15%, 15%);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(234, 0, 217, 0.5);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.05);
}

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

.btn-outline:hover {
    border-color: var(--ae-color);
    box-shadow: 0 0 15px rgba(144, 0, 255, 0.2);
}

.btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Hero Section */
.hero-section {
    padding: 180px 0 100px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.badge-glow {
    display: inline-flex;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    background-color: rgba(144, 0, 255, 0.08);
    border: 1px solid rgba(144, 0, 255, 0.2);
    color: #c78aff;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(144, 0, 255, 0.1);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

/* Custom Styled Highlights for the Name Mostafa Del Zendeh */
.highlight-pr-ae {
    background: linear-gradient(135deg, #b000ff 0%, #ea00d9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(234, 0, 217, 0.15);
}

.highlight-ps {
    background: linear-gradient(135deg, #00b7ff 0%, #00e1ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 183, 255, 0.15);
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    text-align: justify;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

/* Hero Visual Timeline Mockup */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-card {
    width: 100%;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 25px 50px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 2;
}

.editor-ui-mockup {
    background-color: #0b0b0d;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.mockup-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background-color: #121216;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

body[dir="rtl"] .dot {
    margin-left: 6px;
}

body[dir="ltr"] .dot {
    margin-right: 6px;
}

.mockup-title {
    font-family: var(--font-en);
    font-size: 0.75rem;
    color: var(--text-muted);
}

body[dir="rtl"] .mockup-title {
    margin-right: auto;
    margin-left: 20px;
}

body[dir="ltr"] .mockup-title {
    margin-left: auto;
    margin-right: 20px;
}

.mockup-body {
    padding: 20px;
}

.timeline-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 120px;
    justify-content: center;
}

.timeline-track {
    display: flex;
    gap: 8px;
    background-color: #18181f;
    border-radius: 6px;
    padding: 6px;
    align-items: center;
    height: 38px;
}

.clip {
    height: 26px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    cursor: default;
    animation: clipPulse 2s infinite alternate;
}

.clip.c-pr { background: linear-gradient(90deg, #58004f, var(--pr-color)); }
.clip.c-ae { background: linear-gradient(90deg, #37006b, var(--ae-color)); }
.clip.c-ps { background: linear-gradient(90deg, #004d6b, var(--ps-color)); }

.clip.audio {
    background-color: #11352b;
    border: 1px solid #1a5c4a;
    height: 16px;
}

@keyframes clipPulse {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

.playhead {
    position: absolute;
    top: 0;
    left: 45%;
    width: 2px;
    height: 100%;
    background-color: #ff007f;
    box-shadow: 0 0 10px #ff007f;
}

.playhead::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 10px;
    height: 10px;
    background-color: #ff007f;
    transform: rotate(45deg);
}

.glow-sphere {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    z-index: -1;
    filter: blur(50px);
    opacity: 0.4;
}

.glow-sphere.s-ae {
    background-color: var(--ae-color);
    bottom: -30px;
    right: -30px;
}

.glow-sphere.s-pr {
    background-color: var(--pr-color);
    top: -30px;
    left: -30px;
}

/* Sections Global Styling */
section {
    padding: 100px 0;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-tag {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--ae-color);
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Skills Section Card Styling */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--x, 0px) var(--y, 0px), rgba(255, 255, 255, 0.08), transparent 40%);
    z-index: 1;
    pointer-events: none;
}

.skill-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 20px 40px var(--glow-color, rgba(0,0,0,0.5));
}

.skill-card.card-pr {
    --hover-border-color: rgba(234, 0, 217, 0.4);
    --glow-color: rgba(234, 0, 217, 0.2);
}
.skill-card.card-ae {
    --hover-border-color: rgba(144, 0, 255, 0.4);
    --glow-color: rgba(144, 0, 255, 0.2);
}
.skill-card.card-ps {
    --hover-border-color: rgba(0, 183, 255, 0.4);
    --glow-color: rgba(0, 183, 255, 0.2);
}

.skill-icon-wrap {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 1.8rem;
    position: relative;
}

.icon-pr {
    background: rgba(234, 0, 217, 0.1);
    border: 1.5px solid var(--pr-color);
    color: var(--pr-color);
    box-shadow: 0 0 15px rgba(234, 0, 217, 0.2);
}

.icon-ae {
    background: rgba(144, 0, 255, 0.1);
    border: 1.5px solid var(--ae-color);
    color: var(--ae-color);
    box-shadow: 0 0 15px rgba(144, 0, 255, 0.2);
}

.icon-ps {
    background: rgba(0, 183, 255, 0.1);
    border: 1.5px solid var(--ps-color);
    color: var(--ps-color);
    box-shadow: 0 0 15px rgba(0, 183, 255, 0.2);
}

.skill-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.skill-intro {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.skill-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 35px;
}

.skill-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.skill-features li i {
    color: #27c93f;
    margin-top: 5px;
}

/* Progress bar inside cards */
.progress-bar-container {
    margin-top: auto;
}

.progress-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.progress-line {
    width: 100%;
    height: 4px;
    background-color: var(--bg-dark-3);
    border-radius: 10px;
    overflow: hidden;
}

.progress-line span {
    display: block;
    height: 100%;
    border-radius: 10px;
}

/* Portfolio Filters */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 50px;
}

.filter-btn {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 0.6rem 1.6rem;
    border-radius: 50px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: var(--transition-smooth);
}

body[dir="rtl"] .filter-btn {
    font-family: var(--font-fa);
}

body[dir="ltr"] .filter-btn {
    font-family: var(--font-en);
}

.filter-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--ae-color) 0%, var(--pr-color) 100%);
    border-color: transparent;
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(144, 0, 255, 0.4);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.portfolio-item {
    display: none;
}

.portfolio-item.show {
    display: block;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
    height: 100%;
}

.portfolio-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 20px 45px rgba(144, 0, 255, 0.2);
}

.portfolio-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: var(--bg-dark-2);
}

.portfolio-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.portfolio-card:hover .portfolio-thumbnail img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.portfolio-card:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--ae-color) 0%, var(--pr-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.4rem;
    box-shadow: 0 0 20px rgba(144, 0, 255, 0.6);
    transition: var(--transition-smooth);
}

body[dir="rtl"] .play-icon i {
    margin-right: -4px; /* Align play icon to center visually for RTL */
}

body[dir="ltr"] .play-icon i {
    margin-left: -4px; /* Align play icon to center visually for LTR */
}

.portfolio-card:hover .play-icon {
    transform: scale(1.1);
}

.portfolio-info {
    padding: 24px;
}

.item-category {
    font-size: 0.8rem;
    color: var(--ae-color);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.portfolio-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.portfolio-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 3.5rem;
}

.contact-info-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.contact-info-panel h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.contact-info-panel > p {
    color: var(--text-secondary);
    margin-bottom: 35px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: auto;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.info-icon {
    width: 52px;
    height: 52px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--ae-color);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.info-text {
    display: flex;
    flex-direction: column;
}

.info-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.info-text a {
    font-weight: 500;
    font-size: 1rem;
}

.info-text a:hover {
    color: var(--ae-color);
}

.social-circles {
    display: flex;
    gap: 1rem;
    margin-top: 40px;
}

.social-circle {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.social-circle:hover {
    background-color: var(--text-primary);
    color: var(--bg-black);
    border-color: var(--text-primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* Contact Form Panel */
.contact-form-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    backdrop-filter: blur(5px);
    transition: var(--transition-smooth);
}

body[dir="rtl"] .form-group input, body[dir="rtl"] .form-group textarea {
    font-family: var(--font-fa);
}

body[dir="ltr"] .form-group input, body[dir="ltr"] .form-group textarea {
    font-family: var(--font-en);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(144, 0, 255, 0.5);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 15px rgba(144, 0, 255, 0.3);
}

.form-status-msg {
    margin-top: 15px;
    font-size: 0.95rem;
    text-align: center;
}

.form-status-msg.success { color: #27c93f; }
.form-status-msg.error { color: #ff5f56; }

/* Footer */
.main-footer {
    background-color: #030304;
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

/* Video Lightbox Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(7, 7, 9, 0.6);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal.open {
    display: flex;
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 1010;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--pr-color);
    transform: rotate(90deg) scale(1.05);
}

.modal-content {
    width: 90%;
    max-width: 950px;
    aspect-ratio: 16/9;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 30px 70px rgba(0, 0, 0, 0.8);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal.open .modal-content {
    transform: scale(1);
}

.iframe-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Mobile Menu / Menu Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==============================================================================
   Mobile Optimization media queries (Highly optimized for small screens)
   ============================================================================== */

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
        text-align: center;
    }
    
    .hero-desc {
        margin: 0 auto 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1; /* Place mockup on top on tablet / mobile screens */
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    /* Container spacing */
    .container {
        padding: 0 1.25rem;
    }
    
    /* Header mobile styling */
    .navbar {
        height: 70px;
    }
    
    .menu-toggle {
        display: block;
        order: 3;
    }
    
    .logo {
        font-size: 1.7rem;
        order: 1;
    }
    
    .nav-actions {
        order: 2;
        gap: 0.8rem;
    }
    
    .nav-cta {
        display: none; /* Hide desktop button on mobile header */
    }
    
    /* Responsive Navigation Menu Drawer */
    .nav-menu {
        position: fixed;
        top: 70px;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-black);
        border-top: 1px solid var(--border-color);
        transition: var(--transition-smooth);
        padding: 40px 20px;
        overflow-y: auto; /* Enable scroll if items exceed viewport */
    }
    
    body[dir="rtl"] .nav-menu {
        right: -100%;
        left: auto;
    }
    body[dir="rtl"] .nav-menu.open {
        right: 0;
    }
    
    body[dir="ltr"] .nav-menu {
        left: -100%;
        right: auto;
    }
    body[dir="ltr"] .nav-menu.open {
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 1.25rem;
        font-weight: 600;
        padding: 0.8rem 2rem;
        display: block;
        width: 100%;
        text-align: center;
        background-color: var(--bg-dark-1);
        border: 1px solid var(--border-color);
        border-radius: 50px;
    }
    
    .nav-link:hover, .nav-link.active {
        border-color: var(--ae-color);
        background-color: var(--bg-dark-2);
        box-shadow: 0 0 15px rgba(144, 0, 255, 0.1);
    }
    
    .nav-link::after {
        display: none; /* Disable underline effect on mobile */
    }
    
    /* Hero section adjustments */
    .hero-section {
        padding: 110px 0 60px;
    }
    
    .hero-title {
        font-size: 2.3rem; /* Scaled down for mobile */
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-desc {
        font-size: 0.95rem;
        text-align: center;
        line-height: 1.7;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mockup Visual scales down smoothly */
    .visual-card {
        padding: 16px;
        max-width: 380px;
    }
    
    .timeline-visual {
        height: 100px;
        gap: 8px;
    }
    
    .timeline-track {
        height: 32px;
        padding: 4px;
    }
    
    .clip {
        height: 22px;
        font-size: 0.65rem;
    }
    
    /* Section header spacing */
    section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    /* Card layouts stack to single column */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-card {
        padding: 30px 20px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-filters {
        flex-wrap: wrap; /* Wrap filter buttons on mobile */
        gap: 0.5rem;
        margin-bottom: 30px;
    }
    
    .filter-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }
    
    /* Contact Form spacing */
    .contact-info-panel, .contact-form-panel {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group input, .form-group textarea {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Modal close button adjustments */
    .close-modal {
        top: 15px;
        font-size: 2.5rem;
    }
    
    body[dir="rtl"] .close-modal {
        left: 20px;
    }
    body[dir="ltr"] .close-modal {
        right: 20px;
    }
}

/* Extra small mobile devices (iPhone 5/SE/smaller screens) */
@media (max-width: 360px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .lang-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}
