/* ============================================
   MOSTAFA PORTFOLIO - WORDPRESS PLUGIN STYLES
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --accent-2: #22d3ee;
    --neon-pink: #ec4899;
    --neon-green: #10b981;
    --dark: #0f0f12;
    --darker: #09090b;
    --card: #18181b;
    --card-hover: #1f1f23;
    --border: rgba(255, 255, 255, 0.08);
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    --gradient-3: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
    --glow-primary: 0 0 50px rgba(99, 102, 241, 0.3);
    --glow-accent: 0 0 50px rgba(6, 182, 212, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

body.mdp-page {
    font-family: 'Cairo', sans-serif;
    background: var(--darker);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

body.mdp-page ::selection {
    background: var(--primary);
    color: white;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

.cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10002;
    transform: translate(-50%, -50%);
}

.cursor.hover {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent);
}

.cursor.click {
    transform: translate(-50%, -50%) scale(0.8);
}

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.preloader-logo {
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
}

.preloader-progress {
    width: 200px;
    height: 2px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.preloader-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-1);
    border-radius: 10px;
}

.preloader-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ============================================
   NOISE & GRAIN EFFECT
   ============================================ */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav.scrolled {
    padding: 15px 60px;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo .logo-img {
    height: 45px;
    width: auto;
    transition: all 0.3s ease;
}

.nav-logo .logo-text {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-logo:hover .logo-img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.nav-menu {
    display: flex;
    gap: 50px;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
    padding: 5px 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.nav-link:hover::before {
    width: 100%;
    right: auto;
    left: 0;
}

.nav-cta {
    padding: 12px 28px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--text);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.nav-cta:hover::before {
    transform: translateX(0);
}

.nav-cta:hover {
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

/* Mobile Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 60px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

.hero-gradient-1 {
    background: var(--primary);
    top: -300px;
    right: -200px;
}

.hero-gradient-2 {
    background: var(--accent);
    bottom: -300px;
    left: -200px;
}

.hero-gradient-3 {
    background: var(--secondary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    opacity: 0.2;
}

.hero-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 1000px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.hero-badge i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 30px;
}

.hero-title-line {
    display: block;
    overflow: hidden;
}

.hero-title-word {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}

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

.hero-title .outline-text {
    -webkit-text-stroke: 2px var(--text);
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 50px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-bottom: 50px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-top: 5px;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 40px;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-4px);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    position: relative;
}

.hero-scroll-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: var(--accent);
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(60px); opacity: 0; }
}

/* ============================================
   SECTION STYLES
   ============================================ */
section {
    padding: 120px 60px;
    position: relative;
}

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

.section-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.2;
}

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

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 15px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    background: var(--dark);
}

.about-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image-wrapper {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: var(--gradient-1);
}

.about-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-image-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    color: white;
    opacity: 0.9;
    z-index: 2;
}

.about-image-float {
    position: absolute;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(20px);
    z-index: 3;
}

.about-image-float.float-1 {
    top: 30px;
    right: -30px;
}

.about-image-float.float-2 {
    bottom: 50px;
    left: -30px;
}

.about-image-float-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.about-image-float-text h4 {
    font-size: 1.5rem;
    font-weight: 800;
}

.about-image-float-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.about-content h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.3;
}

.about-content h3 span {
    color: var(--accent);
}

.about-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 20px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--card);
    border-radius: 15px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.about-feature:hover {
    border-color: var(--primary);
    transform: translateX(-5px);
}

