/* ============================================
   ALIREZA KHOSROZADIAN - PREMIUM CYBER-DARK PORTFOLIO
   Pure HTML/CSS/JS - No Frameworks
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

/* Use explicit font families based on dir */
html[dir="rtl"] body {
    font-family: 'Vazirmatn', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
}

html[dir="ltr"] body {
    font-family: 'Space Grotesk', 'Inter', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Core Colors */
    --bg-primary: #06080d;
    --bg-secondary: #0a0e17;
    --bg-card: rgba(15, 22, 35, 0.7);
    --bg-card-hover: rgba(20, 28, 45, 0.85);
    
    /* Accent Colors */
    --accent-cyan: #00e5ff;
    --accent-cyan-dim: #00b8d4;
    --accent-blue: #448aff;
    --accent-purple: #7c4dff;
    --accent-green: #00e676;
    --accent-purple-dim: #b388ff;
    
    /* Text Colors */
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #5f6368;
    --text-accent: var(--accent-cyan);
    
    /* Border & Effects */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(0, 229, 255, 0.15);
    --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.3);
    --glow-cyan-strong: 0 0 40px rgba(0, 229, 255, 0.4), 0 0 80px rgba(0, 229, 255, 0.1);
    --glow-purple: 0 0 20px rgba(124, 77, 255, 0.3);
    
    /* Glassmorphism */
    --glass-bg: rgba(10, 14, 23, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Typography */
    --font-persian: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    --font-english: 'Space Grotesk', 'Inter', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Container */
    --container-max: 1200px;
    
    /* Header */
    --header-height: 70px;
}

/* ===== HEADER LAYOUT ===== */
.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Mobile header (hidden on desktop) */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* RTL-specific adjustments */
html[dir="rtl"] .hero-content {
    flex-direction: row-reverse;
}

html[dir="ltr"] .hero-content {
    flex-direction: row;
}

/* ===== Persian Numerals ===== */
.persian-numerals {
    font-variant-numeric: normal;
}

html[dir="rtl"] .persian-numerals {
    direction: rtl;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

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

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

/* ===== Focus States (Accessibility) ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
    border-radius: 4px;
}

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

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }
}

/* ===== Background Effects ===== */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* Grid Overlay */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 229, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* Glow Blobs */
.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: blobFloat 20s ease-in-out infinite;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-purple), transparent 70%);
    bottom: 20%;
    left: -5%;
    animation-delay: -7s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-blue), transparent 70%);
    top: 50%;
    left: 40%;
    animation-delay: -14s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(40px, 20px) scale(1.02); }
}

/* Scanlines */
.scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .glow-blob {
        animation: none;
    }
    .scanlines {
        opacity: 0.5;
    }
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all var(--transition-base);
}

.header.scrolled {
    background: rgba(6, 8, 13, 0.92);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    z-index: 10;
}

.logo-monogram {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-cyan);
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 6px;
    background: rgba(0, 229, 255, 0.05);
    letter-spacing: 1px;
    transition: all var(--transition-base);
}

.logo-monogram:hover {
    box-shadow: var(--glow-cyan);
    border-color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.1);
}

/* Navigation */
.nav {
    position: static;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-cyan);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: 2px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.75rem;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 8px;
    color: var(--accent-cyan);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    letter-spacing: 0.5px;
}

.lang-switcher:hover {
    background: rgba(0, 229, 255, 0.12);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.lang-switcher:active {
    transform: scale(0.96);
}

.lang-icon-globe {
    opacity: 0.7;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.mobile-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.mobile-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 8, 13, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    text-align: center;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mobile-nav-link {
    font-family: var(--font-persian);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-xl);
    transition: color var(--transition-fast);
    display: block;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent-cyan);
}

.mobile-lang-switcher {
    margin-top: var(--space-2xl);
}

.lang-switcher-mobile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 10px;
    color: var(--accent-cyan);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.lang-switcher-mobile:hover {
    background: rgba(0, 229, 255, 0.12);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-height) + var(--space-3xl)) var(--space-xl) var(--space-3xl);
    position: relative;
}

.hero-container {
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4xl);
    width: 100%;
}

