/* 
   Alexander Santiago - Professional Portfolio
   Mobile-First Responsive Design - Optimized for iPhone
   Modern Photo Blend Hero Design with iPhone Safe Area Support
   Sunset-Inspired Color Palette with Cialdini Persuasion Principles
*/

/* ========================================
   CSS VARIABLES - Mobile-First Approach
   ======================================== */
:root {
    /* Color Palette - Sunset Dusk Theme */
    --accent-gradient-start: #9b8bff;
    --accent-gradient-end: #6ee7ff;
    --accent-primary: #8b5cf6;
    --accent-secondary: #22d3ee;
    --accent-glow: #6366f1;
    
    /* Background Colors */
    --bg-dark: #0e0f13;
    --bg-darker: #0a0b0f;
    --bg-card: #1a1b24;
    --bg-hover: #242530;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-accent: #9b8bff;
    
    /* Dark Mode Support */
    --bg-light: #ffffff;
    --bg-light-card: #f8fafc;
    --text-dark: #1a1a1a;
    --text-dark-secondary: rgba(26, 26, 26, 0.8);
    
    /* Gradients */
    --gradient-accent: linear-gradient(135deg, #9b8bff 0%, #6ee7ff 100%);
    --gradient-hero: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, #0f1016 100%);
    --gradient-card: linear-gradient(135deg, rgba(155, 139, 255, 0.1) 0%, rgba(110, 231, 255, 0.1) 100%);
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-light: #e5e7eb;
    --gray-medium: #9ca3af;
    --gray-dark: #4b5563;
    
    /* Typography - Mobile-First Fluid Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Fluid Typography using clamp() for mobile-first scaling */
    --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --font-size-base: clamp(1rem, 1.2vw + 0.4rem, 1.2rem); /* Paragraphs */
    --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --font-size-2xl: clamp(1.4rem, 2vw + 0.6rem, 2.2rem); /* H2 */
    --font-size-3xl: clamp(1.8rem, 3vw + 1rem, 3rem); /* H1 */
    --font-size-4xl: clamp(1.8rem, 3vw + 1rem, 3rem); /* Large H1 */
    --font-size-button: clamp(0.9rem, 1vw + 0.5rem, 1.1rem); /* Buttons */
    
    /* Spacing - Compact Mobile-First Design */
    --spacing-xs: clamp(0.25rem, 0.3rem + 0.5vw, 0.5rem);
    --spacing-sm: clamp(0.5rem, 0.5rem + 1vw, 1rem);
    --spacing-md: clamp(1rem, 3vw, 2rem); /* Section padding */
    --spacing-lg: clamp(1.5rem, 1rem + 2.5vw, 3rem);
    --spacing-xl: clamp(2rem, 1.5rem + 5vw, 4rem);
    
    /* Enhanced iPhone Safe Area Support */
    --safe-area-top: env(safe-area-inset-top, 0);
    --safe-area-right: env(safe-area-inset-right, 0);
    --safe-area-bottom: env(safe-area-inset-bottom, 0);
    --safe-area-left: env(safe-area-inset-left, 0);
    
    /* Dynamic safe area padding for notch/dynamic island */
    --safe-padding-top: max(env(safe-area-inset-top), 1rem);
    --safe-padding-bottom: max(env(safe-area-inset-bottom), 1rem);
    --safe-padding-horizontal: max(env(safe-area-inset-left), env(safe-area-inset-right), 1rem);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(155, 139, 255, 0.3);
    
    /* Smooth 60fps Transitions */
    --transition-fast: 150ms ease-out;
    --transition-normal: 300ms ease-out;
    --transition-slow: 500ms ease-out;
    --transition-smooth: transform 0.3s ease-out, opacity 0.3s ease-out;
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
    :root {
        --bg-dark: var(--bg-light);
        --bg-darker: #f1f5f9;
        --bg-card: var(--bg-light-card);
        --bg-hover: #f1f5f9;
        --text-primary: var(--text-dark);
        --text-secondary: var(--text-dark-secondary);
        --text-muted: rgba(26, 26, 26, 0.6);
        --gradient-hero: linear-gradient(to bottom, rgba(255,255,255,0.8) 0%, #f8fafc 100%);
    }
}

/* Dark Mode Toggle Class */
.dark-mode {
    --bg-dark: #0e0f13;
    --bg-darker: #0a0b0f;
    --bg-card: #1a1b24;
    --bg-hover: #242530;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --gradient-hero: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, #0f1016 100%);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Prevent horizontal scroll on mobile */
    overflow-x: hidden;
    /* Better text rendering on mobile */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-normal);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    /* iPhone Safe Area Support */
    padding-left: var(--safe-area-left);
    padding-right: var(--safe-area-right);
    /* Smooth transitions for dark mode */
    transition: background-color var(--transition-normal), color var(--transition-normal);
    /* Prevent content overflow on small screens */
    max-width: 100vw;
    box-sizing: border-box;
}

/* Improved focus styles for mobile accessibility */
*:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   GLOBAL TYPOGRAPHY - Mobile-First Responsive
   ======================================== */
h1 {
    font-size: clamp(1.8rem, 3vw + 1rem, 3rem);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h2 {
    font-size: clamp(1.4rem, 2vw + 0.6rem, 2.2rem);
    font-weight: var(--font-weight-semibold);
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: clamp(1.2rem, 1.5vw + 0.5rem, 1.8rem);
    font-weight: var(--font-weight-semibold);
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
}

p {
    font-size: clamp(1rem, 1.2vw + 0.4rem, 1.2rem);
    line-height: 1.6;
    margin-bottom: var(--spacing-xs);
}

/* Button Typography */
button,
.btn,
.cta-button,
.nav-link.cta-button,
input[type="submit"],
input[type="button"] {
    font-size: clamp(0.9rem, 1vw + 0.5rem, 1.1rem) !important;
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
}

/* ========================================
   CONTENT CONTAINERS - iPhone Optimized
   ======================================== */
.content-container,
.hero-blend-container,
.section-container,
.portfolio-grid,
.nav-container {
    max-width: min(90vw, 1200px);
    margin: 0 auto;
    padding-left: clamp(1rem, 5vw, 2rem);
    padding-right: clamp(1rem, 5vw, 2rem);
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Specific iPhone breakpoint optimizations */
@media (max-width: 480px) {
    .content-container,
    .hero-blend-container,
    .section-container {
        max-width: 95vw;
        padding-left: clamp(0.75rem, 4vw, 1.5rem);
        padding-right: clamp(0.75rem, 4vw, 1.5rem);
    }
}

/* ========================================
   DARK MODE TOGGLE BUTTON
   ======================================== */
.dark-mode-toggle {
    position: fixed;
    top: calc(var(--safe-area-top) + 1rem);
    right: calc(var(--safe-area-right) + 1rem);
    z-index: 1000;
    background: var(--gradient-accent);
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: clamp(0.9rem, 1vw + 0.5rem, 1.1rem); /* Button sizing */
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-md);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.dark-mode-toggle:active {
    transform: scale(0.95);
}

/* ========================================
   SAFE AREA SUPPORT FOR IPHONE NOTCH
   ======================================== */
.safe-area-header {
    position: relative;
    /* Enhanced safe area padding for notch/dynamic island */
    padding-top: var(--safe-padding-top);
    padding-left: max(env(safe-area-inset-left), 1rem);
    padding-right: max(env(safe-area-inset-right), 1rem);
    /* Smooth height transitions for dynamic island */
    transition: padding-top 0.3s ease;
}

/* ========================================
   NAVIGATION BAR - Mobile-First with Safe Areas
   ======================================== */
.navbar {
    position: relative; /* Changed from fixed - now inside safe-area-header */
    background-color: transparent; /* Let safe-area-header handle background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Remove top padding - now handled by safe-area-header */
    transition: var(--transition-normal);
    padding: clamp(0.5rem, 2vw, 1rem) 1rem;
    height: auto;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0; /* Remove padding - handled by navbar */
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    z-index: 1001;
}

.logo-text {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    text-decoration: none;
}

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

/* Mobile Hamburger Menu */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: var(--transition-normal);
}

.nav-toggle:focus {
    outline: 2px solid var(--accent-primary);
}

.nav-toggle-line {
    width: 2rem;
    height: 0.25rem;
    background: var(--text-primary);
    border-radius: 0.125rem;
    transition: var(--transition-normal);
    transform-origin: 1px;
}

.nav-toggle.active .nav-toggle-line:first-child {
    transform: rotate(45deg);
}

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

.nav-toggle.active .nav-toggle-line:nth-child(3) {
    transform: rotate(-45deg);
}

/* Mobile Navigation Links */
.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    list-style: none;
    transition: right var(--transition-normal);
    /* Safe area support for full screen menu */
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
}

.nav-links.active {
    right: 0;
}

.nav-links li {
    margin: var(--spacing-sm) 0;
}

.nav-link {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 0.5rem;
    transition: var(--transition-smooth);
    display: inline-block;
    /* Touch-friendly sizing */
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--gradient-card);
    transform: translateY(-2px);
}

