:root {
    /* Default (Light) */
    --bg: #fafaf9;
    --text: #292524;
    --text-high: #1c1917;
    --accent: #065f46;
    --border: #e7e5e4;
    --icon-muted: #a8a29e;
    --nav-hover: #f5f5f4;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Default (Dark fallback if no theme selected) */
        --bg: #0c0c0b;
        --text: #d6d3d1;
        --text-high: #f5f5f4;
        --accent: #10b981;
        --border: #27272a;
        --icon-muted: #78716c;
        --nav-hover: #1c1917;
    }
}

:root[data-theme="default"] {
    --bg: #fafaf9;
    --text: #292524;
    --text-high: #1c1917;
    --accent: #065f46;
    --border: #e7e5e4;
    --icon-muted: #a8a29e;
    --nav-hover: #f5f5f4;
}

:root[data-theme="default-dark"] {
    --bg: #0c0c0b;
    --text: #d6d3d1;
    --text-high: #f5f5f4;
    --accent: #10b981;
    --border: #27272a;
    --icon-muted: #78716c;
    --nav-hover: #1c1917;
}

:root[data-theme="tokyonight"] {
    --bg: #1a1b26;
    --text: #a9b1d6;
    --text-high: #c0caf5;
    --accent: #7aa2f7;
    --border: #414868;
    --icon-muted: #565f89;
    --nav-hover: #24283b;
}

:root[data-theme="everforest"] {
    --bg: #2d353b;
    --text: #d3c6aa;
    --text-high: #e6e2cc;
    --accent: #a7c080;
    --border: #475258;
    --icon-muted: #859289;
    --nav-hover: #343f44;
}

:root[data-theme="nord"] {
    --bg: #2e3440;
    --text: #d8dee9;
    --text-high: #eceff4;
    --accent: #88c0d0;
    --border: #4c566a;
    --icon-muted: #4c566a;
    --nav-hover: #3b4252;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-high);
    font-weight: 700;
    margin-top: 0;
}

p {
    margin-bottom: 1.5rem;
}

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

a:hover {
    color: var(--text-high);
}

/* Layout */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    max-width: 900px;
    margin: 0 auto;
}

.top-bar-left, .top-bar-center, .top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar-center {
    gap: 1.5rem;
}

.brand {
    font-weight: 800;
    font-size: 1.125rem;
    color: var(--text-high);
}

.brand:hover {
    color: var(--accent);
}

.nav-link {
    color: var(--text);
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem;
    border-radius: 4px;
}

.nav-link:hover {
    color: var(--accent);
    background-color: var(--nav-hover);
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.theme-switcher {
    background-color: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.25rem 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
}

.theme-switcher:focus {
    border-color: var(--accent);
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Welcome Message / General Content */
.welcome-header {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.welcome-text {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .top-bar-center {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Image Centering */
.center-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh; /* Adjust this to center vertically within the main content area */
    flex-direction: column;
}

.centered-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px; /* Optional: adds rounded corners to the gif */
}
