/* ========================================
   withdu.com - 笃的主页
   深沉 · 温暖 · 人文
   ======================================== */

:root {
    /* 背景 - 深沉的墨色，带一点温暖 */
    --bg-deep: #0c0f14;
    --bg-base: #12161e;
    --bg-surface: #1a1f2a;
    
    /* 主色 - 琥珀金，温暖而不张扬 */
    --accent: #c9a66b;
    --accent-dim: #c9a66b33;
    --accent-bright: #dbb978;
    
    /* 文字 - 温润的白 */
    --text-primary: #e8e4dc;
    --text-secondary: #9b978f;
    --text-muted: #6b6860;
    
    /* 边框 */
    --border: #2a2f3a;
    
    /* 字体 */
    --font-serif-en: 'Cormorant Garamond', Georgia, serif;
    --font-serif-cn: 'Noto Serif SC', 'Songti SC', serif;
    
    /* 间距 */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    font-family: var(--font-serif-cn);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Ambient background effect */
.ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-dim) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 115, 85, 0.08) 0%, transparent 50%);
}

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-md);
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.hero.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-content {
    position: relative;
}

.name {
    font-family: var(--font-serif-cn);
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0.1em;
    line-height: 1;
    margin-bottom: var(--space-sm);
    position: relative;
}

.name::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2rem;
    height: 2px;
    background: var(--accent);
}

.phonetic {
    font-family: var(--font-serif-en);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    margin-top: var(--space-md);
}

.tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 0.3em;
    margin-top: var(--space-sm);
}

/* ===== Sections ===== */
.section {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-content {
    max-width: 600px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-serif-cn);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

/* Prose */
.prose {
    font-size: 1rem;
    line-height: 2;
    color: var(--text-secondary);
}

.prose p {
    margin-bottom: var(--space-md);
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose em {
    font-style: italic;
    color: var(--accent);
}

.prose strong {
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== Name Meaning ===== */
.meaning-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.meaning-item {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-surface);
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.meaning-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(201, 166, 107, 0.1);
}

.meaning-char {
    display: block;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    letter-spacing: 0.1em;
}

.meaning-desc {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.meaning-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

/* ===== Thinking ===== */
.thinking-list {
    list-style: none;
    margin-bottom: var(--space-md);
}

.thinking-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1rem;
    position: relative;
    padding-left: var(--space-md);
}

.thinking-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.5rem;
    line-height: 1;
    top: 50%;
    transform: translateY(-50%);
}

.thinking-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== Writing ===== */
.writing-list {
    list-style: none;
}

.writing-list li {
    margin-bottom: var(--space-sm);
}

.writing-list a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.3s ease;
}

.writing-list a:hover {
    padding-left: var(--space-sm);
    border-color: var(--accent);
}

.writing-title {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.writing-list a:hover .writing-title {
    color: var(--text-primary);
}

.writing-date {
    font-family: var(--font-serif-en);
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== Closing ===== */
.closing {
    padding: var(--space-xl) 0;
    text-align: center;
    border-top: 1px solid var(--border);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.closing.visible {
    opacity: 1;
    transform: translateY(0);
}

.closing-message {
    font-family: var(--font-serif-cn);
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: var(--space-lg);
}

.closing-domain {
    font-family: var(--font-serif-en);
    font-size: 0.875rem;
    color: var(--accent);
    letter-spacing: 0.3em;
    text-transform: lowercase;
}

.closing-meaning {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    margin-top: var(--space-xs);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    html {
        font-size: 16px;
    }
    
    .container {
        padding: var(--space-sm);
    }
    
    .meaning-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .name {
        font-size: clamp(4rem, 25vw, 8rem);
    }
    
    .section {
        padding: var(--space-lg) 0;
    }
    
    .writing-list a {
        flex-direction: column;
        gap: var(--space-xs);
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Selection ===== */
::selection {
    background: var(--accent-dim);
    color: var(--text-primary);
}

