@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ══════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════ */
:root {
    --bg-primary: #00060f;
    --bg-secondary: #001428;
    --bg-glass: rgba(139, 92, 246, 0.12);
    --bg-glass-hover: rgba(139, 92, 246, 0.22);
    --border-glass: rgba(167, 139, 250, 0.18);
    --border-hover: rgba(167, 139, 250, 0.5);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-success: #00dc82;

    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-dark: #6d28d9;
    --accent-glow: rgba(139, 92, 246, 0.4);

    --gradient-text: linear-gradient(135deg, #a78bfa, #8b5cf6);
    --gradient-btn: linear-gradient(135deg, #8b5cf6, #6d28d9);
    --gradient-bg: linear-gradient(160deg, #00060f 0%, #08001a 50%, #03000a 100%);

    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-full: 999px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(155, 53, 255, 0.25);

    --header-h: 70px;
    --font-body: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

/* Light theme */
body.light-theme {
    --bg-primary: #faf9ff;
    --bg-secondary: #f3f0ff;
    --bg-glass: rgba(139, 92, 246, 0.08);
    --bg-glass-hover: rgba(139, 92, 246, 0.15);
    --border-glass: rgba(139, 92, 246, 0.2);
    --border-hover: rgba(139, 92, 246, 0.5);
    --text-primary: #1e1b4b;
    --text-secondary: #4338ca;
    --text-muted: #6366f1;
    --gradient-bg: linear-gradient(160deg, #faf9ff 0%, #f0ebff 50%, #f5f0ff 100%);
    --shadow-card: 0 8px 32px rgba(139, 92, 246, 0.12);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

/* ══════════════════════════════════════
   BACKGROUND PARTICLES
══════════════════════════════════════ */
.bg-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.08;
    animation: drift linear infinite;
}

@keyframes drift {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.08;
    }

    90% {
        opacity: 0.08;
    }

    100% {
        transform: translateY(-20vh) scale(1);
        opacity: 0;
    }
}

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    background: rgba(3, 0, 10, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    transition: background var(--transition), box-shadow var(--transition);
}

header.scrolled {
    background: rgba(3, 0, 10, 0.85);
    box-shadow: 0 4px 30px rgba(20, 0, 60, 0.5);
}

body.light-theme header {
    background: rgba(240, 246, 255, 0.7);
}

body.light-theme header.scrolled {
    background: rgba(240, 246, 255, 0.92);
}

.logo {
    position: absolute;
    left: 24px;
    width: 44px;
    height: 44px;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-fallback {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--gradient-btn);
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

/* Nav */
nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    padding: 6px;
    backdrop-filter: blur(10px);
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: var(--gradient-btn);
    box-shadow: 0 0 16px var(--accent-glow);
}

/* Header actions */
.header-actions {
    position: absolute;
    right: 24px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    border-radius: var(--radius-full);
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-hover);
    box-shadow: 0 0 12px var(--accent-glow);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: absolute;
    right: 24px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ══════════════════════════════════════
   MAIN & SECTIONS
══════════════════════════════════════ */
main {
    position: relative;
    z-index: 1;
    padding-top: var(--header-h);
}

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.section-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-light);
    background: rgba(155, 53, 255, 0.12);
    border: 1px solid rgba(155, 53, 255, 0.3);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.15;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

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

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 26px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--gradient-btn);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
    filter: brightness(1.1);
}

.btn-ghost {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 18px;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ══════════════════════════════════════
   HOME / HERO
══════════════════════════════════════ */
#home {
    padding-top: calc(var(--header-h) + 40px);
}

.hero {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    min-height: calc(100vh - var(--header-h));
    padding: 0 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 220, 130, 0.1);
    border: 1px solid rgba(0, 220, 130, 0.3);
    color: #00dc82;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00dc82;
    animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
    min-height: 56px;
}

.typewriter {
    color: var(--accent-light);
    border-right: 2px solid var(--accent-light);
    animation: blink 0.8s step-end infinite;
    padding-right: 3px;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 420px;
}

