:root {
    /* Light Mode Body Variables */
    --bg: #f8fafc;
    --surface: #ffffff;
    --navy-brand: #0f2942;
    --gold: #c69c53;
    --gold-bg: #f9f3e8;
    --gold-text: #966b21;
    --cyan: #00b4d8;
    --cyan-bg: #e0f7fa;
    --cyan-text: #007791;
    --drf-bg: #e2e8f0;
    --drf-text: #0f2942;
    --text-main: #1e293b;
    --text-muted: #475569;
    --border: #e2e8f0;
    --btn-primary-bg: #0f2942;
    --btn-primary-text: #ffffff;
}

[data-theme="dark"] {
    /* Dark Mode Body Variables */
    --bg: #06101c;
    --surface: #0c1d30;
    --navy-brand: #f1f5f9;
    --gold: #e0b86b;
    --gold-bg: rgba(224, 184, 107, 0.14);
    --gold-text: #e0b86b;
    --cyan: #00d4ff;
    --cyan-bg: rgba(0, 212, 255, 0.14);
    --cyan-text: #38bdf8;
    --drf-bg: rgba(148, 163, 184, 0.16);
    --drf-text: #cbd5e1;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #1b3452;
    --btn-primary-bg: #00b4d8;
    --btn-primary-text: #06101c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Permanently Dark Navbar */
.navbar {
    background-color: #0a192f;
    border-bottom: 1px solid #1b3452;
    padding: 1.1rem 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.brand-logo {
    height: 106px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.brand:hover .brand-logo {
    transform: scale(1.04);
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-name {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 800;
    font-size: 2.15rem;
    line-height: 1.05;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f8fafc;
}

.brand-sub {
    font-size: 0.85rem;
    color: #e0b86b;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a {
    text-decoration: none;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #00d4ff;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #06101c;
    border: 1px solid #1b3452;
    color: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
}

.dot {
    width: 7px;
    height: 7px;
    background: #00d4ff;
    border-radius: 50%;
    box-shadow: 0 0 8px #00d4ff;
}

.theme-btn {
    background: #06101c;
    border: 1px solid #1b3452;
    color: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-btn:hover {
    border-color: #00d4ff;
    transform: scale(1.05);
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
    .brand-name { font-size: 1.45rem; }
    .brand-logo { height: 48px; }
    .status-pill { display: none; }
}

/* Hero */
.hero {
    padding: 4rem 0 3rem;
    max-width: 720px;
}

.hero-badge {
    display: inline-block;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: 2.35rem;
    color: var(--navy-brand);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Projects Grid */
#projects {
    scroll-margin-top: 165px; /* Clears 130px navbar + ~35px (two rows) of breathing room */
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    padding-bottom: 4rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--cyan);
    box-shadow: 0 12px 28px -8px rgba(0, 180, 216, 0.15);
}

.card-featured {
    border-top: 4px solid var(--cyan);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
}

.tag-gold { background: var(--gold-bg); color: var(--gold-text); }
.tag-navy { background: var(--drf-bg); color: var(--drf-text); }
.tag-cyan { background: var(--cyan-bg); color: var(--cyan-text); }

.endpoint-path {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card h2 {
    font-size: 1.25rem;
    color: var(--navy-brand);
    margin-bottom: 0.65rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
    flex-grow: 1;
}

.btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 14px rgba(0, 212, 255, 0.3);
}

.btn-outline {
    border: 1.5px solid var(--border);
    color: var(--navy-brand);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

/* Footer */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.85rem;
}
