/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Base Colors - Light Theme */
    --primary-bg: #FFFFFF;
    --secondary-bg: #F8F9FA;
    --tertiary-bg: #F3F4F6;

    /* Text Hierarchy */
    --text-primary: #1A1B1C;
    --text-secondary: #4A5568;
    --text-tertiary: #718096;
    --text-muted: #A0AEC0;

    /* Brand Accents */
    --accent-purple: #9747FF;
    --accent-teal: #4ECDC4;
    --accent-coral: #FF6B6B;
    --accent-yellow: #FFC857;
    --accent-blue: #45B7D1;
    --accent-green: #2ECC71;
    --accent-pink: #E91E63;
    --accent-orange: #FF6B35;

    /* Border Colors */
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;
    --border-dark: #9CA3AF;

    /* Shadow System */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

    /* Colored Shadows */
    --shadow-purple: 0 10px 30px -5px rgba(151, 71, 255, 0.15);
    --shadow-teal: 0 10px 30px -5px rgba(78, 205, 196, 0.15);
    --shadow-coral: 0 10px 30px -5px rgba(255, 107, 107, 0.15);

    /* Gradient System */
    --gradient-hero: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 50%, #F3F4F6 100%);
    --gradient-section: linear-gradient(180deg, #FFFFFF 0%, #F8F9FA 100%);
    --gradient-purple: linear-gradient(135deg, #9747FF 0%, #7C3AED 100%);
    --gradient-teal: linear-gradient(135deg, #4ECDC4 0%, #45B7D1 100%);
    --gradient-coral: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    --gradient-rainbow: linear-gradient(135deg, #9747FF 0%, #4ECDC4 50%, #FF6B6B 100%);

    /* Legacy Variables for Compatibility */
    --primary-dark: #FFFFFF;
    --secondary-dark: #F8F9FA;
    --card-bg: #FFFFFF;
    --border-color: #E5E7EB;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--primary-bg);
    overflow-x: hidden;
}

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

.portfolio-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

/* RNO1-Style Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--primary-dark);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
}

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

.nav-logo .logo {
    height: 40px;
}

.logo-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.logo-text:hover {
    color: var(--accent-purple);
    transform: scale(1.05);
}

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

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-purple);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-secondary);
    margin: 4px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-dark);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(78, 205, 196, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(30, 136, 168, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, 
            rgba(10, 74, 92, 0.05) 0%, 
            rgba(30, 136, 168, 0.03) 50%, 
            rgba(78, 205, 196, 0.05) 100%
        );
    background-size: 100% 100%, 100% 100%, 100% 100%;
    animation: backgroundShift 20s ease-in-out infinite;
}

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

/* Tech Grid Overlay */
.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(78, 205, 196, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(78, 205, 196, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridPulse 4s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

/* Particle System Container */
.particle-system {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Floating Code Elements */
.code-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.code-element {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(78, 205, 196, 0.3);
    animation: float 15s linear infinite;
    opacity: 0;
}

@keyframes float {
    0% { 
        transform: translateY(100vh) translateX(-50px);
        opacity: 0;
    }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { 
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* Circuit Paths */
.circuit-paths {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.15;
}

.circuit-path {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(78, 205, 196, 0.8), transparent);
    height: 1px;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.1; 
        transform: scaleX(0.8);
    }
    50% { 
        opacity: 0.8; 
        transform: scaleX(1.2);
    }
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 1000px;
    padding: 0 20px;
    margin: 0 auto;
}

.hero-quote {
    font-size: clamp(2rem, 4.5vw, 4rem);
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 32px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-quote.typing {
    overflow: hidden;
    border-right: 3px solid var(--accent-purple);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent-purple); }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out 2s forwards;
    position: relative;
}

.hero-subtitle::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
    animation: lineGrow 2s ease-out 3s forwards;
}

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

@keyframes lineGrow {
    to { width: 100px; }
}

/* Enhanced text effects */
.hero-content .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: wordReveal 0.8s ease-out forwards;
    margin-right: 0.3em;
}

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

/* Improved subtitle animation */
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out forwards;
    position: relative;
}

/* Glitch effect for hover */
.hero-quote:hover {
    animation: textShimmer 3s ease-in-out infinite, glitch 0.3s ease-in-out;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Modern Portfolio Showcase */
.portfolio-showcase {
    padding: 120px 0;
    background: var(--primary-dark);
    position: relative;
    overflow: hidden;
}

.showcase-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    letter-spacing: 0.03em;
}

/* RNO1-Inspired Portfolio Grid - 2x2 Layout matching Work page */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 64px;
    margin: 0 auto;
    align-items: start;
    max-width: 1300px;
}

/* Clean RNO1-Inspired Card Design */
.project-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    transform-origin: center;
    min-height: 350px;
    aspect-ratio: 3/2;
    width: 100%;
}

