:root {
    color-scheme: light;

    --bg: #eceeef;
    --bg-rgb: 236, 238, 239;
    --surface: rgba(255, 255, 255, .9);
    --surface-rgb: 255, 255, 255;
    --surface-solid: #f8f9f9;
    --surface-2: #e5e8ea;
    --surface-2-rgb: 229, 232, 234;
    --surface-3: #d9dde0;
    --surface-3-rgb: 217, 221, 224;
    --border: rgba(54, 61, 66, .16);
    --border-rgb: 54, 61, 66;

    --card-bg: rgba(255, 255, 255, .94);
    --card-bg-hover: rgba(255, 255, 255, .99);
    --card-border: rgba(54, 61, 66, .17);
    --card-border-hover: rgba(var(--accent-rgb), .48);
    --card-shadow: 0 7px 20px rgba(35, 39, 42, .08);
    --card-shadow-hover: 0 10px 26px rgba(35, 39, 42, .13);

    --text: #1c2023;
    --text-rgb: 28, 32, 35;
    --text-dim: #626a70;
    --text-dim-rgb: 98, 106, 112;
    --heading: #343a3e;
    --hero-title-color: #30363a;
    --hero-title-shadow: none;
    --media-text: #f1f3f4;
    --media-text-dim: #c4c9cc;
    --media-accent: #d0ad76;
    --media-accent-rgb: 208, 173, 118;

    --accent: #b67f18;
    --accent-hover: #94630f;
    --accent-rgb: 182, 127, 24;
    --accent-text: #ffffff;
    --secondary: #66747d;
    --secondary-hover: #414d54;
    --secondary-rgb: 102, 116, 125;

    --success: #3f735c;
    --success-rgb: 63, 115, 92;
    --warning: #8a5b3d;
    --warning-rgb: 138, 91, 61;

    --poly-dark-rgb: 160, 165, 169;
    --poly-mid-rgb: 202, 206, 209;
    --poly-light-rgb: 241, 243, 244;
    --poly-opacity: .88;
    --poly-reduced-opacity: .66;

    --overlay-strong: rgba(7, 8, 9, .76);
    --overlay-mid: rgba(10, 11, 12, .36);
    --overlay-soft: rgba(10, 11, 12, .02);
    --highlight-rgb: 255, 255, 255;
    --shadow-soft: rgba(35, 39, 42, .05);
    --shadow-medium: rgba(35, 39, 42, .09);
    --shadow-strong: rgba(35, 39, 42, .14);
    --shadow-color: rgba(35, 39, 42, .1);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 10px 28px var(--shadow-color);
    --header-h: 64px;
    --content-width: 1160px;
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0d0e0f;
    --bg-rgb: 13, 14, 15;
    --surface: rgba(25, 27, 29, .9);
    --surface-rgb: 25, 27, 29;
    --surface-solid: #191b1d;
    --surface-2: #232629;
    --surface-2-rgb: 35, 38, 41;
    --surface-3: #2c3033;
    --surface-3-rgb: 44, 48, 51;
    --border: rgba(190, 196, 200, .15);
    --border-rgb: 190, 196, 200;

    --card-bg: rgba(38, 40, 42, .97);
    --card-bg-hover: rgba(45, 48, 51, .98);
    --card-border: rgba(224, 228, 230, .16);
    --card-border-hover: rgba(var(--accent-rgb), .48);
    --card-shadow: 0 10px 28px rgba(0, 0, 0, .3);
    --card-shadow-hover: 0 14px 34px rgba(0, 0, 0, .38);

    --text: #edf0f1;
    --text-rgb: 237, 240, 241;
    --text-dim: #a7adb1;
    --text-dim-rgb: 167, 173, 177;
    --heading: #edf0f1;
    --hero-title-color: #f0f2f3;
    --hero-title-shadow: none;

    --accent: #b99560;
    --accent-hover: #d0ad76;
    --accent-rgb: 185, 149, 96;
    --accent-text: #0d0e0f;
    --secondary: #aeb8bf;
    --secondary-hover: #cbd2d6;
    --secondary-rgb: 174, 184, 191;

    --success: #91b9a4;
    --success-rgb: 145, 185, 164;
    --warning: #c7a387;
    --warning-rgb: 199, 163, 135;

    --poly-dark-rgb: 10, 11, 12;
    --poly-mid-rgb: 27, 29, 31;
    --poly-light-rgb: 55, 58, 61;
    --poly-opacity: .84;
    --poly-reduced-opacity: .58;

    --overlay-strong: rgba(7, 8, 9, .84);
    --overlay-mid: rgba(10, 11, 12, .46);
    --overlay-soft: rgba(10, 11, 12, .03);
    --shadow-soft: rgba(0, 0, 0, .1);
    --shadow-medium: rgba(0, 0, 0, .16);
    --shadow-strong: rgba(0, 0, 0, .24);
    --shadow-color: rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: var(--text);
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}
main { flex: 1; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; }
.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    padding: 22px 24px;
    color: var(--text-dim);
    background: rgba(var(--bg-rgb), .9);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 13px;
}
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--secondary-hover); }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 20px;
    color: var(--accent-text);
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.button:hover { color: var(--accent-text); background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); }
.button.secondary { color: var(--secondary-hover); background: rgba(var(--secondary-rgb), .06); border-color: rgba(var(--secondary-rgb), .38); }
.button.secondary:hover { color: var(--text); background: rgba(var(--secondary-rgb), .13); border-color: var(--secondary); }
#bg-lowpoly { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; opacity: var(--poly-opacity); pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    #bg-lowpoly { opacity: var(--poly-reduced-opacity); }
}
