:root {
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(15, 23, 42, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.90);
    --gradient-1: #ef4444;
    --gradient-2: #8b5cf6;
    --gradient-3: #3b82f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, .logo {
    font-family: 'Outfit', sans-serif;
}

/* Background Effects */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.15;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--gradient-2), transparent);
    top: -100px;
    left: -200px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent), transparent);
    top: 50%;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Typography Tools */
.highlight {
    color: var(--accent);
}

.gradient-text {
    background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientFlow 5s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

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

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: #fff !important;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 166, 255, 0.4);
}

/* Two-Column Grid Redesign */
.main-layout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 5%;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.sleek-header {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(46, 160, 67, 0.1);
    color: #3fb950;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(46, 160, 67, 0.2);
    margin-bottom: 1rem;
}

.pulse {
    width: 6px;
    height: 6px;
    background: #3fb950;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.7);
    animation: pulsing 2s infinite;
}

@keyframes pulsing {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(63, 185, 80, 0); }
}

.sleek-header h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.sleek-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Right Rail */
.right-rail {
    position: sticky;
    top: 100px; /* offset for nav */
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.subscribe-card {
    padding: 20px;
    text-align: center;
}

.email-form {
    display: flex;
    gap: 10px;
    width: 100%;
}

.rail-form {
    flex-direction: column;
    gap: 5px;
}

.email-form input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.03);
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.email-form input:focus {
    border-color: var(--accent);
}

