/* ==========================================================================
   DESIGN SYSTEM - CSS VARIABLES & INITIAL CUSTOMS
   ========================================================================== */
:root {
    /* Color Palette */
    --color-bg: #090b0f;
    --color-panel: rgba(15, 18, 26, 0.65);
    --color-panel-hover: rgba(22, 27, 38, 0.8);
    --color-border: rgba(255, 255, 255, 0.06);
    --color-border-hover: rgba(255, 255, 255, 0.12);
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    
    /* Neon Accent Colors & Gradients */
    --color-accent-tech: #00f2fe;
    --color-accent-creative: #f72585;
    
    --gradient-tech: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    --gradient-creative: linear-gradient(135deg, #f72585 0%, #7209b7 100%);
    --gradient-combined: linear-gradient(135deg, #4facfe 0%, #f72585 100%);
    
    /* Ambient Glow Spotlights */
    --glow-1: rgba(0, 242, 254, 0.15);
    --glow-2: rgba(247, 37, 133, 0.12);
    --glow-3: rgba(79, 172, 254, 0.1);
    
    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow-tech: 0 0 20px rgba(0, 242, 254, 0.3);
    --shadow-glow-creative: 0 0 20px rgba(247, 37, 133, 0.3);
    
    /* Fonts */
    --font-fa: 'Vazirmatn', sans-serif;
    --font-en: 'Outfit', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RTL / LTR Typography Setup */
body.rtl {
    font-family: var(--font-fa);
    text-align: right;
    letter-spacing: 0;
}

body.ltr {
    font-family: var(--font-en);
    text-align: left;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   RESET & GLOBAL STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background-color: var(--color-bg);
    line-height: 1.6;
    color: var(--color-text-secondary);
    position: relative;
    overflow-x: hidden;
}

/* Ambient Background Lights */
.ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.7;
}

.glow-1 {
    top: -100px;
    left: -100px;
    background-color: var(--glow-1);
}

body.rtl .glow-1 {
    left: auto;
    right: -100px;
}

.glow-2 {
    top: 50vh;
    right: -100px;
    background-color: var(--glow-2);
}

body.rtl .glow-2 {
    right: auto;
    left: -100px;
}

.glow-3 {
    bottom: -100px;
    left: 10%;
    background-color: var(--glow-3);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 2px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-combined);
}

/* Selection */
::selection {
    background-color: rgba(0, 242, 254, 0.3);
    color: var(--color-text-primary);
}

/* ==========================================================================
   UTILITY CLASSES & GENERAL COMPONENTS
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

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

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

/* Glassmorphism Panel base */
.glass {
    background: var(--color-panel);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: border-color var(--transition-normal), background var(--transition-normal), transform var(--transition-normal);
}

.glass:hover {
    background: var(--color-panel-hover);
    border-color: var(--color-border-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

body.rtl .btn {
    font-family: var(--font-fa);
}

body.ltr .btn {
    font-family: var(--font-en);
}

.btn-primary {
    background: var(--gradient-combined);
    color: var(--color-text-primary);
    border: none;
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 37, 133, 0.4);
}

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

.btn-outline:hover {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
    transform: translateY(-2px);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--gradient-tech);
    border-radius: 2px;
}

.section-subtitle {
    display: block;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-top: 8px;
}

/* Highlight / Gradient Text */
.highlight-text {
    font-weight: 800;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gradient-1 {
    background-image: var(--gradient-combined);
}

.gradient-2 {
    background-image: var(--gradient-tech);
}

/* Custom Cursor Styles */
.custom-cursor-dot,
.custom-cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-accent-tech);
    box-shadow: 0 0 10px var(--color-accent-tech);
}

.custom-cursor-outline {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 242, 254, 0.4);
    transition: width 0.15s ease-out, height 0.15s ease-out, border-color 0.15s ease-out;
}

/* Cursor effects when active/hovering */
.cursor-hover .custom-cursor-outline {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 242, 254, 0.08);
    border-color: var(--color-accent-tech);
}