html[dir="rtl"] .hero-content {
    flex-direction: row-reverse;
}

html[dir="ltr"] .hero-content {
    flex-direction: row;
}

.hero-text {
    flex: 1;
    max-width: 580px;
}

.hero-profile {
    flex-shrink: 0;
}

/* Hero Text */
.hero-intro-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.cyber-line {
    display: block;
    width: 30px;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
}

.intro-tag-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hero-heading {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-name-en {
    font-family: var(--font-english);
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple-dim));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-headline {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.hero-description {
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
    max-width: 520px;
}

html[dir="rtl"] .hero-description {
    max-width: 100%;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #06080d;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(0, 229, 255, 0.4);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
    color: var(--accent-cyan);
    border-color: rgba(0, 229, 255, 0.3);
    transform: translateY(-2px);
}

.btn-icon {
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

.btn:hover .btn-icon {
    opacity: 1;
}

.btn-sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.82rem;
    border-radius: 8px;
    margin-top: var(--space-md);
}

/* Social Links */
.hero-social-links {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.social-link:hover {
    color: var(--accent-cyan);
    border-color: rgba(0, 229, 255, 0.3);
    background: rgba(0, 229, 255, 0.06);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

/* Profile Image Frame */
.profile-frame {
    position: relative;
    width: 280px;
    height: 280px;
}

.profile-frame-inner {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 2;
}

.profile-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
}

.profile-reflection {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 50%,
        transparent 100%
    );
    border-radius: 30px;
    pointer-events: none;
}

/* Glow Ring */
.profile-glow-ring {
    position: absolute;
    inset: -3px;
    border-radius: 32px;
    background: conic-gradient(
        from 0deg,
        var(--accent-cyan),
        var(--accent-blue),
        var(--accent-purple),
        var(--accent-cyan)
    );
    animation: glowRingSpin 6s linear infinite;
    z-index: 1;
    opacity: 0.6;
}

@keyframes glowRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-frame:hover .profile-glow-ring {
    opacity: 1;
}

/* Cyber Corners */
.profile-cyber-corner {
    position: absolute;
    z-index: 3;
    width: 24px;
    height: 24px;
}

.corner-tl {
    top: -6px;
    left: -6px;
    border-top: 2px solid var(--accent-cyan);
    border-left: 2px solid var(--accent-cyan);
    border-radius: 4px 0 0 0;
}

.corner-tr {
    top: -6px;
    right: -6px;
    border-top: 2px solid var(--accent-cyan);
    border-right: 2px solid var(--accent-cyan);
    border-radius: 0 4px 0 0;
}

.corner-bl {
    bottom: -6px;
    left: -6px;
    border-bottom: 2px solid var(--accent-cyan);
    border-left: 2px solid var(--accent-cyan);
    border-radius: 0 0 0 4px;
}

.corner-br {
    bottom: -6px;
    right: -6px;
    border-bottom: 2px solid var(--accent-cyan);
    border-right: 2px solid var(--accent-cyan);
    border-radius: 0 0 4px 0;
}

/* Scroll Indicator */
.scroll-indicator {
    margin-top: var(--space-4xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0.5;
    transition: opacity var(--transition-base);
}

.scroll-indicator:hover {
    opacity: 0.8;
}

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-wheel {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 2px;
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
}

.scroll-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== SECTIONS COMMON ===== */
.section {
    padding: var(--space-4xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    margin-bottom: var(--space-md);
}

.section-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    margin: 0 auto;
    border-radius: 3px;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 229, 255, 0.01) 50%, transparent 100%);
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: var(--space-2xl);
    backdrop-filter: blur(10px);
    margin-bottom: var(--space-2xl);
    transition: all var(--transition-base);
}

.about-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--glow-cyan);
}

.about-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.15);
    color: var(--accent-cyan);
    margin-bottom: var(--space-xl);
}

.about-text p {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Quick Info */
.about-quick-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.quick-info-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.quick-info-item:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
}

.qi-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

