/* ============================================
   Cody Negri — codynegri.com
   ============================================ */

:root {
    --color-bg: #0e0a14;
    --color-bg-alt: #130f1a;
    --color-surface: #1c1626;
    --color-border: #2e2640;
    --color-text: #e8e6ed;
    --color-text-muted: #908a9c;
    --color-accent: #9b6ff7;
    --color-accent-hover: #b08af8;
    --color-white: #ffffff;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1120px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16px;
}

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

/* Animated Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

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

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.hero,
.section,
.footer {
    position: relative;
    z-index: 1;
}

.nav.scrolled {
    background: rgba(14, 10, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 14px 0;
}

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

.nav-logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--color-white);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 36px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition);
    letter-spacing: 0.01em;
}

.nav-links a:hover {
    color: var(--color-white);
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

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

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

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

/* ============================================
   Hero
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.section-alt {
    background: rgba(19, 15, 26, 0.85);
    backdrop-filter: blur(2px);
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 72px;
    position: relative;
}

.hero-photo {
    flex-shrink: 0;
}

.hero-photo img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    object-position: center top;
    border-radius: 20px;
    border: 2px solid var(--color-border);
    filter: grayscale(0%);
    transition: var(--transition);
}

.hero-photo img:hover {
    border-color: rgba(155, 111, 247, 0.4);
    box-shadow: 0 20px 60px rgba(155, 111, 247, 0.15);
}

.hero-content {
    max-width: 580px;
    position: relative;
}

.hero-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 20px;
    padding: 8px 20px;
    border: 1px solid rgba(155, 111, 247, 0.25);
    border-radius: 100px;
}

.hero-title {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--color-white);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: clamp(17px, 2.5vw, 21px);
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

.hero-description {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font);
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(155, 111, 247, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-text-muted);
    background: var(--color-surface);
    transform: translateY(-1px);
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 100px 0;
    background: rgba(14, 10, 20, 0.7);
}


.section-header {
    margin-bottom: 56px;
}

.section-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--color-white);
    max-width: 600px;
}

/* ============================================
   About
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 64px;
    align-items: start;
}

.about-text p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 40px;
    background: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ============================================
   Services
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.service-card {
    padding: 36px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: var(--transition);
}

.service-card:hover {
    border-color: rgba(155, 111, 247, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(155, 111, 247, 0.1);
    border-radius: 10px;
    margin-bottom: 20px;
    color: var(--color-accent);
}

.service-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ============================================
   Experience
   ============================================ */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.experience-card {
    padding: 32px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: var(--transition);
}

.experience-card.featured {
    grid-column: 1 / -1;
    border-color: rgba(155, 111, 247, 0.3);
    background: linear-gradient(135deg, var(--color-surface) 0%, rgba(155, 111, 247, 0.05) 100%);
}

.experience-card:hover {
    border-color: rgba(155, 111, 247, 0.3);
    transform: translateY(-2px);
}

.experience-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.experience-role {
    font-size: 14px;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 12px;
}

.experience-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.experience-note {
    padding: 28px 32px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: 8px;
}

.experience-note p {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.experience-note strong {
    color: var(--color-white);
}

/* ============================================
   Contact
   ============================================ */
.contact-content {
    max-width: 560px;
}

.contact-description {
    font-size: 17px;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 36px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    transition: color var(--transition);
}

.contact-item:hover {
    color: var(--color-accent);
}

.contact-item svg {
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.contact-item:hover svg {
    color: var(--color-accent);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--color-border);
}

.footer p {
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger animation for grid items */
.services-grid .fade-in:nth-child(2) { transition-delay: 0.1s; }
.services-grid .fade-in:nth-child(3) { transition-delay: 0.2s; }
.services-grid .fade-in:nth-child(4) { transition-delay: 0.3s; }

.experience-grid .fade-in:nth-child(2) { transition-delay: 0.1s; }
.experience-grid .fade-in:nth-child(3) { transition-delay: 0.15s; }
.experience-grid .fade-in:nth-child(4) { transition-delay: 0.2s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 48px;
    }

    .hero-photo img {
        width: 260px;
        height: 260px;
    }

    .hero-actions {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        flex-direction: row;
        justify-content: space-between;
        text-align: center;
    }

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

@media (max-width: 640px) {
    .section {
        padding: 72px 0;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(14, 10, 20, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 24px 60px;
        min-height: auto;
    }

    .hero-photo img {
        width: 220px;
        height: 220px;
    }

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

    .btn {
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }

    .about-stats {
        flex-direction: column;
        text-align: left;
    }

    .experience-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        margin-bottom: 40px;
    }
}
