/* =============================================
   RESET & VARIABLES
   ============================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #f5f1eb;
    --bg-alt: #ede8e0;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-glass: rgba(255, 255, 255, 0.45);
    --text: #2d2a24;
    --text-secondary: #6b655c;
    --text-muted: #9e958b;
    --text-inverse: #f5f1eb;
    --accent: #bc4a3c;
    --accent-dark: #9a3a2e;
    --accent-subtle: rgba(188, 74, 60, 0.08);
    --accent-light: rgba(188, 74, 60, 0.04);
    --gold: #8b7355;
    --gold-dark: #6d5940;
    --gold-light: rgba(139, 115, 85, 0.1);
    --border: rgba(45, 42, 36, 0.08);
    --border-accent: rgba(188, 74, 60, 0.2);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.08);
    --shadow-xl: 0 24px 64px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-display: 'Noto Serif SC', 'Noto Sans SC', serif;
    --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-accent: 'Outfit', sans-serif;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --max-width: 1100px;
    --header-h: 72px;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) var(--bg-alt);
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================
   NOISE TEXTURE OVERLAY
   ============================================= */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* =============================================
   TYPOGRAPHY HELPERS
   ============================================= */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-accent);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.section-label::after {
    content: '';
    width: 24px;
    height: 1.5px;
    background: var(--accent);
    border-radius: 1px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    letter-spacing: -0.02em;
}
.section-title .accent {
    color: var(--accent);
    position: relative;
}
.section-title .accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0.15em;
    background: var(--accent-subtle);
    border-radius: 2px;
}

.section-sub {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 8px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--accent);
    color: var(--text-inverse);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 100px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 50%);
    pointer-events: none;
}
.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(188, 74, 60, 0.25);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.88rem;
    border-radius: 100px;
    transition: var(--transition);
}
.btn-secondary:hover {
    border-color: var(--border-accent);
    background: var(--accent-subtle);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
    border-radius: 100px;
}
.btn-ghost:hover {
    color: var(--text);
    background: var(--bg-card);
}
.btn-ghost i { font-size: 0.75rem; transition: var(--transition); }
.btn-ghost:hover i { transform: translateX(4px); }

/* Write button — gold variant */
.btn-write {
    background: var(--gold) !important;
}
.btn-write::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 50%) !important;
}
.btn-write:hover {
    background: var(--gold-dark) !important;
    box-shadow: 0 8px 24px rgba(139, 115, 85, 0.3) !important;
}

.articles-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    font-size: 0.85rem;
    border-radius: 100px;
    transition: var(--transition);
}
.btn-danger:hover {
    background: #c82333;
}

/* =============================================
   HEADER
   ============================================= */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}
.header.scrolled {
    background: rgba(245, 241, 235, 0.85);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
}
.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-icon {
    width: 34px;
    height: 34px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--accent);
    transition: var(--transition);
    font-family: var(--font-accent);
    font-weight: 600;
}
.logo:hover .logo-icon {
    background: var(--accent);
    color: var(--text-inverse);
    transform: scale(1.05);
}
.logo-text {
    transition: var(--transition);
}
.logo:hover .logo-text {
    color: var(--accent);
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    padding: 4px 0;
    font-weight: 450;
}
.nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    border-radius: 1px;
    transform: translateX(-50%);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }
.nav a.active { color: var(--text); font-weight: 600; }
.nav a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .icon-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 1rem;
}
.header-actions .icon-btn:hover {
    background: var(--bg-alt);
    color: var(--accent);
}

.header-actions .login-btn {
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent);
    border: 1px solid var(--border-accent);
    transition: var(--transition);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}
.header-actions .login-btn:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 36px; height: 36px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.menu-toggle span {
    display: block;
    width: 20px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* =============================================
   LOGIN DROPDOWN
   ============================================= */
.header-auth-buttons {
    position: relative;
}
.login-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 24px;
    display: none;
    z-index: 200;
    animation: dropdownIn 0.25s ease;
}
.login-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: white;
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: rotate(45deg);
}
.login-dropdown.show { display: block; }
.login-dropdown-header { text-align: center; margin-bottom: 20px; }
.login-dropdown-header h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
}
.login-dropdown-header p { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.login-dropdown .form-group { margin-bottom: 14px; }
.login-dropdown .form-group label {
    font-size: 0.8rem; font-weight: 500; color: var(--text);
    margin-bottom: 4px; display: block;
}
.login-dropdown .form-group input {
    width: 100%; padding: 10px 14px; font-size: 0.85rem;
    font-family: var(--font-body); color: var(--text);
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); outline: none; transition: var(--transition);
}
.login-dropdown .form-group input:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle);
}
.login-dropdown .form-submit {
    width: 100%; padding: 10px; background: var(--accent);
    color: var(--text-inverse); font-size: 0.85rem; font-weight: 600;
    border-radius: 100px; border: none; cursor: pointer;
    transition: var(--transition); margin-top: 4px;
}
.login-dropdown .form-submit:hover { background: var(--accent-dark); }
.login-dropdown .form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.login-dropdown-footer {
    text-align: center; margin-top: 16px; padding-top: 14px;
    border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-secondary);
}
.login-dropdown-footer a { color: var(--accent); font-weight: 500; }
.login-dropdown-footer a:hover { text-decoration: underline; }

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =============================================
   USER MENU (Header)
   ============================================= */
.user-menu { position: relative; }
.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.user-avatar-btn:hover {
    border-color: var(--border-accent);
    background: var(--accent-subtle);
}
.avatar-small {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    font-size: 1rem;
}
.user-name {
    font-size: 0.85rem;
    font-weight: 500;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-avatar-btn i { font-size: 0.65rem; color: var(--text-muted); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 8px;
    display: none;
    z-index: 100;
    animation: dropdownIn 0.2s ease;
}
.user-dropdown.show { display: block; }
.user-dropdown a, .user-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-align: left;
}
.user-dropdown a:hover, .user-dropdown button:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}
.user-dropdown hr { margin: 6px 0; border: none; border-top: 1px solid var(--border); }

