
@font-face {
    font-family: 'LXGW WenKai Mono';
    src: url('LXGWWenKaiMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
:root {
    --page-rail-width: min(1000px, calc(100% - 24px));
    --navbar-height: 68px;
    --navbar-margin-top: 12px;
    --reader-gap: 10px;
    --reader-top-offset: calc(var(--navbar-height) + var(--navbar-margin-top) + var(--reader-gap));
    --primary: #ff7096;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-main: #1c1719;
    --text-muted: #5c5255;
    --liquid-color-1: rgba(255, 112, 150, 0.35);
    --liquid-color-2: rgba(255, 183, 205, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'LXGW WenKai Mono', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[hidden] {
    display: none !important;
}

body {
    background-color: #fff7fa;
    color: var(--text-main);
    overflow-x: clip;
    overflow-y: visible;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 液体背景层 */
.liquid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 10% 20%, #fff0f5 0%, #ffe3ec 100%);
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: move 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
    z-index: -1;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--liquid-color-1);
    top: -15%;
    left: -10%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--liquid-color-2);
    bottom: -10%;
    right: -10%;
    animation-duration: 25s;
    animation-delay: -5s;
}

@keyframes move {
    from { transform: translate(0, 0) rotate(0deg) scale(1); }
    to { transform: translate(150px, 100px) rotate(30deg) scale(1.1); }
}

/* Liquid Glass: SVG displacement + backdrop blur */
.liquidGlass-wrapper {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: inherit;
    background: var(--liquid-bg, var(--liquid-tint, rgba(255, 255, 255, 0.1)));
    backdrop-filter: blur(var(--liquid-blur, 4px));
    backdrop-filter: blur(var(--liquid-blur, 4px)) url(#liquid_glass_filter);
    -webkit-backdrop-filter: blur(var(--liquid-blur, 4px));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.45),
      inset 0 -1px 0 rgba(255, 255, 255, 0.18),
      inset 6px 6px 16px rgba(255, 255, 255, 0.12),
      0 10px 28px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2);
}

/* 导航栏 - Liquid Glass */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 12px auto 0;
    width: var(--page-rail-width);
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    --nav-radius: 24px;
    border-radius: var(--nav-radius);
    z-index: 3000;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    --liquid-tint: rgba(255, 255, 255, 0.24);
    --liquid-bg: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#navbar.scrolled {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.58);
    --liquid-tint: rgba(255, 255, 255, 0.38);
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    background: linear-gradient(90deg, #ff7096, #ffb7cd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    position: relative;
    transition: opacity 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    width: 100%;
}

/* 核心内容区 */
.container {
    max-width: 800px;
    margin: 120px auto;
    padding: 0 24px;
}

.hero {
    text-align: center;
    margin-bottom: 100px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
    color: #1c1719;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.post-tools {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.new-post-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    --liquid-tint: rgba(255, 255, 255, 0.24);
}

.new-post-entry:hover {
    border-color: rgba(99, 102, 241, 0.45);
}

/* 博客卡片 - Liquid Glass 效果 */
.post-card {
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 32px;
    padding: 40px;
    margin-bottom: 40px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
    position: relative;
    --liquid-tint: rgba(255, 255, 255, 0.2);
}

.post-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 255, 255, 0.65);
    --liquid-tint: rgba(255, 255, 255, 0.32);
}

.post-card .date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

.post-card h2 {
    margin-bottom: 16px;
    font-size: 1.75rem;
    color: #1c1719;
}

.post-card p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    #navbar { width: calc(100% - 16px); }
}


/* ================================
   Dark Theme Overrides & Toggle
================================ */

