/* =========================================
   reasoner.studio - Neubrutalist Navy-Metallic Forge
   Palette:
     Deep Navy:      #1A2840
     Navy Mid:       #2A3858
     Metallic Blue:  #5070A0
     Steel Light:    #8098B8
     Metallic Shine: #B0C0D8
     Studio Grey:    #F4F6FA
     Forge White:    #FAFBFE
     Candle Warm:    rgba(200,170,120,0.05)
   Fonts:
     Jost (Google Fonts) — display headings & body
     IBM Plex Mono (Google Fonts) — tags & labels
   ========================================= */

/* --- Reset & Base --- */
*, *::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: 'Jost', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.8;
    color: #2A3858;
    background-color: #FAFBFE;
    overflow-x: hidden;
    position: relative;
}

/* --- Candle Atmospheric Glow --- */
.candle-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 40% 25%, rgba(200,170,120,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* --- Dreamy Ethereal Mist Layer --- */
.ethereal-mist {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(176,192,216,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(128,152,184,0.03) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(200,170,120,0.02) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: mistDrift 20s ease-in-out infinite alternate;
}

@keyframes mistDrift {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    color: #1A2840;
    line-height: 1.15;
}

h2 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 500;
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 700;
}

/* --- Section Tag (monospace label) --- */
.section-tag,
.project-tag,
.project-meta-tag,
.footer-tag,
.footer-meta-item,
.scroll-indicator-tag,
.method-number {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    color: #5070A0;
    text-transform: uppercase;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    z-index: 1;
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    max-width: 1200px;
    width: 100%;
}

.hero-title-wrap {
    flex: 1;
}

.hero-title {
    font-family: 'Jost', sans-serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    color: #1A2840;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.hero-dot {
    color: #5070A0;
}

.hero-tagline {
    margin-top: 20px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    color: #5070A0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-model {
    flex: 0 0 auto;
    width: 340px;
    height: 310px;
    position: relative;
}

.reasoning-model-svg {
    width: 100%;
    height: 100%;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator-tag {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
}

.scroll-indicator-line {
    width: 1px;
    height: 40px;
    background: #5070A0;
    animation: scrollPulse 2s ease-in-out infinite;
}

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

/* =========================================
   PORTFOLIO SECTION
   ========================================= */
.portfolio {
    position: relative;
    z-index: 1;
    padding: 100px 40px 120px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-header .section-tag {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}

.section-header .section-title {
    font-weight: 500;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Project Cards */
.project-card {
    background: #F4F6FA;
    border: 3px solid #1A2840;
    border-radius: 0;
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #1A2840;
}

.project-card--wide {
    grid-column: span 2;
}

.project-card-inner {
    position: relative;
    z-index: 1;
}

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

.project-tag {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
}

.project-number {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.7rem;
    color: #B0C0D8;
}

.project-title {
    margin-bottom: 12px;
    color: #1A2840;
}

.project-desc {
    font-size: clamp(0.82rem, 1vw, 0.92rem);
    line-height: 1.7;
    color: #2A3858;
    margin-bottom: 16px;
}

.project-model {
    margin-bottom: 16px;
}

.project-svg {
    width: 100%;
    max-height: 100px;
}

.project-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-meta-tag {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border: 2px solid #B0C0D8;
    border-radius: 0;
    color: #5070A0;
}

/* =========================================
   SLIDE-REVEAL ANIMATION (curtain-pull from left)
   ========================================= */
.slide-reveal {
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-reveal.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* =========================================
   MANIFESTO SECTION
   ========================================= */
.manifesto {
    position: relative;
    z-index: 1;
    padding: 120px 40px;
    background: #1A2840;
    color: #F4F6FA;
    overflow: hidden;
}

/* Candle warmth inside manifesto */
.manifesto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 40%, rgba(200,170,120,0.04) 0%, transparent 50%);
    pointer-events: none;
}

.manifesto-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 80px;
    align-items: center;
    position: relative;
}

.manifesto-content {
    flex: 1;
}

.manifesto-content .section-tag {
    color: #8098B8;
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
}

.manifesto-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #FAFBFE;
    margin-bottom: 32px;
    line-height: 1.15;
}

.manifesto-text p {
    color: #B0C0D8;
    margin-bottom: 20px;
    line-height: 1.9;
}

.manifesto-text p:last-child {
    margin-bottom: 0;
    color: #FAFBFE;
    font-weight: 500;
    font-size: 1.1em;
}

.manifesto-model {
    flex: 0 0 auto;
    width: 300px;
}

.manifesto-svg {
    width: 100%;
    height: auto;
}

/* =========================================
   METHODOLOGY SECTION
   ========================================= */
.methodology {
    position: relative;
    z-index: 1;
    padding: 120px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.method-card {
    background: #F4F6FA;
    border: 3px solid #1A2840;
    border-radius: 0;
    padding: 32px 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.method-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #1A2840;
}

.method-number {
    display: block;
    font-size: 2rem;
    color: #B0C0D8;
    margin-bottom: 16px;
    line-height: 1;
}

.method-title {
    margin-bottom: 12px;
    font-size: 1.15rem;
    color: #1A2840;
}

.method-desc {
    font-size: clamp(0.8rem, 0.95vw, 0.88rem);
    line-height: 1.7;
    color: #2A3858;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    position: relative;
    z-index: 1;
    padding: 60px 40px;
    border-top: 3px solid #1A2840;
    background: #FAFBFE;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-title {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #1A2840;
    letter-spacing: 0.04em;
}

.footer-tag {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
}

.footer-meta {
    display: flex;
    gap: 32px;
}

.footer-meta-item {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: #8098B8;
}

/* =========================================
   CANDLE FLICKER ON HERO MODEL
   ========================================= */
.hero-model::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(200,170,120,0.06) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
    animation: candleFlicker 4s ease-in-out infinite alternate;
}

@keyframes candleFlicker {
    0% { opacity: 0.4; transform: scale(1); }
    25% { opacity: 0.7; transform: scale(1.05); }
    50% { opacity: 0.5; transform: scale(0.98); }
    75% { opacity: 0.8; transform: scale(1.03); }
    100% { opacity: 0.45; transform: scale(1.01); }
}

/* =========================================
   NEUBRUTALIST ACCENTS
   ========================================= */

/* Thick underline on section titles */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #1A2840;
    margin-top: 16px;
}

/* Card hover glow -- Vermeer candle warmth on hover */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 0;
    transition: background 0.2s ease;
}

.project-card:hover::before {
    background: radial-gradient(circle at 50% 50%, rgba(200,170,120,0.03) 0%, transparent 70%);
}

/* Manifesto title underline for neubrutalist weight */
.manifesto-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #5070A0;
    margin-top: 12px;
}

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

    .hero-model {
        width: 260px;
        height: 240px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-card--wide {
        grid-column: span 2;
    }

    .method-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .manifesto-inner {
        flex-direction: column;
        gap: 40px;
    }

    .manifesto-model {
        width: 250px;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 40px 20px;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .hero-model {
        width: 200px;
        height: 180px;
    }

    .portfolio {
        padding: 60px 20px 80px;
    }

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

    .project-card--wide {
        grid-column: span 1;
    }

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

    .manifesto {
        padding: 80px 20px;
    }

    .footer {
        padding: 40px 20px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
    }

    .footer-meta {
        flex-direction: column;
        gap: 8px;
    }
}
