/* ===========================
   WEB3 CSS VARIABLES
   =========================== */
:root {
    /* Dark Blue Theme Colors */
    --primary-dark: #0a1628;
    --secondary-dark: #1a2332;
    --tertiary-dark: #0f172a;
    
    /* Bright Blue Accents */
    --primary-blue: #0ea5e9;
    --secondary-blue: #3b82f6;
    --bright-blue: #60a5fa;
    --electric-blue: #00d4ff;
    --neon-blue: #00f0ff;
    
    /* White & Light Colors */
    --white: #ffffff;
    --off-white: #f8fafc;
    --light-gray: #e2e8f0;
    --text-gray: #94a3b8;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --glow-blue: 0 0 20px rgba(14, 165, 233, 0.5);
    --glow-bright: 0 0 30px rgba(0, 212, 255, 0.6);
    --glow-neon: 0 0 40px rgba(0, 240, 255, 0.8);
    
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* ===========================
   MODERN STICKY NAVBAR
   =========================== */
.modern-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: transform 0.3s ease, background 0.3s ease;
}

.modern-navbar.nav-hidden {
    transform: translateY(-100%);
}

.modern-navbar.scrolled {
    background: rgba(10, 22, 40, 0.98);
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    transition: var(--transition-normal);
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-normal);
    filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.3));
}

.nav-logo:hover .logo-img {
    filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.6));
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--off-white);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-normal);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--electric-blue));
    transition: width 0.3s ease;
}

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

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

.nav-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--off-white);
    font-size: 1rem;
    transition: var(--transition-normal);
    text-decoration: none;
}

.social-icon:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--glow-blue);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--off-white);
    transition: var(--transition-normal);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: rgba(10, 22, 40, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 6rem 2rem 2rem;
        gap: 2rem;
        transition: right 0.3s ease;
        border-left: 1px solid var(--glass-border);
    }
    
    .nav-links.mobile-active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.1rem;
        width: 100%;
        padding: 0.75rem 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-social {
        gap: 0.75rem;
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .nav-social {
        display: none;
    }
}

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

body {
    padding-top: 82px; /* Height of navbar */
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--off-white);
    background-color: var(--primary-dark);
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ===========================
   ANIMATED BACKGROUND
   =========================== */
.web3-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--primary-dark) 0%, 
        var(--secondary-dark) 25%,
        #0d1b2a 50%,
        var(--tertiary-dark) 75%,
        var(--primary-dark) 100%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--white);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.75rem;
}

h3 {
    font-size: 1.875rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-gray);
    font-size: 1.1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-blue), var(--electric-blue), var(--bright-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    box-shadow: var(--glow-blue);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-bright);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--white);
    border: 2px solid var(--primary-blue);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: var(--glow-blue);
}

/* ===========================
   NAVIGATION
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: var(--transition-normal);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--electric-blue), transparent);
    opacity: 0.5;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--white), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: var(--off-white);
    font-weight: 500;
    transition: var(--transition-normal);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--electric-blue));
    transition: var(--transition-normal);
    box-shadow: var(--glow-blue);
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--electric-blue));
    transition: var(--transition-normal);
    border-radius: 2px;
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: var(--text-gray);
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
    animation: fadeInUp 1s ease 0.6s backwards;
}

/* Testimonial cards and badges */
.testimonials {
    padding-top: 60px;
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}
.testimonial-card {
    padding: 1.5rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.06);
}
.testimonial-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}
.client-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
    padding: 8px;
    flex: 0 0 80px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(102, 126, 234, 0.3);
    position: relative;
}
.client-logo.white { 
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
}
.client-logo img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: contain !important;
    display: block !important;
    max-width: 100%;
    max-height: 100%;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none;
}
.client-logo::before {
    content: none !important;
}
.client-info h4 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.client-info p { font-size: 0.9rem; color: var(--text-gray); }
.project-badge {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--white);
}
.difficulty-easy { background: linear-gradient(90deg,#10b981,#34d399); }
.difficulty-medium { background: linear-gradient(90deg,#f59e0b,#f97316); }
.difficulty-hard { background: linear-gradient(90deg,#ef4444,#dc2626); }
.testimonial-text { color: var(--text-gray); margin: 0.75rem 0 1rem; }
.testimonial-metrics { display: flex; gap: 0.75rem; }
.testimonial-metrics .metric { background: rgba(255,255,255,0.03); padding: 12px; border-radius: 8px; flex: 1; text-align: center; }
.testimonial-metrics .metric strong { display:block; font-size:1.05rem; color: var(--white); }
.testimonial-metrics .metric span { display:block; font-size:0.85rem; color: var(--text-gray); }

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-blue), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-gray);
    font-size: 1rem;
}

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

/* ===========================
   SECTION HEADERS
   =========================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-gray);
}

/* ===========================
   ABOUT SECTION
   =========================== */
.about {
    background: linear-gradient(180deg, transparent 0%, rgba(14, 165, 233, 0.03) 50%, transparent 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    margin-bottom: 1.5rem;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.tech-item:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
    transform: translateX(5px);
}

.tech-item i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.tech-item span {
    color: var(--off-white);
    font-weight: 500;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.stat:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
    transform: translateY(-5px);
}

.stat h4 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin: 0;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.image-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
    z-index: 1;
}

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

.about-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--secondary-dark), var(--tertiary-dark));
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    position: relative;
    z-index: 2;
}