.form-feedback {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #3fb950;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Timeline */
.timeline-container {
    max-width: 100%;
}

.timeline-container h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.vertical-timeline {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 0 3rem 40px; /* Massive top padding for negative air space below Today */
    position: relative;
    border-left: 4px solid var(--accent);
}

.timeline-item {
    min-width: 350px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(10px);
}

.timeline-item:hover {
    transform: translateY(-5px);
    border-color: rgba(88, 166, 255, 0.4);
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 30px;
    left: -42px; /* mathematically pierce the exact 62.0px center of the node */
    width: 42px; /* compensate for left shift so it connects flush to card edge */
    height: 4px;
    background: var(--accent);
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: 20px;
    left: -55px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 4px solid var(--accent);
    box-shadow: 0 0 0 6px rgba(88, 166, 255, 0.3);
}

.event-date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.event-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.event-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.event-sources {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.source-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.source-tag.left { border-color: rgba(56, 189, 248, 0.4); color: #38bdf8; }
.source-tag.right { border-color: rgba(248, 113, 113, 0.4); color: #f87171; }
.source-tag.center { border-color: rgba(167, 139, 250, 0.4); color: #a78bfa; }

/* Event Extras */
.milestone-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.badge-severity {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.70rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-badge {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.severity-major {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.severity-minor {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Timeline Filters */
.timeline-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    padding-left: 40px; 
}

.filter-btn {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(15, 23, 42, 0.08);
}

.filter-btn.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}

/* Temporal & UX Upgrades */
.timeline-today-marker {
    position: absolute;
    top: -5px; /* absolute peak cap */
    left: -18px; /* mathematical certainty of perfect alignment */
    display: flex;
    align-items: center;
}

.today-dot {
    display: block;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--bg-color);
    border: 8px solid var(--accent);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 8px rgba(88, 166, 255, 0.3);
}

.today-text {
    margin-left: 24px; /* Space out to align directly with 40px padding of cards */
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.timeline-terminus-marker {
    position: absolute;
    bottom: -5px; /* absolute floor cap */
    left: -18px; /* mathematical certainty of perfect alignment */
    display: flex;
    align-items: center;
}

.terminus-dot {
    display: block;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--bg-color);
    border: 8px solid #a855f7; /* Start origin color explicitly different */
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 8px rgba(168, 85, 247, 0.2);
}

.terminus-text {
    margin-left: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* Skeleton Loaders */
.skeleton-card {
    min-width: 350px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.03);
    animation: pulse-skele 1.5s infinite;
}

.skeleton-card::before {
    content: '';
    position: absolute;
    top: 30px;
    left: -40px;
    width: 40px;
    height: 4px;
    background: var(--border-color);
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 20px;
    left: -55px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 4px solid var(--border-color);
}

.skel-line {
    background: rgba(15, 23, 42, 0.08);
    border-radius: 4px;
    margin-bottom: 10px;
    height: 12px;
}

.skel-title { width: 60%; height: 24px; margin-bottom: 20px; }
.skel-desc { width: 100%; margin-bottom: 8px; }
.skel-desc-2 { width: 80%; }
.skel-image { width: 100%; height: 200px; border-radius: 8px; margin-bottom: 1.5rem; }

@keyframes pulse-skele {
    0% { opacity: 0.6; }
    50% { opacity: 0.9; }
    100% { opacity: 0.6; }
}

/* Event Expansion */
.event-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.event-desc.expanded {
    -webkit-line-clamp: unset;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 1.5rem;
    margin-top: -1rem;
    display: block;
    padding: 0;
}
.read-more-btn:hover { text-decoration: underline; }

/* Share Tooltip */
.share-btn { cursor: pointer; transition: 0.2s; position: relative; }
.share-btn:hover { background: rgba(37,99,235,0.08); color: var(--accent); }
.share-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #15803d;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
    white-space: nowrap;
}
.share-btn.copied .share-tooltip { opacity: 1; top: -35px; }

/* About Section */
.about-container {
    padding: 3rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-icon {
    font-size: 2rem;
    background: rgba(37, 99, 235, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.terminal-box {
    background: #0d1117; /* Hardcoded dark to contrast the Light UI */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15);
}

.terminal-header {
    background: rgba(0,0,0,0.5);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
}

.terminal-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-header span:nth-child(1) { background: #ff5f56; }
.terminal-header span:nth-child(2) { background: #ffbd2e; }
.terminal-header span:nth-child(3) { background: #27c93f; }

.terminal-header .title {
    margin-left: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
}

.terminal-body {
    padding: 20px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    color: #a5d6ff;
    line-height: 1.8;
    height: 180px;
    overflow-y: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.terminal-body .success {
    color: #3fb950;
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Community Flow Bubbles */
.community-container {
    border-top: 1px solid var(--border-color);
    padding-top: 3rem;
}

.bubbles-container {
    position: relative;
    height: 400px;
    width: 100%;
    margin-top: 2rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.chat-bubble {
    position: absolute;
    background: var(--glass-bg);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.06);
    animation: driftBubble 20s linear infinite;
    backdrop-filter: blur(5px);
}

@keyframes driftBubble {
    0% { transform: translateY(0px) translateX(0px) scale(0.9); opacity: 0; }
    10% { transform: translateY(-50px) translateX(10px) scale(1.0); opacity: 0.9; }
    90% { transform: translateY(-380px) translateX(30px) scale(1.0); opacity: 0.9; }
    100% { transform: translateY(-450px) translateX(40px) scale(0.9); opacity: 0; }
}

/* Chatbot Widget Overlay */
.chatbot-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--accent);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

.chatbot-wrapper.closed {
    height: 60px;
    cursor: pointer;
}

.chatbot-wrapper.closed .chatbot-messages,
.chatbot-wrapper.closed .chatbot-input {
    display: none;
}

.chatbot-wrapper.closed #chatbot-toggle-btn {
    transform: rotate(45deg);
}

.chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(37, 99, 235, 0.08);
    border-bottom: 1px solid var(--border-color);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chatbot-messages::-webkit-scrollbar { width: 6px; }
.chatbot-messages::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.bot-msg, .user-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bot-msg {
    background: #f1f5f9;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-msg {
    background: rgba(37, 99, 235, 0.1);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.chatbot-input {
    display: flex;
    padding: 10px;
    background: rgba(15, 23, 42, 0.04);
    border-top: 1px solid var(--border-color);
}

.chatbot-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 8px 12px;
    font-size: 0.9rem;
    outline: none;
}

/* Responsiveness */
@media (max-width: 950px) {
    .main-layout-grid { grid-template-columns: 1fr; }
    .right-rail { position: relative; top: 0; height: auto; }
    .sleek-header h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
    .timeline-item { min-width: 100%; }
}
