﻿/* ============================================================================
   HOME PAGE - MODERN, FAST, MOBILE-OPTIMIZED
   ============================================================================ */

/* CSS Variables for easy theming and consistency */
:root {
    /* Colors */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #8894a7;
    --accent-primary: #0ea5e9;
    --accent-secondary: #0284c7;
    --accent-hover: #38bdf8;

    /* Project-specific colors */
    --rogue-color: rgba(248, 72, 72, 0.9);
    --nasa-color: rgba(124, 58, 255, 0.9);
    --kinect-color: rgba(245, 158, 11, 0.9);
    --audio-color: rgba(14, 165, 233, 0.9);
    --endure-color: rgba(34, 197, 94, 0.9);
    --wedding-color: rgba(236, 72, 153, 0.9);
    --reading-color: rgba(16, 185, 129, 0.9);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Border radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Lazy loading optimization */
.lazy-img {
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.lazy-img.loaded {
    opacity: 1;
}

/* ============================================================================
   HERO BANNER SECTION
   ============================================================================ */
.hero-banner {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Video Background */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.8) 0%, 
        rgba(15, 23, 42, 0.9) 100%);
    z-index: 1;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--spacing-md);
    padding-bottom: 8rem;  /* ADD: Extra padding at bottom to make room for arrow */
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-text {
    color: #ffffff;
}

.hero-greeting {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-xs);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-sm);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #cbd5e1;
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

/* Hero CTA Buttons */
.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 0rem;  /* Fixed: specific value instead of variable */
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;  /* Slightly larger for better visibility */
    color: rgba(255, 255, 255, 0.7);
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 10;  /* Ensure it's above other elements */
    pointer-events: auto;  /* Ensure it's clickable */
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ============================================================================
   STATS SECTION
   ============================================================================ */
.stats-section {
    background: var(--bg-secondary);
    padding: var(--spacing-xl) var(--spacing-md);
    border-bottom: 1px solid #30363d;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(14, 165, 233, 0.06) 100%);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

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

/* ============================================================================
   ABOUT HIGHLIGHT SECTION
   ============================================================================ */
.about-highlight {
    padding: var(--spacing-xl) var(--spacing-md);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    padding-right: var(--spacing-md);
}

.about-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.about-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-slow);
}

.about-image img:hover {
    transform: scale(1.02);
}

/* ============================================================================
   SECTION TITLES
   ============================================================================ */
.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   WORK & PROJECTS SECTIONS
   ============================================================================ */
.work-section,
.projects-section {
    padding: var(--spacing-xl) var(--spacing-md);
}

.work-section {
    background: var(--bg-secondary);
}

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

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

/* Project Card Base Styles */
.project-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid transparent;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* Card Image Container */
.card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a2332 0%, #0d1117 100%);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.card-overlay {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    z-index: 1;
}

.card-tag {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(22, 27, 34, 0.95);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

/* Card Content */
.card-content {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.card-company {
    font-size: 0.95rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.card-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

/* Card Tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.tag {
    display: inline-block;
    padding: 0.4em 0.8em;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.08) 100%);
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: 1px solid rgba(14, 165, 233, 0.35);
}

/* Card Link */
.card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: gap var(--transition-fast), color var(--transition-fast);
}

.card-link:hover {
    gap: var(--spacing-sm);
    color: var(--accent-secondary);
}

.card-link i {
    transition: transform var(--transition-fast);
}

.card-link:hover i {
    transform: translateX(4px);
}

/* Project-specific card colors */
.rogue-card {
    border-top: 4px solid var(--rogue-color);
}

.rogue-card:hover {
    border-color: var(--rogue-color);
    box-shadow: 0 20px 60px rgba(248, 72, 72, 0.15);
}

.nasa-card {
    border-top: 4px solid var(--nasa-color);
}

.nasa-card:hover {
    border-color: var(--nasa-color);
    box-shadow: 0 20px 60px rgba(124, 58, 255, 0.15);
}

.kinect-card {
    border-top: 4px solid var(--kinect-color);
}

.kinect-card:hover {
    border-color: var(--kinect-color);
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.15);
}

.audio-card {
    border-top: 4px solid var(--audio-color);
}

.audio-card:hover {
    border-color: var(--audio-color);
    box-shadow: 0 20px 60px rgba(14, 165, 233, 0.15);
}

.endure-card {
    border-top: 4px solid var(--endure-color);
}

.endure-card:hover {
    border-color: var(--endure-color);
    box-shadow: 0 20px 60px rgba(34, 197, 94, 0.15);
}

.wedding-card {
    border-top: 4px solid var(--wedding-color);
}

.wedding-card:hover {
    border-color: var(--wedding-color);
    box-shadow: 0 20px 60px rgba(236, 72, 153, 0.15);
}

.reading-card {
    border-top: 4px solid var(--reading-color);
}

.reading-card:hover {
    border-color: var(--reading-color);
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.15);
}

/* ============================================================================
   SKILLS PREVIEW SECTION
   ============================================================================ */
.skills-preview {
    background: var(--bg-secondary);
    padding: var(--spacing-xl) var(--spacing-md);
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.skill-category {
    text-align: center;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(14, 165, 233, 0.06) 100%);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(14, 165, 233, 0.25);
    transition: transform var(--transition-base), border-color var(--transition-base);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: rgba(14, 165, 233, 0.3);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.skill-category p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

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

/* ============================================================================
   CONTACT CTA SECTION
   ============================================================================ */
.contact-cta {
    padding: var(--spacing-xl) var(--spacing-md);
    background: linear-gradient(135deg, #0d1117 0%, rgba(14, 165, 233, 0.08) 100%); border: 1px solid #30363d;
    color: #ffffff;
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: #ffffff;
}

.cta-content p {
    font-size: 1.2rem;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    transition: all var(--transition-base);
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.contact-cta .btn-outline {
    color: #ffffff;
    border-color: #ffffff;
}

.contact-cta .btn-outline:hover {
    background: #ffffff;
    color: #0d1117;
}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================================================ */

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 576px) {
    :root {
        --spacing-xl: 2.5rem;
        --spacing-lg: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .about-text {
        padding-right: 0;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 768px) {
    .video-background video {
        object-position: center;
    }
    
    .scroll-indicator {
        bottom: var(--spacing-md);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================================
   ACCESSIBILITY & MOTION PREFERENCES
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--accent-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .project-card {
        border: 2px solid var(--text-primary);
    }
}

/* ============================================================================
   LOADING OPTIMIZATION
   ============================================================================ */
.loading {
    opacity: 0;
}

.loaded {
    opacity: 1;
    animation: fadeIn 0.6s ease;
}

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

/* Prevent layout shift during image load */
.card-image::before {
    content: '';
    display: block;
    padding-top: 62.5%; /* 16:10 aspect ratio */
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================================================
   TYPEWRITER CURSOR
   ============================================================================ */
.typewriter-cursor {
    display: inline-block;
    color: var(--accent-primary);
    font-weight: 300;
    animation: cursor-blink 1s step-end infinite;
    margin-left: 1px;
    user-select: none;
}

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