/* ===========================
   SERVICES SECTION
   =========================== */
.services {
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-height: 450px;
    display: flex;
    flex-direction: column;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-slow);
}

.service-card:hover .card-glow {
    opacity: 1;
    animation: rotate 8s linear infinite;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    box-shadow: var(--glow-blue);
    position: relative;
    z-index: 1;
}

.service-card h3 {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    font-size: 1.4rem;
}

.service-card p {
    text-align: left;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.service-tech {
    text-align: center;
    font-size: 0.8rem;
    color: var(--primary-blue);
    padding: 0.75rem;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.service-details {
    position: relative;
    z-index: 1;
    padding: 1rem;
    background: rgba(10, 22, 40, 0.5);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    margin-top: auto;
}

.service-details small {
    display: block;
    color: var(--text-gray);
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.service-details small:last-child {
    margin-bottom: 0;
}

.service-details strong {
    color: var(--primary-blue);
    font-weight: 600;
}

/* ===========================
   TESTIMONIALS SECTION
   =========================== */
.testimonials {
    position: relative;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    padding: 2rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.client-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    padding: 10px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%) !important;
}

.client-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* For logos with white artwork (transparent PNGs), add a dark rounded background */
.client-logo.white {
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%) !important;
    padding: 12px;
}

.client-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: var(--white);
}

.client-info p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 0.75rem;
}

.rating {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0;
}

.rating i {
    color: #fbbf24;
    font-size: 0.9rem;
}

.project-badge {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: var(--glow-blue);
}

.testimonial-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.metric {
    text-align: center;
}

.metric strong {
    display: block;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.metric span {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* ===========================
   PORTFOLIO SECTION
   =========================== */
.portfolio {
    background: linear-gradient(180deg, transparent 0%, rgba(14, 165, 233, 0.03) 50%, transparent 100%);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 350px;
    cursor: pointer;
    border: 2px solid var(--glass-border);
    transition: var(--transition-normal);
    /* subtle card background to make icons pop */
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(14,165,233,0.02));
    backdrop-filter: blur(6px);
}

.portfolio-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 1;
}

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

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

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-slow);
    background: linear-gradient(135deg, var(--secondary-dark), var(--tertiary-dark));
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: var(--transition-slow);
    background-color: rgba(0,0,0,0.04);
    z-index: 0; /* sit behind overlay */
}

.portfolio-icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* fill the card */
    display: block;
    transition: transform 0.6s ease, filter 0.4s ease;
}

.portfolio-item:hover .portfolio-icon img {
    transform: scale(1.03);
    filter: brightness(0.9) contrast(1.02);
}

/* ensure overlay content stays above the image */
.portfolio-overlay { z-index: 2; }

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

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.95), rgba(14, 165, 233, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 2;
    backdrop-filter: blur(10px);
}

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

.portfolio-content {
    text-align: center;

    }

/* Logo-friendly sizing: use for clean logos so they sit centered and don't get cropped.
   Apply by adding data-logo="true" to the <img> or the class .portfolio-logo. */
.portfolio-icon img[data-logo="true"],
.portfolio-icon img.portfolio-logo {
    object-fit: contain;    /* preserve the whole logo */
    padding: 12px;         /* breathing room inside the card */
    max-width: 86%;
    max-height: 86%;
    margin: auto;
    left: 0; right: 0; top: 0; bottom: 0; /* keep absolute inset behavior */
}