.qi-value {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.qi-value-link a {
    color: var(--accent-cyan);
    transition: all var(--transition-fast);
}

.qi-value-link a:hover {
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* ===== SERVICES SECTION ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: var(--space-2xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon-wrap {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.12);
    color: var(--accent-cyan);
    margin-bottom: var(--space-lg);
    transition: all var(--transition-base);
}

.service-card:hover .service-icon-wrap {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

.service-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

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

/* ===== SKILLS SECTION ===== */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    max-width: 750px;
    margin: 0 auto;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.skill-category:hover {
    border-color: var(--border-glow);
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.skill-cat-icon {
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.skill-category-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.skill-tag {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 0.4rem 0.9rem;
    background: rgba(0, 229, 255, 0.04);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    letter-spacing: 0.3px;
}

.skill-tag:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.1);
}

/* ===== PROCESS SECTION ===== */
.process-section {
    background: linear-gradient(180deg, transparent 0%, rgba(124, 77, 255, 0.015) 50%, transparent 100%);
}

.process-timeline {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.process-step {
    display: flex;
    gap: var(--space-xl);
    position: relative;
    padding-bottom: var(--space-2xl);
}

.process-step:last-child {
    padding-bottom: 0;
}

.step-number {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
    opacity: 0.4;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.step-connector {
    position: absolute;
    left: 19px;
    top: 36px;
    width: 2px;
    height: calc(100% - 20px);
    background: linear-gradient(180deg, var(--accent-cyan), transparent);
    opacity: 0.15;
}

html[dir="rtl"] .step-connector {
    left: auto;
    right: 19px;
}

.process-step:last-child .step-connector {
    display: none;
}

.step-content {
    flex: 1;
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
}

.step-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.12);
    color: var(--accent-cyan);
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.process-step:hover .step-icon {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

.step-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.step-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== CONTACT SECTION ===== */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-base);
}

.contact-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.contact-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.12);
    color: var(--accent-cyan);
    margin: 0 auto var(--space-lg);
    transition: all var(--transition-base);
}

.contact-card:hover .contact-card-icon {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

.contact-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.contact-card-value {
    display: block;
    font-size: 0.88rem;
    color: var(--accent-cyan);
    transition: all var(--transition-fast);
    word-break: break-word;
}

.contact-card-value:hover {
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* Desktop contact card hover - value link glow */
@media (min-width: 769px) {
    .contact-card:hover .contact-card-value {
        text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    }
}

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-3xl) 0;
    background: rgba(6, 8, 13, 0.5);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.footer-monogram {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-cyan);
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 6px;
    background: rgba(0, 229, 255, 0.04);
}

.footer-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0;
}