.about-feature i {
    color: var(--accent);
    font-size: 1.2rem;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills {
    background: var(--darker);
    overflow: hidden;
}

.skills-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.skill-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

.skill-card-icon {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    transition: all 0.5s;
}

.skill-card:hover .skill-card-icon {
    background: var(--gradient-1);
    transform: scale(1.1) rotate(5deg);
}

.skill-card-icon i {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s;
}

.skill-card:hover .skill-card-icon i {
    -webkit-text-fill-color: white;
    background: none;
}

.skill-card h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.skill-card-number {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 5rem;
    font-weight: 900;
    color: var(--border);
    line-height: 1;
    z-index: 0;
    transition: all 0.5s;
}

.skill-card:hover .skill-card-number {
    color: rgba(99, 102, 241, 0.1);
}

/* ============================================
   MARQUEE
   ============================================ */
.marquee-section {
    padding: 25px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    overflow: hidden;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.marquee-section::before,
.marquee-section::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-section::before {
    right: 0;
    background: linear-gradient(to right, transparent, rgba(99, 102, 241, 0.8));
}

.marquee-section::after {
    left: 0;
    background: linear-gradient(to left, transparent, rgba(6, 182, 212, 0.8));
}

.marquee {
    display: flex;
    width: max-content;
    animation: marquee 35s linear infinite;
}

.marquee:hover {
    animation-play-state: paused;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 10px;
}

.marquee-content span {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.marquee-content span:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   PORTFOLIO PREVIEW
   ============================================ */
.portfolio-preview {
    background: var(--dark);
}

.portfolio-preview-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-card {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    aspect-ratio: 16/12;
    background: var(--card);
    cursor: pointer;
}

.portfolio-card-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    opacity: 0.1;
    transition: opacity 0.5s;
}

.portfolio-card:hover .portfolio-card-bg {
    opacity: 0.2;
}

.portfolio-card-content {
    position: absolute;
    inset: 0;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
}

.portfolio-card-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: all 0.5s;
}

.portfolio-card:hover .portfolio-card-icon {
    background: var(--accent);
    transform: rotate(45deg);
}

.portfolio-card-info h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.portfolio-card-link {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.portfolio-cta {
    text-align: center;
    margin-top: 60px;
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */
.experience {
    background: var(--darker);
}

.experience-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding-right: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent), var(--secondary));
}

.timeline-item {
    position: relative;
    padding-bottom: 60px;
    padding-right: 60px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    right: -11px;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--darker);
    border: 3px solid var(--primary);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s;
}

.timeline-item:hover .timeline-dot {
    background: var(--primary);
    box-shadow: var(--glow-primary);
    transform: scale(1.2);
}

.timeline-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 35px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:hover .timeline-content {
    border-color: var(--primary);
    transform: translateX(-10px);
}

.timeline-date {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.timeline-content h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.timeline-content h5 {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.timeline-content p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    background: var(--dark);
}

.contact-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
}

.contact-info h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
}

.contact-info h3 span {
    color: var(--accent);
}

.contact-info > p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--card);
    border-radius: 15px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.contact-item:hover {
    border-color: var(--primary);
    transform: translateX(-5px);
}

.contact-item-icon {
    width: 55px;
    height: 55px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--accent);
    transition: all 0.3s;
}

.contact-item:hover .contact-item-icon {
    background: var(--gradient-1);
    color: white;
}

.contact-item-text h5 {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-item-text p {
    font-size: 1.1rem;
    font-weight: 500;
}

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

.social-link {
    width: 55px;
    height: 55px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 1.3rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-link:hover {
    background: var(--gradient-1);
    border-color: transparent;
    transform: translateY(-5px) rotate(5deg);
    box-shadow: var(--glow-primary);
}

.contact-form-wrapper {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 50px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px 22px;
    background: var(--darker);
    border: 2px solid var(--border);
    border-radius: 15px;
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
    padding: 20px;
    font-size: 1.1rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--darker);
    padding: 40px 60px;
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.footer-text span {
    color: var(--accent);
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 55px;
    height: 55px;
    background: var(--gradient-1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    text-decoration: none;
    border: none;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-primary);
}

/* ============================================
   PORTFOLIO PAGE SPECIFIC
   ============================================ */
.portfolio-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 120px;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 28px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 100px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
}

.portfolio-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    aspect-ratio: 16/12;
    background: var(--card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

.portfolio-item-bg {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
    transition: all 0.5s;
}

.portfolio-item:hover .portfolio-item-bg {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
}

.portfolio-item-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
    transition: all 0.5s;
}

.portfolio-item:hover .portfolio-item-icon {
    transform: scale(1.2);
    color: var(--accent);
}

.portfolio-item-url {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.portfolio-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(9, 9, 11, 0.95), transparent 60%);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: all 0.4s;
}

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

.portfolio-item-overlay h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.portfolio-item-overlay p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: capitalize;
}

.portfolio-item-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.portfolio-item-link:hover {
    color: white;
    gap: 12px;
}