.portfolio-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: var(--glow-blue);
}

.portfolio-content h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.portfolio-content p {
    color: var(--off-white);
    margin-bottom: 1.5rem;
}

.portfolio-tech {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.portfolio-tech span {
    padding: 6px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--off-white);
    backdrop-filter: blur(10px);
}

/* ===========================
   CONTACT SECTION
   =========================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--glass-bg);

/* ===========================
   INTERACTIONS & MODAL
   =========================== */

/* Slightly tighter grid for large screens */
.testimonials-grid, .portfolio-grid {
    gap: 1.5rem;
}

/* Card hover and focus micro-interactions */
.testimonial-card, .portfolio-item {
    will-change: transform, box-shadow, opacity;
}

.testimonial-card:focus-within, .testimonial-card:focus, .portfolio-item:focus {
    outline: 3px solid rgba(14,165,233,0.18);
    outline-offset: 4px;
    transform: translateY(-6px);
}

/* Difficulty labels */
.difficulty.high { color: #ff4d4f; font-weight:700 }
.difficulty.medium { color: #ffb020; font-weight:700 }
.difficulty.low { color: #34d399; font-weight:700 }

/* Modal base */
.portfolio-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.portfolio-modal-overlay.open {
    display: flex;
}

.portfolio-modal {
    width: 100%;
    max-width: 980px;
    background: linear-gradient(180deg, rgba(10,22,40,0.98), rgba(14,165,233,0.04));
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    color: var(--off-white);
    position: relative;
}

.portfolio-modal .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: var(--off-white);
    cursor: pointer;
}

.portfolio-modal .modal-header {
    display:flex;
    gap:16px;
    align-items:center;
    margin-bottom:12px;
}

.portfolio-modal .modal-logo {
    width:84px;
    height:84px;
    border-radius:10px;
    overflow:hidden;
    background:var(--white);
    padding:8px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.portfolio-modal .modal-body { display:grid; grid-template-columns: 1fr 1fr; gap: 16px }
.portfolio-modal .modal-body p { color: var(--text-gray) }
.portfolio-modal .modal-tech { display:flex; gap:10px; flex-wrap:wrap }

@media (max-width: 800px) {
    .portfolio-modal .modal-body { grid-template-columns: 1fr; }
}
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

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

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--white);
    box-shadow: var(--glow-blue);
    flex-shrink: 0;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.contact-item p {
    color: var(--text-gray);
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--primary-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    box-shadow: var(--glow-blue);
    transform: translateY(-5px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--off-white);
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

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

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: var(--secondary-dark);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    background: linear-gradient(135deg, var(--white), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-gray);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-column a {
    display: block;
    color: var(--text-gray);
    margin-bottom: 0.75rem;
    transition: var(--transition-normal);
}

.footer-column a:hover {
    color: var(--primary-blue);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-bottom p {
    color: var(--text-gray);
    margin: 0.5rem 0;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--primary-blue);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 968px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .tech-stack {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 75px;
        flex-direction: column;
        background: var(--secondary-dark);
        width: 100%;
        text-align: center;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        border-top: 1px solid var(--glass-border);
        backdrop-filter: blur(20px);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    section {
        padding: 60px 0;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

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

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

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* ===========================
   LOADING SCREEN
   =========================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    margin-bottom: 2rem;
}

.blockchain-cube {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 3s infinite linear;
}

.blockchain-cube::before,
.blockchain-cube::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--electric-blue));
    border: 2px solid var(--bright-blue);
    box-shadow: var(--glow-bright);
}

.blockchain-cube::before {
    transform: rotateY(0deg) translateZ(40px);
}

.blockchain-cube::after {
    transform: rotateY(90deg) translateZ(40px);
}

@keyframes rotateCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

.loader-text h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--white), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loader-text p {
    color: var(--text-gray);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.loader-bar {
    width: 300px;
    height: 4px;
    background: var(--glass-bg);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--electric-blue));
    border-radius: 10px;
    animation: loadProgress 2s ease-in-out;
    box-shadow: var(--glow-blue);
}

@keyframes loadProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* ===========================
   MAGNETIC CURSOR
   =========================== */
.magnetic-cursor {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--electric-blue);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    box-shadow: 0 0 20px var(--electric-blue);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-blue);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, opacity 0.3s;
    opacity: 0.5;
}

.magnetic-cursor.hover .cursor-dot {
    width: 16px;
    height: 16px;
}

