/* 2026 Premium Psychological UI Framework */

:root {
    --bg-base: #0a0a0b;
    --bg-surface: rgba(255, 255, 255, 0.02);
    --bg-glass: rgba(15, 15, 18, 0.4);
    --border: rgba(255, 255, 255, 0.06);
    --border-highlight: rgba(255, 255, 255, 0.15);

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-dim: #71717a;

    --accent: #ffffff;
    --accent-dim: rgba(255, 255, 255, 0.1);

    --green: #10b981;
    --red: #ef4444;
    --orange: #f59e0b;
    --teal: #14b8a6;

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --glass-blur: blur(24px);
    --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.4);

    --space-xl: 8rem;
    --space-lg: 4rem;
    --space-md: 2rem;
    --space-sm: 1rem;
}

:root[data-theme="light"] {
    --bg-base: #f9f9fb;
    --bg-surface: rgba(0, 0, 0, 0.02);
    --bg-glass: rgba(255, 255, 255, 0.6);
    --border: rgba(0, 0, 0, 0.06);
    --border-highlight: rgba(0, 0, 0, 0.15);

    --text-primary: #0a0a0b;
    --text-secondary: #52525b;
    --text-dim: #a1a1aa;

    --accent: #0a0a0b;
    --accent-dim: rgba(0, 0, 0, 0.05);

    --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html,
body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: background-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Canvas & Progress */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--accent);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--border-highlight);
}

.theme-icon.sun-icon {
    display: none;
}

:root[data-theme="light"] .theme-icon.moon-icon {
    display: none;
}

:root[data-theme="light"] .theme-icon.sun-icon {
    display: block;
}

/* Wrapper */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

/* Top Navigation — Dynamic Island */
.top-nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    z-index: 1000;
    padding: 0;
    display: flex;
    justify-content: center;
    background: transparent;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.top-nav.nav-hidden {
    transform: translateX(-50%) translateY(-120%);
    opacity: 0;
}

.nav-links {
    display: inline-flex;
    align-items: center;
    background: rgba(10, 10, 11, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 0.4rem;
    gap: 0.35rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 0.25rem;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.nav-item.active {
    color: var(--bg-base);
    background: var(--text-primary);
}

/* --- THE HALO EFFECT: HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 6rem;
    padding-bottom: var(--space-xl);
    position: relative;
}

/* Floating ambient orbs */
.hero-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
}

.orb-1 {
    width: 500px;
    height: 500px;
    top: 5%;
    right: 10%;
    animation: orb-drift-1 20s ease-in-out infinite, orb-pulse 8s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    bottom: 10%;
    left: 5%;
    animation: orb-drift-2 25s ease-in-out infinite, orb-pulse 10s ease-in-out infinite 2s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    animation: orb-drift-3 18s ease-in-out infinite, orb-pulse 12s ease-in-out infinite 4s;
}

@keyframes orb-drift-1 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-30px, 40px);
    }

    50% {
        transform: translate(20px, -20px);
    }

    75% {
        transform: translate(-15px, -30px);
    }
}

@keyframes orb-drift-2 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(40px, -30px);
    }

    50% {
        transform: translate(-20px, 20px);
    }

    75% {
        transform: translate(25px, 35px);
    }
}

@keyframes orb-drift-3 {

    0%,
    100% {
        transform: translateX(-50%) translate(0, 0);
    }

    33% {
        transform: translateX(-50%) translate(30px, -40px);
    }

    66% {
        transform: translateX(-50%) translate(-25px, 30px);
    }
}

@keyframes orb-pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.hero>*:not(.hero-orbs) {
    position: relative;
    z-index: 1;
}

.hero-top {
    margin-bottom: var(--space-lg);
}

.glass-capsule {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--green);
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    white-space: nowrap;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    font-weight: 300;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
    border: 1px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-dim);
}