.nav-link.cta-button {
    background: var(--gradient-accent);
    color: var(--white);
    font-weight: var(--font-weight-semibold);
    margin-top: var(--spacing-md);
}

.nav-link.cta-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-glow);
}

/* Hero Section Container with Safe Area */
.hero-safe-container {
    /* Add safe area padding for iPhone landscape */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    /* Prevent horizontal overflow */
    max-width: 100%;
    overflow-x: hidden;
}

/* ========================================
   HERO SECTION - Desktop Visual Polish
   ======================================== */

/* 1. HERO LAYOUT - Clean desktop centering */
.hero {
    min-height: 80vh;
    position: relative;
    background: var(--gradient-hero);
    overflow-x: hidden;
    padding-top: 2rem;
    padding-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop hero - Centered with reduced top padding */
@media (min-width: 1024px) {
    .hero {
        padding-top: 60px; /* Reduced from 90px for better centering */
        padding-bottom: 80px;
        min-height: 85vh;
        display: flex;
        align-items: center; /* Center the entire hero content */
        justify-content: center;
    }
}

/* Tablet hero - intermediate spacing */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero {
        padding-top: 4rem;
        min-height: 82vh;
    }
}

/* Mobile hero adjustments - No sticky navbar, add headroom */
@media (max-width: 767px) {
    .hero {
        min-height: auto;
        padding-top: 3rem;
        padding-bottom: 2rem;
    }
}

/* Extra small screens - ensure everything fits */
@media (max-width: 449px) {
    .hero {
        padding-top: 2rem;
        padding-bottom: 1.5rem;
    }
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    min-height: 0;
}

/* Desktop two-column layout - Clean grid alignment */
@media (min-width: 1024px) {
    .hero-container {
        flex-direction: row;
        text-align: left;
        gap: 32px; /* Standardized spacing scale */
        padding: 0 32px; /* Grid-aligned padding */
        align-items: flex-start; /* Align portrait with first line of heading */
        max-width: 1140px; /* Grid-aligned max-width */
        justify-content: center;
    }
    
    .hero-content {
        flex: 1;
        max-width: 560px; /* Limited text width as requested */
        order: 1;
    }
    
    .hero-photo {
        flex: 0 0 auto;
        order: 2;
        margin-top: 0; /* Align with first line of text */
    }
}

/* Tablet layout - intermediate */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-container {
        flex-direction: row;
        text-align: left;
        gap: 24px; /* Standardized spacing */
        padding: 0 24px;
        align-items: center;
    }
    
    .hero-content {
        flex: 1;
        order: 1;
    }
    
    .hero-photo {
        flex: 0 0 auto;
        order: 2;
    }
}

/* Mobile hero container - ensure everything fits in viewport */
@media (max-width: 767px) {
    .hero-container {
        gap: 1rem;
        padding: 0 16px; /* Standardized mobile padding */
        justify-content: flex-start;
    }
    
    .hero-photo {
        order: 1;
        margin-bottom: 0.5rem;
    }
    
    .hero-content {
        order: 2;
        width: 100%;
    }
}

/* 2. HERO IMAGE FIX - Reduced height, proper object-fit */
.hero-photo {
    position: relative;
}

.hero-image {
    width: 280px; /* Fixed width for consistency */
    height: 320px; /* Reduced height - shows full face without scrolling */
    object-fit: cover; /* Applied as requested */
    object-position: top; /* Keep top of head visible */
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: translateY(-5px); /* Subtle hover effect */
}

/* Mobile image adjustments */
@media (max-width: 767px) {
    .hero-image {
        width: 240px;
        height: 280px;
    }
}

/* 3. HERO TEXT - Enhanced hierarchy with proper sizing */
.hero-name {
    font-size: 2.75rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.3rem;
    line-height: 1.1;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    line-height: 1.4;
    max-width: 500px;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.5;
    max-width: 450px;
}

/* Desktop typography - Enhanced hierarchy and proper sizing */
@media (min-width: 1024px) {
    .hero-name {
        font-size: 3.5rem; /* Increased for proper hierarchy */
        font-weight: 800; /* Increased weight */
        margin-bottom: 16px; /* Grid-aligned spacing */
        line-height: 1.05;
    }
    
    .hero-title {
        font-size: 1.75rem; /* Increased */
        font-weight: 600; /* Increased weight */
        margin-bottom: 16px;
        line-height: 1.2;
    }
    
    .hero-tagline {
        font-size: 1.2rem; /* Slightly reduced body text */
        margin-bottom: 16px;
        line-height: 1.4;
        max-width: 520px; /* Limited width as requested */
    }
    
    .hero-subtitle {
        font-size: 1rem; /* Reduced body text */
        margin-bottom: 24px; /* Grid-aligned spacing */
        line-height: 1.5;
        max-width: 480px;
    }
}

/* Mobile font scaling for screens < 768px */
@media (max-width: 767px) {
    .hero-name {
        font-size: 2.25rem;
        margin-bottom: 0.25rem; /* Reduced */
    }
    
    .hero-title {
        font-size: 1.25rem;
        margin-bottom: 0.3rem; /* Reduced */
    }
    
    .hero-tagline {
        font-size: 1.1rem;
        margin-bottom: 0.25rem; /* Reduced */
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 0.4rem; /* Reduced */
    }
}

/* Extra responsive scaling for screens < 430px */
@media (max-width: 429px) {
    .hero-name {
        font-size: 1.9rem; /* Reduced by ~15% */
        line-height: 1.05;
    }
    
    .hero-title {
        font-size: 1.1rem; /* Reduced by ~15% */
        line-height: 1.25;
    }
    
    .hero-tagline {
        font-size: 0.95rem; /* Reduced by ~15% */
        line-height: 1.35;
    }
    
    .hero-subtitle {
        font-size: 0.85rem; /* Reduced by ~15% */
        line-height: 1.4;
    }
}

/* 4. BUILDING BADGE & BUTTONS - Standardized with grid spacing */
.building-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(155, 139, 255, 0.1);
    border: 1px solid rgba(155, 139, 255, 0.2);
    border-radius: 25px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    max-width: 100%;
    text-align: center;
}

/* Desktop building badge - Grid aligned */
@media (min-width: 1024px) {
    .building-badge {
        font-size: 0.9rem;
        padding: 8px 16px; /* Grid-aligned padding */
        margin-bottom: 24px; /* Grid spacing */
        border-radius: 30px;
    }
}

@media (max-width: 429px) {
    .building-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.5rem;
    }
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

/* Desktop button layout - Standardized 48px height */
@media (min-width: 1024px) {
    .hero-buttons {
        justify-content: flex-start;
        flex-direction: row;
        gap: 16px; /* Grid-aligned spacing */
        width: auto;
        margin-bottom: 32px; /* Grid spacing */
    }
}

/* Tablet button layout */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-buttons {
        justify-content: flex-start;
        flex-direction: row;
        width: auto;
        margin-bottom: 24px; /* Grid spacing */
    }
}

/* Mobile button layout - Ensure both buttons always visible */
@media (max-width: 767px) {
    .hero-buttons {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        width: 100%;
    }
}

/* STANDARDIZED BUTTON STYLES - 48px height across all buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-height: 44px;
    box-sizing: border-box;
    white-space: nowrap;
}

/* Desktop buttons - Standardized 48px height */
@media (min-width: 1024px) {
    .btn {
        padding: 12px 24px; /* Standardized padding for 48px height */
        font-size: 1rem;
        min-height: 48px; /* Standardized height */
        max-height: 48px;
        border-radius: 10px;
        font-weight: 500;
    }
}

/* Tablet button sizing */
@media (min-width: 768px) and (max-width: 1023px) {
    .btn {
        padding: 0.75rem 1.5rem;
        min-height: 46px;
    }
}

/* Mobile button sizing - Compact but always visible */
@media (max-width: 767px) {
    .btn {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-height: 40px;
        max-height: 40px;
    }
}

