/* ----------------------------------------------------------
   DARK THEME
-----------------------------------------------------------*/

:root {
    --bg: #020617;             /* main background (very dark navy) */
    --bg-elevated: #020617;
    --panel: rgba(15, 23, 42, 0.92);
    --panel-soft: rgba(15, 23, 42, 0.8);
    --glass: rgba(15, 23, 42, 0.75);
    --border-subtle: rgba(148, 163, 184, 0.25);

    --accent: #22d3ee;         /* cyan */
    --accent-soft: #0ea5e9;
    --accent-glow: #38e5ff;

    --text: #e5e7eb;
    --subtext: #9ca3af;

    --radius: 14px;
    --transition: 0.3s ease;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", Arial, sans-serif;
    background: radial-gradient(circle at top left, #0f172a 0%, #020617 45%, #000 100%);
    color: var(--text);
    scroll-behavior: smooth;
}

/* ----------------------------------------------------------
   HEADER + NAVIGATION
-----------------------------------------------------------*/

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(15,23,42,0.95), rgba(15,23,42,0.8));
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148,163,184,0.3);
}

nav {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

nav .title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Small animated battery in navbar */
.batt-nav {
    width: 30px;
    height: 16px;
    border-radius: 6px;
    border: 2px solid var(--accent);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(34,211,238,0.7);
}

.batt-nav::after {
    content: "";
    position: absolute;
    right: -4px;
    top: 3px;
    width: 4px;
    height: 8px;
    border-radius: 0 4px 4px 0;
    background: #e5e7eb;
}

.batt-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #22d3ee);
    transform-origin: left center;
    animation: battPulse 3s ease-in-out infinite;
}

@keyframes battPulse {
    0%   { transform: scaleX(0.25); opacity: 0.7; }
    50%  { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(0.35); opacity: 0.8; }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
}

nav ul li a {
    color: #cbd5f5;
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: color var(--transition);
}

nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #22c55e, #22d3ee);
    border-radius: 999px;
    transition: width var(--transition);
}

nav ul li a:hover {
    color: #e5e7eb;
}

nav ul li a:hover::after {
    width: 100%;
}
.sim-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 32px;
    width: 100%;
    max-width: none;
    margin: 40px 0 60px 0;
    padding: 0 48px;
}
.plots {
    width: 100%;
    min-height: 70vh;
    padding: 24px;
    border-radius: 18px;
    background: rgba(15,23,42,0.35);
    border: 1px solid rgba(148,163,184,0.25);
}


/* ----------------------------------------------------------
   SECTIONS / CARDS / TEXT
-----------------------------------------------------------*/

section {
    width: 100%;
    max-width: none;
    padding: 32px 48px;
    margin: 28px auto;
    background: var(--panel-soft);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 18px 45px rgba(15,23,42,0.7);
    backdrop-filter: blur(18px);
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h1, h2, h3 {
    color: #e5e7eb;
    letter-spacing: 0.02em;
}

p, li {
    color: var(--subtext);
    line-height: 1.6;
}

.card {
    background: rgba(15,23,42,0.85);
    border-radius: var(--radius);
    padding: 18px 18px 16px;
    border: 1px solid rgba(148,163,184,0.35);
    box-shadow: 0 16px 35px rgba(15,23,42,0.9);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(34,211,238,0.2), transparent 55%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

/* ----------------------------------------------------------
   SCROLL CHARGING BAR
-----------------------------------------------------------*/

#charging-bar {
    position: fixed;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 60vh;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.4);
    background: radial-gradient(circle at top, rgba(15,23,42,0.8), transparent);
    overflow: hidden;
    z-index: 900;
    box-shadow: 0 0 12px rgba(15,23,42,1);
}

#charging-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, #22c55e, #22d3ee);
    box-shadow: 0 0 16px rgba(56,229,255,0.9);
    transition: height 0.2s linear;
}

/* ----------------------------------------------------------
   BUTTONS
-----------------------------------------------------------*/

button, .btn {
    background: linear-gradient(120deg, #22c55e, #22d3ee);
    color: #020617;
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, filter 0.15s ease-out;
    box-shadow: 0 12px 30px rgba(34,211,238,0.48);
}

button:hover, .btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 18px 40px rgba(34,211,238,0.7);
}

button:active, .btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 8px 22px rgba(34,211,238,0.45);
}

/* ----------------------------------------------------------
   HERO / PILLS (used on index)
-----------------------------------------------------------*/

.pill {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
    background: rgba(15,23,42,0.9);
    font-size: 0.8rem;
    color: var(--subtext);
}

/* ----------------------------------------------------------
   FOOTER
-----------------------------------------------------------*/

footer {
    width: 90%;
    max-width: 1100px;
    margin: 30px auto 40px;
    text-align: center;
    color: var(--subtext);
    font-size: 0.85rem;
    padding-top: 10px;
    border-top: 1px solid rgba(148,163,184,0.4);
}
