:root {
    /* === COLORS === */
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-text: #111111;
    --color-muted: #666666;

    --color-primary: #0a66c2;
    --color-primary-hover: #004182;

    --color-border-accent: rgba(10, 102, 194, 0.15);

    --color-text-inverse: #ffffff;

    --color-surface-elevated-dark: #22262e;

    /* === DARK MODE COLORS === */
    --color-bg-dark: #0f1115;
    --color-surface-dark: #1a1d23;
    --color-text-dark: #e6e6e6;
    --color-muted-dark: #aaaaaa;
    --color-primary-dark: #6cb6ff;

    /* === SPACING === */
    --space-xs: 0.4em;
    --space-sm: 0.8em;
    --space-md: 1.5em;
    --space-lg: 2.5em;

    /* === RADIUS === */
    --radius: 12px;

    /* === SHADOW === */
    --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 10px 30px rgba(0, 0, 0, 0.1);
}


/* ============================= */
/* === 1. RESET & BASE ======== */
/* ============================= */

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

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    background-color: var(--color-bg);
    color: var(--color-text);
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

/* ============================= */
/* === 2. LAYOUT ============== */
/* ============================= */

header {
    font-size: xx-large;
    margin: 0.5em;
}

.topbar {
    font-size: 0.9rem;
    opacity: 0.7;
    padding: 0.5em 1em;
}

.topbar.minimal {
    opacity: 0.3;
}

nav {
    width: 100%;
    padding: 0.5em 1em;
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    white-space: nowrap;
    overflow-x: auto;
    display: flex;
    align-items: center;
    gap: 1em;
}

nav p {
    margin: 0;
    display: flex;
    gap: 1em;
}

nav a {
    color: var(--color-text-inverse);
}

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

#changed {
    float: right;
    font-size: x-small;
    margin: 0.5em;
}

main {
    max-width: 1000px;
    margin: auto;
    padding: var(--space-md);
}

/* ============================= */
/* === 3. TYPOGRAPHY ========= */
/* ============================= */

h1 {
    letter-spacing: -0.5px;
}

h2 {
    font-weight: 500;
}

main p {
    margin-bottom: 1em;
    max-width: 65ch;
}

/* ============================= */
/* === 8. UTILITIES ========== */
/* ============================= */

.right {
    float: right;
    margin-left: 1.5em;
    border-radius: 12px;
}

.focus {
    margin-top: 1.5em;
    padding: var(--space-md);
    border-left: 3px solid var(--color-primary);
    background: var(--color-border-accent);
}

/* ============================= */
/* === 10. DARK MODE ========= */
/* ============================= */

@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--color-bg-dark);
        color: var(--color-text-dark);
    }

    a {
        color: var(--color-primary-dark);
    }

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

    .focus {
        background: rgba(108, 182, 255, 0.08);
        border-left: 3px solid var(--color-primary-dark);
    }
}


/* ============================= */
/* === QR Code == */
/* ============================= */

.qr {
    text-align: center;
    margin-top: 1em;
}

.qr img {
    border-radius: 8px;
    width: 120px;
}

.qr-light {
    display: block !important;
}

.qr-dark {
    display: none !important;
}

@media (prefers-color-scheme: dark) {
    .qr-light {
        display: none !important;
    }

    .qr-dark {
        display: block !important;
    }
}

.qr-section {
    text-align: center;
    margin-top: 3em;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-section h2 {
    margin-bottom: 0.5em;
}

.qr-text {
    margin-top: 0.6em;
    font-size: 0.9rem;
    color: var(--color-muted);
}

.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5em;
}

.cv-header-right {
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cv-header-right img {
    width: 90px;
    display: block;
}

.qr-label {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 0.3em;
}