.magnetic-cursor.hover .cursor-outline {
    width: 60px;
    height: 60px;
    opacity: 1;
}

/* Hide on mobile */
@media (max-width: 768px) {
    .magnetic-cursor {
        display: none;
    }
}

/* ===========================
   SOUND & THEME TOGGLES
   =========================== */
.sound-toggle,
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    color: var(--primary-blue);
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle {
    top: 160px;
}

.sound-toggle:hover,
.theme-toggle:hover {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: var(--glow-blue);
    transform: scale(1.1);
}

.sound-toggle.muted {
    color: var(--text-gray);
}

/* ===========================
   SHARE FAB
   =========================== */
.share-fab {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 999;
}

.share-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--glow-blue);
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: var(--glow-bright);
}

.share-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-normal);
}

.share-fab:hover .share-menu,
.share-fab.active .share-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-item {
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    color: var(--primary-blue);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
    animation: slideInRight 0.3s ease backwards;
}

.share-item:nth-child(1) { animation-delay: 0.1s; }
.share-item:nth-child(2) { animation-delay: 0.2s; }
.share-item:nth-child(3) { animation-delay: 0.3s; }
.share-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.share-item:hover {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: var(--glow-blue);
    transform: scale(1.1);
}

/* ===========================
   ACHIEVEMENT NOTIFICATION
   =========================== */
.achievement-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    width: 350px;
    background: var(--glass-bg);
    border: 2px solid var(--primary-blue);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(20px);
    box-shadow: var(--glow-bright);
    z-index: 9999;
    display: flex;
    gap: 15px;
    align-items: center;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-notification.show {
    right: 30px;
}

.achievement-icon {
    font-size: 3rem;
    animation: bounce 0.6s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.achievement-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--white);
}

.achievement-text {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin: 0;
}

/* ===========================
   VISITOR COUNTER
   =========================== */
.visitor-counter {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 24px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999;
    transition: var(--transition-normal);
}

.visitor-counter:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
    transform: scale(1.05);
}

.visitor-counter i {
    color: var(--primary-blue);
    font-size: 1.2rem;
}

#visitor-count {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    min-width: 60px;
}

.counter-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* ===========================
   CRYPTO TICKER
   =========================== */