.cursor-hover .custom-cursor-dot {
    background-color: var(--color-accent-creative);
    box-shadow: 0 0 10px var(--color-accent-creative);
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition-normal);
}

.header.scrolled {
    padding: 12px 0;
    background: rgba(9, 11, 15, 0.75);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

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

/* Logo */
.logo-area {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
}

.logo-dot {
    background: var(--gradient-combined);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Menu Links */
.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-combined);
    transition: var(--transition-normal);
}

body.rtl .nav-link::after {
    left: auto;
    right: 0;
}

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

/* Actions area */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Language switch button */
.lang-switch-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 30px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-normal);
}

.lang-switch-btn:hover {
    border-color: var(--color-accent-tech);
    background: rgba(0, 242, 254, 0.05);
    transform: translateY(-1px);
}

.lang-icon {
    color: var(--color-accent-tech);
}

/* Mobile Nav Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.mobile-menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--color-text-primary);
    border-radius: 2px;
    transition: var(--transition-normal);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    padding: 160px 0 80px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

body.rtl .hero-content {
    align-items: flex-start;
}

.badge-wrapper {
    margin-bottom: 20px;
}

.creative-badge {
    padding: 6px 14px;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.15);
    color: var(--color-accent-tech);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 30px;
    display: inline-block;
}

.hero-title {
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    min-height: 42px;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* Hero Visual Graphic */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.visual-container {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.interactive-card {
    position: relative;
    z-index: 2;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 242, 254, 0.2);
}

.card-header {
    background: rgba(9, 11, 15, 0.6);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

.dots {
    display: flex;
    gap: 6px;
    margin-inline-end: 16px;
}

.dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dots span:nth-child(1) { background-color: #ff5f56; }
.dots span:nth-child(2) { background-color: #ffbd2e; }
.dots span:nth-child(3) { background-color: #27c93f; }

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

.card-body {
    padding: 24px;
    font-family: var(--font-en);
    font-size: 0.9rem;
    line-height: 1.6;
    background: rgba(15, 18, 26, 0.4);
}

.card-body pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.keyword { color: #f72585; }
.string { color: #00f2fe; }
.literal { color: #4facfe; }
.number { color: #ae81ff; }

/* Decorative Background shapes */
.creative-shapes .shape {
    position: absolute;
    z-index: 1;
    filter: blur(2px);
    animation: floatingShape 8s ease-in-out infinite alternate;
}

.circle-1 {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-creative);
    opacity: 0.4;
    top: -20px;
    right: -20px;
}

.triangle-1 {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid var(--color-accent-tech);
    opacity: 0.2;
    bottom: -30px;
    left: -20px;
    transform: rotate(35deg);
    animation-delay: 2s !important;
}

.blob-1 {
    width: 120px;
    height: 120px;
    border-radius: 43% 57% 41% 59% / 57% 45% 55% 43%;
    background: var(--gradient-combined);
    opacity: 0.25;
    bottom: 20px;
    right: -40px;
    filter: blur(8px) !important;
    animation-duration: 12s !important;
}

@keyframes floatingShape {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-15px) rotate(10deg); }
}

/* Scroll down indicator mouse */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--color-text-muted);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
    transition: var(--transition-normal);
}

.mouse:hover {
    border-color: var(--color-accent-tech);
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--color-accent-tech);
    border-radius: 2px;
    animation: scrollWheel 1.6s infinite ease-in-out;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   ABOUT ME SECTION
   ========================================================================== */
.about-section {
    padding: 100px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.about-img-area {
    display: flex;
    justify-content: center;
}

.about-frame {
    width: 320px;
    height: 380px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-glow {
    position: absolute;
    width: 110%;
    height: 110%;
    border-radius: 24px;
    background: var(--gradient-combined);
    opacity: 0.12;
    filter: blur(20px);
    z-index: 1;
}

.design-mosaic {
    position: absolute;
    width: 80%;
    height: 80%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    z-index: 2;
}

.design-mosaic span {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.design-mosaic span:nth-child(1) {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.25) 0%, transparent 100%);
    border-color: rgba(0, 242, 254, 0.3);
}

.design-mosaic span:nth-child(2) {
    background: transparent;
    transform: scale(0.9);
}

.design-mosaic span:nth-child(3) {
    background: transparent;
    transform: scale(0.9);
}

.design-mosaic span:nth-child(4) {
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.25) 0%, transparent 100%);
    border-color: rgba(247, 37, 133, 0.3);
}

.about-metrics {
    position: absolute;
    bottom: -30px;
    left: -20px;
    display: flex;
    gap: 16px;
    padding: 16px 24px;
    z-index: 3;
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.1);
}

body.rtl .about-metrics {
    left: auto;
    right: -20px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metric-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-accent-tech);
    background: var(--gradient-tech);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-lbl {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
    white-space: nowrap;
    margin-top: 2px;
}

.metric-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    align-self: stretch;
}

