/* ===========================================
   Matthew Moore Portfolio
   Theme: Aerogel White + Bright Red Accents
   =========================================== */

:root {
    /* Aerogel White Palette */
    --white-pure: #ffffff;
    --white-aerogel: rgba(255, 255, 255, 0.92);
    --white-frost: rgba(255, 255, 255, 0.75);
    --white-mist: rgba(255, 255, 255, 0.45);
    --gray-subtle: #f8f9fa;
    --gray-light: #e9ecef;
    --gray-medium: #6c757d;
    --gray-dark: #212529;
    
    /* Bright Red Accents */
    --red-primary: #ff2d2d;
    --red-bright: #ff4444;
    --red-deep: #cc0000;
    --red-glow: rgba(255, 45, 45, 0.3);
    --red-subtle: rgba(255, 45, 45, 0.1);
    
    /* Background layers */
    --bg-base: linear-gradient(145deg, #f0f2f5 0%, #e8eaed 50%, #f5f7fa 100%);
    --bg-overlay: radial-gradient(ellipse at 30% 20%, rgba(255, 45, 45, 0.03) 0%, transparent 50%),
                  radial-gradient(ellipse at 70% 80%, rgba(255, 45, 45, 0.02) 0%, transparent 50%);
    
    /* Typography */
    --font-display: 'Bebas Neue', sans-serif;
    --font-heading: 'Syne', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-heading);
    background: var(--bg-base);
    color: var(--gray-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    pointer-events: none;
    z-index: -1;
}

/* Floating Particles */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

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

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 25s; }
.particle:nth-child(2) { left: 20%; top: 80%; animation-delay: -5s; animation-duration: 20s; }
.particle:nth-child(3) { left: 60%; top: 30%; animation-delay: -10s; animation-duration: 22s; }
.particle:nth-child(4) { left: 80%; top: 70%; animation-delay: -15s; animation-duration: 18s; }
.particle:nth-child(5) { left: 30%; top: 50%; animation-delay: -7s; animation-duration: 24s; }
.particle:nth-child(6) { left: 90%; top: 10%; animation-delay: -12s; animation-duration: 21s; }
.particle:nth-child(7) { left: 45%; top: 90%; animation-delay: -3s; animation-duration: 23s; }
.particle:nth-child(8) { left: 70%; top: 45%; animation-delay: -18s; animation-duration: 19s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.2; }
    25% { transform: translate(30px, -50px) scale(1.5); opacity: 0.4; }
    50% { transform: translate(-20px, -100px) scale(1); opacity: 0.2; }
    75% { transform: translate(50px, -50px) scale(1.2); opacity: 0.3; }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--white-aerogel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 45, 45, 0.1);
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
}

.logo-bracket {
    color: var(--red-primary);
}

.logo-text {
    color: var(--gray-dark);
}

.nav-links {
    display: flex;
    gap: var(--space-md);
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--gray-dark);
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red-primary);
    transition: width var(--transition-base);
}

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-lg);
    padding: calc(var(--space-xl) + 60px) var(--space-lg) var(--space-xl);
    position: relative;
}

.hero-content {
    z-index: 1;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.label-line {
    width: 60px;
    height: 2px;
    background: var(--red-primary);
}

.label-text {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--red-primary);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 10rem);
    line-height: 0.9;
    margin-bottom: var(--space-md);
}

.title-line {
    display: block;
    color: var(--gray-dark);
}

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

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--gray-medium);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.05em;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 1rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--red-primary);
    color: var(--white-pure);
    box-shadow: 0 4px 20px var(--red-glow);
}

.btn-primary:hover {
    background: var(--red-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--red-glow);
}

.btn-secondary {
    background: var(--white-aerogel);
    color: var(--gray-dark);
    border: 1px solid var(--gray-light);
}

.btn-secondary:hover {
    border-color: var(--red-primary);
    color: var(--red-primary);
}