body.dark-theme {
    --primary: #ffb7cd;
    --glass-bg: rgba(28, 23, 25, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #fff0f5;
    --text-muted: #e0d0d5;
    --liquid-color-1: rgba(255, 112, 150, 0.15);
    --liquid-color-2: rgba(233, 30, 99, 0.15);
    background-color: #1c1719;
}

body {
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.dark-theme .liquid-bg {
    background: radial-gradient(circle at 10% 20%, #1c1719 0%, #3f3a3b 100%);
}

body.dark-theme .hero h1,
body.dark-theme .post-card h2,
body.dark-theme .logo {
    color: #fff0f5;
}

body.dark-theme .liquidGlass-wrapper {
    --liquid-bg: rgba(15, 23, 42, 0.38);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      inset 0 -1px 0 rgba(255, 255, 255, 0.08),
      inset 6px 6px 16px rgba(148, 163, 184, 0.08),
      0 12px 28px rgba(2, 6, 23, 0.38);
}

body.dark-theme #navbar {
    border-color: rgba(255, 255, 255, 0.2);
    --liquid-bg: rgba(15, 23, 42, 0.7);
}

body.dark-theme #navbar.scrolled {
    border-color: rgba(255, 255, 255, 0.2);
    --liquid-tint: rgba(15, 23, 42, 0.6);
}

body.dark-theme .post-card:hover {
    border-color: rgba(255, 255, 255, 0.24);
    --liquid-tint: rgba(30, 41, 59, 0.58);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.beian-record-wrap {
    position: relative;
    z-index: 20;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: auto auto 16px;
    padding: 0 12px 8px;
}

.beian-record-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.62);
    padding: 8px 12px;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.beian-record-link:hover {
    color: var(--primary);
}

.beian-record-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-track {
    width: 60px;
    height: 30px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--glass-border);
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    transition: background 0.5s;
    overflow: hidden;
    backdrop-filter: blur(4px);
}

body.dark-theme .toggle-track {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

body.dark-theme .beian-record-link {
    color: rgba(248, 250, 252, 0.88);
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.72);
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), background 0.5s;
}

body.dark-theme .toggle-thumb {
    transform: translateX(30px) rotate(360deg);
    background: #1e293b;
}

.sun-icon, .moon-icon {
    position: absolute;
    width: 14px;
    height: 14px;
    transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0s), clip-path 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0s), filter 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0s), transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0s);
}

.sun-icon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.moon-icon {
    opacity: 0;
    transform: scale(0.6) rotate(90deg);
}

body.dark-theme .sun-icon {
    opacity: 0;
    transform: scale(0.6) rotate(-90deg);
}

body.dark-theme .moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

/* Auth Card */
.auth-layout {
    min-height: calc(100vh - 110px);
    display: grid;
    place-items: center;
    padding: 56px 24px 96px;
}

.auth-card {
    width: min(100%, 560px);
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 34px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.1);
    --liquid-tint: rgba(255, 255, 255, 0.22);
}

.auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 68px rgba(15, 23, 42, 0.15);
}

.auth-content {
    position: relative;
}

.auth-card-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.24) 0%, rgba(99, 102, 241, 0) 70%);
    top: -120px;
    right: -80px;
    pointer-events: none;
}

.auth-kicker {
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-card h1 {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 22px;
}

.auth-tabs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.16);
    margin-bottom: 24px;
}

.auth-tab-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    transform: translateX(calc(var(--auth-tab-index, 0) * 100%));
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.auth-tab {
    background: transparent;
    border: none;
    height: 42px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.auth-tab.active {
    color: var(--text-main);
}

.auth-form-stage {
    position: relative;
    min-height: 338px;
}

.auth-form {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease, filter 0.4s ease;
    opacity: 0;
    pointer-events: none;
    filter: blur(3px);
}

.auth-card.auth-login .auth-login,
.auth-card.auth-register .auth-register {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    filter: blur(0);
}

.auth-card.auth-login .auth-register {
    transform: translateX(34px);
}

.auth-card.auth-register .auth-login {
    transform: translateX(-34px);
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-field .auth-field-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: -2px;
}

.auth-field input {
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.56);
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-main);
    padding: 0 14px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.auth-field input::placeholder {
    color: rgba(100, 116, 139, 0.9);
}

.auth-field input:focus {
    border-color: rgba(99, 102, 241, 0.58);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.58);
}

.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    margin-bottom: 2px;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.auth-checkbox input {
    accent-color: var(--primary);
}

.auth-inline-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.88rem;
}

.auth-inline-link:hover {
    text-decoration: underline;
}

.auth-submit {
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    box-shadow: 0 14px 28px rgba(99, 102, 241, 0.28);
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(99, 102, 241, 0.35);
    filter: saturate(1.05);
}

.auth-switch-tip {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
}

.auth-switch-link {
    border: none;
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
}

.auth-switch-link:hover {
    text-decoration: underline;
}

body.dark-theme .auth-card {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 62px rgba(2, 6, 23, 0.46);
}