/* =============================================
   SEARCH OVERLAY
   ============================================= */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(45,42,36,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
}
.search-overlay.show { display: flex; }
.search-modal {
    background: var(--bg);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: dropdownIn 0.25s ease;
}
.search-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.search-header i { color: var(--text-muted); font-size: 1.1rem; }
.search-header input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.05rem;
    font-family: var(--font-body);
    color: var(--text);
    outline: none;
}
.search-header input::placeholder { color: var(--text-muted); }
.search-header button { color: var(--text-muted); font-size: 1.2rem; }
.search-header button:hover { color: var(--text); }
.search-results { max-height: 400px; overflow-y: auto; padding: 8px; }
.search-result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}
.search-result-item:hover { background: var(--bg-alt); }
.search-result-item .sri-title { font-weight: 600; font-size: 0.92rem; }
.search-result-item .sri-meta { font-size: 0.78rem; color: var(--text-muted); }

/* =============================================
   SCROLL REVEAL
   ============================================= */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}
[data-reveal].revealed-up {
    opacity: 1;
    transform: translateY(0);
}
[data-reveal="left"] {
    opacity: 0;
    transform: translateX(-30px);
}
[data-reveal="left"].revealed {
    opacity: 1;
    transform: translateX(0);
}
[data-reveal="right"] {
    opacity: 0;
    transform: translateX(30px);
}
[data-reveal="right"].revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger children */
.track-card:nth-child(1) { transition-delay: 0.05s; }
.track-card:nth-child(2) { transition-delay: 0.1s; }
.track-card:nth-child(3) { transition-delay: 0.15s; }
.track-card:nth-child(4) { transition-delay: 0.2s; }
.track-card:nth-child(5) { transition-delay: 0.25s; }
.track-card:nth-child(6) { transition-delay: 0.3s; }

.article-card:nth-child(1) { transition-delay: 0.05s; }
.article-card:nth-child(2) { transition-delay: 0.15s; }
.article-card:nth-child(3) { transition-delay: 0.05s; }
.article-card:nth-child(4) { transition-delay: 0.15s; }

.res-item:nth-child(1) { transition-delay: 0.02s; }
.res-item:nth-child(2) { transition-delay: 0.06s; }
.res-item:nth-child(3) { transition-delay: 0.10s; }
.res-item:nth-child(4) { transition-delay: 0.14s; }
.res-item:nth-child(5) { transition-delay: 0.18s; }
.res-item:nth-child(6) { transition-delay: 0.22s; }
.res-item:nth-child(7) { transition-delay: 0.26s; }
.res-item:nth-child(8) { transition-delay: 0.30s; }

/* =============================================
   HERO
   ============================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-h);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 85% 15%, rgba(188, 74, 60, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 85%, rgba(139, 115, 85, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(188, 74, 60, 0.02) 0%, transparent 40%),
        linear-gradient(180deg, var(--bg) 0%, #ede4d8 100%);
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--bg), transparent);
    pointer-events: none;
}

/* Floating decorative elements */
.hero-float {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.float-dot-1 {
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(188,74,60,0.04), transparent 70%);
    top: 10%; right: 5%;
    animation: floatDrift 8s ease-in-out infinite;
}
.float-dot-2 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(139,115,85,0.04), transparent 70%);
    bottom: 5%; left: 0%;
    animation: floatDrift 12s ease-in-out infinite reverse;
}
.float-line {
    width: 1px; height: 200px;
    background: linear-gradient(to bottom, transparent, rgba(188,74,60,0.08), transparent);
    top: 15%; left: 8%;
    transform: rotate(15deg);
    animation: floatPulse 6s ease-in-out infinite;
}
.float-ring {
    width: 80px; height: 80px;
    border: 1px solid rgba(139,115,85,0.12);
    top: 60%; right: 15%;
    animation: floatRing 10s linear infinite;
}

@keyframes floatDrift {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(15px, -15px); }
    66% { transform: translate(-10px, 10px); }
}
@keyframes floatPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}
@keyframes floatRing {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-content { padding: 40px 0; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
    margin-bottom: 28px;
    animation: heroFadeSlide 0.8s ease forwards;
}
.hero-badge .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Date/time in hero */
.hero-datetime {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    animation: heroFadeSlide 0.8s ease 0.05s forwards;
    opacity: 0;
    font-weight: 400;
    letter-spacing: 0.3px;
}
.hero-datetime i {
    font-size: 0.7rem;
    opacity: 0.7;
}
.hero-datetime .dt-sep {
    opacity: 0.3;
    margin: 0 2px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    animation: heroFadeSlide 0.8s ease 0.1s forwards;
    opacity: 0;
    letter-spacing: -0.01em;
}
.hero-title .accent {
    color: var(--accent);
    position: relative;
    display: inline-block;
}
.hero-title .type-end {
    display: inline-block;
    width: 3px; height: 0.85em;
    background: var(--accent);
    margin-left: 4px;
    vertical-align: baseline;
    animation: blink 1.2s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 460px;
    animation: heroFadeSlide 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    animation: heroFadeSlide 0.8s ease 0.3s forwards;
    opacity: 0;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    animation: heroFadeSlide 0.8s ease 0.4s forwards;
    opacity: 0;
}
.hero-stat .num {
    font-family: var(--font-accent);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}
.hero-stat .lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.hero-stat .num .accent { color: var(--accent); }

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    animation: heroFadeSlide 0.8s ease 0.15s forwards;
    opacity: 0;
}
.hero-card-stack {
    position: relative;
    width: 100%;
    max-width: 420px;
}
.hero-card-item {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    cursor: default;
    animation: cardSlideUp 0.6s ease forwards;
    opacity: 0;
}
.hero-card-item:hover {
    transform: translateX(8px) scale(1.02);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
    background: rgba(255,255,255,0.9);
}
.hero-card-item:nth-child(2) { margin-left: 24px; }
.hero-card-item:nth-child(3) { margin-left: 48px; }

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-card-item .hci-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: var(--transition);
}
.hero-card-item:hover .hci-icon { transform: scale(1.1); }
.hci-icon.frontend { background: rgba(188, 74, 60, 0.1); color: var(--accent); }
.hci-icon.backend { background: rgba(139, 115, 85, 0.15); color: var(--gold); }
.hci-icon.ai { background: rgba(45, 42, 36, 0.08); color: var(--text); }
.hero-card-item .hci-content { flex: 1; min-width: 0; }
.hero-card-item .hci-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.hero-card-item .hci-meta { font-size: 0.75rem; color: var(--text-muted); }
.hero-card-item .hci-arrow { color: var(--text-muted); font-size: 0.75rem; transition: var(--transition); }
.hero-card-item:hover .hci-arrow {
    color: var(--accent);
    transform: translateX(4px);
}
.hero-deco {
    position: absolute;
    top: -20px; right: -20px;
    width: 120px; height: 120px;
    border: 1px solid var(--border);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.4;
    animation: floatRing 15s linear infinite;
}
.hero-deco::after {
    content: '';
    position: absolute;
    inset: 16px;
    border: 1px solid var(--border);
    border-radius: 50%;
}