/* All cards have equal size in 2x2 grid */

/* Simplified Card Background */
.card-background {
    display: none;
}

/* Enhanced Image Container */
.project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(1) saturate(1.1) contrast(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.02) 70%,
        rgba(0, 0, 0, 0.1) 90%,
        rgba(0, 0, 0, 0.2) 100%
    );
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    pointer-events: none;
}

/* Clean Content Layout */
.project-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 20px;
    z-index: 4;
    color: #ffffff;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0.3) 70%,
        transparent 100%
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.project-category {
    margin-bottom: 8px;
    opacity: 0.9;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
}

.category-tag {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.project-title {
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(0, 0, 0, 0.8),
        0 4px 16px rgba(0, 0, 0, 0.5);
    transform: translateY(15px);
    transition: all 0.3s ease;
    line-height: 1.2;
}

.project-subtitle {
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: #e0e0e0;
    text-shadow: 
        0 1px 4px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(0, 0, 0, 0.6);
    transform: translateY(15px);
    transition: all 0.3s ease;
    opacity: 0.95;
}

.project-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s ease 0.2s;
}

.service-tag {
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 400;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.project-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s ease 0.25s;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.cta-text {
    position: relative;
}

.cta-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.cta-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Category-Based Color Themes */
.project-card[data-category="ecommerce"]:hover .image-overlay {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 50%,
        rgba(147, 51, 234, 0.05) 65%,
        rgba(0, 0, 0, 0.1) 85%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

.project-card[data-category="photography"]:hover .image-overlay {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 50%,
        rgba(59, 130, 246, 0.05) 65%,
        rgba(0, 0, 0, 0.1) 85%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

.project-card[data-category="digital"]:hover .image-overlay {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 50%,
        rgba(20, 184, 166, 0.05) 65%,
        rgba(0, 0, 0, 0.1) 85%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

.project-card[data-category="retail"]:hover .image-overlay {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 50%,
        rgba(249, 115, 22, 0.05) 65%,
        rgba(0, 0, 0, 0.1) 85%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

.project-card[data-category="community"]:hover .image-overlay {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 50%,
        rgba(34, 197, 94, 0.05) 65%,
        rgba(0, 0, 0, 0.1) 85%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

/* Subtle RNO1-Style Hover Effects */
.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-purple);
}

.project-card:hover .card-background {
    animation-duration: 3s;
    background-size: 150% 150%;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
    filter: brightness(1.1) saturate(1.2) contrast(1.1);
}

.project-card:hover .image-overlay {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.05) 65%,
        rgba(0, 0, 0, 0.15) 85%,
        rgba(0, 0, 0, 0.25) 100%
    );
}

.project-card:hover .project-content {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    /* Stronger background overlay for better text readability */
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 60%,
        transparent 100%
    );
}

/* Also show on focus for keyboard navigation */
.project-card:focus .project-content,
.project-card:focus-within .project-content {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* For touch devices - show content on tap */
@media (hover: none) and (pointer: coarse) {
    .project-card.show-info .project-content {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        /* Stronger background overlay for better text readability */
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.4) 60%,
            transparent 100%
        );
    }
    
    /* Add a subtle indicator for mobile users */
    .project-card:not(.show-info)::after {
        content: 'TAP FOR INFO';
        position: absolute;
        bottom: 10px;
        right: 10px;
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.1em;
        color: rgba(255, 255, 255, 0.5);
        background: rgba(0, 0, 0, 0.6);
        padding: 3px 6px;
        border-radius: 3px;
        z-index: 3;
        transition: opacity 0.3s ease;
    }
}

