/* ============================================
   Justin Levy - Personal Website
   Industrial/Technical Aesthetic
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Core Colors */
    --black: #0a0a0a;
    --black-soft: #111111;
    --black-card: #161616;
    --white: #ffffff;
    --white-soft: rgba(255, 255, 255, 0.9);
    --white-muted: rgba(255, 255, 255, 0.6);
    --white-subtle: rgba(255, 255, 255, 0.1);

    /* Accent Colors */
    --cyan: #00f0ff;
    --cyan-glow: rgba(0, 240, 255, 0.3);
    --purple: #a855f7;
    --purple-glow: rgba(168, 85, 247, 0.3);
    --red: #ff3b3b;

    /* Grid */
    --grid-color: rgba(255, 255, 255, 0.03);

    /* Typography */
    --font-display: 'Outfit', -apple-system, sans-serif;
    --font-mono: 'Space Mono', monospace;

    /* Spacing */
    --section-padding: 120px;
    --container-max: 1200px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s var(--ease-out-expo);
    --transition-medium: 0.4s var(--ease-out-expo);
    --transition-slow: 0.8s var(--ease-out-expo);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Grid Overlay */
.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 1;
}

/* Particle Background */
#particles-js {
    position: fixed;
    inset: 0;
    z-index: 0;
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 32px;
    z-index: 2;
}

.hero-content {
    animation: heroFadeIn 1s var(--ease-out-expo) 0.2s both;
}

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

.hero-label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.label-line {
    width: 48px;
    height: 1px;
    background: var(--cyan);
    animation: lineGrow 0.8s var(--ease-out-expo) 0.5s both;
}

@keyframes lineGrow {
    from { transform: scaleX(0); transform-origin: left; }
    to { transform: scaleX(1); }
}

.label-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.title-outline {
    -webkit-text-stroke: 2px var(--white);
    -webkit-text-fill-color: transparent;
    position: relative;
}

.title-outline::after {
    content: 'LEVY';
    position: absolute;
    left: 0;
    top: 0;
    -webkit-text-stroke: 0;
    -webkit-text-fill-color: var(--cyan);
    clip-path: inset(0 100% 0 0);
    animation: textReveal 1.2s var(--ease-out-expo) 0.8s forwards;
}

@keyframes textReveal {
    to { clip-path: inset(0 0 0 0); }
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--white-muted);
    margin-bottom: 48px;
    animation: fadeIn 0.8s var(--ease-out-expo) 1s both;
}

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

.hero-stats {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    animation: fadeIn 0.8s var(--ease-out-expo) 1.2s both;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--white-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 48px;
    right: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    animation: fadeIn 0.8s var(--ease-out-expo) 1.5s both;
}

.scroll-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--white-muted);
    writing-mode: vertical-rl;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--cyan), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.5; transform: scaleY(0.8); }
}

/* ============================================
   Section Styles
   ============================================ */
section {
    position: relative;
    z-index: 2;
    padding: var(--section-padding) 0;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 64px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Scroll Animation Base */
.section-header,
.about-content,
.experience-card,
.venture-card,
.connect-link {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.section-header.visible,
.about-content.visible,
.experience-card.visible,
.venture-card.visible,
.connect-link.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    background: linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.02), transparent);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--white-soft);
}

.about-lead strong {
    color: var(--cyan);
}

.about-text p {
    color: var(--white-muted);
    font-size: 1rem;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-frame {
    position: relative;
    width: 300px;
    height: 300px;
}

.image-frame::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    z-index: -1;
    opacity: 0.5;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--black-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--cyan);
}

.image-placeholder svg {
    width: 120px;
    height: 120px;
    animation: rotate 20s linear infinite;
}

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

.image-placeholder span {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.3em;
}

/* ============================================
   Experience Section
   ============================================ */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.experience-card {
    background: var(--black-card);
    border: 1px solid var(--white-subtle);
    padding: 32px;
    position: relative;
    transition: all var(--transition-medium);
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
}

.experience-card:hover {
    border-color: var(--cyan);
    transform: translateY(-4px);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--white-muted);
}

.card-indicator {
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.experience-card:first-child .card-indicator {
    background: var(--red);
    box-shadow: 0 0 12px var(--red);
}

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

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-org {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan);
    margin-bottom: 16px;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--white-muted);
    line-height: 1.6;
}

/* ============================================
   Ventures Section
   ============================================ */
.ventures-section {
    background: linear-gradient(180deg, transparent, rgba(168, 85, 247, 0.02), transparent);
}

.ventures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.venture-card {
    display: flex;
    flex-direction: column;
    background: var(--black-card);
    border: 1px solid var(--white-subtle);
    padding: 48px 32px;
    text-decoration: none;
    color: var(--white);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-medium);
}

.venture-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--cyan-glow), var(--purple-glow));
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.venture-card:hover {
    transform: translateY(-8px);
    border-color: var(--purple);
}

.venture-card:hover::before {
    opacity: 0.1;
}

.venture-logo {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.venture-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: brightness(1.1);
    transition: transform var(--transition-medium);
}

.venture-card:hover .venture-logo img {
    transform: scale(1.05);
}

.venture-logo.text-logo {
    height: auto;
}

.stratus-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.visuals-logo {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.4em;
    color: var(--white-muted);
    margin-top: 8px;
}

.venture-info {
    text-align: center;
    position: relative;
    z-index: 1;
}

.venture-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.venture-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--white-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast);
}

.venture-card:hover .venture-link {
    color: var(--cyan);
}

.venture-link svg {
    transition: transform var(--transition-fast);
}

.venture-card:hover .venture-link svg {
    transform: translate(2px, -2px);
}

/* ============================================
   Connect Section
   ============================================ */
.connect-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--white-subtle);
}

.connect-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0;
    border-bottom: 1px solid var(--white-subtle);
    text-decoration: none;
    color: var(--white);
    transition: all var(--transition-medium);
}

.connect-link:hover {
    padding-left: 24px;
}

.connect-label {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.connect-link:hover .connect-label {
    color: var(--cyan);
}

.connect-arrow {
    width: 48px;
    height: 48px;
    border: 1px solid var(--white-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-medium);
}

.connect-link:hover .connect-arrow {
    background: var(--cyan);
    border-color: var(--cyan);
    color: var(--black);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--white-subtle);
    position: relative;
    z-index: 2;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

.footer-location {
    font-size: 0.85rem;
    color: var(--white-muted);
}

.footer-year {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--white-muted);
}

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

    html { scroll-behavior: auto; }

    .section-header,
    .about-content,
    .experience-card,
    .venture-card,
    .connect-link {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    :root {
        --section-padding: 80px;
    }

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

    .about-image {
        order: -1;
    }

    .image-frame {
        width: 200px;
        height: 200px;
    }

    .hero-stats {
        gap: 32px;
    }

    .scroll-indicator {
        right: 32px;
        bottom: 32px;
    }
}

@media (max-width: 600px) {
    :root {
        --section-padding: 64px;
    }

    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 20px;
    }

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

    .title-outline {
        -webkit-text-stroke-width: 1px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .scroll-indicator {
        display: none;
    }

    .section-header {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 48px;
    }

    .experience-card {
        padding: 24px;
    }

    .venture-card {
        padding: 32px 24px;
    }

    .connect-label {
        font-size: 1.25rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}