@keyframes heroFadeSlide {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   SECTION — TRACKS
   ============================================= */
.track-section { padding: 80px 0 60px; }
.track-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}
.track-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-alt);
    padding: 4px;
    border-radius: 100px;
    overflow-x: auto;
}
.track-tab {
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
.track-tab:hover { color: var(--text); }
.track-tab.active {
    background: var(--bg-glass);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}
.track-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.track-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    perspective: 800px;
}
.track-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    opacity: 0;
    transition: var(--transition);
}
.track-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-lg);
}
.track-card:hover::before { opacity: 1; }
.track-card:active {
    transform: translateY(-2px) scale(1.005);
}
.track-card .tc-icon {
    font-size: 1.6rem;
    margin-bottom: 14px;
    display: inline-block;
    transition: var(--transition);
}
.track-card:hover .tc-icon {
    transform: scale(1.15);
}
.track-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.track-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
}
.track-card .tc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.track-card .tc-tags span {
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--border-accent);
    transition: var(--transition);
}
.track-card:hover .tc-tags span {
    background: var(--accent-subtle);
}
.track-card .tc-count {
    font-family: var(--font-accent);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* =============================================
   SECTION — ARTICLES
   ============================================= */
.articles-section { padding: 60px 0 80px; }
.articles-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.article-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.article-card .ac-thumb {
    width: 100%;
    aspect-ratio: 16/7;
    background: linear-gradient(135deg, var(--accent-light), var(--gold-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
    position: relative;
    overflow: hidden;
}
.article-card .ac-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-card), transparent 60%);
}
.article-card .ac-thumb span {
    transition: var(--transition);
}
.article-card:hover .ac-thumb span {
    transform: scale(1.15);
}
.article-card .ac-body {
    padding: 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.article-card .ac-cat {
    display: inline-block;
    font-family: var(--font-accent);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}
.article-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    transition: var(--transition);
}
.article-card:hover h3 { color: var(--accent); }
.article-card .ac-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}
.article-card .ac-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}
.article-card .ac-meta i { margin-right: 4px; }

/* =============================================
   RESOURCES
   ============================================= */
.resources-bar { padding: 60px 0; }
.resources-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
.res-item {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 16px 24px;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.res-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: var(--transition);
}
.res-item:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.res-item:hover::before { opacity: 1; }
.res-item .ri-icon { font-size: 1.6rem; margin-bottom: 8px; transition: var(--transition); }
.res-item:hover .ri-icon { transform: scale(1.2); }
.res-item h4 { font-size: 0.9rem; font-weight: 600; }
.res-item p { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

/* Highlighted card for special tools (e.g. study plan) */
.res-item-highlight {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(79, 70, 229, 0.10)) !important;
    border-color: rgba(139, 92, 246, 0.25) !important;
    position: relative;
}
.res-item-highlight .ri-icon {
    background: linear-gradient(135deg, #8b5cf6, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.res-item-highlight h4 {
    background: linear-gradient(135deg, #8b5cf6, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.res-item-highlight::after {
    content: 'NEW';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #4f46e5);
    color: #fff;
}
.res-item-highlight:hover {
    border-color: rgba(139, 92, 246, 0.5) !important;
    box-shadow: 0 8px 24px rgba(124, 92, 252, 0.20) !important;
}

/* Card for Star Dream Assistant */
.res-item-star {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.06), rgba(139, 92, 246, 0.10)) !important;
    border-color: rgba(236, 72, 153, 0.20) !important;
    position: relative;
}
.res-item-star .ri-icon {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.res-item-star h4 {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.res-item-star::after {
    content: 'NEW';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff;
}
.res-item-star:hover {
    border-color: rgba(236, 72, 153, 0.45) !important;
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.20) !important;
}

/* =============================================
   ABOUT
   ============================================= */
.about-section {
    padding: 80px 0;
    position: relative;
}
.about-section::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: var(--max-width);
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.about-visual .av-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: var(--transition);
}
.about-visual .av-box:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}
.about-visual .av-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--accent-subtle);
    border: 2px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 16px;
    transition: var(--transition);
}
.about-visual .av-box:hover .av-avatar {
    border-color: var(--accent);
    transform: scale(1.05);
}
.about-visual .av-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
}
.about-visual .av-role { font-size: 0.85rem; color: var(--text-secondary); }
.about-visual .av-location { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.about-visual .av-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.about-visual .av-stats .as-num {
    font-family: var(--font-accent);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}
.about-visual .av-stats .as-lbl { font-size: 0.72rem; color: var(--text-muted); }
.about-text .quote {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--gold);
    padding-left: 20px;
    border-left: 3px solid var(--accent);
    margin-bottom: 20px;
    line-height: 1.6;
}
.about-text p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.8;
    margin-bottom: 12px;
}
.about-text .highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.about-text .highlights span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.about-text .highlights span:hover {
    border-color: var(--border-accent);
    background: var(--accent-subtle);
    color: var(--accent);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    padding: 60px 0 32px;
    border-top: 1px solid var(--border);
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}
.footer-brand .fb-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.footer-brand .fb-logo .mark { color: var(--accent); }
.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 320px;
}
.footer-brand .social {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.footer-brand .social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: var(--transition);
}
.footer-brand .social a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
    transform: translateY(-2px);
}
.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.footer-col ul li a {
    display: block;
    padding: 5px 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.footer-col ul li a:hover {
    color: var(--accent);
    padding-left: 4px;
}
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* =============================================
   QR CODE LIGHTBOX
   ============================================= */
.qrcode-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(45, 42, 36, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    animation: overlayIn 0.3s ease;
}
.qrcode-overlay.show {
    display: flex;
}
.qrcode-modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px 40px 32px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: modalPop 0.4s var(--bounce);
    max-width: 320px;
}
.qrcode-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
    background: transparent;
    border: none;
    cursor: pointer;
}
.qrcode-close:hover {
    background: var(--bg-alt);
    color: var(--accent);
}
.qrcode-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 4px solid var(--bg);
}
.qrcode-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.qrcode-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}
@keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