body.dark-theme .article-container,
body.dark-theme .editor-pane,
body.dark-theme .preview-pane {
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-theme .auth-tabs {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.14);
}

body.dark-theme .auth-tab-indicator {
    background: rgba(51, 65, 85, 0.88);
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.45);
}

body.dark-theme .auth-field input {
    background: rgba(15, 23, 42, 0.56);
    border-color: rgba(148, 163, 184, 0.26);
}

body.dark-theme .auth-field input::placeholder {
    color: rgba(148, 163, 184, 0.85);
}

body.dark-theme .auth-field input:focus {
    background: rgba(15, 23, 42, 0.74);
    border-color: rgba(129, 140, 248, 0.62);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.22);
}

/* Immediate state for when user interrupts */
.reveal-wrapper.immediate {
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    opacity: 1;
    clip-path: none;
    -webkit-clip-path: none;
    filter: blur(0px);
    transform: translateY(0);
}



@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-tools {
        justify-content: center;
    }

    .auth-layout {
        padding: 28px 16px 64px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 26px;
    }

    .auth-card h1 {
        font-size: 1.65rem;
    }

    .auth-form-stage {
        min-height: 350px;
    }

    .auth-row {
        gap: 12px;
        flex-wrap: wrap;
    }
}

/* Theme View Transition */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) {
  z-index: 1;
}
::view-transition-new(root) {
  z-index: 2147483646;
}

/* ========================================
   Articles Page Arc-Fitted Layout
======================================== */
body.articles-page {
    overflow: hidden;
}

.articles-page .article-collection {
    --article-arc-size: clamp(1280px, 138vw, 1920px);
    --article-arc-top: calc(-1 * clamp(180px, 14vh, 220px));
    --article-arc-left-factor: 0.62;
    position: relative;
    z-index: 1;
    width: var(--page-rail-width);
    max-width: 1000px;
    height: calc(100vh - 84px);
    margin: 84px auto 0;
    padding: 0 clamp(10px, 1.8vw, 24px);
    display: flex;
    flex-direction: column;
}

body.essays-page .container {
    width: var(--page-rail-width);
    max-width: 1000px;
    margin: var(--reader-top-offset) auto 120px;
}

body.essays-page .posts-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

body.essays-page .post-card {
    width: 100%;
    margin-bottom: 28px;
}

.articles-page .article-collection::before {
    content: "";
    position: absolute;
    left: calc(var(--article-arc-size) * -1 * var(--article-arc-left-factor));
    top: var(--article-arc-top);
    width: var(--article-arc-size);
    height: var(--article-arc-size);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.52);
    background:
        radial-gradient(50% 36% at 76% 24%, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 72%),
        radial-gradient(34% 30% at 80% 70%, rgba(255, 182, 206, 0.32) 0%, rgba(255, 182, 206, 0) 74%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 236, 242, 0.18) 34%, rgba(255, 255, 255, 0.06) 100%);
    box-shadow:
        inset -40px 0 58px rgba(255, 255, 255, 0.28),
        inset 26px 0 44px rgba(255, 171, 196, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        0 56px 110px rgba(30, 18, 22, 0.16);
    backdrop-filter: blur(12px) saturate(1.08);
    -webkit-backdrop-filter: blur(12px) saturate(1.08);
    pointer-events: none;
    z-index: -1;
}

.articles-page .article-collection::after {
    content: "";
    position: absolute;
    left: clamp(42px, 8vw, 132px);
    top: clamp(30px, 8vh, 84px);
    width: clamp(280px, 32vw, 500px);
    height: clamp(280px, 32vw, 500px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 72%);
    filter: blur(0.6px);
    pointer-events: none;
    z-index: -1;
}

.articles-page .article-hero {
    text-align: left;
    margin: 0 0 16px clamp(140px, 20vw, 286px);
    padding-top: 10px;
}

.articles-page .article-kicker {
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.articles-page .article-hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 4.8vw, 3.5rem);
}

.articles-page .article-flow {
    position: relative;
    flex: 1;
    overflow: hidden;
    padding: 8px clamp(6px, 3vw, 24px) 24px 0;
}

.articles-page .article-flow:focus-visible {
    outline: none;
}

.articles-page .article-flow::-webkit-scrollbar {
    display: none;
}

.articles-page .article-flow {
    scrollbar-width: none;
}

