:root {
    --font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #bb86fc;
    --primary-variant-color: #3700b3;
    --secondary-color: #03dac6;
    --text-color: rgba(255, 255, 255, 0.87);
    --text-secondary-color: rgba(255, 255, 255, 0.6);
    --border-color: rgba(255, 255, 255, 0.12);
    --header-height: 60px;
    --content-width: 960px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    font-size: 16px;
}

body {
    padding-top: var(--header-height);
}

/* For embedded views, remove the padding reserved for the header */
body.embedded {
    padding-top: 0;
}

.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

header .header-content {
    width: 100%;
    max-width: var(--content-width);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

header nav a {
    color: var(--text-secondary-color);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.2s ease-in-out;
}

header nav a:hover, header nav a.active {
    color: var(--text-color);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary-color);
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

footer a {
    color: var(--text-secondary-color);
    text-decoration: underline;
}

footer a:hover {
    color: var(--primary-color);
}

footer .links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}


/* --- Typography & Content --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    line-height: 1.2;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    text-decoration: underline;
}

code {
    background-color: var(--surface-color);
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 6px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

pre {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    line-height: 1.45;
}

pre code {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 100%;
    border-radius: 0;
}

blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    color: var(--text-secondary-color);
    margin: 1.5rem 0;
    font-style: italic;
}

ul {
    padding-left: 20px;
}

li {
    margin-bottom: 0.5rem;
}

/* --- Cards and Grids --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card h3 {
    margin-top: 0;
    font-size: 1.25rem;
    color: var(--secondary-color);
}

.card p {
    color: var(--text-secondary-color);
    flex-grow: 1;
}

.card .card-footer {
    margin-top: 1rem;
    font-weight: 500;
    color: var(--primary-color);
}