/* =============================================
   AI CHATBOT — Floating Chat
   ============================================= */

/* FAB button */
.chat-fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9997;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2B5CF5;
    color: white;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(43,92,245,0.35);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(43,92,245,0.45);
}
.chat-fab.active {
    background: #e53e3e;
    box-shadow: 0 4px 20px rgba(229,62,62,0.3);
}
.chat-fab.active i {
    transform: rotate(45deg);
}
.chat-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e53e3e;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #f5f1eb;
}

/* Panel */
.chat-panel {
    position: fixed;
    bottom: 100px;
    right: 32px;
    z-index: 9996;
    width: 380px;
    height: 540px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 2px 10px rgba(0,0,0,0.06);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: chatSlideUp 0.3s ease;
    border: 1px solid #eef0f2;
}
.chat-panel.show {
    display: flex;
}
@keyframes chatSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1px solid #f0f1f3;
    background: #fafbfc;
    flex-shrink: 0;
}
.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-header-icon {
    font-size: 1.5rem;
}
.chat-header-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2329;
}
.chat-header-status {
    font-size: 0.72rem;
    color: #2ecc71;
    font-weight: 450;
}
.chat-header-actions {
    display: flex;
    gap: 4px;
}
.chat-header-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #8f959e;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.chat-header-btn:hover {
    background: #e5e6e8;
    color: #1f2329;
}

/* Body */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 8px;
    background: #fafbfc;
}
.chat-body::-webkit-scrollbar {
    width: 4px;
}
.chat-body::-webkit-scrollbar-thumb {
    background: #d0d4da;
    border-radius: 2px;
}

/* Empty state */
.chat-empty {
    text-align: center;
    padding: 32px 16px;
}
.chat-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.chat-empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2329;
    margin-bottom: 6px;
}
.chat-empty-desc {
    font-size: 0.82rem;
    color: #8f959e;
    line-height: 1.6;
    margin-bottom: 20px;
}
.chat-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.chat-suggestion {
    padding: 8px 20px;
    border: 1px solid #e5e6e8;
    border-radius: 100px;
    background: white;
    color: #646a73;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.chat-suggestion:hover {
    border-color: #2B5CF5;
    color: #2B5CF5;
    background: rgba(43,92,245,0.04);
}

/* Messages */
.chat-msg {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: msgIn 0.25s ease;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-msg-assistant {
    padding-right: 24px;
}
.chat-msg-user {
    padding-left: 24px;
    justify-content: flex-end;
}
.chat-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(43,92,245,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.chat-msg-avatar.user-avatar {
    background: rgba(45,42,36,0.06);
    order: 1;
}
.chat-msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.65;
    max-width: 100%;
    word-break: break-word;
}
.chat-msg-assistant .chat-msg-bubble {
    background: white;
    color: #1f2329;
    border: 1px solid #eef0f2;
    border-bottom-left-radius: 4px;
}
.chat-msg-user .chat-msg-bubble {
    background: #2B5CF5;
    color: white;
    border-bottom-right-radius: 4px;
}
.chat-msg-bubble code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8em;
    background: rgba(0,0,0,0.06);
    padding: 1px 5px;
    border-radius: 3px;
}
.chat-msg-user .chat-msg-bubble code {
    background: rgba(255,255,255,0.15);
}
.chat-msg-bubble pre {
    background: #1f2329;
    color: #e5e6e8;
    padding: 12px 14px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 8px 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.chat-msg-bubble pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}
.chat-msg-bubble strong {
    font-weight: 600;
}
.chat-msg-bubble em {
    font-style: italic;
}