.project-card:hover .project-category {
    transform: translateY(0);
    opacity: 1;
}

.project-card:hover .project-title {
    transform: translateY(0);
}

.project-card:hover .project-subtitle {
    transform: translateY(0);
}

.project-card:hover .project-services {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover .project-cta {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover .cta-text::after {
    width: 100%;
}

.project-card:hover .cta-arrow {
    transform: translateX(8px);
}

/* Card Color Variations */
.project-card[data-category="ecommerce"] .card-background {
    background: linear-gradient(135deg, 
        rgba(78, 205, 196, 0.15) 0%, 
        rgba(30, 136, 168, 0.08) 50%, 
        rgba(10, 74, 92, 0.12) 100%
    );
}

.project-card[data-category="retail"] .card-background {
    background: linear-gradient(135deg, 
        rgba(10, 74, 92, 0.15) 0%, 
        rgba(44, 62, 80, 0.08) 50%, 
        rgba(52, 73, 94, 0.12) 100%
    );
}

.project-card[data-category="digital"] .card-background {
    background: linear-gradient(135deg, 
        rgba(241, 196, 15, 0.15) 0%, 
        rgba(243, 156, 18, 0.08) 50%, 
        rgba(230, 126, 34, 0.12) 100%
    );
}

.project-card[data-category="photography"] .card-background {
    background: linear-gradient(135deg, 
        rgba(233, 30, 99, 0.15) 0%, 
        rgba(173, 20, 87, 0.08) 50%, 
        rgba(136, 14, 79, 0.12) 100%
    );
}

.project-card[data-category="community"] .card-background {
    background: linear-gradient(135deg, 
        rgba(46, 204, 113, 0.15) 0%, 
        rgba(39, 174, 96, 0.08) 50%, 
        rgba(34, 153, 84, 0.12) 100%
    );
}

.project-card[data-category="placeholder"] .card-background {
    background: linear-gradient(135deg, 
        rgba(127, 140, 141, 0.08) 0%, 
        rgba(149, 165, 166, 0.05) 50%, 
        rgba(178, 190, 195, 0.08) 100%
    );
}

/* Staggered Animation on Load */
.project-card {
    opacity: 0;
    transform: translateY(40px);
    animation: cardReveal 0.8s ease-out forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes cardReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.003);
    }
}

/* Enhanced Focus States for Accessibility */
.project-card:focus {
    outline: none;
    transform: translateY(-8px) scale(1.01);
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 0 0 3px rgba(78, 205, 196, 0.3);
}

.project-card:focus .project-services,
.project-card:focus .project-cta {
    opacity: 1;
    transform: translateY(0);
}

/* Subtle Parallax Effect */
.project-card:hover .project-image img {
    transform: scale(1.1) translateY(-5px);
}

/* Advanced Micro-interactions */
.category-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.service-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* All project cards - minimize text overlay to show images better */
.project-card .project-content {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.5) 0%,
        transparent 25%
    );  /* Minimal gradient only at very bottom */
    padding: 8px 12px;  /* Very small padding */
    height: auto;

    /* Enhanced text shadow for better readability on all backgrounds */
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.8),
        0 2px 6px rgba(0, 0, 0, 0.4),
        0 0 12px rgba(0, 0, 0, 0.6);
}

/* Hide category badges by default on all cards */
.project-card .project-category {
    opacity: 0;
    display: none;  /* Completely hide to save space */
}

/* Slightly reduce text sizes for all cards */
.project-card .project-title {
    font-size: 1.2rem !important;  /* Slightly smaller than normal */
    margin-bottom: 2px;
}

