:root {
    color-scheme: light;
    --ink: #46564d;
    --ink-strong: #2f3d36;
    --muted: rgba(70, 86, 77, .68);
    --surface: rgba(236, 244, 236, .64);
    --surface-soft: rgba(229, 240, 232, .46);
    --surface-strong: rgba(246, 250, 244, .72);
    --stroke: rgba(255, 255, 255, .56);
    --shadow: 18px 28px 80px rgba(91, 112, 101, .18), -8px -8px 34px rgba(255, 255, 255, .5);
    --inner: inset 0 1px 0 rgba(255, 255, 255, .68), inset 0 -18px 40px rgba(174, 208, 190, .16);
    --accent: #42cdbf;
    --accent-strong: #1bb7a7;
    --accent-soft: rgba(66, 205, 191, .14);
    --warn: #c17350;
    --radius: 34px;
    --font: "SF Pro Rounded", "SF Pro Display", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

[data-theme="dark"] {
    color-scheme: dark;
    --ink: #d7e3dc;
    --ink-strong: #f4fbf7;
    --muted: rgba(215, 227, 220, .66);
    --surface: rgba(28, 37, 34, .58);
    --surface-soft: rgba(255, 255, 255, .08);
    --surface-strong: rgba(45, 58, 53, .72);
    --stroke: rgba(255, 255, 255, .12);
    --shadow: 18px 28px 80px rgba(0, 0, 0, .32), -8px -8px 38px rgba(255, 255, 255, .025);
    --inner: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -18px 40px rgba(18, 24, 22, .22);
    --accent: #54d7c9;
    --accent-strong: #70eadf;
    --accent-soft: rgba(84, 215, 201, .14);
    --warn: #efad83;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: var(--font);
    background:
        radial-gradient(circle at 18% 18%, rgba(238, 244, 236, .76), transparent 22%),
        radial-gradient(circle at 76% 16%, rgba(197, 231, 216, .72), transparent 24%),
        linear-gradient(165deg, #e7ebe5 0%, #dfe9df 44%, #c6e8d3 72%, #a7dfcb 100%);
    overflow-x: hidden;
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at 16% 16%, rgba(78, 105, 96, .32), transparent 25%),
        radial-gradient(circle at 80% 18%, rgba(84, 215, 201, .16), transparent 24%),
        linear-gradient(165deg, #111816 0%, #18231f 48%, #24362f 78%, #17352e 100%);
}

body::before,
body::after {
    position: fixed;
    inset: auto;
    z-index: 0;
    pointer-events: none;
    content: "";
}

body::before {
    right: -18vw;
    bottom: -12vw;
    width: 62vw;
    height: 42vw;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(102, 221, 196, .28), transparent 68%);
    filter: blur(8px);
}

body::after {
    inset: 0;
    opacity: .16;
    background-image: radial-gradient(rgba(72, 92, 82, .32) .6px, transparent .6px);
    background-size: 7px 7px;
    mask-image: linear-gradient(to bottom, transparent, #000 42%, transparent);
}

a {
    color: inherit;
    text-decoration: none;
}

.aurora {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    opacity: .42;
    filter: blur(22px);
}

.aurora-a {
    top: 6vh;
    left: 12vw;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .52);
}

.aurora-b {
    right: 12vw;
    bottom: 12vh;
    width: 360px;
    height: 260px;
    border-radius: 999px;
    background: rgba(186, 234, 213, .46);
}

.shell {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100% - 36px));
    margin: 0 auto;
    padding: 36px 0 30px;
}

.glass-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--stroke);
    background: linear-gradient(145deg, var(--surface-strong), var(--surface));
    box-shadow: var(--shadow), var(--inner);
    backdrop-filter: blur(26px) saturate(135%);
    -webkit-backdrop-filter: blur(26px) saturate(135%);
}

.glass-panel::before {
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(150deg, rgba(255, 255, 255, .46), transparent 42%);
    content: "";
}

.topbar {
    position: sticky;
    top: 18px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 76px;
    padding: 14px 16px;
    border-radius: 34px;
}

.brand,
.nav,
.hero-actions,
.section-head,
.footer {
    display: flex;
    align-items: center;
}