/* Typing dots */
.chat-dot-pulse {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 4px 0;
}
.chat-dot-pulse span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c0c4cc;
    animation: dotPulse 1.4s ease-in-out infinite;
}
.chat-dot-pulse span:nth-child(2) { animation-delay: 0.2s; }
.chat-dot-pulse span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Footer */
.chat-footer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid #f0f1f3;
    background: white;
    flex-shrink: 0;
}
.chat-input {
    flex: 1;
    border: 1px solid #e5e6e8;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-family: inherit;
    color: #1f2329;
    outline: none;
    resize: none;
    max-height: 120px;
    line-height: 1.5;
    transition: border-color 0.2s;
}
.chat-input:focus {
    border-color: #2B5CF5;
}
.chat-input::placeholder {
    color: #c0c4cc;
}
.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: #2B5CF5;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.chat-send-btn:hover {
    background: #1a4ad4;
}
.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 480px) {
    .chat-panel {
        right: 12px;
        bottom: 88px;
        width: calc(100% - 24px);
        height: 460px;
    }
    .chat-fab {
        right: 12px;
        bottom: 20px;
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}

/* =============================================
   TOAST
   ============================================= */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    background: var(--text);
    color: var(--text-inverse);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-xl);
    transform: translateY(120%);
    opacity: 0;
    transition: all var(--bounce);
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* =============================================
   AUTH PAGES (Login / Register)
   ============================================= */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 60px;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(188, 74, 60, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(139, 115, 85, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg) 0%, #ede4d8 100%);
}
.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
}
.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 32px;
}
.auth-card .auth-logo .mark {
    width: 48px; height: 48px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent);
    font-family: var(--font-accent);
    font-weight: 600;
    margin-bottom: 12px;
}
.auth-card .auth-logo h1 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
}
.auth-card .auth-logo p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.92rem;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group .form-error {
    font-size: 0.78rem;
    color: var(--accent);
    margin-top: 4px;
    display: none;
}
.form-group.has-error input { border-color: var(--accent); }
.form-group.has-error .form-error { display: block; }

.form-submit {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: var(--text-inverse);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 100px;
    transition: var(--transition);
    margin-top: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.form-submit:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(188, 74, 60, 0.3);
}
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.auth-footer a { color: var(--accent); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

/* =============================================
   ARTICLES LIST PAGE
   ============================================= */
.list-page {
    padding-top: calc(var(--header-h) + 40px);
    min-height: 100vh;
}
.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}
.list-filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.list-filters select, .list-filters input {
    padding: 10px 16px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text);
    outline: none;
}
.list-filters select:focus, .list-filters input:focus {
    border-color: var(--accent);
}
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: 1rem; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}
.pagination span, .pagination button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px; height: 38px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.pagination button:hover {
    border-color: var(--border-accent);
}
.pagination .page-active {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}
.pagination .page-disabled { opacity: 0.4; cursor: not-allowed; }

/* =============================================
   ARTICLE DETAIL
   ============================================= */
.article-detail {
    padding-top: calc(var(--header-h) + 40px);
    max-width: 780px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 80px;
}
.article-detail .ad-header { margin-bottom: 32px; }
.article-detail .ad-category {
    display: inline-block;
    font-family: var(--font-accent);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.article-detail h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 16px;
}
.article-detail .ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
    align-items: center;
}
.article-detail .ad-meta i { margin-right: 4px; }
.article-detail .ad-meta .author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-detail .ad-meta .author-info .avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--accent-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}
.article-detail .ad-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.article-detail .ad-actions button {
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.article-detail .ad-actions button:hover { border-color: var(--border-accent); }
.article-detail .ad-actions .liked { color: var(--accent); }

/* Article content */
.article-content {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text);
    margin: 32px 0;
}
.article-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 32px 0 16px;
}
.article-content h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin: 24px 0 12px;
}
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 16px; }
.article-content li { margin-bottom: 8px; }
.article-content pre {
    background: #2d2a24;
    color: #f5f1eb;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.article-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.88em;
    background: var(--accent-subtle);
    padding: 2px 6px;
    border-radius: 3px;
}
.article-content pre code { background: transparent; padding: 0; border-radius: 0; }
.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    color: var(--text-secondary);
    font-style: italic;
    margin: 20px 0;
}
.article-content img {
    border-radius: var(--radius-md);
    margin: 24px 0;
    width: 100%;
}
.article-content a { color: var(--accent); text-decoration: underline; }

/* Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
}
.article-tags span {
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.78rem;
    background: var(--accent-subtle);
    color: var(--accent);
    border: 1px solid var(--border-accent);
}

/* Comments */
.comments-section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.comments-section h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.comment-form { margin-bottom: 32px; }
.comment-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: var(--bg);
    color: var(--text);
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: var(--transition);
}
.comment-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.comment-form .comment-submit {
    margin-top: 12px;
    padding: 10px 24px;
    background: var(--accent);
    color: var(--text-inverse);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.comment-form .comment-submit:hover { background: var(--accent-dark); }
.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
.comment-item .ci-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.comment-item .ci-header .avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--accent-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.comment-item .ci-header .ci-name { font-weight: 600; font-size: 0.88rem; }
.comment-item .ci-header .ci-time { font-size: 0.75rem; color: var(--text-muted); }
.comment-item .ci-content {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
}
.comment-item .ci-reply {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--accent);
    cursor: pointer;
}
.comment-empty { text-align: center; padding: 40px; color: var(--text-muted); }

/* =============================================
   SPLIT-VIEW EDITOR (左右分栏)
   ============================================= */