.hero-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.hero-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
}

.social-icon:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

/* Hero visual */
.hero-visual {
    position: relative;
    height: 550px;
    overflow: visible;
    transform: translateX(50px);
}

.hero-3d-wrapper {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: visible;
}

.hero-3d-wrapper spline-viewer {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Floating cards */
.floating-card {
    position: absolute;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: var(--shadow-card);
    animation: float ease-in-out infinite;
}

.card-1 {
    top: 10%;
    right: -20px;
    animation-duration: 4s;
    animation-delay: 0s;
}

.card-2 {
    bottom: 25%;
    left: -20px;
    animation-duration: 5s;
    animation-delay: 1s;
}

.card-3 {
    bottom: 10%;
    right: 10%;
    animation-duration: 3.5s;
    animation-delay: 0.5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ══════════════════════════════════════
   PROJECTS GRID
══════════════════════════════════════ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-card);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: transform var(--transition);
}

.project-card:hover .project-placeholder {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 0, 30, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: opacity var(--transition);
    backdrop-filter: blur(4px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.coming-soon-badge {
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.35);
    color: #a78bfa;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.project-info {
    padding: 22px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--accent-light);
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ══════════════════════════════════════
   ABOUT
══════════════════════════════════════ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.about-text h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.about-text strong {
    color: var(--accent-light);
}

.skills-section {
    margin-top: 28px;
}

.skills-section h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

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

.skill-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

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

.skill-fill {
    height: 100%;
    width: 0;
    border-radius: var(--radius-full);
    background: var(--gradient-btn);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Stats */
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    backdrop-filter: blur(16px);
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ══════════════════════════════════════
   CONTACT
══════════════════════════════════════ */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 40px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    backdrop-filter: blur(16px);
    transition: all var(--transition);
}

.contact-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-glass-hover);
    transform: translateX(4px);
}

.contact-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.contact-card h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Social Actions Grid */
.social-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-act-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.act-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: transform 0.4s ease;
}

.act-icon svg {
    width: 32px;
    height: 32px;
}

.act-details h4 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.act-details span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* Hover States & Brand Colors */
.social-act-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.social-act-card:hover .act-icon {
    transform: scale(1.1) rotate(5deg);
}

.social-act-card:hover .act-details span {
    color: #fff;
}

/* WhatsApp Card */
.social-act-card.whatsapp:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.2), rgba(18, 140, 126, 0.2));
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.25);
}
.social-act-card.whatsapp .act-icon {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

/* Instagram Card */
.social-act-card.instagram:hover {
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.2), rgba(225, 48, 108, 0.2));
    box-shadow: 0 10px 30px rgba(225, 48, 108, 0.25);
}
.social-act-card.instagram .act-icon {
    background: linear-gradient(135deg, #833ab4, #e1306c, #f56040);
}

/* LinkedIn Card */
.social-act-card.linkedin:hover {
    background: linear-gradient(135deg, rgba(0, 119, 181, 0.2), rgba(0, 65, 106, 0.2));
    box-shadow: 0 10px 30px rgba(0, 119, 181, 0.25);
}
.social-act-card.linkedin .act-icon {
    background: linear-gradient(135deg, #0077b5, #00416a);
}

/* RTL Support for Social Cards */
[dir="rtl"] .act-details {
    text-align: right;
}

@media (max-width: 600px) {
    .social-act-card {
        padding: 16px;
    }
    .act-icon {
        width: 50px;
        height: 50px;
    }
    .act-icon svg {
        width: 24px;
        height: 24px;
    }
}


/* ══════════════════════════════════════
   EDUCATION CARD
══════════════════════════════════════ */
.edu-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(167, 139, 250, 0.08));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin-top: 20px;
    backdrop-filter: blur(12px);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.edu-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-btn);
    border-radius: 3px;
}

.edu-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.18);
}

