
/* EVMetrics Master Stylesheet */
:root {
    --color-bg: #050505;
    --glass-surface: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --accent: #d4af37;
    --radius-lg: 16px;
    --radius-pill: 50px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    background-image:
        radial-gradient(at 0% 0%, hsla(45, 100%, 20%, 0.4) 0, transparent 50%),
        radial-gradient(at 50% 100%, hsla(38, 80%, 30%, 0.3) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(50, 90%, 15%, 0.4) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family:
        "Jost",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Header & Navigation ─────────────────────────── */
header {
    position: sticky;
    top: 20px;
    z-index: 100;
    margin: 0 auto;
    width: 90%;
    max-width: 1200px;
    border-radius: var(--radius-pill);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 24px;
    width: 24px;
    margin-right: 12px;
    filter: invert(1);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

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

.nav-links a[aria-current="page"] {
    color: #ffffff;
    font-weight: 600;
}

/* ── Layout Containers ───────────────────────────── */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
    width: 100%;
}

/* For individual blog posts */
main.container--blog {
    max-width: 800px;
    padding: 60px 20px;
}

/* ── Hero Sections ───────────────────────────────── */
.hero {
    text-align: center;
    padding: 40px 0 20px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 600;
    background: linear-gradient(180deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
    margin-top: 8px;
}

/* ── Blog Grid & Index ───────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    margin-top: 40px;
}

.blog-card {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.blog-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card a:hover {
    text-decoration: none;
}

.blog-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    vertical-align: bottom;
    margin: 0 !important;
    border-radius: 0 !important;
}

.blog-card__body {
    padding: 6px 20px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card__date {
    display: block;
    padding: 15px 20px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0px;
}

.blog-card__title {
    margin-top: 0;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.blog-card__excerpt {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 0;
}


/* ── Article & Blog Post Typography ──────────────── */
h1, h2, h3, h4 {
    margin-top: 40px;
    margin-bottom: 16px;
    line-height: 1.3;
}

main.container--blog h1 {
    font-size: 2.5rem;
    text-align: center;
}

p.post-meta {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 0.9rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
    font-size: 1.1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

main img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
}

figure {
    margin: 20px 0;
}

figcaption {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* ── Data Sections & Tables ──────────────────────── */
.data-section {
    margin: 40px auto;
    max-width: 1200px;
}

.table-controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

#tableSearch {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    width: 300px;
    font-size: 14px;
}

#tableSearch:focus {
    outline: none;
    border-color: #2a9d8f;
}

.table-container {
    overflow-x: auto;
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin-bottom: 40px;
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    font-size: 14px;
    white-space: nowrap;
}

th {
    background: rgba(0, 0, 0, 0.4);
    color: #d4af37;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

th:hover {
    background: rgba(212, 175, 55, 0.1);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
}

/* ── Footer ──────────────────────────────────────── */
footer {
    text-align: center;
    padding: 32px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 40px;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
    main.container--blog h1 {
        font-size: 2rem;
    }
}