/* About Text */
.about-greeting {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 20px;
    line-height: 1.4;
}

.about-para {
    line-height: 1.9;
    color: var(--color-text-secondary);
    margin-bottom: 28px;
}

.personal-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
}

.info-item {
    display: flex;
    font-size: 0.95rem;
}

.info-label {
    font-weight: 700;
    color: var(--color-text-primary);
    width: 90px;
    flex-shrink: 0;
}

body.rtl .info-label {
    width: 100px;
}

.info-value {
    color: var(--color-text-secondary);
}

.about-actions {
    display: flex;
    gap: 16px;
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-section {
    padding: 100px 0;
    position: relative;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.skills-card {
    padding: 36px 30px;
    border-color: rgba(255, 255, 255, 0.05);
}

.skills-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.skills-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.skills-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skills-icon-box.tech {
    background: rgba(0, 242, 254, 0.1);
    color: var(--color-accent-tech);
}

.skills-icon-box.creative {
    background: rgba(247, 37, 133, 0.1);
    color: var(--color-accent-creative);
}

.skills-icon-box.tools {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-secondary);
}

/* Skill Progress Bars */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
}

.skill-name {
    color: var(--color-text-primary);
}

.skill-percent {
    color: var(--color-text-muted);
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    border-radius: 4px;
    background: var(--gradient-tech);
    width: 0%; /* JS will load or custom inline */
}

.skills-card:nth-child(2) .skill-progress {
    background: var(--gradient-creative);
}

/* Tool Badges Grid */
.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tool-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-normal);
}

.tool-badge:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
}

.tool-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gradient-combined);
}

/* ==========================================================================
   EXPERIENCE & EDUCATION TIMELINE
   ========================================================================== */
.timeline-section {
    padding: 100px 0;
}

.timeline-container {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Vertical Center Line */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.08);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

body.rtl .timeline-container::after {
    left: 50%;
    margin-left: -1px;
}

/* Timeline items */
.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
}

body.rtl .timeline-item:nth-child(odd) {
    left: auto;
    right: 0;
    padding-right: 0;
    padding-left: 40px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
}

body.rtl .timeline-item:nth-child(even) {
    left: auto;
    right: 50%;
    padding-left: 0;
    padding-right: 40px;
}

/* Dots on the line */
.timeline-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    background-color: var(--color-bg);
    border: 3px solid var(--color-accent-tech);
    border-radius: 50%;
    top: 26px;
    z-index: 10;
    box-shadow: 0 0 8px var(--color-accent-tech);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -7px;
}

body.rtl .timeline-item:nth-child(odd) .timeline-dot {
    right: auto;
    left: -7px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -7px;
}

body.rtl .timeline-item:nth-child(even) .timeline-dot {
    left: auto;
    right: -7px;
}

.timeline-item.timeline-edu .timeline-dot {
    border-color: var(--color-accent-creative);
    box-shadow: 0 0 8px var(--color-accent-creative);
}

/* Date Bubble */
.timeline-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 20px;
}

/* Card Content */
.timeline-content {
    padding: 24px;
    border-color: rgba(255, 255, 255, 0.04);
}

.timeline-header {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 12px;
}

.role {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.company {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-accent-tech);
    margin-top: 4px;
}

.timeline-item.timeline-edu .company {
    color: var(--color-accent-creative);
}

.timeline-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
}