.project-card .project-subtitle {
    font-size: 0.8rem !important;  /* Readable but compact */
    margin-bottom: 4px;
}

/* On hover - show everything normally for all cards */
.project-card:hover .project-category {
    display: block;
    opacity: 1;
}

.project-card:hover .project-title {
    font-size: clamp(1.1rem, 2.2vw, 1.6rem) !important;  /* Back to normal */
}

.project-card:hover .project-subtitle {
    font-size: 0.85rem !important;  /* Back to normal */
}

/* Craftsy Affairs Logo - Full Coverage */
.project-card[data-project="craftsy-affair"] .project-image img {
    object-fit: cover;
    object-position: center;
    padding: 0;
}

/* Sancha Logo Styling */
.project-card[data-project="sancha"] .project-image img {
    object-fit: cover;
    object-position: center;
}

/* Placeholder Tile Styling */
.project-card.placeholder .project-image {
    background: rgba(127, 140, 141, 0.1);
}

.placeholder-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(127, 140, 141, 0.05);
}

.placeholder-icon {
    font-size: 4rem;
    color: rgba(127, 140, 141, 0.3);
    font-weight: 300;
    line-height: 1;
}

.project-card.placeholder .category-tag {
    background: rgba(127, 140, 141, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.project-card.placeholder .service-tag {
    background: rgba(127, 140, 141, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

.project-card.placeholder:hover .placeholder-icon {
    color: rgba(127, 140, 141, 0.5);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: var(--secondary-dark);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.cta-section h2 {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.cta-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    letter-spacing: 0.02em;
}

.cta-button {
    padding: 16px 32px;
    background: var(--accent-purple);
    color: var(--text-primary);
    border: 1px solid var(--accent-purple);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: transparent;
    color: var(--accent-purple);
    transform: translateY(-2px);
}

/* CTA Cards Grid */
.cta-cards-grid {
    margin-top: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

/* CTA Card Base - Using Project Card Design Language */
.cta-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    min-height: 280px;
    opacity: 0;
    transform: translateY(20px);
}

.cta-card.primary {
    animation: cardReveal 0.6s ease-out 0.5s forwards;
}

.cta-card.secondary {
    animation: cardReveal 0.6s ease-out 0.7s forwards;
}

/* Card Backgrounds with Color Variants */
.card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* CTA Card Backgrounds Override */



/* Card Content */
.cta-card-content {
    padding: 32px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* Card Icons */
.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.card-icon .icon-svg {
    width: 100%;
    height: 100%;
}

.cta-card.primary .card-icon {
    color: var(--accent-purple);
}

.cta-card.secondary .card-icon {
    color: var(--accent-teal);
}

/* Card Typography */
.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Services Preview */
.services-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    flex-grow: 1;
}

.service-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 6px 0;
    border-left: 2px solid transparent;
    padding-left: 12px;
    transition: all 0.3s ease;
    position: relative;
}


.cta-card.secondary:hover .service-item {
    color: var(--text-primary);
    border-left-color: var(--accent-teal);
    transform: translateX(4px);
}

/* Card CTAs - Similar to Project Card CTAs */
.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    position: relative;
}

.cta-text {
    position: relative;
    transition: all 0.3s ease;
}

.cta-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    transition: width 0.3s ease;
}

.cta-card.primary .cta-text::after {
    background: var(--accent-purple);
}

.cta-card.secondary .cta-text::after {
    background: var(--accent-teal);
}

.cta-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 1.1rem;
}

/* Hover Effects - Matching Project Cards */
.cta-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.cta-card.primary:hover {
    border-color: rgba(151, 71, 255, 0.4);
}

.cta-card.secondary:hover {
    border-color: rgba(78, 205, 196, 0.4);
}


.cta-card.primary:hover {
    box-shadow:
        0 12px 40px rgba(151, 71, 255, 0.35),
        0 0 0 1px rgba(151, 71, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}


.cta-card.secondary:hover {
    box-shadow:
        0 12px 40px rgba(20, 184, 166, 0.3),
        0 0 0 1px rgba(20, 184, 166, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}


.cta-card:hover .card-icon {
    opacity: 1;
    transform: scale(1.1);
}

.cta-card:hover .card-cta {
    color: var(--text-primary);
}

.cta-card:hover .cta-text::after {
    width: 100%;
}

.cta-card:hover .cta-arrow {
    transform: translateX(6px);
}

/* Animations */
@keyframes expandLine {
    from { width: 0; }
    to { width: 200px; }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes subtlePulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

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

/* CTA Section Animated Backgrounds */
.cta-section {
    position: relative;
    overflow: hidden;
}





/* CTA Cards Responsive Design */
@media (max-width: 768px) {
    .cta-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 50px;
    }

    .cta-card {
        min-height: 240px;
    }

    .cta-card-content {
        padding: 24px 20px;
    }

    .card-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 16px;
    }

    .card-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .card-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .service-item {
        font-size: 0.85rem;
        padding: 4px 0;
    }

    .card-cta {
        font-size: 0.85rem;
    }

}

@media (max-width: 480px) {
    .cta-cards-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        margin-top: 40px;
        padding: 0 20px;
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar but keep functionality */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .cta-cards-grid::-webkit-scrollbar {
        display: none;
    }

    .cta-card {
        flex: 0 0 280px;
        scroll-snap-align: start;
        min-height: 220px;
    }

    .cta-card-content {
        padding: 20px 16px;
    }

    .card-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 12px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-description {
        font-size: 0.85rem;
    }

    .service-item {
        font-size: 0.8rem;
    }

}

/* Focus States for Accessibility */
.cta-card:focus {
    outline: 2px solid var(--accent-purple);
    outline-offset: 4px;
}

.cta-card:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 4px;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .cta-card:active {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    }

}

/* Location Section */
.location-section {
    padding: 100px 0;
    background: var(--primary-dark);
    color: var(--text-primary);
    border-top: 1px solid var(--border-color);
}

.location-section h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 50px;
    text-align: center;
}