.portfolio-load-more {
    text-align: center;
    margin-top: 60px;
}

.portfolio-counter {
    text-align: center;
    margin-top: 30px;
    color: var(--text-muted);
}

.portfolio-counter span {
    color: var(--accent);
    font-weight: 700;
}

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

/* Large screens */
@media (max-width: 1400px) {
    .hero-content {
        max-width: 900px;
    }

    .hero-stats {
        gap: 60px;
    }
}

@media (max-width: 1200px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: clamp(2.5rem, 6vw, 5rem);
    }

    .hero-stat-number {
        font-size: 3rem;
    }

    .hero-stats {
        gap: 50px;
    }

    .about-content h3 {
        font-size: 2rem;
    }

    .contact-info h3 {
        font-size: 2rem;
    }
}

@media (max-width: 1024px) {
    section {
        padding: 80px 40px;
    }

    .nav {
        padding: 15px 30px;
    }

    .nav-cta {
        display: none;
    }

    .hero {
        padding: 100px 40px;
    }

    .hero-title {
        font-size: clamp(2rem, 5vw, 4rem);
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stat-number {
        font-size: 2.5rem;
    }

    .hero-stats {
        gap: 40px;
    }

    .about-wrapper {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }

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

    .section-title {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .skill-card {
        padding: 30px;
    }

    .skill-card-number {
        font-size: 4rem;
    }

    .timeline-content {
        padding: 25px;
    }

    .contact-form-wrapper {
        padding: 40px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .portfolio-hero {
        padding-top: 100px !important;
        min-height: 40vh !important;
    }

    .portfolio-filters {
        gap: 10px !important;
        margin-bottom: 40px !important;
    }

    .filter-btn {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 20px !important;
    }

    .nav {
        padding: 15px 20px !important;
    }

    .nav-toggle {
        display: flex !important;
    }

    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 100% !important;
        height: 100vh !important;
        background: var(--darker) !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 30px !important;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
        z-index: 999 !important;
    }

    .nav-menu.active {
        right: 0 !important;
    }

    .nav-link {
        font-size: 1.5rem !important;
    }

    .hero {
        padding: 100px 20px 60px !important;
        min-height: auto !important;
    }

    .hero-content {
        max-width: 100% !important;
    }

    .hero-title {
        font-size: 2rem !important;
        margin-bottom: 20px !important;
        line-height: 1.3 !important;
    }

    .hero-title-line {
        display: block !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 30px !important;
        line-height: 1.8 !important;
        padding: 0 10px !important;
    }

    .hero-badge {
        font-size: 0.8rem !important;
        padding: 10px 18px !important;
        margin-bottom: 25px !important;
    }

    .hero-stats {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 30px !important;
        margin-bottom: 40px !important;
    }

    .hero-stat {
        min-width: 80px !important;
    }

    .hero-stat-number {
        font-size: 2.5rem !important;
    }

    .hero-stat-label {
        font-size: 0.85rem !important;
    }

    .hero-cta {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }

    .hero-cta .btn {
        width: 100% !important;
        max-width: 280px !important;
        justify-content: center !important;
        padding: 16px 30px !important;
    }

    .hero-scroll {
        display: none !important;
    }

    /* Skills Section Mobile */
    .skills-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 !important;
    }

    .skill-card {
        padding: 25px 20px !important;
        border-radius: 20px !important;
    }

    .skill-card-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.8rem !important;
        margin-bottom: 20px !important;
        border-radius: 15px !important;
    }

    .skill-card h4 {
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
    }

    .skill-card p {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }

    .skill-card-number {
        font-size: 3rem !important;
        top: 15px !important;
        right: 20px !important;
    }

    /* Portfolio Mobile */
    .portfolio-preview-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .portfolio-card {
        aspect-ratio: 16/10 !important;
        border-radius: 20px !important;
    }

    .portfolio-card-content {
        padding: 20px !important;
    }

    .portfolio-card-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
    }

    .portfolio-card-info h4 {
        font-size: 1.2rem !important;
    }

    .portfolio-card-info p {
        font-size: 0.9rem !important;
    }

    /* Contact Form Mobile */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .form-group input,
    .form-group textarea {
        padding: 16px 18px !important;
        font-size: 1rem !important;
        border-radius: 12px !important;
    }

    .contact-form-wrapper {
        padding: 30px 20px !important;
        border-radius: 20px !important;
    }

    .contact-form {
        gap: 20px !important;
    }

    /* About Section Mobile */
    .about-wrapper {
        gap: 40px !important;
    }

    .about-image {
        max-width: 100% !important;
    }

    .about-image-wrapper {
        aspect-ratio: 4/3 !important;
        border-radius: 20px !important;
    }

    .about-image-icon {
        font-size: 5rem !important;
    }

    .about-features {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .about-feature {
        padding: 15px 18px !important;
        border-radius: 12px !important;
    }

    .about-feature i {
        font-size: 1.1rem !important;
    }

    .about-feature span {
        font-size: 0.95rem !important;
    }

    .about-content h3 {
        font-size: 1.6rem !important;
        margin-bottom: 20px !important;
    }

    .about-content p {
        font-size: 1rem !important;
        line-height: 1.8 !important;
        margin-bottom: 15px !important;
    }

    /* Timeline Mobile */
    .timeline {
        padding-right: 30px !important;
    }

    .timeline-item {
        padding-right: 40px !important;
        padding-bottom: 40px !important;
    }

    .timeline-content {
        padding: 22px !important;
        border-radius: 16px !important;
    }

    .timeline-content h4 {
        font-size: 1.2rem !important;
    }

    .timeline-content h5 {
        font-size: 0.9rem !important;
    }

    .timeline-content p {
        font-size: 0.95rem !important;
    }

    .timeline-date {
        font-size: 0.8rem !important;
        padding: 5px 14px !important;
    }

    .timeline-dot {
        width: 20px !important;
        height: 20px !important;
        right: -10px !important;
    }

    /* Section Headers Mobile */
    .section-header {
        margin-bottom: 50px !important;
    }

    .section-tag {
        font-size: 0.75rem !important;
        padding: 8px 18px !important;
        letter-spacing: 1.5px !important;
    }

    .section-title {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
    }

    .section-subtitle {
        font-size: 1rem !important;
        margin-top: 12px !important;
    }

    /* Contact Info Mobile */
    .contact-wrapper {
        gap: 50px !important;
    }

    .contact-info h3 {
        font-size: 1.6rem !important;
    }

    .contact-info > p {
        font-size: 1rem !important;
        line-height: 1.8 !important;
        margin-bottom: 30px !important;
    }

    .contact-details {
        margin-bottom: 30px !important;
    }

    .contact-item {
        padding: 18px !important;
        gap: 15px !important;
        border-radius: 14px !important;
        margin-bottom: 15px !important;
    }

    .contact-item-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
        border-radius: 12px !important;
    }

    .contact-item-text h5 {
        font-size: 0.8rem !important;
    }

    .contact-item-text p {
        font-size: 1rem !important;
    }

    /* Social Links Mobile */
    .social-links {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 12px !important;
    }

    .social-link {
        width: 52px !important;
        height: 52px !important;
        font-size: 1.2rem !important;
        border-radius: 14px !important;
    }

    /* Footer Mobile */
    .footer {
        padding: 30px 20px !important;
    }

    .footer-content {
        flex-direction: column !important;
        gap: 20px !important;
        text-align: center !important;
    }

    .footer-links {
        gap: 20px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .footer-text {
        font-size: 0.95rem !important;
    }

    /* Scroll Top Mobile */
    .scroll-top {
        width: 48px !important;
        height: 48px !important;
        bottom: 20px !important;
        left: 20px !important;
        font-size: 1rem !important;
        border-radius: 12px !important;
    }

    /* Buttons Mobile */
    .btn {
        padding: 16px 32px !important;
        font-size: 1rem !important;
        border-radius: 50px !important;
    }

    /* Hide Cursor on Touch */
    .cursor,
    .cursor-dot {
        display: none !important;
    }

    /* Hide floating elements */
    .about-image-float {
        display: none !important;
    }

    /* Marquee Mobile */
    .marquee-section {
        padding: 18px 0 !important;
    }

    .marquee-content span {
        font-size: 0.95rem !important;
        padding: 8px 18px !important;
        gap: 10px !important;
    }

    .marquee-content span i {
        font-size: 1.1rem !important;
    }

    /* Portfolio Page Mobile */
    .portfolio-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .portfolio-hero {
        padding-top: 90px !important;
        min-height: auto !important;
        padding-bottom: 40px !important;
    }

    .portfolio-hero .hero-title {
        font-size: 1.8rem !important;
    }

    .portfolio-hero .hero-subtitle {
        font-size: 1rem !important;
    }

    .portfolio-filters {
        gap: 10px !important;
        margin-bottom: 35px !important;
        padding: 0 !important;
    }

    .filter-btn {
        padding: 10px 18px !important;
        font-size: 0.9rem !important;
    }

    .portfolio-item {
        aspect-ratio: 16/10 !important;
        border-radius: 20px !important;
    }

    .portfolio-item-icon {
        font-size: 2.5rem !important;
    }

    .portfolio-item-url {
        font-size: 0.85rem !important;
    }

    .portfolio-item-overlay {
        padding: 22px !important;
        opacity: 1 !important;
    }

    .portfolio-item-overlay h4 {
        font-size: 1.2rem !important;
    }

    .portfolio-item-overlay p {
        font-size: 0.9rem !important;
        margin-bottom: 12px !important;
    }

    .portfolio-load-more {
        margin-top: 40px !important;
    }

    .portfolio-counter {
        font-size: 0.95rem !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    section {
        padding: 45px 15px !important;
    }

    .nav {
        padding: 12px 15px !important;
    }

    .nav-logo .logo-img {
        height: 38px !important;
    }

    .hero {
        padding: 90px 15px 50px !important;
    }

    .hero-title {
        font-size: 1.7rem !important;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
    }

    .hero-stats {
        gap: 20px !important;
    }

    .hero-stat-number {
        font-size: 2.2rem !important;
    }

    .hero-stat-label {
        font-size: 0.8rem !important;
    }

    .hero-cta .btn {
        padding: 14px 28px !important;
        font-size: 0.95rem !important;
    }

    .section-title {
        font-size: 1.5rem !important;
    }

    .section-tag {
        font-size: 0.7rem !important;
        padding: 6px 14px !important;
    }

    .skill-card {
        padding: 22px 18px !important;
    }

    .skill-card-icon {
        width: 55px !important;
        height: 55px !important;
        font-size: 1.6rem !important;
    }

    .skill-card h4 {
        font-size: 1.1rem !important;
    }

    .skill-card p {
        font-size: 0.9rem !important;
    }

    .skill-card-number {
        font-size: 2.5rem !important;
    }

    .portfolio-card-info h4 {
        font-size: 1.1rem !important;
    }

    .portfolio-card-info p {
        font-size: 0.85rem !important;
    }

    .about-content h3 {
        font-size: 1.4rem !important;
    }

    .about-content p {
        font-size: 0.95rem !important;
    }

    .about-image-icon {
        font-size: 4rem !important;
    }

    .contact-info h3 {
        font-size: 1.4rem !important;
    }

    .contact-form-wrapper {
        padding: 25px 18px !important;
    }

    .form-group input,
    .form-group textarea {
        padding: 14px 16px !important;
        font-size: 0.95rem !important;
    }

    .timeline {
        padding-right: 25px !important;
    }

    .timeline-item {
        padding-right: 35px !important;
        padding-bottom: 35px !important;
    }

    .timeline-content {
        padding: 18px !important;
    }

    .timeline-content h4 {
        font-size: 1.1rem !important;
    }

    .timeline-content p {
        font-size: 0.9rem !important;
    }

    .footer {
        padding: 25px 15px !important;
    }

    .footer-text {
        font-size: 0.9rem !important;
    }

    .portfolio-grid {
        gap: 15px !important;
    }

    .portfolio-hero {
        padding-top: 85px !important;
    }

    .portfolio-hero .hero-title {
        font-size: 1.6rem !important;
    }

    .filter-btn {
        padding: 8px 14px !important;
        font-size: 0.85rem !important;
    }

    .portfolio-item-overlay h4 {
        font-size: 1.1rem !important;
    }

    .portfolio-item-overlay p {
        font-size: 0.85rem !important;
    }
}