.timeline-details li {
    position: relative;
    padding-inline-start: 16px;
}

.timeline-details li::before {
    content: '▪';
    position: absolute;
    left: 0;
    color: var(--color-accent-tech);
}

body.rtl .timeline-details li::before {
    left: auto;
    right: 0;
}

.timeline-item.timeline-edu .timeline-details li::before {
    color: var(--color-accent-creative);
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* ==========================================================================
   PORTFOLIO GALLERY
   ========================================================================== */
.portfolio-section {
    padding: 100px 0;
}

.portfolio-demo-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-muted);
    opacity: 0.5;
    margin-inline-start: 10px;
    vertical-align: middle;
}

/* Filters */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-normal);
}

body.rtl .filter-btn {
    font-family: var(--font-fa);
}

body.ltr .filter-btn {
    font-family: var(--font-en);
}

.filter-btn:hover, .filter-btn.active {
    color: var(--color-text-primary);
    border-color: var(--color-accent-tech);
    background: rgba(0, 242, 254, 0.05);
}

/* Grid Layout */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.portfolio-item {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: scale(1);
    transition: opacity var(--transition-slow), transform var(--transition-slow), border-color var(--transition-normal);
    border-color: rgba(255, 255, 255, 0.04);
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    position: absolute;
    width: 0;
    height: 0;
    padding: 0;
    border: none;
    margin: 0;
    overflow: hidden;
}

.project-img-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #0d111a;
}

.project-img {
    width: 100%;
    height: auto;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(0);
    transition: transform 6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.portfolio-item:hover .project-img {
    transform: translateY(calc(-100% + (100% * 9 / 16)));
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(9, 11, 15, 0.2) 0%, rgba(9, 11, 15, 0.85) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
    z-index: 5;
}

.portfolio-item:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 12px;
    pointer-events: auto;
}

.project-link-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(13, 17, 26, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.4);
    color: var(--color-accent-tech);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 242, 254, 0.2);
    transform: translateY(15px);
    transition: transform var(--transition-normal), background var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.portfolio-item:hover .project-link-icon {
    transform: translateY(0);
}

.project-link-icon:hover {
    background: var(--color-accent-tech);
    color: #0d111a;
    border-color: var(--color-accent-tech);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.6);
}

/* Info inside card */
.project-info {
    padding: 24px;
    border-top: 1px solid var(--color-border);
}

.project-cat {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-accent-tech);
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 10px;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
    padding: 100px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
}

/* Info Panel Left */
.contact-info-panel {
    display: flex;
    flex-direction: column;
}

