/* ==================== CSS VARIABLES ==================== */
:root {
    --bg-primary: #e0e5ec;
    --bg-secondary: #f0f3f7;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gold: #f59e0b;
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;

    --neu-shadow: 8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);

    --neu-shadow-inset: inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);

    --neu-shadow-hover: 12px 12px 24px var(--shadow-dark),
        -12px -12px 24px var(--shadow-light);

    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==================== DARK THEME ==================== */
[data-theme="dark"] {
    --bg-primary: #1a1f2e;
    --bg-secondary: #232938;
    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --shadow-light: #252b3d;
    --shadow-dark: #0f1319;

    --neu-shadow: 8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);

    --neu-shadow-inset: inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);

    --neu-shadow-hover: 12px 12px 24px var(--shadow-dark),
        -12px -12px 24px var(--shadow-light);
}

[data-theme="dark"] .hero-label,
[data-theme="dark"] .section-label {
    color: #ffffff;
}

[data-theme="dark"] .hero-subtitle {
    color: #cacde1;
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

button,
a,
input,
textarea {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: none;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

::selection {
    background: var(--accent-primary);
    color: white;
}

/* ==================== PRELOADER ==================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow-inset);
    position: relative;
    animation: pulse 1.5s ease-in-out infinite;
}

.loader::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--accent-primary);
    animation: spin 1s linear infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ==================== HEADER ==================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: var(--bg-primary);
    transition: var(--transition-smooth);
}

header.scrolled {
    padding: 0.7rem 5%;
    box-shadow: var(--neu-shadow);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    text-decoration: none;
}

/* ==================== NAVIGATION ==================== */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: var(--transition-smooth);
    padding: 0.5rem 1rem;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
    width: 80%;
}

.nav-menu a:hover {
    color: var(--accent-primary);
}

/* ==================== THEME TOGGLE ==================== */
.theme-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--accent-gold);
    transition: var(--transition-smooth);
    outline: none;
}

.theme-toggle:hover {
    box-shadow: var(--neu-shadow-hover);
    transform: scale(1.1) rotate(20deg);
}

.theme-toggle:active {
    box-shadow: var(--neu-shadow-inset);
}

/* ==================== HAMBURGER MENU ==================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    outline: none;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ==================== HERO ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 8% 4rem;
    gap: 4rem;
    position: relative;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-label {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.23;
    margin-bottom: 1.35rem;
    
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

}


.hero-subtitle {
    font-size: 2.25rem;
    font-weight: 600;
    color: #3a3f5b;
    margin-top: 10px;
}



/* ==================== HERO DESCRIPTION ==================== */
.hero-description-container {
    min-height: 65px;
    margin-bottom: 2.5rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.8;
    border-left: 3px solid var(--accent-primary);
    padding-left: 10px;
    display: inline;
}

.cursor {
    font-weight: 100;
    font-size: 1.3rem;
    color: var(--accent-primary);
    animation: blink 0.7s infinite;
    margin-right: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ==================== HERO BUTTONS ==================== */
.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    font-family: inherit;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--neu-shadow);
}

.btn-secondary:hover {
    box-shadow: var(--neu-shadow-hover);
    transform: translateY(-3px);
}

.btn-secondary:active {
    box-shadow: var(--neu-shadow-inset);
    transform: translateY(0);
}

.btn-cv {
    background: var(--bg-primary);
    color: var(--accent-primary);
    box-shadow: var(--neu-shadow);
    font-weight: 700;
}

[data-theme="dark"] .btn-cv {
    color: #ffffff;
}

.btn-cv:hover {
    box-shadow: var(--neu-shadow-hover);
    transform: translateY(-3px);
}

/* ==================== HERO IMAGE ==================== */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 3;
    min-height: 520px;
}