.footer-tagline {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.footer-social-link:hover {
    color: var(--accent-cyan);
    border-color: rgba(0, 229, 255, 0.3);
    background: rgba(0, 229, 255, 0.06);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

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

.footer-name-small {
    color: var(--text-secondary);
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.back-to-top:hover {
    color: var(--accent-cyan);
}

/* ===== FLOATING BACK TO TOP ===== */
.back-to-top-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 12px;
    color: var(--accent-cyan);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html[dir="rtl"] .back-to-top-float {
    right: auto;
    left: 2rem;
}

.back-to-top-float.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-float:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-3px);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* ===== MOBILE APP-LIKE EXPERIENCE (max-width: 768px) ===== */
@media (max-width: 768px) {
    :root {
        --header-height: 52px;
        --bottom-nav-height: 60px;
        --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    }
    
    /* --- Cleaner Mobile Header --- */
    .header {
        height: var(--header-height);
        border-bottom: none;
    }
    
    .header-container {
        padding: 0 var(--space-md);
        justify-content: space-between;
    }
    
    .logo-monogram {
        font-size: 0.95rem;
        padding: 0.3rem 0.6rem;
    }
    
    .nav {
        display: none !important;
    }
    
    .lang-switcher {
        display: none !important;
    }
    
    .mobile-lang-btn {
        display: flex !important;
    }
    
    /* --- Mobile Tab Bar (Floating Glass Bottom Navigation) --- */
    .mobile-tab-bar {
        display: flex !important;
        position: fixed;
        bottom: 10px;
        left: 10px;
        right: 10px;
        height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
        padding-bottom: var(--safe-area-bottom);
        background: rgba(10, 14, 23, 0.78);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 20px;
        z-index: 1000;
        justify-content: space-evenly;
        align-items: center;
        padding: 0 6px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(255, 255, 255, 0.04) inset;
    }
    
    .mobile-tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
        color: rgba(154, 160, 166, 0.6);
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 5px 4px;
        border-radius: 14px;
        min-width: 44px;
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
        position: relative;
        flex: 1;
    }
    
    .mobile-tab-item:active {
        transform: scale(0.88);
        background: rgba(0, 229, 255, 0.06);
    }
    
    .mobile-tab-item.active {
        color: var(--accent-cyan);
    }
    
    .mobile-tab-item.active::after {
        content: '';
        position: absolute;
        top: -1px;
        left: 50%;
        transform: translateX(-50%) scaleY(0);
        width: 20px;
        height: 3px;
        background: var(--accent-cyan);
        border-radius: 0 0 3px 3px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }
    
    .mobile-tab-item.active::after {
        transform: translateX(-50%) scaleY(1);
    }
    
    html[dir="rtl"] .mobile-tab-item.active::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .mobile-tab-icon {
        width: 20px;
        height: 20px;
        opacity: 0.65;
        transition: opacity 0.25s ease;
    }
    
    .mobile-tab-item.active .mobile-tab-icon {
        opacity: 1;
    }
    
    .mobile-tab-label {
        font-family: var(--font-persian);
        font-size: 0.55rem;
        font-weight: 600;
        letter-spacing: 0;
    }
    
    /* Hide old mobile nav overlay and hamburger */
    .mobile-nav-overlay {
        display: none !important;
    }
    
    .mobile-toggle {
        display: none !important;
    }
    
    /* --- Hero mobile --- */
    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + var(--space-xl));
        padding-bottom: calc(var(--bottom-nav-height) + 30px);
    }
    
    .hero-container {
        padding: 0;
    }
    
    .hero-content {
        flex-direction: column-reverse !important;
        text-align: center;
        gap: var(--space-xl);
    }
    
    html[dir="rtl"] .hero-content {
        flex-direction: column-reverse !important;
    }
    
    .hero-text {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .hero-buttons .btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 0.65rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .hero-social-links {
        justify-content: center;
    }
    
    .hero-description {
        max-width: 100%;
        text-align: center;
        font-size: 0.9rem;
    }
    
    .profile-frame {
        width: 170px;
        height: 170px;
    }
    
    .profile-frame-inner {
        border-radius: 22px;
    }
    
    .profile-glow-ring {
        border-radius: 24px;
    }
    
    /* --- Sections mobile --- */
    .section {
        padding: var(--space-3xl) 0;
        padding-bottom: calc(var(--bottom-nav-height) + 24px);
    }
    
    .section-header {
        margin-bottom: var(--space-xl);
    }
    
    .section-title {
        font-size: 1.35rem;
    }
    
    /* --- About mobile --- */
    .about-card {
        padding: var(--space-lg);
        border-radius: 16px;
        margin-bottom: var(--space-xl);
    }
    
    .about-icon {
        width: 44px;
        height: 44px;
    }
    
    .about-text p {
        font-size: 0.9rem;
        line-height: 1.9;
    }
    
    .about-quick-info {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }
    
    .quick-info-item {
        padding: var(--space-md);
        border-radius: 12px;
    }
    
    .qi-label {
        font-size: 0.62rem;
    }
    
    .qi-value {
        font-size: 0.82rem;
    }
    
    /* --- Services mobile --- */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .service-card {
        padding: var(--space-lg);
        border-radius: 16px;
    }
    
    .service-icon-wrap {
        width: 44px;
        height: 44px;
    }
    
    .service-title {
        font-size: 0.95rem;
    }
    
    .service-desc {
        font-size: 0.83rem;
    }
    
    /* --- Skills mobile --- */
    .skills-grid {
        gap: var(--space-md);
    }
    
    .skill-category {
        padding: var(--space-lg);
        border-radius: 14px;
    }
    
    .skill-category-title {
        font-size: 0.92rem;
    }
    
    .skill-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.65rem;
    }
    
    /* --- Process mobile --- */
    .process-timeline {
        max-width: 100%;
    }
    
    .process-step {
        gap: var(--space-md);
        padding-bottom: var(--space-xl);
    }
    
    .step-number {
        width: 28px;
        font-size: 0.65rem;
    }
    
    .step-connector {
        left: 13px;
        top: 24px;
    }
    
    html[dir="rtl"] .step-connector {
        left: auto;
        right: 13px;
    }
    
    .step-icon {
        width: 34px;
        height: 34px;
    }
    
    .step-title {
        font-size: 0.92rem;
    }
    
    .step-desc {
        font-size: 0.8rem;
    }
    
    /* --- Contact mobile --- Sleek single-line cards --- */
    .contact-intro {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .contact-card {
        padding: var(--space-md) var(--space-lg);
        border-radius: 14px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: var(--space-md);
        text-align: left;
        background: var(--bg-card);
        border: 1px solid var(--glass-border);
        transition: all var(--transition-base);
        position: relative;
        overflow: hidden;
    }
    
    .contact-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
        opacity: 0;
        transition: opacity var(--transition-base);
    }
    
    .contact-card:hover::before,
    html[dir="rtl"] .contact-card:hover::before {
        opacity: 1;
    }
    
    .contact-card:hover {
        border-color: var(--border-glow);
        transform: translateY(-2px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    }
    
    html[dir="rtl"] .contact-card {
        text-align: right;
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .contact-card-icon {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: rgba(0, 229, 255, 0.08);
        border: 1px solid rgba(0, 229, 255, 0.12);
        color: var(--accent-cyan);
    }
    
    .contact-card-info {
        flex: 1;
        min-width: 0;
    }
    
    .contact-card-title {
        font-size: 0.72rem;
        color: var(--text-muted);
        margin-bottom: 1px;
        font-weight: 500;
    }
    
    .contact-card-value {
        font-size: 0.88rem;
        color: var(--text-primary);
        font-weight: 600;
    }
    
    .contact-card-action {
        display: none !important;
    }
    
    /* --- Scroll indicator --- */
    .scroll-indicator {
        display: none;
    }
    
    /* --- Footer mobile --- */
    .footer {
        padding: var(--space-2xl) 0;
        padding-bottom: calc(var(--bottom-nav-height) + 20px);
    }
    
    /* --- Back to top button --- */
    .back-to-top-float {
        bottom: calc(var(--bottom-nav-height) + 16px);
        right: calc(var(--space-md) + 4px);
        width: 40px;
        height: 40px;
    }
    
    html[dir="rtl"] .back-to-top-float {
        right: auto;
        left: calc(var(--space-md) + 4px);
    }
    
    /* --- Mobile language button (hidden on desktop) --- */
    .mobile-lang-btn {
        display: none;
        align-items: center;
        gap: 3px;
        padding: 0.3rem 0.55rem;
        background: rgba(0, 229, 255, 0.06);
        border: 1px solid rgba(0, 229, 255, 0.15);
        border-radius: 8px;
        color: var(--accent-cyan);
        cursor: pointer;
        font-family: var(--font-mono);
        font-size: 0.65rem;
        font-weight: 600;
        transition: all var(--transition-fast);
        -webkit-tap-highlight-color: transparent;
        letter-spacing: 0.3px;
    }
    
    .mobile-lang-btn:active {
        transform: scale(0.94);
        background: rgba(0, 229, 255, 0.12);
        border-color: var(--accent-cyan);
    }
    
    .mobile-lang-btn svg {
        width: 12px !important;
        height: 12px !important;
    }
}

/* Tablet (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    :root {
        --header-height: 60px;
        --bottom-nav-height: 64px;
    }
    
    .hero {
        padding-top: calc(var(--header-height) + var(--space-2xl));
    }
    
    .hero-content {
        gap: var(--space-2xl);
    }
    
    .profile-frame {
        width: 220px;
        height: 220px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-quick-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Desktop (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hide desktop nav and bottom tab on desktop */
@media (min-width: 769px) {
    .mobile-tab-bar {
        display: none !important;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .hero-container {
        max-width: 1280px;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .bg-effects,
    .scroll-indicator,
    .back-to-top-float,
    .mobile-nav-overlay {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
}