/* Terminal Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.terminal {
    width: 100%;
    max-width: 500px;
    background: var(--white-aerogel);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 20px 50px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 45, 45, 0.1);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
    border-bottom: 1px solid var(--gray-light);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--red-primary);
}

.terminal-dot:nth-child(2) {
    background: #ffcc00;
}

.terminal-dot:nth-child(3) {
    background: #00cc66;
}

.terminal-title {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--gray-medium);
}

.terminal-body {
    padding: var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    background: var(--gray-dark);
    color: #e0e0e0;
}

.terminal-line {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompt {
    color: var(--red-primary);
    font-weight: 600;
}

.command {
    color: #ffffff;
}

.output {
    color: var(--gray-medium);
    padding-left: 20px;
}

.output.success {
    color: #00cc66;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--red-primary);
}

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

/* Sections */
.section {
    padding: var(--space-xl) var(--space-lg);
    position: relative;
}

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

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--red-primary);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--red-primary);
    letter-spacing: 0.05em;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
    align-items: start;
}

.about-text {
    font-size: 1.125rem;
    color: var(--gray-dark);
}

.about-lead {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    line-height: 1.4;
}

.about-text p {
    margin-bottom: var(--space-md);
}

.highlight {
    color: var(--red-primary);
    font-weight: 600;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.stat {
    padding: var(--space-md);
    background: var(--white-aerogel);
    border-radius: 8px;
    border-left: 4px solid var(--red-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--red-primary);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-medium);
}

/* Skills Section */
.skills {
    background: var(--white-frost);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

.skill-card {
    padding: var(--space-md);
    background: var(--white-aerogel);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--red-primary), var(--red-bright));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.skill-card:hover {
    border-color: var(--red-subtle);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(255, 45, 45, 0.1);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red-subtle);
    border-radius: 8px;
    margin-bottom: var(--space-sm);
    color: var(--red-primary);
}

.skill-icon svg {
    width: 24px;
    height: 24px;
}

.skill-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--gray-dark);
}

.skill-desc {
    font-size: 0.9375rem;
    color: var(--gray-medium);
    line-height: 1.6;
}

/* Expertise Section */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.expertise-card {
    padding: var(--space-md);
    background: var(--white-aerogel);
    border-radius: 12px;
    border: 1px solid var(--gray-light);
    transition: all var(--transition-base);
}

.expertise-card:hover {
    border-color: var(--red-primary);
    box-shadow: 0 8px 30px rgba(255, 45, 45, 0.1);
}

.expertise-card.featured {
    background: linear-gradient(135deg, var(--white-pure) 0%, var(--red-subtle) 100%);
    border-color: var(--red-primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.card-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red-primary);
    background: var(--red-subtle);
    padding: 4px 12px;
    border-radius: 20px;
}

.card-icon {
    font-size: 1.5rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: var(--space-sm);
}

.card-list {
    list-style: none;
}

.card-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: var(--space-xs);
    font-size: 0.9375rem;
    color: var(--gray-medium);
}

.card-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--red-primary);
    font-weight: bold;
}

/* Contact Section */
.contact {
    background: linear-gradient(180deg, var(--white-frost) 0%, var(--gray-subtle) 100%);
}

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

.contact-text {
    font-size: 1.25rem;
    color: var(--gray-dark);
    margin-bottom: var(--space-lg);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 1.25rem 2rem;
    background: var(--white-aerogel);
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--gray-dark);
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.contact-link:hover {
    border-color: var(--red-primary);
    color: var(--red-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--red-glow);
}

.contact-icon {
    width: 24px;
    height: 24px;
}

/* Footer */
.footer {
    padding: var(--space-lg) var(--space-md);
    background: var(--gray-dark);
    color: var(--white-pure);
}

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

.footer .logo-bracket {
    color: var(--red-primary);
}

.footer .logo-text {
    color: var(--white-pure);
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--gray-medium);
    margin-bottom: var(--space-xs);
}

.footer-year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--gray-medium);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: calc(var(--space-lg) + 60px) var(--space-md) var(--space-lg);
    }
    
    .hero-label {
        justify-content: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat {
        flex: 1;
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }
    
    .nav {
        padding: var(--space-sm);
    }
    
    .nav-links {
        gap: var(--space-sm);
    }
    
    .nav-link {
        font-size: 0.75rem;
    }
    
    .section {
        padding: var(--space-lg) var(--space-md);
    }
    
    .skills-grid,
    .expertise-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .about-stats {
        flex-direction: column;
    }
    
    .stat {
        min-width: unset;
    }
}

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

.hero-content,
.hero-visual,
.section-header,
.about-content,
.skill-card,
.expertise-card {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-visual {
    animation-delay: 0.2s;
}

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

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

/* Selection */
::selection {
    background: var(--red-primary);
    color: var(--white-pure);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--red-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red-deep);
}