.location-grid {
    max-width: 1400px;
    margin: 0 auto;
}

.location-card h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
}

.insight-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 8px 25px 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-purple) var(--secondary-dark);
    margin: 0 -8px;
    /* Ensure exactly 3 cards are visible */
    width: calc(100% - 100px); /* Account for scroll buttons */
}

.insight-grid::-webkit-scrollbar {
    height: 6px;
}

.insight-grid::-webkit-scrollbar-track {
    background: var(--secondary-dark);
    border-radius: 10px;
}

.insight-grid::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 10px;
}

.insight-grid::-webkit-scrollbar-thumb:hover {
    background: #b565ff;
}

.insight-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 10px;
}

.scroll-btn {
    background: var(--accent-purple);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 2;
}

.scroll-btn:hover {
    background: #b565ff;
    transform: scale(1.1);
}

.scroll-btn:active {
    transform: scale(0.95);
}

.insight-card {
    width: calc((100% - 32px) / 3); /* Exactly 3 cards with gaps */
    min-width: calc((100% - 32px) / 3);
    max-width: calc((100% - 32px) / 3);
    height: auto;
    min-height: 160px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
    text-align: center;
    position: relative;
    padding: 18px 14px;
    overflow: hidden;
    box-sizing: border-box;
}

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

.insight-card.yellow {
    background: var(--accent-yellow);
    color: var(--dark);
}

.insight-card.pink {
    background: var(--accent-pink);
    color: var(--white);
}

.insight-card.blue {
    background: var(--accent-blue);
    color: var(--text-primary);
}

.insight-card.purple {
    background: var(--accent-purple);
    color: var(--text-primary);
}

.insight-card.green {
    background: var(--accent-green);
    color: var(--text-primary);
}

.insight-card.gray {
    background: var(--accent-gray);
    color: var(--text-primary);
}

.insight-card.orange {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: var(--white);
}

.insight-card.teal {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    color: var(--white);
}