.hero-image-wrapper {
    position: relative;
    width: min(450px, 85vw);
    height: min(540px, 85vw);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 112%;
    height: 112%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    opacity: 0.2;
    animation: blobAnimation 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes blobAnimation {
    0% {
        border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
        transform: translate(-50%, -50%) scale(1);
    }

    25% {
        border-radius: 41% 59% 68% 32% / 72% 38% 62% 28%;
        transform: translate(-50%, -50%) scale(1.05);
    }

    50% {
        border-radius: 37% 63% 45% 55% / 48% 55% 45% 52%;
        transform: translate(-50%, -50%) scale(1);
    }

    75% {
        border-radius: 58% 42% 38% 62% / 58% 45% 55% 42%;
        transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
        transform: translate(-50%, -50%) scale(1);
    }
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
    box-shadow: var(--neu-shadow);
    position: relative;
    z-index: 2;
}

/* ==================== FLOATING STATS ==================== */
.floating-stat {
    position: absolute;
    background: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-radius: 20px;
    box-shadow: var(--neu-shadow);
    animation: floatUpDown 4s ease-in-out infinite;
    z-index: 4;
    white-space: nowrap;
}

@keyframes floatUpDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.floating-stat:nth-of-type(1) {
    bottom: -10px;
    right: -8%;
    animation-delay: 0s;
}

.floating-stat:nth-of-type(2) {
    bottom: -10px;
    left: -8%;
    animation-delay: 1s;
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==================== SECTIONS ==================== */
section {
    padding: 5rem 8%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ==================== FADE-IN ANIMATION ==================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== ABOUT ==================== */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-neu {
    width: 100%;
    max-width: 500px;
    height: 500px;
    border-radius: 30px;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow);
    overflow: hidden;
}

.about-image-neu img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.about-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.about-list {
    list-style: none;
    margin-top: 2rem;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-list li i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow);
    border-radius: 50%;
    color: var(--accent-primary);
}

/* ==================== SKILLS ==================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-primary);
    padding: 2.5rem 1.5rem 2rem;
    border-radius: 28px;
    box-shadow: var(--neu-shadow);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    cursor: default;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: var(--neu-shadow-hover);
}

.skill-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow-inset);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: var(--transition-smooth);
}

.skill-card:hover .skill-icon-wrapper {
    box-shadow: var(--neu-shadow);
}

.skill-icon-wrapper img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.skill-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.skill-bar-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skill-bar-track {
    width: 100%;
    height: 8px;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow-inset);
    border-radius: 50px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.skill-card:hover .skill-bar-fill {
    width: 100% !important;
}

/* ==================== WHY ME ==================== */
.why-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.why-text-side {
    background: var(--bg-primary);
    border-radius: 30px;
    box-shadow: var(--neu-shadow-inset);
    padding: 3rem;
    min-height: 320px;
    display: flex;
    align-items: flex-start;
}

.why-typing-wrapper {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 2;
    border-right: 3px solid var(--accent-primary);
    padding-right: 1.2rem;
}

.why-typed {
    display: inline;
}

.why-cards-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.why-card {
    background: var(--bg-primary);
    padding: 1.8rem 1.5rem;
    border-radius: 24px;
    box-shadow: var(--neu-shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.why-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--neu-shadow-hover);
}

.why-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow-inset);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--accent-primary);
    transition: var(--transition-smooth);
}

.why-card:hover .why-icon {
    box-shadow: var(--neu-shadow);
    color: var(--accent-secondary);
}

.why-card-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.why-card-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== PROJECTS ==================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--bg-primary);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--neu-shadow);
    transition: var(--transition-bounce);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--neu-shadow-hover);
}

.project-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 2rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    background: var(--bg-secondary);
    box-shadow: var(--neu-shadow-inset);
    border-radius: 15px;
    color: var(--accent-primary);
    font-weight: 600;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a,
.project-links button {
    border: none;
    outline: none;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow);
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.project-links a:hover,
.project-links button:hover {
    color: var(--accent-primary);
    box-shadow: var(--neu-shadow-inset);
}

/* ==================== MODAL ==================== */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(224, 229, 236, 0.4);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.project-modal.open {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-primary);
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    border-radius: 35px;
    box-shadow: var(--neu-shadow-hover);
    padding: 2.5rem;
    position: relative;
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.project-modal.open .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.close-modal:hover {
    box-shadow: var(--neu-shadow-inset);
    color: var(--accent-primary);
}

.modal-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--neu-shadow-inset);
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal-tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.modal-buttons {
    display: flex;
    gap: 1.5rem;
}

/* ==================== CONTACT ==================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 25px;
    box-shadow: var(--neu-shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition-smooth);
}

.contact-card:hover {
    transform: scale(1.03);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.contact-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-form {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: 30px;
    box-shadow: var(--neu-shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border: none;
    outline: none;
    border-radius: 15px;
    box-shadow: var(--neu-shadow-inset);
    font-family: inherit;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group textarea {
    height: 150px;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    box-shadow: var(--neu-shadow);
}

.form-success-message {
    background: #def7ec;
    color: #03543f;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: none;
    text-align: center;
    font-weight: 600;
}

.form-success-message.show {
    display: block;
}

/* ==================== FOOTER ==================== */
footer {
    background: var(--bg-secondary);
    padding: 4rem 8% 2rem;
    text-align: center;
    box-shadow: var(--neu-shadow);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer-socials a {
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.2rem;
    text-decoration: none;
    transition: var(--transition-bounce);
}

.footer-socials a:hover {
    color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: var(--neu-shadow-hover);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==================== SCROLL TO TOP ==================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 1.3rem;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* ==================== SCROLL HINT ==================== */
.scroll-hint {
    display: none;
    position: absolute;
    bottom: 0.1rem;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent-primary);
    opacity: 0.7;
    animation: bounceDown 1.8s ease-in-out infinite;
    z-index: 5;
    font-size: 0.8rem;
    font-weight: 600;
}

.scroll-hint i {
    font-size: 1.4rem;
}

@keyframes bounceDown {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.7;
    }

    50% {
        transform: translateX(-50%) translateY(8px);
        opacity: 1;
    }
}