.panel-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.panel-desc {
    line-height: 1.7;
    margin-bottom: 30px;
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 36px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-color: rgba(255, 255, 255, 0.04);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 242, 254, 0.07);
    color: var(--color-accent-tech);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-card:nth-child(2) .card-icon {
    background: rgba(247, 37, 133, 0.07);
    color: var(--color-accent-creative);
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.card-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.card-link:hover {
    color: var(--color-accent-tech);
}

/* Social links */
.social-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.social-icon:hover {
    color: var(--color-text-primary);
    border-color: var(--color-accent-tech);
    background: rgba(0, 242, 254, 0.05);
    transform: translateY(-2px);
}

/* Form Panel Right */
.contact-form {
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-color: rgba(255, 255, 255, 0.04);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

body.rtl .input-group label {
    font-family: var(--font-fa);
}

body.ltr .input-group label {
    font-family: var(--font-en);
}

.input-group input,
.input-group textarea {
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: rgba(9, 11, 15, 0.4);
    color: var(--color-text-primary);
    font-size: 0.95rem;
    transition: var(--transition-normal);
}

body.rtl .input-group input,
body.rtl .input-group textarea {
    font-family: var(--font-fa);
}

body.ltr .input-group input,
body.ltr .input-group textarea {
    font-family: var(--font-en);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--color-accent-tech);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
    background: rgba(9, 11, 15, 0.7);
}

.submit-btn {
    align-self: flex-start;
    padding: 14px 32px;
}

.submit-icon {
    transition: transform var(--transition-normal);
}

/* Arrow direction flips for RTL */
body.rtl .submit-icon {
    transform: scaleX(-1);
}

.submit-btn:hover .submit-icon {
    transform: translate(3px, -3px);
}

body.rtl .submit-btn:hover .submit-icon {
    transform: scaleX(-1) translate(3px, -3px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    padding: 30px 0;
    border-top: 1px solid var(--color-border);
    background: rgba(9, 11, 15, 0.9);
}

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

.copyright {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.scroll-to-top {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.scroll-to-top:hover {
    color: var(--color-text-primary);
    border-color: var(--color-accent-tech);
    background: rgba(0, 242, 254, 0.05);
    transform: translateY(-3px);
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Intro Animations (Hero) */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

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

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Tablet & Smaller Screens */
@media (max-width: 1024px) {
    /* Hide custom cursor elements on mobile/tablet to avoid lagging and match native behavior */
    .custom-cursor-dot,
    .custom-cursor-outline {
        display: none !important;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }
    
    .hero-content {
        align-items: center;
    }
    
    body.rtl .hero-content {
        align-items: center;
    }
    
    .hero-desc {
        margin-inline: auto;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .about-img-area {
        order: -1;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .timeline-container::after {
        left: 30px;
    }
    
    body.rtl .timeline-container::after {
        left: auto;
        right: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 60px !important;
        padding-right: 0 !important;
    }
    
    body.rtl .timeline-item {
        padding-right: 60px !important;
        padding-left: 0 !important;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    body.rtl .timeline-item:nth-child(even) {
        right: 0;
    }
    
    .timeline-dot {
        left: 23px !important;
        right: auto !important;
    }
    
    body.rtl .timeline-dot {
        right: 23px !important;
        left: auto !important;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Mobile Screens */
@media (max-width: 768px) {
    .header {
        padding: 16px 0;
    }
    
    /* Navigation drawer for mobile */
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .mobile-menu-toggle.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: rgba(9, 11, 15, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--color-border);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right var(--transition-normal);
        z-index: 999;
    }
    
    body.rtl .nav-menu {
        right: auto;
        left: -100%;
        border-left: none;
        border-right: 1px solid var(--color-border);
        transition: left var(--transition-normal);
    }
    
    .nav-menu.open {
        right: 0;
    }
    
    body.rtl .nav-menu.open {
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        min-height: 34px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-actions .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .about-frame {
        width: 280px;
        height: 330px;
    }
    
    .about-metrics {
        bottom: -20px;
        right: 50% !important;
        left: auto !important;
        transform: translateX(50%) !important;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 24px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* ==========================================================================
   CUSTOM MODAL POPUP STYLES
   ========================================================================== */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.custom-modal.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 30, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.custom-modal .modal-card {
    position: relative;
    z-index: 2;
    max-width: 480px;
    width: 100%;
    padding: 36px 28px;
    border-radius: 20px;
    text-align: center;
    background: rgba(16, 24, 48, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.2);
    transform: scale(0.85) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-modal.active .modal-card {
    transform: scale(1) translateY(0);
}

.custom-modal .modal-close {
    position: absolute;
    top: 15px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

body.rtl .custom-modal .modal-close {
    right: auto;
    left: 18px;
}

.custom-modal .modal-close:hover {
    color: var(--color-accent-tech);
    transform: scale(1.2);
}

.custom-modal .modal-icon-box {
    width: 66px;
    height: 66px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(255, 170, 0, 0.15);
    border: 1px solid rgba(255, 170, 0, 0.4);
    color: #ffaa00;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.25);
}

.custom-modal .modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.custom-modal .modal-text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 18px;
}

.custom-modal .modal-phone-box {
    margin: 10px 0 22px;
    padding: 10px 20px;
    background: rgba(0, 242, 254, 0.08);
    border: 1px dashed var(--color-accent-tech);
    border-radius: 12px;
    display: inline-block;
}

.custom-modal .phone-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-accent-tech);
    direction: ltr;
    display: inline-block;
    letter-spacing: 1px;
}

.custom-modal .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.custom-modal .modal-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