@media (min-width: 1024px) {
    .articles-page .article-flow {
        max-height: min(62vh, 620px);
    }
}

.articles-page .post-tools {
    position: relative;
    z-index: 8;
    justify-content: flex-start;
    margin: 0 0 14px calc(clamp(140px, 20vw, 286px) + 8px);
}

.articles-page .new-post-entry {
    min-height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    border-color: rgba(255, 255, 255, 0.6);
    --liquid-tint: rgba(255, 255, 255, 0.34);
}

.articles-page .new-post-entry:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 112, 150, 0.56);
}

.articles-page .posts-grid {
    position: relative;
    display: block;
    height: min(64vh, 620px);
    min-height: clamp(360px, 48vh, 460px);
    padding: 0;
}

.articles-page .post-card {
    --arc-left: 0px;
    --arc-top: 0px;
    --card-expand: 0px;
    --card-scale: 1;
    --card-focus: 0;
    position: absolute;
    left: var(--arc-left);
    top: var(--arc-top);
    isolation: isolate;
    overflow: hidden;
    margin: 0 !important;
    width: min(calc(clamp(280px, 31vw, 450px) + var(--card-expand, 0px)), calc(100% - 18px));
    min-height: 76px;
    padding: 14px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.56);
    --liquid-tint: rgba(255, 255, 255, calc(0.32 + var(--card-focus, 0) * 0.14));
    box-shadow:
        0 calc(12px + var(--card-focus, 0) * 16px) calc(28px + var(--card-focus, 0) * 24px) rgba(25, 16, 20, calc(0.08 + var(--card-focus, 0) * 0.12)),
        inset 0 1px 0 rgba(255, 255, 255, calc(0.46 + var(--card-focus, 0) * 0.24)),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    transform: translate3d(0, 0, 0) scale(var(--card-scale, 1));
    filter: saturate(calc(0.9 + var(--card-focus, 0) * 0.2));
    will-change: left, top, transform, opacity;
    transition:
        left 0.28s cubic-bezier(0.22, 0.7, 0.22, 1),
        top 0.28s cubic-bezier(0.22, 0.7, 0.22, 1),
        transform 0.22s cubic-bezier(0.22, 0.7, 0.22, 1),
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        filter 0.22s ease;
}

.articles-page .post-card:hover {
    transform: translateX(2px) translateY(-2px) scale(var(--card-scale, 1));
    border-color: rgba(255, 255, 255, 0.74);
    box-shadow:
        0 20px 40px rgba(25, 16, 20, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.58),
        inset 0 -1px 0 rgba(255, 255, 255, 0.24);
}

.articles-page .post-card .date,
.articles-page .post-card p {
    display: none !important;
}

.articles-page .post-card h2 {
    margin: 0;
    width: 100%;
    font-size: clamp(1.06rem, 1.74vw, 1.38rem);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.articles-page .post-card.folder-card {
    border-style: dashed;
    border-color: rgba(255, 148, 179, 0.68);
    --liquid-tint: rgba(255, 244, 249, calc(0.45 + var(--card-focus, 0) * 0.12));
}

.articles-page .post-card.folder-card h2 {
    font-weight: 800;
}

.articles-page .post-card.folder-child-card {
    border-color: rgba(255, 255, 255, 0.44);
}

.articles-page .post-card.folder-child-card h2 {
    font-size: clamp(0.98rem, 1.5vw, 1.2rem);
}

body.dark-theme.articles-page .article-collection::before {
    border-color: rgba(148, 163, 184, 0.3);
    background:
        radial-gradient(50% 36% at 76% 24%, rgba(248, 250, 252, 0.14) 0%, rgba(248, 250, 252, 0) 72%),
        radial-gradient(34% 30% at 80% 70%, rgba(244, 114, 182, 0.14) 0%, rgba(244, 114, 182, 0) 74%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.62) 0%, rgba(30, 41, 59, 0.44) 45%, rgba(15, 23, 42, 0.24) 100%);
    box-shadow:
        inset -40px 0 54px rgba(248, 250, 252, 0.08),
        inset 26px 0 40px rgba(244, 114, 182, 0.08),
        inset 0 0 0 1px rgba(148, 163, 184, 0.14),
        0 56px 116px rgba(2, 6, 23, 0.46);
}

