@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg: #050505;
    --card-bg: rgba(20, 20, 20, 0.6);
    --card-border: #222;
    --text: #ffffff;
    --text-dim: #888888;
    --accent-start: #ff3b30;
    --accent-mid: #ff9500;
    --accent-end: #ffcc00;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --glow: 0 0 30px rgba(255, 59, 48, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 59, 48, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(255, 149, 0, 0.05), transparent 25%);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.8rem 0;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--accent-start), var(--accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    align-items: center;
}

.version-wrapper {
    position: relative;
    margin-left: 10px;
    -webkit-text-fill-color: initial;
    background: none;
    display: flex;
    align-items: center;
}

.version-tag {
    font-size: 0.75rem;
    color: var(--accent-mid);
    background: rgba(255, 149, 0, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 149, 0, 0.2);
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.version-tag:hover {
    background: rgba(255, 149, 0, 0.2);
    box-shadow: 0 0 10px rgba(255, 149, 0, 0.1);
}

.changelog-popup {
    position: absolute;
    top: calc(100% + 10px);
    left: -10px;
    width: 320px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-main);
}

.changelog-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.changelog-item {
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
    border-radius: 8px;
}
.changelog-item:last-child { border-bottom: none; }
.changelog-item:hover { background: rgba(255,255,255,0.03); }

.cl-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cl-ver { color: var(--accent-mid); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; background: rgba(255, 149, 0, 0.1); padding: 2px 6px; border-radius: 4px; }
.cl-date { color: #666; font-size: 0.75rem; font-weight: 400; }
.cl-title { color: #eee; font-size: 0.9rem; font-weight: 600; display: block; margin-bottom: 4px; letter-spacing: -0.01em;}
.cl-desc { color: #999; font-size: 0.85rem; line-height: 1.7; font-weight: 400; letter-spacing: 0.02em; }

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    margin-left: 20px;
    font-weight: 500;
    position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-mid);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    margin-left: 20px;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
}
.nav-btn:hover {
    background: #222;
    border-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Hero */
.hero {
    text-align: center;
    padding: 6rem 0 4rem;
}

@keyframes ember-pulse {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.1) saturate(1.1); }
    100% { filter: brightness(1); }
}

.hero-logo-container {
    margin: 0 auto 2rem;
    max-width: 600px;
    width: fit-content; /* Ensure hover only triggers on the logo itself */
    /* Layer 1: Very subtle ambient warmth */
    filter: drop-shadow(0 0 15px rgba(254, 68, 44, 0.1));
    transition: filter 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    display: block;
}

.hero-logo-container:hover {
    /* Layered Glow: Core brightness + Ambient heat */
    filter: 
        drop-shadow(0 0 8px rgba(255, 202, 4, 0.3)) 
        drop-shadow(0 0 30px rgba(254, 68, 44, 0.2));
}

.hero-logo-container:hover .hero-logo {
    animation: ember-pulse 4s ease-in-out infinite;
}

.hero-logo {
    width: 100%;
    height: auto;
    max-height: 220px;
    /* Removed scale transition to prevent layout shifts */
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Install Bar */
.install-bar {
    background: #111;
    border: 1px solid #333;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.2s, border-color 0.2s;
    max-width: 100%;
    overflow-x: auto;
}

.install-bar:hover {
    transform: translateY(-2px);
    border-color: #555;
}

.cmd-prefix { color: var(--accent-mid); user-select: none; }
.cmd-text { color: #fff; }
.copy-btn { background: transparent; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; transition: color 0.2s; }
.copy-btn:hover { color: #fff; }

/* =========================================
   Terminal Component
   ========================================= */
.terminal-component {
    margin: 4rem auto;
    max-width: 800px;
    perspective: 1000px;
}

.terminal-tabs-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: -1px;
    padding: 0 10px;
}

.terminal-tabs-list {
    display: flex;
    gap: 5px;
}

.tab-btn {
    background: #111;
    border: 1px solid #222;
    border-bottom: none;
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.85rem;
    transition: all 0.2s;
    position: relative;
    top: 1px;
}

.tab-btn:hover { color: #fff; background: #1a1a1a; }
.tab-btn.active {
    background: #0d0d0d;
    color: var(--accent-mid);
    border-color: #333;
    border-bottom: 1px solid #0d0d0d;
    z-index: 10;
}

.control-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
}
.control-btn:hover { opacity: 1; transform: rotate(180deg); }

.terminal-window {
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    text-align: left;
    min-height: 450px;
    position: relative;
    overflow: hidden;
    z-index: 5;
}

.terminal-window-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #222;
}

.terminal-window-header .title { margin-left: auto; color: #333; font-size: 0.8rem; }

.dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-body {
    color: #ccc;
    line-height: 1.6;
    height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 #0d0d0d;
    padding-bottom: 20px;
}

.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

.line { display: block; min-height: 1.6em; white-space: pre-wrap; word-break: break-all; }
.prompt { color: var(--accent-start); margin-right: 8px; }
.prompt-custom { color: #fff; margin-right: 8px; opacity: 0.5; }

/* =========================================
   Philosophy Section (New)
   ========================================= */
.philosophy { padding: 4rem 0; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-dim); }

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.philo-card {
    background: linear-gradient(145deg, #111, #0a0a0a);
    border: 1px solid #222;
    padding: 2.5rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.philo-card:hover { 
    transform: translateY(-5px); 
    border-color: var(--accent-start);
    box-shadow: 0 10px 40px rgba(255, 59, 48, 0.15);
    z-index: 1;
}

/* .philo-card.highlight removed to keep border only on hover */

.philo-num {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #1a1a1a;
    z-index: 0;
    pointer-events: none;
    transition: color 0.6s ease;
}

.philo-num svg {
    width: 80px;
    height: 80px;
    stroke-width: 1.5;
    opacity: 1;
    transition: opacity 0.6s ease, filter 0.6s ease;
}

.philo-card:hover .philo-num {
    color: var(--accent-start);
}

.philo-card:hover .philo-num svg {
    opacity: 0.4;
    filter: drop-shadow(0 0 15px var(--accent-start));
}

.philo-card h3, .philo-card p { position: relative; z-index: 1; }
.philo-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: #fff; }
.philo-card p { color: var(--text-dim); font-size: 0.95rem; }

/* =========================================
   Features (Bento Grid)
   ========================================= */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding-bottom: 4rem;
}

.bento-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .bento-item.wide { grid-column: span 2; }
    .bento-item.tall { grid-row: span 2; }
}

.bento-item:hover {
    background: rgba(30, 30, 30, 0.9);
    border-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    z-index: 1;
}

.bento-item .icon { font-size: 2rem; margin-bottom: 1rem; }
.bento-item h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: #fff; }
.bento-item p { color: var(--text-dim); font-size: 0.9rem; flex-grow: 1; }

/* Footer */
footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-dim);
    font-size: 0.9rem;
    border-top: 1px solid #111;
    margin-top: 4rem;
}

.social-links { margin-bottom: 1rem; }
.social-links a { color: var(--text); margin: 0 10px; text-decoration: none; font-weight: 600; }