.insight-card.indigo {
    background: linear-gradient(135deg, #6610f2, #7c3aed);
    color: var(--white);
}

/* News & Insights Enhancements */
.insight-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.badge-news {
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-project {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.insight-card h4 {
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.3;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: center;
}

.insight-source {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 5px;
    font-weight: 500;
}

.insight-desc {
    font-size: 0.65rem;
    opacity: 0.7;
    margin: 5px 0 0 0;
    line-height: 1.2;
    display: none; /* Hidden by default, shown on larger cards */
}

/* Loading spinner for news */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    height: 160px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.loading-spinner::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid var(--accent-purple);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Footer */
.footer {
    background: var(--secondary-dark);
    color: var(--text-primary);
    padding: 50px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-logo .logo {
    height: 28px;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


.hero.reduced-motion .hero-background,
.hero.reduced-motion .tech-grid,
.hero.reduced-motion .code-elements,
.hero.reduced-motion .circuit-paths {
    animation: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .insight-card {
        min-width: 140px;
        height: 140px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 280px;
        flex-direction: column;
        background: rgba(21, 32, 43, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        text-align: left;
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        padding: 100px 40px 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        gap: 0;
    }

    .nav-menu li {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: 20px 0;
        font-size: 1.1rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.9);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        transition: all 0.3s ease;
        position: relative;
    }

    .nav-menu a:hover {
        color: var(--accent-teal);
        padding-left: 20px;
        transform: translateX(10px);
    }

    .nav-menu a:before {
        content: '';
        position: absolute;
        left: -40px;
        top: 50%;
        width: 0;
        height: 2px;
        background: var(--accent-teal);
        transition: width 0.3s ease;
        transform: translateY(-50%);
    }

    .nav-menu a:hover:before {
        width: 30px;
    }

    .nav-menu.active {
        right: 0;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
        position: relative;
    }

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

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

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

    /* Mobile menu backdrop */
    .nav-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

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

    .hero-quote {
        font-size: 2rem;
        line-height: 1.3;
        max-width: 100%;
    }

    /* Mobile animation optimizations */
    .tech-grid {
        background-size: 30px 30px;
        opacity: 0.15;
    }

    .code-element {
        font-size: 10px;
    }

    .circuit-path {
        opacity: 0.1;
    }

    .particle-system canvas {
        opacity: 0.7;
    }

    /* Reduce animation intensity on mobile */
    .hero-background {
        animation-duration: 30s;
    }

    /* Portfolio Showcase Mobile */
    .portfolio-showcase {
        padding: 80px 0;
    }
    
    .showcase-header {
        margin-bottom: 60px;
    }
    
    .section-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .section-subtitle {
        font-size: 1rem;
        padding: 0 20px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 20px;
        grid-auto-rows: auto;
        max-width: 90vw;
        margin: 0 auto;
    }

    .project-card.featured {
        grid-column: span 1;
        grid-row: span 1;
    }

    .project-card.tall {
        grid-row: span 1;
    }

    .project-content {
        padding: 20px;
    }
    
    .project-card {
        min-height: 267px;
        max-width: 400px;
        margin: 0 auto;
    }

    .project-title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
    }

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

    .project-services {
        margin-bottom: 20px;
    }

    .service-tag {
        font-size: 0.7rem;
        padding: 3px 10px;
    }

    /* Optimize hover effects for mobile */
    .project-card:hover {
        transform: translateY(-6px) scale(1.01);
        box-shadow: 
            0 12px 40px rgba(0, 0, 0, 0.12),
            0 4px 16px rgba(0, 0, 0, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.95);
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    .location-section h2 {
        font-size: 2rem;
    }

    .insight-container {
        gap: 15px;
        padding: 0 5px;
    }

    .insight-grid {
        gap: 12px;
        padding: 10px 6px 20px 6px;
        margin: 0 -6px;
        width: calc(100% - 80px);
    }

    .insight-card {
        width: calc((100% - 24px) / 3);
        min-width: calc((100% - 24px) / 3);
        max-width: calc((100% - 24px) / 3);
        min-height: 140px;
        font-size: 0.9rem;
        padding: 15px 12px;
    }

    .insight-card h4 {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    .scroll-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        text-align: center;
    }

    .footer-links a {
        font-size: 0.85rem;
    }
}

/* Additional performance optimizations */
@media (max-width: 480px) {
    .location-section h2 {
        font-size: 1.8rem;
        margin-bottom: 40px;
        padding: 0 15px;
    }

    .insight-container {
        gap: 12px;
        padding: 0 3px;
    }

    .insight-grid {
        gap: 10px;
        padding: 8px 4px 18px 4px;
        margin: 0 -4px;
        width: calc(100% - 70px);
    }

    .insight-card {
        width: calc((100% - 20px) / 3);
        min-width: calc((100% - 20px) / 3);
        max-width: calc((100% - 20px) / 3);
        min-height: 120px;
        font-size: 0.8rem;
        padding: 12px 8px;
    }

    .insight-card h4 {
        font-size: 0.75rem;
        line-height: 1.1;
    }

    .scroll-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .footer {
        padding: 40px 15px 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    .footer-links a {
        font-size: 0.9rem;
        padding: 5px 0;
    }

    .footer-bottom {
        font-size: 0.8rem;
        padding-top: 15px;
    }

    .particle-system {
        display: none;
    }
    
    .code-elements {
        opacity: 0.5;
    }
    
    .circuit-paths {
        opacity: 0.1;
    }
    
    /* Ultra-mobile optimizations for portfolio */
    .portfolio-showcase {
        padding: 60px 0;
    }
    
    .showcase-header {
        margin-bottom: 40px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 16px;
        grid-auto-rows: auto;
        max-width: 95vw;
        margin: 0 auto;
    }
    
    .project-content {
        padding: 18px;
    }
    
    .project-card {
        min-height: 253px;
        max-width: 380px;
        margin: 0 auto;
    }
    
    .project-title {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }
    
    .project-subtitle {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }
    
    .project-services {
        margin-bottom: 16px;
    }
    
    .service-tag {
        font-size: 0.65rem;
        padding: 2px 8px;
    }
    
    .category-tag {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
    
    .project-cta {
        font-size: 0.85rem;
    }
    
    /* Reduce animation intensity on small screens */
    .project-card:hover {
        transform: translateY(-4px);
        box-shadow: 
            0 8px 24px rgba(0, 0, 0, 0.10),
            0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    .project-card:hover .project-image img {
        transform: scale(1.05);
    }
}

/* Tablet landscape optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 48px;
        padding: 0 28px;
        grid-auto-rows: 380px;
    }
    
    .project-card.featured {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .project-card.tall {
        grid-row: span 1;
    }
    
    .project-content {
        padding: 28px;
    }
}

/* Large desktop optimizations */
@media (min-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 56px;
        max-width: 1000px;
    }
    
    .portfolio-container {
        padding: 0 60px;
    }
}

@media (min-width: 1400px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 60px;
        max-width: 1200px;
    }
    
    .portfolio-container {
        padding: 0 80px;
    }
    
    .project-title {
        font-size: 2.2rem;
    }
    
    .project-subtitle {
        font-size: 1.1rem;
    }
}

@media (min-width: 1600px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 64px;
        max-width: 1300px;
    }
    
    .portfolio-container {
        max-width: 1800px;
        padding: 0 100px;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }

    .nav-container {
        max-width: 1400px;
        padding: 0 60px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 80px;
        max-width: 1600px;
    }

    .portfolio-container {
        max-width: 2400px;
        padding: 0 120px;
    }

    .hero-content {
        max-width: 1100px;
    }

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

    .section-title {
        font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    }

    .portfolio-showcase {
        padding: 140px 0;
    }

    .cta-section {
        padding: 120px 0;
    }

    .location-section {
        padding: 120px 0;
    }
}

/* Ultra-Wide Screens (2560px+) */
@media (min-width: 2560px) {
    .container {
        max-width: 1600px;
    }

    .nav-container {
        max-width: 1600px;
        padding: 0 80px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 100px;
        max-width: 2000px;
    }

    .portfolio-container {
        max-width: 2800px;
        padding: 0 140px;
    }

    .hero-content {
        max-width: 1200px;
    }

    .hero-quote {
        font-size: clamp(3rem, 5.5vw, 5rem);
    }

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

    .portfolio-showcase {
        padding: 160px 0;
    }

    .cta-section {
        padding: 140px 0;
    }

    .location-section {
        padding: 140px 0;
    }

    .cta-cards-grid {
        max-width: 1200px;
        gap: 60px;
    }

    .project-card {
        min-height: 380px;
    }

    .insight-grid {
        gap: 24px;
        width: calc(100% - 140px);
    }

    .insight-card {
        width: calc((100% - 48px) / 3);
        min-width: calc((100% - 48px) / 3);
        max-width: calc((100% - 48px) / 3);
        min-height: 200px;
        font-size: 1.2rem;
    }
}

/* News & Insights responsive layout */
@media (min-width: 1200px) {
    .location-grid {
        max-width: 1600px;
    }
}

@media (min-width: 1400px) {
    .location-grid {
        max-width: 1800px;
    }

    .insight-grid {
        gap: 20px;
        width: calc(100% - 120px);
    }

    .insight-card {
        width: calc((100% - 40px) / 3);
        min-width: calc((100% - 40px) / 3);
        max-width: calc((100% - 40px) / 3);
        min-height: 180px;
        font-size: 1.15rem;
    }
}

@media (min-width: 1600px) {
    .location-grid {
        max-width: 2000px;
    }

    .insight-card {
        min-width: 200px;
        height: 200px;
    }
}

/* High refresh rate display optimization */
@media screen and (min-resolution: 120dpi) {
    .hero-background,
    .tech-grid,
    .circuit-paths {
        will-change: transform, opacity;
        transform: translateZ(0);
    }
}

/* ==============================================================
   NEW LIGHT THEME COMPONENT LIBRARY
   ============================================================== */

/* Card Components */
.card-base {
    background: var(--primary-bg);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 32px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-base::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: var(--gradient-rainbow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box,
                  linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.card-base:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.card-primary {
    background: var(--primary-bg);
    box-shadow: var(--shadow-sm);
}

.card-secondary {
    background: var(--secondary-bg);
    box-shadow: var(--shadow-md);
}

.card-featured {
    background: var(--gradient-section);
    border: 2px solid var(--accent-purple);
    box-shadow: var(--shadow-purple);
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-purple);
    color: #FFFFFF;
    box-shadow: var(--shadow-purple);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--primary-bg);
    color: var(--accent-purple);
    border: 2px solid var(--accent-purple);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--accent-purple);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: var(--shadow-purple);
}

.btn-text {
    background: transparent;
    color: var(--accent-purple);
    padding: 8px 16px;
}

.btn-text:hover {
    background: var(--secondary-bg);
}

/* Magnetic button effect */
.btn-magnetic {
    will-change: transform;
}

/* Link CTA Component */
.link-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
}

.link-cta::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-purple);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.link-cta svg,
.link-cta .arrow-icon {
    transition: transform 0.3s ease;
}

.link-cta:hover svg,
.link-cta:hover .arrow-icon {
    transform: translateX(4px);
}

/* Section Header Component */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-purple);
    margin-bottom: 12px;
    padding: 6px 16px;
    background: rgba(151, 71, 255, 0.1);
    border-radius: 20px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Stat Card Component */
.stat-card {
    background: var(--primary-bg);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-purple);
    border-color: var(--accent-purple);
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-purple);
    line-height: 1;
    margin-bottom: 12px;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card.featured {
    background: var(--gradient-section);
    border-color: var(--accent-teal);
}

.stat-card.featured:hover {
    box-shadow: var(--shadow-teal);
}

/* Image Container Component */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-container:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

/* Utility Classes for Interactions */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .btn-magnetic {
        will-change: auto;
    }
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 4px;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .link-cta {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}