.crypto-ticker {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

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

.ticker-item i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.ticker-name {
    font-weight: 700;
    color: var(--white);
}

.ticker-price {
    font-weight: 600;
    color: var(--off-white);
}

.ticker-change {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.ticker-change.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.ticker-change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* ===========================
   ENHANCED HERO STATS
   =========================== */
.stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    box-shadow: var(--glow-blue);
}

/* ===========================
   TEXT SCRAMBLE EFFECT
   =========================== */
.scramble-text {
    position: relative;
    display: inline-block;
}

/* ===========================
   MAGNETIC BUTTON EFFECT
   =========================== */
.magnetic-btn {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===========================
   UTILITY ANIMATIONS
   =========================== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: var(--glow-blue);
    }
    50% {
        box-shadow: var(--glow-bright);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===========================
   LIGHT THEME SUPPORT
   =========================== */
body.light-theme {
    --primary-dark: #f8fafc;
    --secondary-dark: #e2e8f0;
    --tertiary-dark: #cbd5e1;
    --white: #0a1628;
    --off-white: #1a2332;
    --text-gray: #475569;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
}

body.light-theme .navbar {
    background: rgba(255, 255, 255, 0.9);
}

body.light-theme .gradient-bg {
    background: linear-gradient(135deg, 
        #f8fafc 0%, 
        #e2e8f0 25%,
        #cbd5e1 50%,
        #f1f5f9 75%,
        #f8fafc 100%);
}

/* ===========================
   RESPONSIVE ENHANCEMENTS
   =========================== */
@media (max-width: 768px) {
    .crypto-ticker {
        gap: 1rem;
    }
    
    .ticker-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .share-fab,
    .visitor-counter {
        display: none;
    }
    
    .sound-toggle,
    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .achievement-notification {
        width: 300px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .crypto-ticker {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .ticker-item {
        width: 100%;
        justify-content: space-between;
    }
    
    .loader-bar {
        width: 250px;
    }
}

/* ===========================
   SCROLLBAR STYLING
   =========================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-blue), var(--electric-blue));
}

/* ===========================
   PRINT STYLES
   =========================== */
@media print {
    .loading-screen,
    .magnetic-cursor,
    .sound-toggle,
    .theme-toggle,
    .share-fab,
    .achievement-notification,
    .visitor-counter,
    .back-to-top,
    .web3-background {
        display: none !important;
    }
}

/* ===========================
   LANGUAGE SELECTOR MODAL
   =========================== */
.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.language-modal.show {
    opacity: 1;
    visibility: visible;
}

.language-modal-content {
    background: var(--glass-bg);
    border: 2px solid var(--primary-blue);
    border-radius: 24px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(20px);
    box-shadow: var(--glow-bright);
    animation: modalSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.language-modal-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--white), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.language-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.lang-btn {
    padding: 2rem 1.5rem;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.lang-btn:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
    transform: translateY(-5px);
}

.lang-btn .flag {
    font-size: 3rem;
}

.lang-btn .lang-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
}

/* ===========================
   LANGUAGE TOGGLE BUTTON
   =========================== */
.language-toggle {
    position: fixed;
    top: 220px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    color: var(--primary-blue);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.language-toggle:hover {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: var(--glow-blue);
    transform: scale(1.1);
}

.language-toggle i {
    font-size: 1.2rem;
}

#current-lang {
    font-size: 0.75rem;
    font-weight: 700;
}

/* ===========================
   RTL SUPPORT
   =========================== */
[dir="rtl"] {
    direction: rtl;
}

[dir="rtl"] body {
    font-family: 'Tajawal', 'Cairo', 'Arial', sans-serif;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

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

[dir="rtl"] .about-content {
    direction: rtl;
}

[dir="rtl"] .tech-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .tech-item:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .contact-item:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .footer-column a:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .sound-toggle,
[dir="rtl"] .theme-toggle,
[dir="rtl"] .language-toggle {
    right: auto;
    left: 30px;
}

[dir="rtl"] .share-fab {
    right: auto;
    left: 30px;
}

[dir="rtl"] .share-menu {
    right: auto;
    left: 0;
}

[dir="rtl"] .visitor-counter {
    left: auto;
    right: 30px;
}

[dir="rtl"] .achievement-notification {
    right: auto;
    left: -400px;
}

[dir="rtl"] .achievement-notification.show {
    right: auto;
    left: 30px;
}

/* ===========================
   LANGUAGE CONTENT VISIBILITY
   =========================== */
.lang-ar,
.lang-en {
    display: none;
}

body.lang-ar .lang-ar {
    display: block;
}

body.lang-ar .lang-en {
    display: none;
}

body.lang-en .lang-en {
    display: block;
}

body.lang-en .lang-ar {
    display: none;
}

/* Inline language spans */
span.lang-ar,
span.lang-en {
    display: inline;
}

body.lang-ar span.lang-ar {
    display: inline;
}

body.lang-ar span.lang-en {
    display: none;
}

body.lang-en span.lang-en {
    display: inline;
}

body.lang-en span.lang-ar {
    display: none;
}

/* ===========================
   ARABIC FONT SUPPORT
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&family=Cairo:wght@400;600;700;900&display=swap');

body.lang-ar {
    font-family: 'Tajawal', 'Cairo', sans-serif;
}

body.lang-ar h1,
body.lang-ar h2,
body.lang-ar h3,
body.lang-ar h4,
body.lang-ar h5,
body.lang-ar h6 {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-weight: 700;
}

/* ===========================
   RESPONSIVE LANGUAGE MODAL
   =========================== */
@media (max-width: 768px) {
    .language-modal-content {
        padding: 2rem;
    }
    
    .language-modal-content h2 {
        font-size: 1.5rem;
    }
    
    .language-options {
        grid-template-columns: 1fr;
    }
    
    .lang-btn {
        padding: 1.5rem 1rem;
    }
    
    .lang-btn .flag {
        font-size: 2.5rem;
    }
    
    .lang-btn .lang-name {
        font-size: 1.1rem;
    }
    
    .language-toggle {
        width: 45px;
        height: 45px;
        top: 190px;
    }
}

@media (max-width: 480px) {
    .language-modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .language-modal-content h2 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
}

/* Service card icon helpers */
.service-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.service-icon .card-icon {
    width: 48px;
    height: 48px;
    display: block;
}

/* Note: removed legacy small-badge .portfolio-icon rules (they conflicted with
   the full-card image behavior). The active .portfolio-icon rules earlier in
   the file position the image to fill the card (object-fit: cover).
*/