/* xh-agi.com - 极简白主题 */
/* 大道至简。白底、黑字、留白，让内容自己说话。 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Colors */
    --bg: #ffffff;
    --bg-subtle: #f9fafb;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #e5e5e5;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
    --font-mono: "SF Mono", "Fira Code", Monaco, monospace;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container--narrow {
    max-width: 720px;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.nav__logo:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.nav__links {
    display: flex;
    gap: var(--space-md);
}

.nav__link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
    position: relative;
}

.nav__link:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.nav__link.active {
    color: var(--text-primary);
    font-weight: 600;
}

.nav__link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--text-primary);
}

/* Mobile menu button */
.nav__menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.nav__menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
}

/* Mobile menu */
.nav__mobile {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 99;
    padding: var(--space-lg) var(--space-md);
    flex-direction: column;
    gap: var(--space-sm);
}

.nav__mobile.active {
    display: flex;
}

.nav__mobile a {
    font-size: 1.1rem;
    color: var(--text-secondary);
    padding: var(--space-xs) 0;
}

.nav__mobile a:hover,
.nav__mobile a.active {
    color: var(--text-primary);
}


/* Wide screen */
@media (min-width: 1200px) {
    .container {
        max-width: 960px;
    }
    .grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet */
@media (max-width: 900px) {
    .container {
        max-width: 720px;
    }
    .hero__name {
        font-size: 2.5rem;
    }
}
@media (max-width: 768px) {
    .nav__links {
        display: none;
    }
    
    .nav__menu-btn {
        display: flex;
    }
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    padding: calc(56px + var(--space-2xl)) 0 var(--space-xl);
    text-align: left;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

/* ============================================
   Main Content
   ============================================ */
.main {
    padding: var(--space-lg) 0 var(--space-2xl);
}

/* ============================================
   Hero (Home Page)
   ============================================ */
.hero {
    padding: calc(56px + var(--space-2xl)) 0 var(--space-xl);
}

.hero__name {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.hero__tagline {
    font-size: 1rem;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .hero__name {
        font-size: 2rem;
    }
}

/* ============================================
   Section
   ============================================ */
.section {
    margin-bottom: var(--space-2xl);
}

.section__title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.card--clickable:hover {
    background: var(--bg-subtle);
    text-decoration: none;
}

.card__label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card__text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Grid */
.grid {
    display: grid;
    gap: var(--space-md);
}

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

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

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

/* ============================================
   List Card
   ============================================ */
.list-card {
    display: block;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    text-decoration: none;
    color: inherit;
}

.list-card:hover {
    background: #f3f4f6;
    text-decoration: none;
}

.list-card__date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.list-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.list-card:hover .list-card__title {
    color: var(--accent);
}

.list-card__excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Tags (Simplified)
   ============================================ */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags--simple span,
.tag {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    min-height: 44px;
}

.btn--primary {
    background: var(--text-primary);
    color: #fff;
}

.btn--primary:hover {
    background: #333;
}

.btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn--secondary {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn--secondary:hover {
    background: var(--bg-subtle);
}

.btn--block {
    width: 100%;
}

/* ============================================
   Discuss/Messages
   ============================================ */
.message {
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.message__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.message__avatar {
    width: 32px;
    height: 32px;
    background: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #fff;
    font-weight: 500;
}

.message__name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.message__time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.message__content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
}

.messages-list {
    margin-bottom: var(--space-xl);
}

/* ============================================
   Search
   ============================================ */
.search-box {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.search-box input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}

.search-box input:focus {
    border-color: var(--accent);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-result {
    display: block;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    text-decoration: none;
    color: inherit;
}

.search-result:hover {
    background: #f3f4f6;
}

.search-result__type {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-result__date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.search-result__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.search-result__excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.search-result__excerpt mark {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

@media (max-width: 600px) {
    .search-box {
        flex-direction: column;
    }
    
    .search-box .btn {
        width: 100%;
    }
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    color: var(--text-muted);
}

.empty-state__text {
    font-size: 0.95rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer a {
    color: var(--text-muted);
}

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

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   About Page Specific
   ============================================ */
.about-section {
    padding: var(--space-lg) 0;
}

.about-section h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.about-section p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.about-section blockquote {
    border-left: 3px solid var(--text-primary);
    padding-left: var(--space-md);
    margin: var(--space-md) 0;
}

.about-section blockquote p {
    margin-bottom: var(--space-xs);
    font-style: italic;
}

.about-section blockquote cite {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: normal;
}

.about-section ul {
    list-style: none;
    margin: var(--space-md) 0;
}

.about-section ul li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.about-section ul li:last-child {
    border-bottom: none;
}

.about-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.about-nav a {
    display: block;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    color: inherit;
}

.about-nav a:hover {
    background: #f3f4f6;
    text-decoration: none;
}

.about-nav__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.about-nav__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .about-nav {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Journal Page Specific
   ============================================ */
.timeline-year {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 2rem 0 1rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 0.25rem;
}

.timeline-content {
    min-width: 0;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
}

@media (max-width: 600px) {
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

/* ============================================
   Thoughts Page Specific
   ============================================ */
.thought-card {
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.thought-card:hover {
    background: #f3f4f6;
}

.thought-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.thought-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.thought-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.thought-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
}

.thought-content p {
    margin-bottom: 1rem;
}

.thought-content p:last-child {
    margin-bottom: 0;
}

.thought-content blockquote {
    border-left: 2px solid var(--text-primary);
    padding-left: var(--space-md);
    margin: 1rem 0;
}

/* ============================================
   Collab Page Specific
   ============================================ */
.intro-text {
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto var(--space-xl);
    line-height: 1.8;
}

.contact-email {
    display: inline-block;
    font-size: 1rem;
    color: var(--accent);
}

/* ============================================
   Loading State
   ============================================ */
.loading {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

/* ============================================
   Divider
   ============================================ */
.divider {
    text-align: center;
    color: var(--text-muted);
    margin: var(--space-xl) 0;
}
.card__tag{margin-top:12px;font-size:12px;color:#888;letter-spacing:0.5px}