.edu-icon {
    font-size: 2rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.edu-info h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.edu-info p {
    font-size: 0.82rem;
    color: var(--accent-light);
    font-weight: 500;
}

/* Accent highlight for DK7 Store text */
.accent-highlight {
    color: var(--accent-light);
    font-weight: 700;
}

/* Live store stat — emoji instead of number */
.stat-live {
    font-size: 2rem !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
    filter: drop-shadow(0 0 8px rgba(0, 220, 130, 0.5));
}

/* RTL edu-card */
[dir="rtl"] .edu-card::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .edu-info h4,
[dir="rtl"] .edu-info p {
    text-align: right;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 28px 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-glass);
}

footer strong {
    color: var(--accent-light);
}

.heart {
    display: inline-block;
    animation: heartbeat 1.4s ease infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-desc {
        max-width: 100%;
    }

    .hero-links,
    .hero-socials {
        justify-content: center;
    }

    .hero-visual {
        height: 380px;
    }

    .floating-card {
        display: none;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .header-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    nav {
        display: none;
    }

    nav.open {
        display: block;
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: rgba(8, 0, 15, 0.95);
        padding: 20px;
        border-bottom: 1px solid var(--border-glass);
    }

    nav.open ul {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .nav-link {
        display: block;
        text-align: center;
        padding: 12px;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .section {
        padding: 60px 16px;
    }

    .contact-form {
        padding: 22px 18px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════
   ARABIC / RTL SUPPORT
══════════════════════════════════════ */
body.lang-ar,
body.lang-ar * {
    font-family: 'Tajawal', 'Inter', sans-serif;
    letter-spacing: 0;
}

/* Flip logo & actions positions */
[dir="rtl"] .logo {
    left: auto;
    right: 24px;
}

[dir="rtl"] .header-actions {
    right: auto;
    left: 24px;
}

[dir="rtl"] .mobile-menu-btn {
    right: auto;
    left: 24px;
}

/* Hero text alignment */
[dir="rtl"] .hero-content {
    text-align: right;
}

[dir="rtl"] .hero-links {
    justify-content: flex-start;
}

[dir="rtl"] .hero-socials {
    justify-content: flex-start;
}

[dir="rtl"] .hero-desc {
    text-align: right;
}

/* Hero text on smaller screens */
@media (max-width: 900px) {
    [dir="rtl"] .hero-content {
        text-align: center;
    }

    [dir="rtl"] .hero-links {
        justify-content: center;
    }

    [dir="rtl"] .hero-socials {
        justify-content: center;
    }
}

/* Flip hero text absolute position */
[dir="rtl"] .hero-texts {
    left: auto;
    right: 0;
}

/* About text */
[dir="rtl"] .about-text p,
[dir="rtl"] .about-text h3 {
    text-align: right;
}

/* Contact cards */
[dir="rtl"] .contact-card:hover {
    transform: translateX(-4px);
}

/* Section headers */
[dir="rtl"] .section-header {
    direction: rtl;
}

/* Nav stays centered — no flip needed */

/* Skill fill: RTL bars grow from right */
[dir="rtl"] .skill-fill {
    margin-left: auto;
    margin-right: 0;
}

/* Form labels */
[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] .form-group input,
[dir="rtl"] .form-group textarea {
    text-align: right;
    direction: rtl;
}

/* Footer */
[dir="rtl"] footer {
    direction: rtl;
}

/* Project cards */
[dir="rtl"] .project-info h3,
[dir="rtl"] .project-info p {
    text-align: right;
}

[dir="rtl"] .project-tags {
    justify-content: flex-end;
}

/* Typewriter cursor stays on the left in RTL */
[dir="rtl"] .typewriter {
    border-right: none;
    border-left: 2px solid var(--accent-light);
    padding-right: 0;
    padding-left: 3px;
}

/* Lang button shows current target lang */
.lang-btn {
    font-weight: 700;
    min-width: 44px;
    letter-spacing: 1px;
}