@media (max-width: 429px) {
    .btn {
        padding: 0.55rem 0.8rem;
        font-size: 0.85rem;
        min-height: 38px;
        max-height: 38px;
    }
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 12px rgba(155, 139, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(155, 139, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(155, 139, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(155, 139, 255, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Desktop button enhancements */
@media (min-width: 1024px) {
    .btn-primary {
        box-shadow: 0 6px 20px rgba(155, 139, 255, 0.25);
    }
    
    .btn-primary:hover {
        box-shadow: 0 8px 25px rgba(155, 139, 255, 0.35);
        transform: translateY(-3px);
    }
    
    .btn-secondary {
        border-width: 2px;
        backdrop-filter: blur(10px);
    }
    
    .btn-secondary:hover {
        background: rgba(155, 139, 255, 0.12);
        transform: translateY(-3px);
    }
}

/* Social links - Responsive spacing */
.hero-social {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Desktop social links - Clean spacing */
@media (min-width: 1024px) {
    .hero-social {
        justify-content: flex-start;
        gap: 1rem;
        margin-bottom: 0;
        margin-top: 1rem; /* Space from buttons */
    }
}

/* Tablet social links */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-social {
        justify-content: flex-start;
        gap: 0.85rem;
    }
}

@media (max-width: 767px) {
    .hero-social {
        gap: 0.4rem;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 429px) {
    .hero-social {
        gap: 0.3rem;
        margin-bottom: 0.25rem;
    }
}

@media (min-width: 768px) {
    .hero-social {
        justify-content: flex-start;
        gap: 1rem;
        margin-bottom: 1rem;
    }
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem; /* Smaller on mobile */
    transition: all 0.2s ease;
}

@media (max-width: 429px) {
    .social-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

.social-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

/* Status indicator - clean and minimal */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0;
}

/* Desktop status indicator */
@media (min-width: 1024px) {
    .status-indicator {
        justify-content: flex-start;
        font-size: 0.9rem;
        margin-top: 0.5rem; /* Small space from social links */
    }
}

/* Tablet status indicator */
@media (min-width: 768px) and (max-width: 1023px) {
    .status-indicator {
        justify-content: flex-start;
        font-size: 0.85rem;
    }
}

@media (max-width: 767px) {
    .status-indicator {
        font-size: 0.75rem;
        margin-bottom: 0;
    }
}

@media (max-width: 429px) {
    .status-indicator {
        font-size: 0.7rem;
    }
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* 5. GLOBAL MOBILE POLISH - Prevent overflow and center alignment */
body {
    overflow-x: hidden; /* Fix cards pushed off-screen */
    box-sizing: border-box;
}

* {
    box-sizing: border-box;
}

/* Mobile viewport optimization - ensure content fits */
@media (max-width: 767px) {
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Force content to fit in viewport */
    .hero {
        max-height: 100vh; /* Don't exceed viewport */
        overflow: visible; /* Allow natural flow */
    }
    
    .hero-container {
        max-height: none; /* Let content determine height */
        overflow: visible;
    }
}

/* Ensure all sections center properly on mobile */
@media (max-width: 767px) {
    section {
        padding: 2rem 0; /* Consistent section spacing */
        overflow-x: hidden;
    }
    
    .container,
    .hero-container,
    .portfolio-container {
        margin-left: auto;
        margin-right: auto;
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
    }
}

@media (max-width: 429px) {
    section {
        padding: 1.5rem 0;
    }
    
    .container,
    .hero-container,
    .portfolio-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Fix any negative margins or transforms causing horizontal scroll */
.project-card,
.blog-card,
.testimonial-card {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    transform: none;
}

@media (max-width: 767px) {
    .project-card,
    .blog-card,
    .testimonial-card {
        width: 100%;
        margin: 0 auto 1rem auto;
    }
}

/* Role styling for mobile */
.role-separator {
    color: var(--text-muted);
    margin: 0 0.5rem;
}

@media (max-width: 429px) {
    .role-separator {
        margin: 0 0.3rem;
    }
}

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

.building-icon {
    font-size: 1rem;
}

@media (max-width: 429px) {
    .building-icon {
        font-size: 0.9rem;
    }
}

.social-icon {
    font-size: 1.1rem;
}

@media (max-width: 429px) {
    .social-icon {
        font-size: 1rem;
    }
}

/* ========================================
   PARTICLE ANIMATION - Optional Enhancement
   ======================================== */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 40%;
    right: 20%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    bottom: 30%;
    left: 15%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    top: 60%;
    right: 10%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    bottom: 20%;
    right: 30%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

.hero-blend-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    /* Enhanced mobile padding that respects safe areas */
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 2;
    /* Ensure content doesn't overflow on small screens */
    min-width: 0;
}

/* Desktop Hero Adjustments */
@media (min-width: 768px) {
    .hero {
        min-height: 100vh;
        max-height: none;
        padding-top: calc(5rem + env(safe-area-inset-top));
    }
}

/* Hero Photo - Centered and Responsive */
.hero-photo-side {
    order: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.hero-main-photo {
    /* Responsive image with max-width 90% */
    max-width: min(90%, 300px);
    width: auto;
    height: auto;
    /* Aspect ratio to prevent layout shift */
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    /* Smooth loading transition */
    transition: var(--transition-smooth);
}

.hero-main-photo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.photo-gradient-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-accent);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.hero-photo-side:hover .photo-gradient-overlay {
    opacity: 0.2;
}

/* Hero Text Content */
.hero-text-side {
    order: 2;
    text-align: center;
    width: 100%;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-name {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-sm);
    /* Prevent layout shift */
    line-height: 1.2;
    /* Ensure visibility on all devices */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    /* iPhone-specific adjustments */
    max-width: 100%;
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
}

.hero-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.5;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Force immediate visibility for critical content */
.hero-title {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.hero-cta-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    align-items: center;
}

.hero-cta-group .btn-primary,
.hero-cta-group .btn-secondary {
    /* Touch-friendly button sizing */
    min-height: 44px;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-base);
    width: 100%;
    max-width: 280px;
}

.hero-social-links {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Particle Animation - Optimized for Mobile Performance */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.6;
    /* Use transform for 60fps animation instead of top/left */
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 40%;
    right: 20%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    bottom: 30%;
    left: 15%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    top: 60%;
    right: 10%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    bottom: 20%;
    right: 30%;
    animation-delay: 3s;
}

/* 60fps Float Animation using transform */
@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

/* ========================================
   CLEAN WEBTOON-LIKE RESPONSIVE DESIGN
   ======================================== */

/* Ensure all sections have proper mobile spacing */
section {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2rem);
    box-sizing: border-box;
}

/* Mobile-specific container adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 clamp(1rem, 4vw, 1.5rem);
    }
    
    section {
        padding: clamp(2rem, 6vw, 3rem) 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* Prevent horizontal scroll on all elements */
* {
    max-width: 100%;
    box-sizing: border-box;
}

img, video, iframe {
    max-width: 100% !important;
    height: auto !important;
}

/* Improve touch targets for mobile */
button, a, .btn, input, select, textarea {
    min-height: 44px;
}

/* Better text readability on mobile - DARK MODE FIXED */
@media (max-width: 768px) {
    body {
        font-size: clamp(1rem, 3.5vw, 1.2rem);
        line-height: 1.6;
        color: var(--text-primary) !important; /* Ensure dark mode text visibility */
    }
    
    h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
        line-height: 1.2;
        margin-bottom: 1rem;
        color: var(--text-primary) !important;
    }
    
    h2 {
        font-size: clamp(1.4rem, 5vw, 2rem) !important;
        line-height: 1.3;
        margin-bottom: 0.75rem;
        color: var(--text-primary) !important;
    }
    
    h3 {
        font-size: clamp(1.2rem, 4vw, 1.6rem) !important;
        line-height: 1.3;
        margin-bottom: 0.5rem;
        color: var(--text-primary) !important;
    }
    
    p {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem) !important;
        line-height: 1.6;
        margin-bottom: 1rem;
        color: var(--text-secondary) !important;
    }
}

/* Hero Photo - Centered and Responsive */
.hero-photo-side {
    order: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.hero-main-photo {
    /* Responsive image with max-width 90% */
    max-width: min(90%, 300px);
    width: auto;
    height: auto;
    /* Aspect ratio to prevent layout shift */
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    /* Smooth loading transition */
    transition: var(--transition-smooth);
}

.hero-main-photo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.photo-gradient-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-accent);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.hero-photo-side:hover .photo-gradient-overlay {
    opacity: 0.2;
}

/* Hero Text Content */
.hero-text-side {
    order: 2;
    text-align: center;
    width: 100%;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-name {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-sm);
    /* Prevent layout shift */
    line-height: 1.2;
    /* Ensure visibility on all devices */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    /* iPhone-specific adjustments */
    max-width: 100%;
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
}

/* ========================================
   RESPONSIVE DESIGN - iPhone Breakpoints
   ======================================== */

/* iPhone Mini and smaller (max-width: 390px) */
@media (max-width: 390px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1.25rem;
        --spacing-lg: 2rem;
    }
    
    .hero-main-photo {
        max-width: min(180px, 55vw) !important;
    }
    
    .btn {
        font-size: 0.9rem !important;
        padding: 0.6rem 1.2rem !important;
    }
    
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* iPhone Pro Max and larger phones (min-width: 391px and max-width: 428px) */
@media (min-width: 391px) and (max-width: 428px) {
    .hero-main-photo {
        max-width: min(90%, 320px);
    }
    
    .hero-cta-group {
        flex-direction: row;
        gap: var(--spacing-sm);
    }
    
    .hero-cta-group .btn-primary,
    .hero-cta-group .btn-secondary {
        width: auto;
        min-width: 140px;
    }
}

/* Large phones and small tablets (min-width: 429px and max-width: 820px) */
@media (min-width: 429px) and (max-width: 820px) {
    .nav-links {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        flex-direction: row;
        gap: var(--spacing-sm);
        padding: 0;
    }
    
    .nav-toggle {
        display: none;
    }
    
    .hero-blend-container {
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-xl);
    }
    
    .hero-photo-side {
        order: 2;
        flex: 0 0 auto;
    }
    
    .hero-text-side {
        order: 1;
        text-align: left;
        flex: 1;
    }
    
    .hero-cta-group {
        justify-content: flex-start;
        flex-direction: row;
    }
    
    .hero-social-links {
        justify-content: flex-start;
    }
}

/* Desktop and larger screens (min-width: 821px) */
@media (min-width: 821px) {
    .nav-links {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        flex-direction: row;
        gap: 2rem;
        padding: 0;
    }
    
    .nav-toggle {
        display: none;
    }
    
    .hero-blend-container {
        flex-direction: row;
        gap: var(--spacing-xl);
    }
    
    .hero-photo-side {
        order: 2;
        flex: 0 0 auto;
    }
    
    .hero-text-side {
        order: 1;
        text-align: left;
        flex: 1;
    }
    
    .hero-main-photo {
        max-width: min(90%, 400px);
    }
    
    .hero-cta-group {
        justify-content: flex-start;
        flex-direction: row;
    }
    
    .hero-social-links {
        justify-content: flex-start;
    }
}

/* ========================================
   BUTTONS - Touch-Friendly Mobile Design
   ======================================== */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    /* Touch-friendly sizing */
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

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

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

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

.btn-secondary:hover {
    background: var(--accent-primary);
    transform: translateY(-2px);
}

/* ========================================
   SCROLL ANIMATIONS - 60fps Optimized
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: var(--transition-smooth);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: var(--transition-smooth);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   UTILITY CLASSES - Mobile Optimized
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

.hidden-mobile {
    display: none;
}

.visible-mobile {
    display: block;
}

/* Show/hide utilities for larger screens */
@media (min-width: 429px) {
    .hidden-mobile {
        display: block;
    }
    
    .visible-mobile {
        display: none;
    }
}

/* Prevent horizontal scroll on mobile */
.overflow-hidden {
    overflow-x: hidden;
}

/* Touch-friendly spacing */
.touch-spacing {
    margin: var(--spacing-md) 0;
}

.touch-spacing > * + * {
    margin-top: var(--spacing-md);
}

/* ========================================
   HERO COMPONENTS - Mobile Optimized
   ======================================== */
.building-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--gradient-card);
    border: 1px solid rgba(155, 139, 255, 0.3);
    border-radius: 1rem;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.building-icon {
    font-size: var(--font-size-base);
}

.animated-tagline {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--text-accent);
    margin-bottom: var(--spacing-md);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

.role-separator {
    color: var(--text-muted);
    margin: 0 0.5rem;
}

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

.social-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    /* Touch-friendly sizing */
    min-height: 44px;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.social-icon {
    font-size: var(--font-size-lg);
}

/* ========================================
   ANIMATIONS - 60fps Optimized
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-secondary: rgba(255, 255, 255, 0.95);
        --text-muted: rgba(255, 255, 255, 0.8);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.8);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particle {
        animation: none;
    }
    
    .hero-particles {
        display: none;
    }
}

/* Focus indicators for keyboard navigation */
.nav-toggle:focus,
.dark-mode-toggle:focus {
    outline: 3px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */
/* GPU acceleration for smooth animations */
.hero-main-photo,
.nav-toggle,
.dark-mode-toggle,
.btn-primary,
.btn-secondary,
.social-link,
.nav-link {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Optimize painting */
.hero-particles,
.particle {
    contain: layout style paint;
}

/* Lazy loading placeholder */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: loading 1.4s ease infinite;
}

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

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

.logo-text {
    font-size: var(--font-size-xl); /* Use consistent variable */
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem; /* Reduced from 2rem for mobile compactness */
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
    padding: 0.5rem 1rem;
}

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

.nav-link.nav-social-button {
    background: rgba(155, 139, 255, 0.15);
    border: 1px solid rgba(155, 139, 255, 0.3);
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.nav-link.nav-social-button:hover {
    background: rgba(155, 139, 255, 0.25);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.nav-link.cta-button {
    background: var(--gradient-accent);
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
    color: var(--white);
}

.nav-link.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ========================================
   HERO SECTION - Photo Blend Design
   ======================================== */
.hero {
    margin-top: 70px;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
}

.hero-blend-container {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: stretch;
}

/* Left Side - Your Photo with Soft Fade */
.hero-photo-side {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.hero-main-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    /* Cinematic filter matching sunset tones */
    filter: saturate(1.15) contrast(1.05) brightness(0.85);
}

.photo-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient from transparent on left to dark on right */
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(15, 16, 22, 0.95) 100%
    );
}

/* Right Side - Text Content with Dark Background */
.hero-text-side {
    flex: 1;
    position: relative;
    background: linear-gradient(
        to right,
        rgba(15, 16, 22, 0.95) 0%,
        var(--bg-dark) 20%,
        var(--bg-dark) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3rem;
}

.hero-content {
    max-width: 600px;
    animation: fadeInUp 1s ease-out;
}

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

.hero-name {
    font-size: clamp(1rem, 1.2vw + 0.4rem, 1.2rem); /* Use paragraph sizing for subtitle */
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(1.8rem, 3vw + 1rem, 3rem); /* H1 sizing for main title */
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.role-separator {
    color: var(--text-muted);
    margin: 0 0.5rem;
}

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

.hero-tagline {
    font-size: clamp(1.4rem, 2vw + 0.6rem, 2.2rem); /* H2 sizing for tagline */
    font-weight: var(--font-weight-normal);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Hero Social Links */
.hero-social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(155, 139, 255, 0.1);
    border: 1px solid rgba(155, 139, 255, 0.3);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(155, 139, 255, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(155, 139, 255, 0.3);
}

.social-icon {
    font-size: 1.2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(155, 139, 255, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-gradient-start);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(155, 139, 255, 0.1);
    border-color: var(--accent-gradient-end);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(155, 139, 255, 0.3);
}

.availability-notice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(155, 139, 255, 0.1);
    border: 1px solid rgba(155, 139, 255, 0.2);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 1vw + 0.5rem, 1.1rem); /* Button sizing */
    animation: fadeInUp 1s ease-out 0.6s both;
}

.availability-icon {
    font-size: clamp(0.9rem, 1vw + 0.5rem, 1.1rem); /* Button sizing */
}

/* Responsive Design for Hero */
@media (max-width: 768px) {
    .hero-blend-container {
        flex-direction: column;
    }
    
    .hero-photo-side {
        flex: 0 0 45vh;
        min-height: 300px;
    }
    
    .hero-main-photo {
        object-position: center 20%;
    }
    
    .hero-text-side {
        flex: 1;
        padding: 2rem 1.5rem;
    }
    
    /* Font sizes now handled by clamp() - removed redundant overrides */
    
    .hero-cta-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-social-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .social-link {
        justify-content: center;
    }
    
    .hero-cta-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
    padding: 6rem 2rem;
    background: var(--bg-darker);
}

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

.about-photo-full {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    margin-bottom: 2rem;
    /* Apply cinematic purple-blue filter to match brand */
    filter: saturate(1.2) contrast(1.05) brightness(0.9) hue-rotate(-10deg);
    box-shadow: var(--shadow-lg);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: clamp(1.4rem, 2vw + 0.6rem, 2.2rem); /* H2 sizing */
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: clamp(1rem, 1.2vw + 0.4rem, 1.2rem); /* Paragraph sizing */
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-quote {
    font-style: italic;
    color: var(--text-accent);
    border-left: 3px solid var(--accent-gradient-start);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-size: clamp(1rem, 1.2vw + 0.4rem, 1.2rem); /* Paragraph sizing */
}

/* ========================================
   JOURNEY SECTION - GENUINE GROWTH STORY
   ======================================== */
.journey-section {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.genuine-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Smaller min-width */
    gap: 1rem; /* Reduced from 2rem for mobile */
    margin: 2rem 0 3rem; /* Reduced margins */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.genuine-stat {
    background: var(--bg-card);
    padding: 1.2rem; /* Reduced by 40% from 2rem */
    border-radius: 12px;
    border: 1px solid rgba(155, 139, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem; /* Slightly reduced gap */
}

.genuine-stat:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.stat-emoji {
    font-size: clamp(1.4rem, 2vw + 0.6rem, 2.2rem); /* H2 sizing for emojis */
    flex-shrink: 0;
    animation: float 3s ease-in-out infinite;
}

.genuine-stat p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: clamp(1rem, 1.2vw + 0.4rem, 1.2rem); /* Paragraph sizing */
}

/* Journey Timeline - Mobile-First Responsive */
.journey-timeline {
    max-width: 900px;
    margin: 4rem auto;
    position: relative;
    padding: 0 1rem; /* Add padding for mobile */
}

/* Mobile timeline adjustments */
@media (max-width: 767px) {
    .journey-timeline {
        margin: 2rem auto;
        padding: 0 0.5rem;
    }
    
    .journey-timeline::before {
        left: 50px !important; /* Force mobile alignment */
    }
}

@media (max-width: 429px) {
    .journey-timeline {
        margin: 1.5rem auto;
        padding: 0 0.25rem;
    }
    
    .journey-timeline::before {
        left: 40px !important;
    }
}

.journey-timeline::before {
    content: '';
    position: absolute;
    left: 100px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
}

.timeline-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    position: relative;
}

/* Mobile timeline item adjustments */
@media (max-width: 767px) {
    .timeline-item {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 429px) {
    .timeline-item {
        gap: 0.35rem;
        margin-bottom: 1rem;
    }
}

.timeline-year {
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    padding-top: 0.5rem;
    position: relative;
    flex-shrink: 0;
}

/* Mobile timeline year adjustments */
@media (max-width: 767px) {
    .timeline-year {
        width: 80px;
        gap: 0.3rem;
        padding-top: 0.3rem;
    }
}

@media (max-width: 429px) {
    .timeline-year {
        width: 70px;
        gap: 0.2rem;
        padding-top: 0.2rem;
    }
}

.timeline-emoji {
    font-size: 2.5rem;
    animation: float 3s ease-in-out infinite;
}

/* Mobile timeline emoji sizing */
@media (max-width: 767px) {
    .timeline-emoji {
        font-size: 2rem;
    }
}

@media (max-width: 429px) {
    .timeline-emoji {
        font-size: 1.5rem;
    }
}

.timeline-year-text {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--accent-gradient-start);
}

/* Mobile timeline year text sizing */
@media (max-width: 767px) {
    .timeline-year-text {
        font-size: 1rem;
    }
}

@media (max-width: 429px) {
    .timeline-year-text {
        font-size: 0.85rem;
    }
}

.timeline-year::after {
    content: '';
    position: absolute;
    right: -0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    animation: glow-pulse 2s ease-in-out infinite;
}

.timeline-content {
    flex: 1;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(155, 139, 255, 0.2);
    transition: all 0.3s ease;
}

.timeline-card {
    position: relative;
}

.timeline-card-active {
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.timeline-content:hover {
    transform: translateX(10px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.timeline-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.timeline-title {
    font-size: clamp(1.4rem, 2vw + 0.6rem, 2.2rem); /* H2 sizing */
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: var(--font-weight-semibold);
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-size: clamp(1rem, 1.2vw + 0.4rem, 1.2rem); /* Paragraph sizing */
}

.timeline-insight {
    background: rgba(155, 139, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-primary);
}

.timeline-insight strong {
    color: var(--accent-primary);
}

.timeline-result {
    background: rgba(34, 211, 238, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-secondary);
    color: var(--text-secondary);
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--accent-gradient-end);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: 1.25rem;
}

.timeline-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.timeline-btn {
    padding: 0.5rem 1.25rem;
    background: var(--gradient-accent);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    transition: all 0.3s ease;
}

.timeline-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(155, 139, 255, 0.4);
}

.timeline-btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.timeline-btn-secondary:hover {
    background: rgba(155, 139, 255, 0.1);
}

.timeline-lesson {
    background: rgba(255, 193, 7, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-left: 3px solid #ffc107;
    margin-bottom: 1rem;
}

.timeline-next {
    background: linear-gradient(135deg, rgba(155, 139, 255, 0.15), rgba(110, 231, 255, 0.15));
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border: 1px solid rgba(155, 139, 255, 0.3);
}

.timeline-next strong {
    color: var(--accent-primary);
}

/* Journey Quote */
.journey-quote {
    max-width: 800px;
    margin: 4rem auto 0;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(155, 139, 255, 0.1), rgba(110, 231, 255, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(155, 139, 255, 0.3);
}

.journey-quote p {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-style: italic;
    margin: 0;
    line-height: 1.6;
}

.pulse-text {
    animation: soft-pulse 3s ease-in-out infinite;
}

@keyframes soft-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

/* ========================================
   PORTFOLIO SECTION - Clean Webtoon-like Layout
   ======================================== */
.portfolio {
    padding: 6rem 2rem;
    background: var(--bg-dark);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 3vw + 1rem, 3rem);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-header .subtitle {
    font-size: clamp(1rem, 1.2vw + 0.4rem, 1.2rem);
    color: var(--text-secondary);
}

/* Fix section-subtitle color to match headers */
.section-subtitle {
    font-size: clamp(1rem, 1.2vw + 0.4rem, 1.2rem);
    color: var(--text-primary); /* Same color as headers for better visibility */
    text-align: center;
    margin-bottom: 1rem;
    font-style: italic;
    opacity: 0.9;
}

.portfolio-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* Mobile adjustments for clean scrolling */
@media (max-width: 768px) {
    .portfolio {
        padding: 4rem 1rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .portfolio {
        padding: 3rem 1rem;
    }
    
    .portfolio-grid {
        gap: 1rem;
    }
}

.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    border: 1px solid rgba(155, 139, 255, 0.1);
    max-width: 100%;
    margin: 0 auto;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(155, 139, 255, 0.3);
}

.project-image {
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Base project image styling */
.project-image img {
    width: 100%;
    object-fit: contain; /* Changed from cover to contain to always show full image */
    transition: transform 0.3s ease;
    background: var(--bg-card); /* Add background for letterboxing */
}

/* Specific sizing for different project types - All show complete images */
.project-image.ai-receptionist-image {
    height: 200px;
}

.project-image.ai-receptionist-image img {
    height: 100%;
    object-fit: contain; /* Always show complete AI receptionist image */
    object-position: center center;
}

.project-image.donxera-image {
    height: 200px;
}

.project-image.donxera-image img {
    height: 100%;
    object-fit: contain; /* Always show complete DonXera image */
    object-position: center center;
}

.project-image.building-projects-image {
    height: 280px;
}

.project-image.building-projects-image img {
    height: 100%;
    object-position: center 20%; /* Higher position to show building better */
}

.project-image.where-it-started-image {
    height: 200px;
}

.project-image.where-it-started-image img {
    height: 100%;
    object-position: center center; /* Fix the black bar issue */
    filter: brightness(1.1) contrast(1.05); /* Improve visibility */
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.overlay-link {
    color: var(--white);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--white);
    border-radius: 8px;
    font-weight: var(--font-weight-semibold);
    transition: all 0.3s ease;
}

.overlay-link:hover {
    background: var(--white);
    color: var(--bg-dark);
}

.project-content {
    padding: 1.2rem; /* Reduced by 40% from 2rem */
}

.project-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(155, 139, 255, 0.2);
    color: var(--text-accent);
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.project-content h3 {
    font-size: clamp(1.4rem, 2vw + 0.6rem, 2.2rem); /* H2 sizing */
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.project-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-badge {
    padding: 0.375rem 0.75rem;
    background: rgba(110, 231, 255, 0.1);
    color: var(--accent-secondary);
    border-radius: 6px;
    font-size: var(--font-size-sm); /* Use small variable size */
    font-weight: var(--font-weight-medium);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-accent);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: color var(--transition-fast);
}

.project-link:hover {
    color: var(--accent-gradient-end);
}

/* ========================================
   BLOG SECTION
   ======================================== */
.blog {
    padding: 6rem 2rem;
    background: var(--bg-darker);
}

.blog-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.2rem; /* Reduced by 40% from 2rem */
    transition: transform var(--transition-normal);
    border: 1px solid rgba(155, 139, 255, 0.1);
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(155, 139, 255, 0.3);
}

.blog-card h3 {
    font-size: clamp(1.4rem, 2vw + 0.6rem, 2.2rem); /* H2 sizing */
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.blog-card .excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card .read-more {
    color: var(--text-accent);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
}

.blog-card .read-more:hover {
    color: var(--accent-gradient-end);
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
    padding: 6rem 2rem;
    background: var(--bg-dark);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid rgba(155, 139, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-dark);
    border: 1px solid rgba(155, 139, 255, 0.2);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: clamp(1rem, 1.2vw + 0.4rem, 1.2rem); /* Paragraph sizing */
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gradient-start);
    box-shadow: 0 0 0 3px rgba(155, 139, 255, 0.1);
}

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

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-accent);
    color: var(--white);
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 2rem;
    background: var(--bg-darker);
    text-align: center;
    border-top: 1px solid rgba(155, 139, 255, 0.1);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .portfolio-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
}

/* ========================================
   ANIMATIONS & EFFECTS
   ======================================== */

/* Particle Background Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes led-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(100px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
}

/* Hero Particle Background */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    opacity: 0.3;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-gradient-start);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 30%; top: 40%; animation-delay: 1s; }
.particle:nth-child(3) { left: 50%; top: 60%; animation-delay: 2s; }
.particle:nth-child(4) { left: 70%; top: 30%; animation-delay: 3s; }
.particle:nth-child(5) { left: 90%; top: 50%; animation-delay: 4s; }

/* Animated Gradient Background */
.hero-text-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, #0e0f13, #1a1b24, #242530, #0a0b0f);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    z-index: -1;
}

/* Animated Tag Line */
.animated-tagline {
    font-size: 1.2rem;
    color: var(--text-accent);
    margin: 1rem 0;
    font-weight: var(--font-weight-medium);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

/* Currently Building Badge */
.building-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(155, 139, 255, 0.1);
    border: 1px solid rgba(155, 139, 255, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 1rem;
    transition: all var(--transition-normal);
}

.building-badge:hover {
    background: rgba(155, 139, 255, 0.2);
    border-color: rgba(155, 139, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.building-icon {
    width: 8px;
    height: 8px;
    background: var(--accent-gradient-start);
    border-radius: 50%;
    animation: glow-pulse 2s ease-in-out infinite;
}

/* Scroll Fade-in Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Section Dividers with Gradient */
.gradient-divider {
    height: 2px;
    background: var(--gradient-accent);
    margin: 4rem auto;
    max-width: 200px;
    border-radius: 2px;
}

/* Tech Badge Icons */
.tech-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tech-badge {
    background: var(--bg-card);
    border: 1px solid rgba(155, 139, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.tech-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-card);
    transition: left var(--transition-normal);
}

.tech-badge:hover::before {
    left: 0;
}

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

.tech-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.tech-name {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    position: relative;
    z-index: 1;
}

.tech-category {
    font-size: 0.85rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.tech-experience {
    font-size: 0.8rem;
    color: var(--accent-secondary);
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}

/* Skill Experience Bar */
.skill-bar {
    width: 100%;
    height: 6px;
    background: rgba(155, 139, 255, 0.2);
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.skill-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 3px;
    transition: width 1s ease-out;
}

/* Orbiting Tech Logos */
.tech-orbit-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 3rem auto;
}

.orbit-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    animation: orbit 20s linear infinite;
}

.orbit-icon:nth-child(1) { animation-delay: 0s; }
.orbit-icon:nth-child(2) { animation-delay: -5s; }
.orbit-icon:nth-child(3) { animation-delay: -10s; }
.orbit-icon:nth-child(4) { animation-delay: -15s; }

/* LED Availability Indicator */
.led-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 25px;
    margin: 1rem 0;
}

.led-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: led-blink 2s ease-in-out infinite;
}

.led-text {
    color: #10b981;
    font-weight: var(--font-weight-medium);
    font-size: 0.95rem;
}

/* Voice Message Button (Twilio Theme) */
.voice-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f22f46 0%, #d61f1f 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(242, 47, 70, 0.3);
}

.voice-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(242, 47, 70, 0.4);
}