/* ==================== RESPONSIVE: TABLET ==================== */
@media (max-width: 1024px) {

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--bg-primary);
        box-shadow: var(--neu-shadow);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.4s ease;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 7rem 5% 3rem;
        gap: 2rem;
        min-height: 110vh;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        min-height: auto;
        width: 100%;
    }

    .hero-image-wrapper {
        width: min(300px, 75vw);
        height: min(300px, 75vw);
        margin: 0 auto;
    }

    .floating-stat:nth-of-type(1) {
        bottom: -10px;
        right: -2%;
    }

    .floating-stat:nth-of-type(2) {
        bottom: -10px;
        left: -2%;
    }

    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image-neu {
        margin: 0 auto;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .why-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    section {
        padding: 3rem 5%;
    }

    .hero {
        position: relative;
    }

    .scroll-hint {
        display: flex;
    }

    /* Mobile: hero description hidden initially */
    .hero-description-container {
        opacity: 0;
        transform: translateY(15px);
    }

    .hero-description-container.text-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== RESPONSIVE: MOBILE ==================== */
@media (max-width: 768px) {

    .hero {
        padding: 6rem 4% 4rem;
        gap: 1.5rem;
        min-height: 115vh;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-label {
        display: none;
    }

    .hero-description-container {
        min-height: 80px;
        margin-bottom: 2rem;
    }

    .hero-image-wrapper {
        width: min(300px, 80vw);
        height: min(400px, 110vw);
        border-radius: 50%;
        margin-bottom: 4rem;
        padding-bottom: 0;
    }

    .hero-image-wrapper img {
        object-fit: cover;
        object-position: top center;
    }

    .floating-stat {
        position: absolute !important;
        padding: 0.8rem 1.2rem;
        bottom: -3rem !important;
        animation: none;
    }

    .floating-stat:nth-of-type(1) {
        left: 0 !important;
        right: auto !important;
        bottom: -3rem !important;
    }

    .floating-stat:nth-of-type(2) {
        right: 0 !important;
        left: auto !important;
        bottom: -3rem !important;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .contact-icon {
        flex-shrink: 0;
    }

    .contact-card {
        flex-direction: column;
        text-align: center;
    }

    .contact-info {
        gap: 1.5rem;
    }
}

/* ==================== RESPONSIVE: SMALL MOBILE ==================== */
@media (max-width: 600px) {

    .hero {
        min-height: 120vh;
        padding: 6rem 4% 3rem;
    }

    .hero-image-wrapper {
        width: min(280px, 78vw);
        height: min(360px, 105vw);
        border-radius: 50%;
        margin-bottom: 4rem;
    }

    .hero-image-wrapper img {
        object-position: top center;
    }

    .floating-stat {
        padding: 0.7rem 1rem;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .contact-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .contact-details h4 {
        font-size: 1rem;
    }

    .contact-details p {
        font-size: 0.9rem;
    }

    .contact-form {
        padding: 2rem;
    }
}

/* ==================== RESPONSIVE: EXTRA SMALL ==================== */
@media (max-width: 480px) {

    .hero {
        padding: 5.5rem 4% 3rem;
        min-height: 125vh;
    }

    .hero-image-wrapper {
        width: min(260px, 75vw);
        height: min(340px, 100vw);
        border-radius: 50%;
        margin-bottom: 4rem;
    }

    .hero-image-wrapper img {
        object-position: top center;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .why-cards-side {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 0.8rem 1.8rem;
        font-size: 0.9rem;
    }

    .contact-card {
        padding: 1.2rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }

    .form-group textarea {
        height: 120px;
    }
}




.btn-cv-download {
    background: var(--bg-primary);
    color: var(--text-secondary);
    /* داكن في لايت مود */
    box-shadow: var(--neu-shadow);
    padding: 0.75rem 1.8rem;
    /* أصغر من الرئيسي */
    font-size: 0.9rem;
    border: 2px solid transparent;
    transition: var(--transition-smooth);
}

.btn-cv-download:hover {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
    transform: translateY(-4px);
    border-color: transparent;
}

[data-theme="dark"] .btn-cv-download {
    color: #f7fafc;
    /* أبيض في الدارك مود */
}