.cta-pulse {
    animation: pulse-ring 3s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
    position: relative;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

:root[data-theme="light"] .cta-pulse {
    animation: pulse-ring-light 3s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes pulse-ring-light {
    0% {
        box-shadow: 0 0 0 0 rgba(10, 10, 11, 0.3);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(10, 10, 11, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(10, 10, 11, 0);
    }
}

.btn-secondary {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-highlight);
    background: var(--bg-surface);
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.btn-ghost:hover {
    color: var(--text-primary);
}

/* --- ORBITAL DASHBOARD --- */
.dashboard-section {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.dashboard-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.glass-panel:hover {
    border-color: var(--border-highlight);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root[data-theme="light"] .glass-panel {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

:root[data-theme="light"] .glass-panel:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Top row: main stat centered */
.main-stat {
    width: 100%;
    max-width: 500px;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-glass), rgba(139, 92, 246, 0.05));
}

.main-stat .stat-value {
    font-size: 3.5rem;
}

/* Orbital ring: stats arranged in a centered row with arc spacing */
.orbit-ring {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 900px;
}

.orbit-stat {
    flex: 1;
    min-width: 160px;
    max-width: 220px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    cursor: default;
}

.orbit-stat:hover {
    transform: translateY(-6px);
}

.orbit-stat .stat-value {
    font-size: 2rem;
}

.text-stat {
    width: 100%;
    max-width: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem !important;
    background: transparent;
    border: none;
    text-align: center;
}

.manifesto-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-secondary);
    font-style: italic;
}

.mini-stat {
    padding: 1.5rem 2.5rem;
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-meta {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.positive {
    color: var(--green);
}

.negative {
    color: var(--red);
}

.neutral {
    color: var(--text-primary);
}

.subtle {
    color: var(--text-secondary);
}

/* --- ARCHIVAL INDEX: STATS & CALENDAR --- */
.archival-stats {
    margin-bottom: var(--space-xl);
    border-top: 1px solid var(--border);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.archival-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
    transition: padding 0.3s ease;
}

.archival-row:hover {
    padding-left: 1rem;
    padding-right: 1rem;
    background: var(--bg-surface);
}

.archival-label {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-secondary);
}

.archival-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 400;
}

/* Chart */
.chart-section {
    margin-bottom: var(--space-xl);
}

.chart-header {
    margin-bottom: var(--space-md);
    text-align: center;
}

.chart-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 300;
}

.chart-meta {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chart-container {
    height: 500px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Updates Ledger */
.updates-section {
    margin-bottom: var(--space-xl);
    padding: 3rem;
    cursor: pointer;
}

.updates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 300;
    display: flex;
    gap: 1rem;
    align-items: baseline;
}

.section-title span {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.4s ease;
}

.updates-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.updates-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: all 0.4s ease;
}

.updates-list.collapsed {
    display: none;
}

.update-item {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.update-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.update-date {
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.update-tag {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.update-desc {
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.8;
}

/* Legend */
.legend-section {
    margin-bottom: var(--space-lg);
}

.minimal-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.legend-archival {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Calendar Temporal Index */
.calendar-section {
    margin-bottom: var(--space-xl);
}

.calendar-header-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--font-mono);
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.nav-btn:hover {
    transform: scale(1.2);
}

.monthly-recap {
    margin-bottom: 2rem;
    cursor: pointer;
    padding: 2rem;
    overflow: hidden;
}

.recap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recap-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 300;
}

.recap-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recap-month {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.monthly-recap.collapsed .recap-stats {
    display: none;
}

.recap-stats {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    margin-top: 2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.recap-stat {
    background: var(--bg-base);
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recap-stat-value {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.recap-stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Inject stats container injected via js */
.days-bar-container {
    background: var(--bg-base);
    padding: 1.5rem;
    grid-column: 1 / -1;
}

.days-bar-header {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.days-bar,
.sp500-comparison-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.days-bar-green {
    background: var(--green);
}

.days-bar-red {
    background: var(--red);
}

/* Calendar Grid */
.calendar-container {
    padding: 2rem;
}

.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

/* calendar-day base styles are at the bottom of this file */

.calendar-day.empty {
    background: transparent;
}

.calendar-day.weekend {
    color: var(--text-dim);
}

.calendar-day.today {
    font-weight: 700;
    color: var(--accent);
}

.calendar-day.has-data {
    cursor: pointer;
}

.calendar-day.has-data:hover {
    background: var(--bg-surface);
}

.calendar-day.positive::after,
.calendar-day.negative::after,
.calendar-day.neutral::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.calendar-day.positive::after {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}

.calendar-day.negative::after {
    background: var(--red);
    box-shadow: 0 0 8px var(--red);
}

.calendar-day.neutral::after {
    background: var(--text-dim);
}


/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    max-width: 600px;
    width: 90%;
    padding: 3rem;
    transform: translateY(20px) scale(0.98);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-lg {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header.with-nav {
    justify-content: center;
    gap: 2rem;
    position: relative;
}

.modal-title,
.modal-date {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 300;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-dim);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.5rem;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-body::-webkit-scrollbar {
    display: none;
}

.disclosure-block {
    margin-bottom: 2rem;
}

.disclosure-block h4 {
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.disclosure-block p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.no-data {
    text-align: center;
    padding: 3rem 0;
}

.no-data-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.weekend-message {
    color: var(--text-secondary);
    font-style: italic;
}

/* Animations injected from JS */
.slide-out-left {
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.2s ease;
}

.slide-out-right {
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.2s ease;
}

.slide-in-left {
    transform: translateX(-20px);
    opacity: 0;
}

.slide-in-right {
    transform: translateX(20px);
    opacity: 0;
}

/* Scroll Reveals */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* Injected JS Trade List Modal styling */
.modal-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    display: block;
    object-fit: contain;
}

.modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-stat {
    text-align: center;
    padding: 1.25rem;
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.modal-stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.modal-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

.modal-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.modal-breakdown-item {
    text-align: center;
    padding: 1rem 0.5rem;
    background: var(--bg-surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.modal-breakdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.modal-breakdown-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 500;
}

.modal-pnl-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-pnl-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.modal-pnl-item.loss {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.15);
}

.modal-pnl-item.win {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.15);
}

.modal-pnl-label {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.modal-pnl-value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
}

.modal-notes {
    padding: 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-trades {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.modal-trades-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.trade-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.trade-item:last-child {
    border-bottom: none;
}

.trade-time {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
}

.trade-type {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-align: center;
    width: fit-content;
}

.trade-type.long {
    color: var(--green);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.trade-type.short {
    color: var(--red);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.trade-risk {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.trade-result {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: right;
}

.trade-result.win {
    color: var(--green);
}

.trade-result.loss {
    color: var(--red);
}

.trade-result.be {
    color: var(--teal);
}

/* Philosophy Section */
.philosophy-section {
    margin-bottom: var(--space-xl);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.philosophy-card {
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.philosophy-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-highlight);
}

.philosophy-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1.5rem;
}

.philosophy-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.philosophy-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- PERFORMANCE PAGE --- */
.perf-page-header {
    text-align: center;
    margin-bottom: var(--space-lg);
    padding-top: var(--space-md);
}

.perf-page-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    margin-bottom: 0.75rem;
}

.perf-page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.perf-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: var(--space-lg);
}

.perf-metric {
    text-align: center;
    padding: 2rem 1.5rem;
}

.perf-metric .stat-value {
    font-size: 2rem;
}

.perf-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: var(--space-lg);
}

.perf-chart-half .chart-header {
    text-align: left;
}

.perf-chart-half .chart-header h2 {
    font-size: 1.5rem;
}

.perf-detail-section {
    margin-bottom: var(--space-lg);
}

.perf-stats-table {
    padding: 2rem;
}

.perf-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.perf-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.perf-stat-row:nth-child(3n) {
    border-right: none;
}

.perf-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.perf-stat-val {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 500;
}

/* --- LEDGER / TIMELINE PAGE --- */
.ledger-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-top: var(--space-md);
}

.ledger-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.ledger-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    margin-bottom: 0.75rem;
}

.ledger-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.7;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 3rem;
}

/* Vertical connecting line */
.timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--border), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 2rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    border-color: var(--accent);
    transform: scale(1.15);
}

.timeline-icon {
    color: var(--text-dim);
    width: 14px;
    height: 14px;
}

.timeline-item:hover .timeline-icon {
    color: var(--accent);
}

.timeline-content {
    padding: 2rem 2.5rem;
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateX(4px);
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.03em;
}

.timeline-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
}

.tag-risk {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.tag-logic {
    color: var(--green);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag-arch {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.timeline-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.timeline-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.timeline-impact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.impact-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    flex-shrink: 0;
}

.impact-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-surface);
    border-radius: 100px;
    overflow: hidden;
    max-width: 120px;
}

.impact-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--accent));
    border-radius: 100px;
    transition: width 1s ease;
}

.impact-level {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    text-align: center;
    padding: var(--space-lg) 0 2rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* Calendar Grid Improvements */
.calendar-day {
    aspect-ratio: 1;
    background: var(--bg-base);
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: left;
    position: relative;
    cursor: default;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .orbit-ring {
        flex-direction: column;
        align-items: center;
    }

    .orbit-stat {
        max-width: 100%;
        width: 100%;
    }

    .main-stat,
    .text-stat {
        max-width: 100%;
    }

    .recap-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
    }

    .perf-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .perf-charts-row {
        grid-template-columns: 1fr;
    }

    .perf-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-breakdown {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem 4rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero {
        min-height: 80vh;
    }

    .recap-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-grid {
        gap: 1px;
    }

    .calendar-day {
        aspect-ratio: auto;
        min-height: 48px;
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    .archival-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .modal-stats,
    .modal-pnl-row {
        grid-template-columns: 1fr;
    }

    .trade-item {
        grid-template-columns: 1fr 1fr;
        gap: 0.25rem;
    }
}