.voice-icon {
    font-size: 1.3rem;
    animation: glow-pulse 2s ease-in-out infinite;
}

/* Personal Story Section */
.personal-story {
    background: var(--bg-card);
    border-left: 4px solid var(--accent-primary);
    padding: 2rem;
    border-radius: 8px;
    margin: 3rem 0;
    position: relative;
}

.personal-story::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--accent-primary);
    opacity: 0.3;
}

.story-content {
    position: relative;
    z-index: 1;
}

.story-image {
    width: 100%;
    max-width: 300px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-normal);
}

.story-image:hover {
    transform: scale(1.05);
}

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

@media (max-width: 768px) {
    .tech-badges {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .tech-badge {
        padding: 1rem 0.75rem;
    }
    
    .tech-icon {
        font-size: 2rem;
    }
    
    .tech-orbit-container {
        width: 200px;
        height: 200px;
    }
    
    .orbit-icon {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }

    /* Journey Section Mobile */
    .genuine-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .timeline-item {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .journey-timeline::before {
        left: 50px;
    }

    .timeline-year {
        width: 80px;
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .timeline-emoji {
        font-size: 1.8rem;
    }
    
    .timeline-year-text {
        font-size: 1rem;
    }

    .timeline-year::after {
        right: -0.9rem;
    }

    .timeline-content {
        margin-left: 0;
    }

    .timeline-photo {
        height: 150px;
    }

    .journey-quote p {
        font-size: 1rem;
    }
}

/* ========================================
   DESKTOP SPACING RESTORATION
   ======================================== */
@media (min-width: 768px) {
    /* Restore larger gaps and padding on desktop */
    .portfolio-grid {
        gap: 2rem;
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .genuine-stats {
        gap: 2rem;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        margin: 3rem 0 4rem;
    }
    
    .timeline-item {
        gap: 2rem;
        margin-bottom: 3rem;
    }
    
    .nav-links {
        gap: 2rem;
    }
    
    .project-content {
        padding: 2rem;
    }
    
    .blog-card {
        padding: 2rem;
    }
    
    .genuine-stat {
        padding: 2rem;
        gap: 1rem;
    }
    
    /* Desktop navigation */
    .nav-links {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 1rem;
        padding: 0;
    }
    
    .nav-toggle {
        display: none; /* Hide hamburger on desktop */
    }
    
    .nav-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* ========================================
   MOBILE ANIMATION REMOVAL
   ======================================== */
@media (max-width: 768px) {
    /* Remove animation delays on all mobile devices for instant content */
    .hero-cta-group {
        animation-delay: 0s !important;
        animation-duration: 0.3s !important;
    }
    
    .hero-social-links {
        animation-delay: 0s !important;
        animation-duration: 0.3s !important;
    }
    
    .availability-status {
        animation-delay: 0s !important;
        animation-duration: 0.3s !important;
    }
    
    /* Speed up any remaining animations */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.2s !important;
    }
    
    /* Remove scroll animation delays */
    .fade-in,
    .slide-in-left,
    .slide-in-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ========================================
   EXTRA SMALL MOBILE - NAV WRAPPING
   ======================================== */
@media (max-width: 500px) {
    /* Override hamburger menu on very small screens for better accessibility */
    .nav-links {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0;
        margin-top: 0.5rem;
    }
    
    .nav-toggle {
        display: none; /* Hide hamburger on very small screens */
    }
    
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.25rem 0.5rem;
        font-size: var(--font-size-sm);
    }
    
    /* Remove animation delays for immediate content visibility */
    .hero-cta-group,
    .hero-social-links,
    .availability-status,
    .hero-content,
    .hero-name,
    .hero-title,
    .hero-subtitle {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        animation-delay: 0s !important;
        transition: none !important;
    }
    
    /* Remove any fadeInUp animations */
    [data-animation],
    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* ========================================
   IPHONE BREAKPOINT OPTIMIZATIONS
   ======================================== */

/* iPhone 12 mini / 13 mini - 390px */
@media (max-width: 390px) {
    .project-card,
    .blog-card,
    .genuine-stat {
        padding: 0.75rem;
        border-radius: 8px;
        margin-bottom: 0.75rem;
    }
    
    .portfolio-grid,
    .genuine-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .hero-main-photo {
        max-width: 200px;
        height: 200px;
    }
    
    .hero-name {
        font-size: clamp(1.5rem, 4vw + 0.5rem, 2.2rem) !important;
        line-height: 1.1;
        margin-bottom: 0.75rem;
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
}

/* iPhone 12/13/14 - 428px */
@media (max-width: 428px) {
    .project-card,
    .blog-card {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .genuine-stat {
        padding: 0.875rem;
        gap: 0.5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .genuine-stats {
        gap: 0.75rem;
        grid-template-columns: 1fr;
    }
    
    .hero-name {
        font-size: clamp(1.6rem, 4.5vw + 0.5rem, 2.5rem) !important;
        line-height: 1.2;
    }
    
    .hero-title {
        font-size: clamp(1.3rem, 3vw + 0.4rem, 1.8rem) !important;
    }
}

/* General mobile scaling up to 480px */
@media (max-width: 480px) {
    /* Hero optimizations */
    .hero {
        min-height: 70vh;
        max-height: 70vh;
        padding-top: calc(2rem + env(safe-area-inset-top));
    }
    
    .hero-name {
        font-size: clamp(1.7rem, 5vw + 0.5rem, 2.8rem) !important;
        line-height: 1.1;
        margin-bottom: 1rem;
        /* Ensure gradient is visible on small screens */
        -webkit-text-fill-color: transparent;
        color: var(--text-primary); /* Fallback */
    }
    
    .hero-title {
        font-size: clamp(1.4rem, 3.5vw + 0.4rem, 2rem) !important;
        margin-bottom: 1rem;
    }
    
    /* Card scaling */
    .project-card,
    .blog-card,
    .genuine-stat {
        transform: scale(1);
        transition: transform 0.2s ease;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .project-card:hover,
    .blog-card:hover,
    .genuine-stat:hover {
        transform: scale(1.02);
    }
    
    /* Ensure all grids are single column */
    .portfolio-grid,
    .genuine-stats {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 1rem;
        padding: 0;
    }
    
    /* Image optimizations */
    .hero-main-photo {
        max-width: min(70vw, 250px);
        height: auto;
        aspect-ratio: 1;
    }
    
    /* Typography adjustments */
    .project-content h3,
    .blog-card h3 {
        font-size: clamp(1.1rem, 1.8vw + 0.5rem, 1.6rem);
        line-height: 1.3;
    }
    
    .project-content p,
    .blog-card .excerpt {
        font-size: clamp(0.9rem, 1.1vw + 0.3rem, 1.1rem);
        line-height: 1.5;
    }
    
    /* Navigation adjustments */
    .nav-container {
        max-width: 95vw;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Section spacing */
    section {
        padding: clamp(1rem, 5vw, 2rem) 0;
    }
    
    /* Prevent horizontal scroll */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    img,
    video,
    iframe {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* ================================
   WHITE BOX TEXT READABILITY CLEANUP - High Contrast Enforcement
   ================================ */

/* Universal white/light background containers - enforce dark text */
.bg-white,
.bg-slate-50,
.bg-gray-50,
.bg-neutral-50,
div[style*="background: #ffffff"],
div[style*="background: #f9fafb"],
div[style*="background: #f8fafc"],
div[style*="background: white"],
section[style*="background: #f9fafb"],
section[style*="background: #f8fafc"] {
    color: #111827 !important; /* Ensure base text is dark */
}

/* All text elements in white/light containers */
.bg-white *,
.bg-slate-50 *,
.bg-gray-50 *,
.bg-neutral-50 *,
div[style*="background: #f9fafb"] *,
div[style*="background: #f8fafc"] *,
section[style*="background: #f9fafb"] *,
section[style*="background: #f8fafc"] * {
    opacity: 1 !important; /* Remove all opacity */
}

/* Headings in white/light containers - maximum contrast */
.bg-white h1,
.bg-white h2,
.bg-white h3,
.bg-white h4,
.bg-white h5,
.bg-white h6,
.bg-slate-50 h1,
.bg-slate-50 h2,
.bg-slate-50 h3,
.bg-slate-50 h4,
.bg-slate-50 h5,
.bg-slate-50 h6,
div[style*="background: #f9fafb"] h1,
div[style*="background: #f9fafb"] h2,
div[style*="background: #f9fafb"] h3,
div[style*="background: #f9fafb"] h4,
section[style*="background: #f9fafb"] h1,
section[style*="background: #f9fafb"] h2,
section[style*="background: #f9fafb"] h3,
section[style*="background: #f9fafb"] h4 {
    color: #111827 !important;
    opacity: 1 !important;
}

/* Paragraph text in white/light containers */
.bg-white p,
.bg-slate-50 p,
div[style*="background: #f9fafb"] p,
div[style*="background: #f8fafc"] p,
section[style*="background: #f9fafb"] p,
section[style*="background: #f8fafc"] p {
    color: #374151 !important;
    opacity: 1 !important;
}

/* List items in white/light containers */
.bg-white li,
.bg-slate-50 li,
div[style*="background: #f9fafb"] li,
div[style*="background: #f8fafc"] li,
section[style*="background: #f9fafb"] li,
section[style*="background: #f8fafc"] li {
    color: #374151 !important;
    opacity: 1 !important;
}

/* Strong/bold text in white/light containers */
.bg-white strong,
.bg-white b,
.bg-slate-50 strong,
.bg-slate-50 b,
div[style*="background: #f9fafb"] strong,
div[style*="background: #f8fafc"] strong,
section[style*="background: #f9fafb"] strong,
section[style*="background: #f8fafc"] strong {
    color: #111827 !important;
    opacity: 1 !important;
}

/* Override any Tailwind text colors that are too light */
.bg-white .text-slate-300,
.bg-white .text-slate-400,
.bg-white .text-slate-500,
.bg-white .text-gray-300,
.bg-white .text-gray-400,
.bg-white .text-gray-500,
.bg-slate-50 .text-slate-300,
.bg-slate-50 .text-slate-400,
.bg-slate-50 .text-slate-500,
.bg-slate-50 .text-gray-300,
.bg-slate-50 .text-gray-400,
.bg-slate-50 .text-gray-500 {
    color: #374151 !important; /* Force to readable gray */
}

/* Ensure text-slate-700 and darker are preserved */
.bg-white .text-slate-700,
.bg-white .text-slate-800,
.bg-white .text-slate-900,
.bg-white .text-gray-700,
.bg-white .text-gray-800,
.bg-white .text-gray-900,
.bg-slate-50 .text-slate-700,
.bg-slate-50 .text-slate-800,
.bg-slate-50 .text-slate-900,
.bg-slate-50 .text-gray-700,
.bg-slate-50 .text-gray-800,
.bg-slate-50 .text-gray-900 {
    opacity: 1 !important;
}

/* Hover/focus states - prevent text fading */
.bg-white:hover,
.bg-white:focus,
.bg-slate-50:hover,
.bg-slate-50:focus {
    color: #111827 !important;
}

.bg-white:hover *,
.bg-white:focus *,
.bg-slate-50:hover *,
.bg-slate-50:focus * {
    opacity: 1 !important;
}

/* Buttons and links in white containers */
.bg-white a,
.bg-white button,
.bg-slate-50 a,
.bg-slate-50 button {
    opacity: 1 !important;
}

/* Tables in white containers */
.bg-white table,
.bg-slate-50 table,
table.w-full {
    color: #374151 !important;
}

.bg-white table th,
.bg-slate-50 table th,
table.w-full th {
    color: white !important; /* Table headers stay white on blue */
}

.bg-white table td,
.bg-slate-50 table td,
table.w-full td {
    color: #374151 !important;
    opacity: 1 !important;
}

/* Special case for pricing text (blue) - keep readable */
.text-blue-600,
.text-blue-500 {
    opacity: 1 !important;
}

/* Green text (savings, checkmarks) */
.text-green-600,
.text-green-500 {
    opacity: 1 !important;
}

/* ================================
   AI RECEPTIONIST PAGE STYLES - Fixed for White Background Readability
   ================================ */

/* Tier cards - ensure readable text on white/light backgrounds */
.tier-card {
    border: 2px solid #e5e7eb !important;
    border-radius: clamp(8px, 2.5vw, 12px) !important;
    padding: var(--spacing-card) !important;
    margin: var(--spacing-mobile-sm) 0 !important;
    background: #ffffff !important;
    color: #111827 !important; /* Dark text for readability */
    transition: all 0.3s ease !important;
    max-width: 100% !important;
    overflow: hidden !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
}

/* Pricing card font normalization using Tailwind classes */
.bg-white h3,
.bg-slate-50 h3 {
    font-size: clamp(1.1rem, 1.6vw, 1.4rem) !important;
    line-height: 1.3 !important;
}

.bg-white .text-blue-600,
.bg-slate-50 .text-blue-600 {
    font-size: clamp(1rem, 1.4vw, 1.2rem) !important;
    line-height: 1.4 !important;
}

.bg-white .space-y-2 li,
.bg-slate-50 .space-y-2 li {
    font-size: clamp(0.9rem, 1.2vw, 1.05rem) !important;
    line-height: 1.5 !important;
}

.bg-white p,
.bg-slate-50 p {
    font-size: clamp(0.9rem, 1.2vw, 1.05rem) !important;
    line-height: 1.6 !important;
}

/* Override Tailwind text size classes in pricing cards */
.bg-white .text-xl,
.bg-slate-50 .text-xl,
.border-2.bg-white .text-xl,
.border-2.bg-slate-50 .text-xl {
    font-size: clamp(1.1rem, 1.6vw, 1.4rem) !important;
}

.bg-white .text-lg,
.bg-slate-50 .text-lg,
.border-2.bg-white .text-lg,
.border-2.bg-slate-50 .text-lg {
    font-size: clamp(1rem, 1.4vw, 1.2rem) !important;
}

/* Specific targeting for pricing cards with borders */
.border-2.rounded-xl h3 {
    font-size: clamp(1.1rem, 1.6vw, 1.4rem) !important;
}

.border-2.rounded-xl .text-blue-600 {
    font-size: clamp(1rem, 1.4vw, 1.2rem) !important;
}

.border-2.rounded-xl .space-y-2 li,
.border-2.rounded-xl p {
    font-size: clamp(0.9rem, 1.2vw, 1.05rem) !important;
}

/* Technical section "How it works" font normalization */
.my-16.bg-slate-50 h2 {
    font-size: clamp(1.1rem, 1.6vw, 1.4rem) !important;
}

.my-16.bg-slate-50 h4 {
    font-size: clamp(1rem, 1.4vw, 1.2rem) !important;
}

.my-16.bg-slate-50 .space-y-2 li {
    font-size: clamp(0.9rem, 1.2vw, 1.05rem) !important;
    line-height: 1.5 !important;
}

.my-16.bg-slate-50 p {
    font-size: clamp(0.9rem, 1.2vw, 1.05rem) !important;
}

.my-16.bg-slate-50 .text-2xl {
    font-size: clamp(1.1rem, 1.6vw, 1.4rem) !important;
}

.my-16.bg-slate-50 .text-lg {
    font-size: clamp(1rem, 1.4vw, 1.2rem) !important;
}

.tier-card h3 {
    color: #111827 !important;
    font-weight: 700 !important;
    margin-bottom: var(--spacing-mobile-xs) !important;
    font-size: clamp(1.1rem, 4vw, 1.4rem) !important;
    line-height: 1.3 !important;
}

.tier-card h4 {
    color: #374151 !important;
    font-weight: 600 !important;
    margin: var(--spacing-mobile-xs) 0 !important;
    font-size: clamp(1rem, 3.5vw, 1.2rem) !important;
}

.tier-card p {
    color: #4b5563 !important;
    font-weight: 400 !important;
    opacity: 1 !important; /* Remove any opacity */
    line-height: 1.6 !important;
    margin: var(--spacing-mobile-xs) 0 !important;
    font-size: clamp(0.9rem, 3.2vw, 1rem) !important;
}

/* Pricing text should be prominent */
.tier-card p[style*="color: #667eea"] {
    color: #667eea !important;
    font-weight: 700 !important;
    font-size: clamp(1.1rem, 4.2vw, 1.3rem) !important;
}

.tier-card:hover {
    border-color: #667eea !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2) !important;
    transform: translateY(-2px) !important;
}

.tier-recommended {
    border-color: #667eea !important;
    background: #f8faff !important;
}

/* Feature lists - dark readable text */
.feature-list {
    list-style: none !important;
    padding: 0 !important;
    margin: var(--spacing-mobile-xs) 0 !important;
}

.feature-list li {
    padding: clamp(0.3rem, 1.5vw, 0.5rem) 0 !important;
    display: flex !important;
    align-items: flex-start !important;
    color: #374151 !important; /* Darker than #6b7280 */
    font-weight: 400 !important;
    opacity: 1 !important;
    line-height: 1.5 !important;
    font-size: clamp(0.85rem, 3vw, 0.95rem) !important;
}

.feature-list li:before {
    content: "✓" !important;
    color: #10b981 !important;
    font-weight: bold !important;
    margin-right: clamp(0.4rem, 2vw, 0.6rem) !important;
    flex-shrink: 0 !important;
    margin-top: 0.1rem !important;
}

/* ROI tables */
.roi-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: var(--spacing-mobile-sm) 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    border-radius: clamp(6px, 2vw, 8px) !important;
    overflow: hidden !important;
}

.roi-table th {
    background: #667eea !important;
    color: white !important;
    padding: clamp(0.7rem, 3vw, 1rem) !important;
    text-align: left !important;
    font-weight: 600 !important;
    font-size: clamp(0.8rem, 2.8vw, 0.9rem) !important;
}

.roi-table td {
    padding: clamp(0.7rem, 3vw, 1rem) !important;
    border-bottom: 1px solid #e5e7eb !important;
    color: #374151 !important;
    font-weight: 400 !important;
    opacity: 1 !important;
    font-size: clamp(0.8rem, 2.8vw, 0.9rem) !important;
    background: white !important;
}

.roi-table tr:hover {
    background: #f9fafb !important;
}

.roi-table tr:hover td {
    background: #f9fafb !important;
}

.savings {
    color: #10b981 !important;
    font-weight: 600 !important;
}

/* Content sections on AI receptionist page */
.container h2 {
    color: #111827 !important;
    font-weight: 700 !important;
    margin: var(--spacing-mobile-md) 0 var(--spacing-mobile-sm) 0 !important;
    font-size: clamp(1.4rem, 5vw, 2rem) !important;
    line-height: 1.2 !important;
    opacity: 1 !important;
}

.container h3 {
    color: #111827 !important; /* Darker than #374151 for better contrast */
    font-weight: 600 !important;
    margin: var(--spacing-mobile-sm) 0 var(--spacing-mobile-xs) 0 !important;
    font-size: clamp(1.1rem, 4vw, 1.4rem) !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
}

.container h4 {
    color: #111827 !important; /* Darker than #4b5563 for better contrast */
    font-weight: 600 !important;
    margin: var(--spacing-mobile-xs) 0 !important;
    font-size: clamp(1rem, 3.5vw, 1.2rem) !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
}

.container p {
    color: #374151 !important; /* Darker than #4b5563 for better contrast */
    font-weight: 400 !important;
    opacity: 1 !important;
    line-height: 1.6 !important;
    margin: var(--spacing-mobile-xs) 0 !important;
    font-size: clamp(0.9rem, 3.2vw, 1rem) !important;
}

.container strong {
    color: #111827 !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

/* Warning/info boxes */
div[style*="background: #fffbeb"] {
    background: #fffbeb !important;
    border-left: 4px solid #f59e0b !important;
    padding: var(--spacing-mobile-sm) !important;
    margin: var(--spacing-mobile-sm) 0 !important;
    border-radius: clamp(6px, 2vw, 8px) !important;
}

div[style*="background: #fffbeb"] p {
    color: #92400e !important; /* Darker amber for better contrast */
    margin: 0 !important;
    opacity: 1 !important;
}

div[style*="background: #fffbeb"] strong {
    color: #78350f !important; /* Even darker for strong text */
    opacity: 1 !important;
}

/* Technical section */
section[style*="background: #f9fafb"] {
    background: #f9fafb !important;
    padding: var(--spacing-card) !important;
    border-radius: clamp(8px, 2.5vw, 12px) !important;
    margin: var(--spacing-mobile-md) 0 !important;
}

section[style*="background: #f9fafb"] h2,
section[style*="background: #f9fafb"] h4 {
    color: #111827 !important;
    opacity: 1 !important;
}

section[style*="background: #f9fafb"] p,
section[style*="background: #f9fafb"] li {
    color: #374151 !important; /* Darker than #4b5563 for better contrast */
    opacity: 1 !important;
}

section[style*="background: #f9fafb"] strong {
    color: #111827 !important;
    opacity: 1 !important;
}

/* Pre/code blocks */
pre {
    background: white !important;
    color: #374151 !important;
    padding: var(--spacing-mobile-sm) !important;
    border-radius: clamp(6px, 2vw, 8px) !important;
    overflow-x: auto !important;
    border: 1px solid #e5e7eb !important;
    font-size: clamp(0.75rem, 2.5vw, 0.85rem) !important;
    line-height: 1.4 !important;
}

/* Instagram CTA */
.instagram-cta {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%) !important;
    color: white !important;
    padding: var(--spacing-mobile-sm) var(--spacing-mobile-md) !important;
    border-radius: clamp(6px, 2vw, 8px) !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin: var(--spacing-mobile-sm) 0 !important;
    font-weight: 600 !important;
    font-size: clamp(0.9rem, 3.2vw, 1rem) !important;
    transition: all 0.3s ease !important;
}

.instagram-cta:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

/* Legal section */
section[style*="color: #6b7280"] {
    color: #374151 !important; /* Darker than #6b7280 for better contrast */
    background: #f9fafb !important;
    padding: var(--spacing-mobile-sm) !important;
    border-radius: clamp(6px, 2vw, 8px) !important;
    font-size: clamp(0.8rem, 2.8vw, 0.9rem) !important;
    opacity: 1 !important;
}

section[style*="color: #6b7280"] p {
    color: #374151 !important; /* Darker than #6b7280 for better contrast */
    opacity: 1 !important;
}

section[style*="color: #6b7280"] strong {
    color: #111827 !important;
    opacity: 1 !important;
}

/* Mobile responsiveness for AI receptionist page */
@media (max-width: 480px) {
    .tier-card {
        margin: var(--spacing-mobile-xs) 0 !important;
        padding: var(--spacing-mobile-sm) !important;
    }
    
    .roi-table {
        font-size: 0.75rem !important;
    }
    
    .roi-table th,
    .roi-table td {
        padding: 0.5rem 0.3rem !important;
    }
    
    /* Make sure tables don't overflow on small screens - Stack format */
    .roi-table thead tr {
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
    }
    
    .roi-table tr {
        border: 1px solid #e5e7eb !important;
        margin-bottom: 0.5rem !important;
        padding: 0.5rem !important;
        border-radius: 4px !important;
        background: white !important;
        display: block !important;
    }
    
    .roi-table td {
        border: none !important;
        border-bottom: 1px solid #eee !important;
        position: relative !important;
        padding-left: 50% !important;
        text-align: right !important;
        display: block !important;
    }
    
    .roi-table td:before {
        content: attr(data-label) ": " !important;
        position: absolute !important;
        left: 6px !important;
        width: 45% !important;
        padding-right: 10px !important;
        white-space: nowrap !important;
        text-align: left !important;
        font-weight: 600 !important;
        color: #374151 !important;
    }
}

/* iPhone specific optimizations for AI page */
@media (max-width: 428px) {
    .container[style*="max-width: 1200px"] {
        max-width: 95vw !important;
        padding: 0 var(--spacing-mobile-xs) !important;
        margin: 3rem auto !important;
    }
    
    /* Ensure project hero is also mobile-friendly */
    .project-hero {
        padding: var(--spacing-mobile-md) var(--spacing-mobile-sm) !important;
    }
    
    .project-hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
        line-height: 1.2 !important;
    }
    
    .project-hero p {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem) !important;
        line-height: 1.5 !important;
    }
}