/* === Page body === */
body.feishu-editor-page {
    background: #f5f6f7;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* === Minimal Header (shared) === */
.feishu-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid #e5e6e8;
}
.feishu-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 52px; padding: 0 20px; max-width: 100%; margin: 0 auto;
}
.feishu-header-left { display: flex; align-items: center; gap: 10px; min-width: 100px; }
.feishu-header-back {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    border-radius: 6px; color: #8f959e; transition: all 0.2s; font-size: 0.8rem;
}
.feishu-header-back:hover { background: #f0f1f3; color: #1f2329; }
.feishu-header-divider { width: 1px; height: 18px; background: #e5e6e8; }
.feishu-header-status { font-size: 0.78rem; color: #8f959e; font-weight: 450; }
.feishu-header-center { flex: 1; text-align: center; }
.feishu-breadcrumb { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: #8f959e; }
.feishu-breadcrumb a { color: #8f959e; transition: color 0.2s; }
.feishu-breadcrumb a:hover { color: #2B5CF5; }
.feishu-breadcrumb-sep { font-size: 0.5rem; opacity: 0.5; }
.feishu-breadcrumb-current { color: #1f2329; font-weight: 500; }
.feishu-header-right { display: flex; align-items: center; gap: 10px; min-width: 100px; justify-content: flex-end; }
.feishu-login-btn {
    padding: 5px 14px; border-radius: 6px; font-size: 0.8rem; font-weight: 500;
    color: #2B5CF5; border: 1px solid rgba(43,92,245,0.2); transition: all 0.2s;
    background: transparent; cursor: pointer; font-family: inherit;
}
.feishu-login-btn:hover { background: rgba(43,92,245,0.06); border-color: #2B5CF5; }

/* === Publish Bar (shared) === */
.feishu-publish-bar {
    position: fixed; top: 52px; left: 0; right: 0; height: 48px;
    z-index: 999; background: #fff; border-bottom: 1px solid #e5e6e8;
}
.feishu-publish-bar-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 48px; padding: 0 20px; max-width: 100%; margin: 0 auto;
}
.feishu-publish-meta { display: flex; align-items: center; gap: 10px; flex: 1; }
.feishu-meta-group { display: flex; align-items: center; gap: 10px; }
.feishu-select {
    padding: 5px 10px; border: 1px solid #e5e6e8; border-radius: 6px;
    font-size: 0.78rem; font-family: inherit; color: #1f2329;
    background: #f5f6f7; outline: none; cursor: pointer; min-width: 110px;
}
.feishu-select:focus { border-color: #2B5CF5; background: #fff; }
.feishu-input {
    padding: 5px 10px; border: 1px solid #e5e6e8; border-radius: 6px;
    font-size: 0.78rem; font-family: inherit; color: #1f2329;
    background: #f5f6f7; outline: none;
}
.feishu-input:focus { border-color: #2B5CF5; background: #fff; }
.feishu-input::placeholder { color: #c0c4cc; }
.feishu-meta-tags { width: 180px; }
.feishu-publish-actions { display: flex; align-items: center; gap: 8px; }
.feishu-btn {
    padding: 6px 16px; border-radius: 6px; font-size: 0.82rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s; font-family: inherit;
    display: inline-flex; align-items: center; gap: 6px; border: none; text-decoration: none;
}
.feishu-btn-ghost { background: transparent; color: #646a73; border: 1px solid #e5e6e8; }
.feishu-btn-ghost:hover { background: #f0f1f3; color: #1f2329; }
.feishu-btn-primary { background: #2B5CF5; color: #fff; border: 1px solid #2B5CF5; }
.feishu-btn-primary:hover { background: #1a4ad4; box-shadow: 0 2px 8px rgba(43,92,245,0.25); transform: translateY(-1px); }
.feishu-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* === Container (full width) === */
.feishu-editor-container.split-editor {
    padding-top: calc(52px + 48px);
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
    height: calc(100vh - 52px - 48px);
    display: flex;
    flex-direction: column;
}

/* === Form === */
.split-editor form {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

/* === Title === */
.split-title-wrap {
    padding: 18px 32px 10px;
    flex-shrink: 0;
}
.split-title {
    width: 100%;
    border: none;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Noto Serif SC', 'Noto Sans SC', serif;
    color: #1f2329;
    outline: none;
    padding: 0;
    line-height: 1.4;
    letter-spacing: -0.01em;
    background: transparent;
}
.split-title::placeholder { color: #c0c4cc; font-weight: 600; }

/* === Toolbar === */
.split-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 32px;
    flex-shrink: 0;
    border-bottom: 1px solid #eef0f2;
    background: #fafbfc;
}
.split-toolbar-left {
    display: flex;
    align-items: center;
    gap: 2px;
}
.split-tb-group {
    display: flex;
    align-items: center;
    gap: 1px;
}
.split-tb-btn {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; border-radius: 5px;
    color: #646a73; font-size: 0.82rem; cursor: pointer; transition: all 0.15s;
}
.split-tb-btn:hover { background: #e5e6e8; color: #1f2329; }
.tb-text-sm { font-size: 0.65rem; font-weight: 700; }
.split-tb-divider { width: 1px; height: 18px; background: #e5e6e8; margin: 0 4px; }
.split-toolbar-right { display: flex; align-items: center; gap: 2px; }
.split-tb-sep { width: 1px; height: 18px; background: #e5e6e8; margin: 0 6px; }
.split-tb-mode-btn {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; border-radius: 5px;
    color: #c0c4cc; font-size: 0.82rem; cursor: pointer; transition: all 0.15s;
}
.split-tb-mode-btn:hover { color: #646a73; }
.split-tb-mode-btn.active { color: #2B5CF5; background: rgba(43,92,245,0.08); }

/* === Split Editor Area === */
.split-editor-area {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}
.split-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}
.split-pane-edit {
    border-right: 1px solid #eef0f2;
}
.split-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    flex-shrink: 0;
    background: #fafbfc;
    border-bottom: 1px solid #eef0f2;
}
.split-pane-label {
    font-size: 0.72rem;
    color: #8f959e;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}
.split-pane-label i { font-size: 0.65rem; }
.split-pane-wordcount,
.split-pane-time {
    font-size: 0.7rem;
    color: #c0c4cc;
}
.split-pane-time { color: #2ecc71; }

/* === Textarea === */
.split-textarea {
    flex: 1;
    border: none;
    padding: 20px 24px;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    line-height: 1.85;
    color: #1f2329;
    background: #fff;
    resize: none;
    outline: none;
    letter-spacing: 0.01em;
}
.split-textarea::placeholder { color: #d0d4da; font-family: 'Noto Sans SC', sans-serif; }

/* === Preview pane === */
.split-pane-preview {
    background: #fafbfc;
}
.split-preview-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    max-width: 780px;
    margin: 0 auto;
    width: 100%;
}
.split-preview-empty {
    text-align: center;
    padding: 80px 20px;
    color: #c0c4cc;
}
.split-preview-empty .spe-icon { font-size: 3rem; margin-bottom: 12px; }
.split-preview-empty p { font-size: 0.9rem; margin-bottom: 4px; }
.split-preview-empty .spe-hint { font-size: 0.78rem; color: #d0d4da; }

/* === Preview rendered styles === */
/* Reuse article content styles */
.split-preview-content h2 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.5rem; margin: 28px 0 14px; color: #1f2329; font-weight: 700;
}
.split-preview-content h3 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.2rem; margin: 22px 0 10px; color: #1f2329; font-weight: 600;
}
.split-preview-content p {
    margin-bottom: 14px; color: #2d2a24; line-height: 1.8;
}
.split-preview-content ul, .split-preview-content ol {
    padding-left: 24px; margin-bottom: 14px;
}
.split-preview-content li { margin-bottom: 6px; }
.split-preview-content pre {
    background: #1f2329; color: #e5e6e8; padding: 16px 20px;
    border-radius: 8px; overflow-x: auto; font-size: 0.82rem;
    line-height: 1.6; margin-bottom: 14px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.split-preview-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85em; background: rgba(0,0,0,0.05);
    padding: 2px 6px; border-radius: 3px;
}
.split-preview-content pre code { background: transparent; padding: 0; }
.split-preview-content blockquote {
    border-left: 3px solid #2B5CF5; padding-left: 18px;
    color: #646a73; font-style: italic; margin: 16px 0;
}
.split-preview-content img {
    max-width: 100%; border-radius: 8px; margin: 16px 0;
}
.split-preview-content a { color: #2B5CF5; text-decoration: underline; }
.split-preview-content strong { font-weight: 600; }

/* === Resize handle === */
.split-handle {
    width: 4px;
    cursor: col-resize;
    background: transparent;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    transition: background 0.2s;
}
.split-handle:hover,
.split-handle.active {
    background: #2B5CF5;
}

/* === Meta bar (bottom) === */
.split-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 32px;
    border-top: 1px solid #eef0f2;
    background: #fafbfc;
    flex-shrink: 0;
}
.split-meta-left {
    flex: 1;
}
.split-excerpt-input {
    width: 100%;
    border: none;
    font-size: 0.82rem;
    font-family: inherit;
    color: #646a73;
    background: transparent;
    outline: none;
    padding: 4px 0;
}
.split-excerpt-input::placeholder { color: #c0c4cc; }
.split-meta-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.split-save-status {
    font-size: 0.72rem; color: #2ecc71;
    display: flex; align-items: center; gap: 4px;
}
.split-save-status i { font-size: 0.6rem; }

/* === View modes === */
.split-editor-area.mode-edit .split-pane-preview,
.split-editor-area.mode-edit .split-handle { display: none; }
.split-editor-area.mode-edit .split-pane-edit { border-right: none; }

.split-editor-area.mode-preview .split-pane-edit,
.split-editor-area.mode-preview .split-handle { display: none; }
.split-editor-area.mode-preview .split-pane-preview { border-right: none; }

/* === Responsive === */
@media (max-width: 768px) {
    .split-editor-area { flex-direction: column; }
    .split-pane-edit { border-right: none; border-bottom: 1px solid #eef0f2; }
    .split-handle { display: none !important; }
    .split-title-wrap { padding: 14px 16px 8px; }
    .split-toolbar { padding: 4px 12px; overflow-x: auto; }
    .split-preview-content { padding: 16px; }
    .split-meta-bar { padding: 8px 16px; flex-direction: column; gap: 6px; }
    .split-tb-mode-btn { display: none; }
    .feishu-breadcrumb { display: none; }
    .feishu-header-center { flex: 0; }
    .feishu-meta-tags { width: 120px; }
}

/* =============================================
   PROFILE PAGE
   ============================================= */
.profile-page {
    padding-top: calc(var(--header-h) + 40px);
    min-height: 100vh;
}
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    transition: var(--transition);
}
.profile-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}
.profile-card .pc-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--accent-subtle);
    border: 2px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 16px;
}
.profile-card .pc-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
}
.profile-card .pc-email, .profile-card .pc-bio {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}
.profile-card .pc-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 24px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.profile-card .pc-stats .num {
    font-family: var(--font-accent);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}
.profile-card .pc-stats .lbl { font-size: 0.78rem; color: var(--text-muted); }

/* =============================================
   LOADING SPINNER
   ============================================= */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-muted);
    gap: 12px;
}
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .track-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { display: none; }
    .hero-content { text-align: center; }
    .hero-desc { margin: 0 auto 32px; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .about-grid { grid-template-columns: 1fr; }
    .about-text .quote { text-align: center; }
    .about-text .highlights { justify-content: center; }
    .resources-grid { grid-template-columns: repeat(3, 1fr); }
    .articles-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .editor-meta { grid-template-columns: 1fr; }
    .hero-float { display: none; }
    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px 24px 24px;
        gap: 12px;
        transform: translateY(-120%);
        transition: var(--transition);
        z-index: 999;
        box-shadow: var(--shadow-md);
    }
    .nav.open { transform: translateY(0); }
    .menu-toggle { display: flex; }
}

@media (max-width: 640px) {
    :root { --header-h: 60px; }
    .section-title { font-size: 1.4rem; }
    .track-grid { grid-template-columns: 1fr; }
    .resources-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero-stats { flex-direction: column; align-items: center; gap: 16px; }
    .track-tabs { border-radius: var(--radius-md); gap: 2px; padding: 3px; overflow-x: auto; flex-wrap: nowrap; }
    .track-tab { padding: 6px 14px; font-size: 0.75rem; white-space: nowrap; }
    .auth-card { padding: 32px 20px; }
    .profile-card { padding: 24px; }
    .hero-title { font-size: 2rem; }
    .hero-desc { font-size: 0.9rem; }
    .hero-datetime { justify-content: center; font-size: 0.72rem; }
    .btn-primary, .btn-ghost { padding: 12px 24px; font-size: 0.85rem; }
    .container { padding: 0 16px; }
    .track-section { padding: 40px 0; }
    .articles-section { padding: 40px 0 60px; }
    .resources-bar { padding: 40px 0; }
    .about-section { padding: 40px 0; }
    .footer { padding: 40px 0 24px; }
    .article-detail { padding: calc(var(--header-h) + 20px) 16px 60px; }
    .article-detail h1 { font-size: 1.4rem; }
    .article-detail .ad-meta { gap: 12px; font-size: 0.78rem; flex-wrap: wrap; }
    .article-content { font-size: 0.92rem; }
    .article-content h2 { font-size: 1.2rem; }
    .article-content pre { padding: 14px 16px; font-size: 0.78rem; }
    .list-page { padding-top: calc(var(--header-h) + 20px); }
    .list-header { flex-direction: column; align-items: stretch; gap: 12px; }
    .list-filters { flex-direction: column; }
    .list-filters select, .list-filters input { width: 100%; }
    .editor-container { padding: 0 16px; }
    .editor-title { font-size: 1.2rem; }
    .nav a { padding: 10px 0; font-size: 0.95rem; min-height: 44px; display: flex; align-items: center; }
    .login-dropdown { width: calc(100vw - 32px); right: -60px; }
    .login-btn, .icon-btn { min-height: 40px; }
    .header-actions .icon-btn { width: 36px; height: 36px; }

    /* About section mobile */
    .about-text .quote { font-size: 0.95rem; padding-left: 14px; }
    .about-text p { font-size: 0.85rem; }
    .about-visual .av-box { padding: 28px 20px; }

    /* Search overlay mobile */
    .search-modal { width: 100%; max-width: 100%; margin: 0 8px; border-radius: var(--radius-md); }
    .search-header { padding: 16px; }

    /* Editor mobile improvements */
    .feishu-editor-container { padding: 0; }
    .split-title-wrap { padding: 14px 16px 8px; }
    .split-toolbar { padding: 4px 8px; overflow-x: auto; gap: 0; }
    .split-editor-area { flex-direction: column; }
    .split-pane-edit { border-right: none; border-bottom: 1px solid #eef0f2; height: 50%; }
    .split-pane-preview { height: 50%; }
    .split-handle { display: none; }
    .split-preview-content { padding: 16px; }
    .split-meta-bar { padding: 8px 12px; flex-direction: column; gap: 6px; }
    .split-tb-mode-btn { display: none; }

    /* Article detail page mobile */
    .article-detail .ad-actions { flex-direction: column; }
    .article-detail .ad-actions button { width: 100%; justify-content: center; }

    /* Comments mobile */
    .comment-item { padding: 14px 0; }
    .comments-section h2 { font-size: 1.1rem; }

    /* Profile mobile */
    .profile-card .pc-stats { flex-direction: column; gap: 12px; }
    .profile-card .pc-stats .num { font-size: 1.1rem; }

    /* Toast mobile */
    .toast { right: 16px; left: 16px; bottom: 16px; border-radius: var(--radius-sm); font-size: 0.82rem; padding: 12px 16px; }

    /* Track cards on mobile */
    .track-card { padding: 20px 18px; }
    .track-card .tc-icon { font-size: 1.3rem; }
    .track-card h3 { font-size: 0.95rem; }

    /* Article cards on mobile */
    .article-card .ac-body { padding: 14px 16px; }
    .article-card h3 { font-size: 0.95rem; }
    .article-card .ac-desc { font-size: 0.8rem; }
    .article-card .ac-meta { gap: 10px; font-size: 0.72rem; flex-wrap: wrap; }

    /* Resources mobile */
    .res-item { padding: 20px 12px 18px; }
    .res-item .ri-icon { font-size: 1.3rem; }

    /* Pagination mobile */
    .pagination { gap: 4px; }
    .pagination span, .pagination button { min-width: 34px; height: 34px; font-size: 0.8rem; }
}

/* Small phones */
@media (max-width: 480px) {
    .hero-title { font-size: 1.7rem; }
    .section-title { font-size: 1.2rem; }
    .hero-badge { font-size: 0.7rem; padding: 4px 14px; }
    .hero-stat .num { font-size: 1.3rem; }
    .hero-stats { gap: 12px; }
    .resources-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .btn-primary, .btn-ghost { padding: 10px 18px; font-size: 0.8rem; }
    .hero-actions { gap: 10px; }
    .track-tab { padding: 5px 10px; font-size: 0.7rem; }
    .footer-grid { gap: 20px; }
    .login-dropdown { width: calc(100vw - 24px); right: -50px; }

    /* Nav items smaller */
    .nav a { font-size: 0.88rem; padding: 8px 0; }

    /* Header adjustments */
    .header-actions { gap: 4px; }
    .logo { font-size: 1rem; }
    .logo-icon { width: 30px; height: 30px; font-size: 0.75rem; }

    /* Feishu editor mobile */
    .feishu-header-inner { padding: 0 12px; }
    .feishu-publish-bar-inner { padding: 0 12px; }
    .feishu-meta-group { flex-wrap: wrap; }
    .feishu-meta-tags { width: 120px; }
    .feishu-breadcrumb { display: none; }
    .feishu-header-center { flex: 0; }
    .feishu-header-left { min-width: auto; }
    .feishu-header-right { min-width: auto; }

    /* Comments */
    .comment-form textarea { font-size: 0.85rem; }

    /* Search */
    .search-overlay { padding-top: 80px; }
}