.brand {
    gap: 12px;
    color: var(--ink-strong);
    font-size: 20px;
    font-weight: 850;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(150deg, #6cd9c9, #2db7a7);
    box-shadow: 0 14px 30px rgba(45, 183, 167, .22);
}

.nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.nav a,
.user-pill,
.theme-toggle {
    min-height: 38px;
    padding: 10px 14px;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 760;
}

.nav a:hover,
.theme-toggle:hover,
.nav-strong,
.user-pill {
    color: var(--ink-strong);
    background: rgba(255, 255, 255, .42);
}

[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .theme-toggle:hover,
[data-theme="dark"] .nav-strong,
[data-theme="dark"] .user-pill {
    background: rgba(255, 255, 255, .08);
}

.theme-toggle {
    cursor: pointer;
}

.widget-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 22px;
    padding: 34px 0;
}

.hero-widget {
    grid-column: span 4;
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 30px;
    min-height: 288px;
    padding: 38px;
    border-radius: 42px;
}

.hero-widget h1 {
    font-size: clamp(34px, 5.4vw, 58px);
}

.avatar-wrap {
    position: relative;
    width: 150px;
    aspect-ratio: 1;
}

.avatar-wrap::after {
    position: absolute;
    inset: -16px;
    z-index: -1;
    border-radius: 50%;
    background: rgba(255, 255, 255, .38);
    filter: blur(2px);
    content: "";
}

.avatar-wrap img,
.avatar-fallback {
    width: 100%;
    height: 100%;
    border: 8px solid rgba(255, 255, 255, .42);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 22px 52px rgba(75, 105, 92, .18);
}

.avatar-fallback {
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 68px;
    font-weight: 900;
    background: linear-gradient(145deg, #76dbc7, #88b7ef);
}

.is-hidden {
    display: none;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--ink-strong);
}

h1 {
    max-width: 720px;
    margin-bottom: 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 14px;
    font-size: 22px;
    line-height: 1.25;
}

h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.lead {
    max-width: 640px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.86;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 16px;
    color: var(--ink-strong);
    background: rgba(241, 248, 241, .52);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72), 0 12px 26px rgba(82, 105, 94, .1);
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.button.primary {
    color: #fff;
    border-color: rgba(255, 255, 255, .34);
    background: linear-gradient(145deg, #62d5c6, #25b6a6);
    box-shadow: 0 16px 34px rgba(38, 182, 166, .22);
}

.hero-actions {
    gap: 12px;
    flex-wrap: wrap;
}

.widget {
    grid-column: span 2;
    min-height: 190px;
    padding: 26px;
    border-radius: var(--radius);
}

.wide {
    grid-column: span 3;
}

.stat-widget {
    justify-content: center;
    color: var(--ink-strong);
}

.clock-widget {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 152px;
}

.clock-time {
    color: var(--ink-strong);
    font-size: clamp(46px, 6vw, 68px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.metric {
    display: block;
    margin-bottom: 8px;
    color: var(--ink-strong);
    font-size: 72px;
    font-weight: 900;
    line-height: .9;
    font-variant-numeric: tabular-nums;
}

.muted,
.widget p,
.post-card p {
    color: var(--muted);
    line-height: 1.78;
}

.tag-row,
.link-grid,
.post-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag-row span,
.post-card span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 13px;
    font-weight: 760;
}

.mini-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

.section-head {
    justify-content: space-between;
    gap: 14px;
}

.section-head a,
.text-link {
    color: var(--accent-strong);
    font-weight: 850;
}

.post-list {
    align-items: stretch;
}

.post-card {
    flex: 1 1 230px;
    min-height: 168px;
    padding: 18px;
    border: 1px solid var(--stroke);
    border-radius: 24px;
    background: var(--surface-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .46);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, .52);
    box-shadow: 0 16px 34px rgba(82, 105, 94, .12);
}

[data-theme="dark"] .post-card:hover {
    background: rgba(255, 255, 255, .11);
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-grid a {
    padding: 14px 16px;
    border: 1px solid var(--stroke);
    border-radius: 18px;
    background: var(--surface-soft);
    color: var(--ink-strong);
    font-weight: 800;
}

.auth-layout,
.dashboard-layout,
.single-layout {
    display: grid;
    min-height: 64vh;
    place-items: center;
    padding: 42px 0;
}

.single-layout {
    gap: 22px;
}

.auth-panel,
.article-panel {
    width: min(760px, 100%);
    padding: 34px;
    border-radius: 36px;
}

.article-panel {
    width: min(900px, 100%);
}

.article-body {
    color: var(--ink);
    font-size: 17px;
    line-height: 2;
}

form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--ink-strong);
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 14px 16px;
    color: var(--ink-strong);
    background: rgba(241, 248, 241, .54);
    outline: none;
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .48);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 8px;
    box-shadow: none;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: rgba(255, 255, 255, .08);
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(66, 205, 191, .72);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

textarea {
    resize: vertical;
}

select {
    appearance: none;
}

.flash {
    margin: 20px 0 0;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 20px;
    background: rgba(226, 255, 238, .7);
    color: #24744d;
    font-weight: 850;
    box-shadow: var(--shadow);
}

.flash.error {
    background: rgba(255, 235, 228, .72);
    color: #9f4a30;
}

.footer {
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px;
    border-radius: 26px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 980px) {
    .widget-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-widget,
    .wide,
    .widget {
        grid-column: span 2;
    }
}

@media (max-width: 680px) {
    .shell {
        width: min(100% - 18px, 1080px);
        padding-top: 12px;
    }

    .topbar {
        align-items: flex-start;
        border-radius: 28px;
        flex-direction: column;
    }

    .nav {
        justify-content: flex-start;
    }

    .widget-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding-top: 18px;
    }

    .hero-widget,
    .wide,
    .widget {
        grid-column: span 1;
    }

    .hero-widget {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 26px;
        border-radius: 32px;
    }

    .avatar-wrap {
        width: 118px;
    }

    h1,
    .hero-widget h1 {
        font-size: 38px;
    }

    .link-grid {
        grid-template-columns: 1fr;
    }
}