body.dark-theme.articles-page .article-collection::after {
    background: radial-gradient(circle, rgba(248, 250, 252, 0.14) 0%, rgba(248, 250, 252, 0) 72%);
}

body.dark-theme.articles-page .new-post-entry {
    border-color: rgba(148, 163, 184, 0.36);
    color: #f7edf2;
    --liquid-tint: rgba(30, 41, 59, 0.6);
}

body.dark-theme.articles-page .new-post-entry:hover {
    border-color: rgba(244, 114, 182, 0.56);
}

body.dark-theme.articles-page .post-card {
    border-color: rgba(148, 163, 184, 0.34);
    --liquid-tint: rgba(30, 41, 59, calc(0.58 + var(--card-focus, 0) * 0.14));
    box-shadow:
        0 18px 38px rgba(2, 6, 23, 0.44),
        inset 0 1px 0 rgba(248, 250, 252, 0.12),
        inset 0 -1px 0 rgba(248, 250, 252, 0.06);
}

body.dark-theme.articles-page .post-card h2 {
    color: #fff1f7;
}

body.dark-theme.articles-page .post-card.folder-card {
    border-color: rgba(244, 114, 182, 0.52);
    --liquid-tint: rgba(42, 22, 33, calc(0.65 + var(--card-focus, 0) * 0.12));
}

body.dark-theme.articles-page .post-card.folder-child-card {
    border-color: rgba(148, 163, 184, 0.42);
}

@media (max-width: 1200px) {
    .articles-page .article-collection {
        --article-arc-size: clamp(1120px, 146vw, 1560px);
    }

    .articles-page .article-hero {
        margin-left: clamp(116px, 16vw, 228px);
    }

    .articles-page .post-tools {
        margin-left: calc(clamp(116px, 16vw, 228px) + 8px);
    }

    .articles-page .post-card {
        width: min(calc(clamp(260px, 34vw, 410px) + var(--card-expand, 0px)), calc(100% - 14px));
    }
}

@media (max-width: 900px) {
    .articles-page .article-collection {
        --article-arc-size: 1140px;
        --article-arc-top: -170px;
        height: calc(100vh - 82px);
        margin-top: 82px;
    }

    .articles-page .article-hero {
        margin-left: 92px;
    }

    .articles-page .article-flow {
        padding-right: 8vw;
    }

    .articles-page .post-tools {
        margin-left: 100px;
    }

    .articles-page .posts-grid {
        height: min(58vh, 560px);
        min-height: 330px;
    }

    .articles-page .post-card {
        width: min(calc(360px + var(--card-expand, 0px)), calc(100% - 12px));
    }
}

@media (max-width: 768px) {
    body.articles-page {
        overflow: hidden;
    }

    .articles-page .article-collection {
        --article-arc-size: 960px;
        --article-arc-top: -140px;
        margin-top: 92px;
        height: calc(100vh - 92px);
        padding: 0 6px;
    }

    .articles-page .article-collection::after {
        left: 18px;
        top: 36px;
        width: 230px;
        height: 230px;
    }

    .articles-page .article-hero {
        margin-left: 66px;
        margin-bottom: 8px;
    }

    .articles-page .article-kicker {
        font-size: 0.74rem;
    }

    .articles-page .article-flow {
        padding-right: 8px;
    }

    .articles-page .post-tools {
        margin-left: 68px;
    }

    .articles-page .posts-grid {
        height: min(56vh, 500px);
        min-height: 314px;
    }

    .articles-page .post-card {
        width: min(calc(332px + var(--card-expand, 0px)), calc(100% - 10px));
        min-height: 66px;
        padding: 12px 15px;
    }

    .articles-page .post-card h2 {
        font-size: 1.02rem;
    }
}

@media (max-width: 520px) {
    .articles-page .article-collection {
        --article-arc-size: 840px;
        --article-arc-top: -118px;
    }

    .articles-page .article-hero {
        margin-left: 52px;
    }

    .articles-page .post-tools {
        margin-left: 52px;
    }

    .articles-page .posts-grid {
        height: min(54vh, 460px);
        min-height: 292px;
    }

    .articles-page .post-card {
        width: min(calc(302px + var(--card-expand, 0px)), calc(100% - 12px));
        padding: 11px 13px;
        border-radius: 24px;
    }

    .articles-page .post-card h2 {
        font-size: 0.98rem;
    }
}
