:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --em-bg: #0d1f3c;
    --em-surface: #132442;
    --em-fg: #e8edf5;
    --em-fg-muted: #8fa8c8;
    --em-accent: #5b9cf6;
    --em-accent-hover: #93c5fd;
    --em-border: #1e3a5f;

    /* Override Bootstrap's body variables */
    --bs-body-bg: #0d1f3c;
    --bs-body-color: #e8edf5;
    --bs-link-color: #5b9cf6;
    --bs-link-hover-color: #93c5fd;
}

html {
    background-color: #0d1f3c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--em-fg) !important;
    background-color: var(--em-bg) !important;
    background-image: linear-gradient(160deg, #1a4a7a 0%, #0d1f3c 45%, #0a1628 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Layout */
.em-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Nav */
.em-nav-bar {
    border-bottom: 1px solid var(--em-border);
    padding: 20px 0;
    margin-bottom: 64px;
    background: rgba(10, 15, 30, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.em-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.em-nav-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--em-fg) !important;
    text-decoration: none !important;
}
.em-nav-links {
    display: flex;
    gap: 20px;
}
.em-nav-links a {
    font-size: 0.875rem;
    color: var(--em-fg-muted) !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}
.em-nav-links a:hover { color: var(--em-fg) !important; }

/* Sections */
.em-section {
    margin-bottom: 60px;
}
.em-section-label {
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--em-accent) !important;
    margin-bottom: 20px;
}

/* Hero */
.em-hero { margin-bottom: 72px; }
.em-hero-name {
    font-size: 2.25rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 12px;
    color: var(--em-fg) !important;
}
.em-hero-tagline {
    color: var(--em-fg-muted) !important;
    font-size: 1.0625rem !important;
    max-width: 500px;
    line-height: 1.65;
    margin-bottom: 24px;
}
.em-social-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.em-social-link {
    font-size: 0.875rem;
    color: var(--em-accent) !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}
.em-social-link:hover { color: var(--em-accent-hover) !important; }

/* Experience / Education entries */
.em-entry {
    display: flex;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--em-border);
}
.em-entry:first-of-type { border-top: 1px solid var(--em-border); }
.em-entry-meta {
    flex-shrink: 0;
    width: 148px;
    padding-top: 1px;
}
.em-entry-date {
    font-size: 0.8125rem !important;
    color: var(--em-fg-muted) !important;
    line-height: 1.5;
    margin: 0 !important;
}
.em-entry-title {
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: var(--em-fg) !important;
    margin: 0 0 2px !important;
    line-height: 1.3;
}
.em-entry-subtitle {
    font-size: 0.875rem !important;
    color: var(--em-fg-muted) !important;
    margin: 0 0 5px !important;
}
.em-entry-body {
    font-size: 0.875rem !important;
    color: var(--em-fg-muted) !important;
    line-height: 1.65;
    margin: 0 !important;
}

/* Project cards */
.em-project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.em-card {
    display: block !important;
    background: var(--em-surface);
    border: 1px solid var(--em-border);
    border-radius: 12px;
    padding: 18px 20px;
    text-decoration: none !important;
    color: inherit !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.em-card:hover {
    border-color: var(--em-accent);
    box-shadow: 0 0 0 1px var(--em-accent), 0 4px 24px rgba(129, 140, 248, 0.08);
}
.em-card-title {
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: var(--em-fg) !important;
    margin: 0 0 5px !important;
}
.em-card-desc {
    font-size: 0.8125rem !important;
    color: var(--em-fg-muted) !important;
    line-height: 1.55;
    margin: 0 0 12px !important;
}
.em-card-link {
    font-size: 0.8125rem !important;
    color: var(--em-accent) !important;
    margin: 0 !important;
}

/* Footer */
.em-footer-bar {
    border-top: 1px solid var(--em-border);
    padding: 28px 0 48px;
    margin-top: 8px;
}
.em-footer-text {
    font-size: 0.8125rem !important;
    color: var(--em-fg-muted) !important;
    margin: 0 !important;
}

/* Responsive */
@media (max-width: 540px) {
    .em-hero-name { font-size: 1.75rem !important; }
    .em-project-grid { grid-template-columns: 1fr; }
    .em-entry { flex-direction: column; gap: 2px; }
    .em-entry-meta { width: auto; }
}
