/* CSS Variables & Reset */
:root {
    --text-main: #000000;
    --text-secondary: #444444;
    --bg-color: #FFFFFF;
    --card-bg: #FFFFFF;
    --border-color: #000000;
    --radius-small: 0px;
    /* Sharp edges */
    --font-heading: 'Instrument Serif', serif;
    --font-mono: 'Space Mono', monospace;
    --font-family: 'Space Mono', monospace;
    /* Default body to mono */
    --transition-standard: 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-mono);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 14px;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.1;
    font-weight: 400;
    /* Serif handles the weight */
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.7;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    margin-top: 32px;
    /* Space for ticker */
}

/* Infrastructure Ticker */
.infra-ticker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: #000;
    color: #fff;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border-bottom: 1px solid #333;
}

.ticker-content {
    white-space: nowrap;
    animation: ticker 30s linear infinite;
    padding-left: 100%;
    /* Start off-screen */
    display: flex;
    gap: 32px;
}

.ticker-content span {
    display: inline-flex;
    align-items: center;
}

.separator {
    color: var(--primary-green, #40B97C);
    margin: 0 10px;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 32px;
    /* Below ticker */
    background: #fff;
    z-index: 100;
    min-height: auto;
}

.brand {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.8rem;
    letter-spacing: -0.02em;
}

.nav-desc {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.nav-separator {
    color: #ddd;
    margin: 0 8px;
}

/* Hero Section */
.hero {
    padding: 120px 40px 100px;
    border-bottom: 1px solid var(--border-color);
    opacity: 1;
    /* Ensure visibility */
    transform: none;
    /* Ensure no scale issues */
}

.hero-title {
    font-size: 5.5rem;
    max-width: 1000px;
    margin: 0 auto 32px 0;
    letter-spacing: -0.03em;
    color: var(--text-main);
    line-height: 0.95;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.6;
    margin: 0;
}

/* Thesis Section */
.thesis-section {
    border-bottom: 1px solid var(--border-color);
}

.thesis-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 40px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    background: #fafafa;
}

.thesis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.thesis-card {
    padding: 40px;
    border-right: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.thesis-card::before {
    content: attr(data-index);
    position: absolute;
    top: -40px;
    right: -20px;
    font-family: var(--font-heading);
    font-size: 12rem;
    color: rgba(0, 0, 0, 0.03);
    z-index: 0;
    pointer-events: none;
    line-height: 1;
}

/* Use nth-child to generate content if manual data attr not allowed in html yet - wait, I can simulate */
.thesis-card:nth-child(1)::before {
    content: '01';
}

.thesis-card:nth-child(2)::before {
    content: '02';
}

.thesis-card:nth-child(3)::before {
    content: '03';
}

.thesis-card:last-child {
    border-right: none;
}

.thesis-card h3 {
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    color: var(--text-main);
    z-index: 1;
    font-weight: 700;
}

.thesis-card p {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    line-height: 1.1;
    z-index: 1;
}

/* Projects Grid (Lab View) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-bottom: 1px solid var(--border-color);
}

/* Project Card */
.project-card {
    background-color: var(--card-bg);
    padding: 40px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 380px;
    opacity: 1;
    /* Reset any old opacity */
    animation: none;
    /* Reset old animations */
    transform: none;
    cursor: pointer;
}

.project-card:nth-last-child(-n+2) {
    border-bottom: none;
    /* Remove bottom border for last row items */
}

.project-card:nth-child(even) {
    border-right: none;
}

/* High Contrast Hover */
.project-card:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.project-card:hover .project-title,
.project-card:hover h2,
.project-card:hover h3 {
    color: #fff;
}

.project-card:hover .project-desc {
    color: rgba(255, 255, 255, 0.7);
}

.project-card:hover .status-pill {
    border-color: #fff;
    color: #fff;
}

.project-card:hover .project-btn {
    color: #fff;
    text-decoration: underline;
}

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

.project-title {
    font-size: 2.5rem;
    margin-bottom: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.status-pill {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

/* Pulse Dot */
.status-pill::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #444;
}

.status-active::before {
    background-color: #40B97C;
    box-shadow: 0 0 8px #40B97C;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.status-active {
    background: transparent;
    /* Changed to transparant for the hover effect */
    color: #000;
}

.status-legacy {
    color: #888;
    border-color: #ccc;
    text-decoration: line-through;
}

.status-legacy::before {
    background-color: #aaa;
}

.project-desc {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 90%;
    margin-bottom: 32px;
    transition: color 0.3s ease;
}

.project-link-wrapper {
    margin-top: auto;
}

.project-btn {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-main);
    text-transform: uppercase;
    font-weight: 700;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    transition: color 0.3s ease;
}

.project-btn:hover {
    text-decoration: underline;
    background: transparent;
    transform: none;
}

/* Footer */
.footer {
    padding: 80px 40px;
    border-top: none;
}

.footer-tagline {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.footer-links {
    display: flex;
    gap: 32px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.footer-link {
    font-family: var(--font-mono);
    font-size: 1rem;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
}

.copyright {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Responsive Landing Page */
@media (max-width: 900px) {
    .container {
        padding: 0;
        border: none;
        box-shadow: none;
    }

    .hero-title {
        font-size: 4rem;
    }

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

    .thesis-card {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

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

    .project-card {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .navbar,
    .hero,
    .thesis-header,
    .thesis-card,
    .project-card,
    .footer {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 80px 20px 60px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px;
    }

    .nav-desc {
        font-size: 0.7rem;
    }

    .thesis-card,
    .project-card {
        padding: 32px 20px;
    }

    .footer {
        padding: 60px 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
}

/* ===================== */
/* Pitch Deck Modal - Venture Studio Theme */
/* ===================== */

.pitch-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    overflow: hidden;
}

/* Optional: Subtle grid background for the 'blueprint' feel */
.pitch-modal::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    pointer-events: none;
}

.pitch-modal.active {
    opacity: 1;
    visibility: visible;
}

.pitch-modal-content {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;
    z-index: 2;
}

/* Close & Mute Buttons - Utilitarian Style */
.pitch-close,
.pitch-mute {
    position: absolute;
    top: 30px;
    background: #ffffff;
    border: 1px solid #000000;
    color: #000000;
    font-size: 1.2rem;
    width: 48px;
    height: 48px;
    border-radius: 0;
    /* Sharp */
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pitch-close {
    right: 40px;
}

.pitch-mute {
    left: 40px;
}

.pitch-close:hover,
.pitch-mute:hover {
    background: #000000;
    color: #ffffff;
    transform: none;
}

/* Slides Container */
.pitch-slides {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Individual Slide & Layouts */
.pitch-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    /* Slide up effect instead of scale */
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    padding: 40px;
    overflow-y: auto;
    /* Enable scrolling if content is too tall on small screens */
}

.pitch-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Layout: Standard (Centered) */
.pitch-slide-standard .slide-content {
    text-align: center;
    max-width: 900px;
}

/* Layout: Split */
.pitch-slide-split {
    flex-direction: row;
    gap: 80px;
    text-align: left;
    max-width: 1100px;
    width: 100%;
    align-items: center;
}

.pitch-slide-split .slide-half:first-child {
    flex: 1;
}

.pitch-slide-split .slide-half:last-child {
    flex: 1;
}

.slide-half {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide-visual {
    width: 100%;
    height: auto;
    border: 1px solid #000;
    /* Framed images */
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 1);
    /* Brutalist shadow */
    transition: transform 0.3s ease;
    object-fit: cover;
    max-height: 60vh;
}

.pitch-slide-title .slide-visual {
    max-height: 50vh;
}

/* Slide Typography - Inverted */
.slide-headline {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    color: #000000;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    line-height: 1;
    text-shadow: none;
}

.slide-tagline {
    font-size: 1rem;
    color: #000;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    display: block;
    border-bottom: 2px solid #000;
    display: inline-block;
    padding-bottom: 4px;
}

.slide-text {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 32px;
}

.slide-content-focused {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.slide-headline-large {
    font-size: 6rem;
    margin-bottom: 40px;
}

.slide-text-large {
    font-size: 2rem;
    line-height: 1.3;
    font-family: var(--font-heading);
    color: #000;
}

/* Metrics Grid - Cards Style */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 48px;
    width: 100%;
}

.metric-item {
    background: #ffffff;
    border: 1px solid #000000;
    padding: 32px;
    text-align: center;
    border-radius: 0;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.1);
}

.metric-value {
    display: block;
    font-size: 3rem;
    font-family: var(--font-heading);
    font-weight: 400;
    color: #000;
    line-height: 1;
    margin-bottom: 8px;
}

.metric-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-flag {
    display: block;
    font-size: 4rem;
    margin-bottom: 16px;
    line-height: 1;
}

/* CTA Slide Button */
.slide-cta-btn {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 24px 56px;
    border-radius: 0;
    /* Sharp */
    font-family: var(--font-mono);
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 40px;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: none;
    border: 1px solid #000;
}

.slide-cta-btn:hover {
    background: #fff;
    color: #000;
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0px #000;
}

/* Navigation & Indicators */
.pitch-nav-wrapper {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 20;
}

.pitch-nav-btn {
    background: #fff;
    border: 1px solid #000;
    color: #000;
    font-size: 1.25rem;
    width: 56px;
    height: 56px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pitch-nav-btn:hover:not(:disabled) {
    background: #000;
    color: #fff;
    transform: none;
}

.pitch-next {
    background: #000;
    color: #fff;
}

.pitch-next:hover:not(:disabled) {
    background: #fff;
    color: #000;
}

.pitch-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
    border-color: #ccc;
    color: #ccc;
}

.pitch-indicators {
    display: flex;
    gap: 12px;
}

.pitch-indicator {
    width: 40px;
    height: 4px;
    border-radius: 0;
    background: #eee;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pitch-indicator.active {
    background: #000;
    border-color: #000;
    width: 60px;
}

/* Responsive Modal Adjustments */
@media (max-width: 900px) {
    .pitch-slide {
        padding: 24px;
        padding-bottom: 120px;
        /* Space for bottom nav */
        flex-direction: column;
        justify-content: flex-start;
        /* Stack from top */
        padding-top: 100px;
        /* Space for top buttons */
    }

    .pitch-slide-split {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .slide-visual {
        max-height: 250px;
        width: 100%;
        margin: 0 auto;
        order: -1;
    }

    .slide-headline {
        font-size: 3rem;
    }

    .slide-headline-large {
        font-size: 3.5rem;
    }

    .slide-text-large {
        font-size: 1.5rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 32px;
    }
}

@media (max-width: 600px) {
    .pitch-modal-content {
        height: 100%;
        max-height: none;
    }

    .pitch-close,
    .pitch-mute {
        top: 20px;
        width: 44px;
        /* Slightly easier tap target */
        height: 44px;
        background: rgba(255, 255, 255, 0.9);
    }

    .pitch-close {
        right: 20px;
    }

    .pitch-mute {
        left: 20px;
    }

    .slide-headline {
        font-size: 3.5rem;
        line-height: 0.95;
        margin-bottom: 24px;
    }

    .slide-headline-large {
        font-size: 4rem;
    }

    .slide-text,
    .slide-text-large {
        font-size: 1.35rem;
        line-height: 1.4;
    }

    .pitch-nav-wrapper {
        bottom: 24px;
        gap: 20px;
    }

    .metric-value {
        font-size: 2rem;
    }

    .slide-cta-btn {
        padding: 18px 40px;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
    }

    .pitch-indicator {
        width: 12px;
    }

    .pitch-indicator.active {
        width: 32px;
    }

    .pitch-indicators {
        gap: 6px;
    }
}

/* Animation Keyframes */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pitch-slide .slide-tagline,
.pitch-slide .slide-headline,
.pitch-slide .slide-text,
.pitch-slide .metric-item,
.pitch-slide .slide-cta-btn,
.pitch-slide .slide-visual {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pitch-slide.active .slide-tagline {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.pitch-slide.active .slide-headline {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.pitch-slide.active .slide-visual {
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.pitch-slide.active .slide-text {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.pitch-slide.active .metrics-grid {
    opacity: 1;
}

.pitch-slide.active .metric-item:nth-child(1) {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.pitch-slide.active .metric-item:nth-child(2) {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.pitch-slide.active .metric-item:nth-child(3) {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.pitch-slide.active .metric-item:nth-child(4) {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.pitch-slide.active .slide-cta-btn {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}
/* ===================== */
/* System Upgrades (Cursor, Boot, Etc) */
/* ===================== */

/* 1. Custom Cursor */
@media (pointer: fine) {
    body {
        cursor: none;
    }
    
    a, button, .project-card, .pitch-close, .pitch-mute, .pitch-nav-btn, .pitch-indicator {
        cursor: none;
    }
}

.sys-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background: #000; /* Will invert due to blend mode */
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.2s ease,
                border-radius 0.2s ease;
    mix-blend-mode: exclusion;
    will-change: transform;
}

.sys-cursor.hovered {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 0; /* Square on hover as requested */
    mix-blend-mode: difference;
}

.sys-cursor.arrow-left::before,
.sys-cursor.arrow-right::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000; /* Contrast against white cursor */
    font-size: 24px;
    font-family: var(--font-mono);
}

.sys-cursor.arrow-left::before { content: '←'; }
.sys-cursor.arrow-right::before { content: '→'; }


/* 2. Boot Sequence Overlay */
.boot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    color: #e0e0e0;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 40px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
}

.boot-content {
    max-width: 600px;
}

.boot-cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: #e0e0e0;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    margin-left: 4px;
}

@keyframes blink { 50% { opacity: 0; } }

/* CRT Turn On Animation class */
body.boot-complete .boot-overlay {
    animation: crtFadeOut 0.8s forwards ease-in-out;
    pointer-events: none;
}

@keyframes crtFadeOut {
    0% { transform: scaleY(1) scaleX(1); opacity: 1; }
    50% { transform: scaleY(0.01) scaleX(1); opacity: 1; filter: brightness(2); }
    60% { transform: scaleY(0.001) scaleX(0.5); opacity: 0.5; }
    100% { transform: scaleY(0) scaleX(0); opacity: 0; }
}


/* 3. 3D Card Tilt Support */
.project-card {
    will-change: transform;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card * {
    transform-style: preserve-3d; /* propagate */
}

/* Lift elements on hover */
.project-card:hover .project-title,
.project-card:hover .status-pill,
.project-card:hover .project-btn {
    transform: translateZ(20px);
}


/* 4. Keyboard Hints in Modal */
.key-hint {
    position: absolute;
    bottom: 40px;
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.1);
    color: #888;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.key-hint.visible {
    opacity: 1;
}

.key-hint-left { left: 40px; }
.key-hint-right { right: 40px; }

@media (max-width: 900px) {
    .sys-cursor { display: none; } /* Native touch on mobile */
    .key-hint { display: none; }
}

/* ===================== */
/* TECH / DATA HUD STYLES */
/* ===================== */

.tech-card,
.tech-card-large {
    background: rgba(255, 255, 255, 0.5); /* Glass-like */
    border: 1px solid #000;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    /* Corner flourishes */
    --c-size: 10px;
    background-image: 
        linear-gradient(to right, #000 1px, transparent 1px),
        linear-gradient(to bottom, #000 1px, transparent 1px);
    background-size: var(--c-size) var(--c-size), var(--c-size) var(--c-size);
    background-repeat: no-repeat;
    background-position: top left, top left;
}

.tech-card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
}

.tech-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 12px;
    margin-bottom: 24px;
}

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

.tech-id {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #aaa;
}

.tech-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.region-body {
    flex-direction: column;
    gap: 16px;
}

.metric-value {
    font-size: 4rem; /* Bigger */
    font-weight: 400;
}

.metric-value-large {
    font-size: 8rem; /* Massive for Market Size */
    font-family: var(--font-heading);
    line-height: 0.8;
}

.metric-flag-large {
    font-size: 4rem;
    line-height: 1;
}

.metric-region-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-align: center;
    line-height: 1.1;
}

.tech-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #444;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 12px;
    margin-top: 12px;
}

.tech-status {
    color: #40B97C; /* Green */
}

/* Market Layout specific */
.market-layout {
    display: flex;
    width: 100%;
    margin-top: 48px;
    gap: 32px;
}

.market-main {
    flex: 2; /* Takes 2/3 */
}

.market-side {
    flex: 1; /* Takes 1/3 */
}

/* Responsive Tech Cards */
@media (max-width: 900px) {
    .market-layout {
        flex-direction: column;
    }
    
    .metric-value-large {
        font-size: 5rem;
    }
    
    .metric-value {
        font-size: 3rem;
    }
}

/* ===================== */
/* FINAL POLISH: Scramble, Scroll, Reveal */
/* ===================== */

/* 1. Scroll Progress Line */
.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: #40B97C; /* Green */
    width: 0%;
    transition: width 0.1s linear;
    z-index: 101;
}

/* 2. Scroll Reveal Animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items if needed, or handle in JS */

/* 3. Scramble Effect Cursor */
.scramble-hover {
    cursor: help; /* Hint at interaction */
}
