:root {
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --bg-muted: #f1f5f9;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #eff6ff;
    --success: #10b981;
    --error: #ef4444;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);

    --header-height: 68px;
    --max-width: 1100px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-soft);
    color: var(--accent);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }

/* Layout */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--header-height) + 64px) 24px 96px;
}

.section {
    margin-bottom: 96px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-header {
    margin-bottom: 40px;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--text);
    color: #fff;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 1rem;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.nav-toggle:hover {
    background: var(--bg-muted);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: var(--text);
}

.nav-item.active .nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

@media (max-width: 760px) {
    .site-header {
        background: #ffffff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .nav-toggle {
        display: grid;
        place-items: center;
    }
    .site-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        z-index: 9999;
        padding: 32px 24px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    .site-nav.is-open {
        transform: translateX(0);
    }
    .nav-list {
        flex-direction: column;
        gap: 6px;
    }
    .nav-link {
        display: block;
        font-size: 1.1rem;
        padding: 12px 0;
    }
    .nav-item.active .nav-link::after {
        bottom: 6px;
        width: 24px;
        right: auto;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn--primary {
    background: var(--text);
    color: #fff;
}
.btn--primary:hover {
    background: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}
.btn--ghost:hover {
    color: var(--text);
    background: var(--bg-muted);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn i {
    width: 18px;
    height: 18px;
}

/* Cards */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition);
}

.card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--bg-muted);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.tag--accent {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: #dbeafe;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.icp-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}
.icp-link:hover {
    color: var(--accent);
}

@media (max-width: 600px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 200;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--text);
    border-radius: var(--radius-md);
    color: #fff;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
    pointer-events: none;
    font-size: 0.9rem;
    opacity: 0;
    visibility: hidden;
}

.toast.is-active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.toast--success i { color: var(--success); }
.toast--error i { color: var(--error); }
.toast--info i { color: #60a5fa; }

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 90;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    color: var(--text);
    border-color: var(--text);
    transform: translateY(-2px);
}

/* Home Hero */
.hero {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 20px;
    width: fit-content;
}

.hero__title {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 24px;
    max-width: 800px;
}

.hero__subtitle {
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 560px;
}

.hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero__stats {
    display: flex;
    gap: 48px;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.hero__stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero__stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

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

@media (max-width: 600px) {
    .hero__stats {
        gap: 24px;
    }
}

/* Section layouts */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.four-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .two-col,
    .three-col,
    .four-col {
        grid-template-columns: 1fr;
    }
}

/* Services */
.service-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.service-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}

.service-card__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    color: var(--accent);
    margin-bottom: 18px;
}

.service-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Projects */
.project-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.project-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.project-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    flex: 1;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Articles */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.article-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

.article-card__content {
    min-width: 0;
}

.article-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-card__desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card__meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    align-items: center;
}

.article-card__stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 80px;
}

@media (max-width: 640px) {
    .article-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .article-card__stats {
        flex-direction: row;
        text-align: left;
    }
}

/* Article detail */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 48px;
    align-items: start;
}

.article-toc {
    position: sticky;
    top: calc(var(--header-height) + 32px);
    padding: 22px;
}

.article-toc h3 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.article-toc ul {
    list-style: none;
}

.article-toc a {
    display: block;
    padding: 7px 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    border-left: 2px solid var(--border);
    padding-left: 14px;
    transition: all var(--transition);
}

.article-toc a:hover,
.article-toc a.active {
    color: var(--accent);
    border-left-color: var(--accent);
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.article-body h2,
.article-body h3,
.article-body h4 {
    color: var(--text);
    margin-top: 2.2em;
    margin-bottom: 0.8em;
    scroll-margin-top: calc(var(--header-height) + 24px);
    font-weight: 600;
}

.article-body h2 {
    font-size: 1.5rem;
    padding-bottom: 0.4em;
    border-bottom: 1px solid var(--border);
}

.article-body h3 {
    font-size: 1.25rem;
}

.article-body p {
    margin-bottom: 1.3em;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.3em 1.6em;
}

.article-body li {
    margin-bottom: 0.4em;
}

.article-body code {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    background: var(--bg-muted);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.88em;
    color: var(--accent);
}

.article-body pre {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 1.6em;
}

.article-body pre code {
    background: transparent;
    padding: 0;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-body blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 18px;
    margin: 1.6em 0;
    color: var(--text-muted);
    font-style: italic;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-muted);
}

.article-meta-bar .btn {
    margin-left: auto;
}

@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-toc {
        display: none;
    }
    .article-meta-bar .btn {
        margin-left: 0;
        width: 100%;
        margin-top: 8px;
    }
}

.reading-progress {
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: 2px;
    background: var(--accent);
    width: 0%;
    z-index: 101;
    transition: width 0.1s linear;
}

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 64px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--text);
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.profile-header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.profile-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
}

.timeline-item h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.timeline-item time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.timeline-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Stack */
.stack-category {
    margin-bottom: 40px;
}

.stack-category h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.stack-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    transition: all var(--transition);
}

.stack-item:hover {
    border-color: #cbd5e1;
    background: var(--bg-soft);
}

/* Contact */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: start;
}

.contact-info h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    cursor: pointer;
    background: transparent;
    font-size: 0.95rem;
}

.contact-link:hover {
    border-color: var(--text);
    background: var(--bg-soft);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

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

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

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.form-error {
    color: var(--error);
    font-size: 0.82rem;
    margin-top: 6px;
}

@media (max-width: 800px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Chat */
.chat-wrapper {
    max-width: 820px;
    margin: 0 auto;
}

.chat-container {
    height: calc(100vh - var(--header-height) - 220px);
    min-height: 420px;
    max-height: 680px;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--success);
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chat-message {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    line-height: 1.65;
    animation: messageIn 0.25s ease forwards;
    white-space: pre-wrap;
}

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

.chat-message--user {
    align-self: flex-end;
    background: var(--text);
    color: #fff;
    border-bottom-right-radius: var(--radius-sm);
}

.chat-message--bot {
    align-self: flex-start;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-bottom-left-radius: var(--radius-sm);
}

.chat-message--loading {
    font-style: italic;
    color: var(--text-muted);
}

.chat-input-area {
    padding: 16px 20px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
}

.chat-input-row {
    display: flex;
    gap: 12px;
}

.chat-input-row .form-input {
    flex: 1;
    background: var(--bg);
}

/* Log */
.log-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.log-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
}

.log-version {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

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

.log-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* CTA section */
.cta-section {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 64px 48px;
    text-align: center;
}

.cta-section h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 600px) {
    .cta-section {
        padding: 40px 24px;
    }
    .main-content {
        padding: calc(var(--header-height) + 40px) 20px 64px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Log tag variants */
.tag--green {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}
.tag--yellow {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}
.tag--red {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* Page header */
.page-header {
    margin-bottom: 48px;
}
.page-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.page-header h1 i {
    color: var(--accent);
}
.page-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color var(--transition);
}
.back-btn:hover {
    color: var(--text);
}

/* Inspiration widget */
.inspiration-widget {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.inspiration-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.4;
}
.inspiration-widget__quote {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 500;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 24px;
    min-height: 3.4em;
    display: grid;
    place-items: center;
}
.inspiration-widget__quote i {
    color: var(--accent);
    opacity: 0.4;
}
.inspiration-widget__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Chat quick prompts */
.chat-prompts {
    padding: 12px 20px 0;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
}
.chat-prompts__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.chat-prompts__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chat-prompt {
    padding: 7px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}
.chat-prompt:hover {
    border-color: var(--text);
    color: var(--text);
    background: var(--bg-soft);
}

/* Contact improvements */
.contact-card {
    height: fit-content;
}
.contact-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.contact-method:last-child {
    border-bottom: none;
}
.contact-method i {
    color: var(--accent);
    flex-shrink: 0;
}
.contact-method__value {
    color: var(--text);
    font-weight: 500;
    word-break: break-all;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition);
}
.social-link:hover {
    border-color: var(--text);
    color: var(--text);
    background: var(--bg-soft);
    transform: translateY(-2px);
}

/* Now page */
.now-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.now-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.now-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}
.now-card__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    color: var(--accent);
    margin-bottom: 16px;
}
.now-card h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}
.now-card ul {
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
}
.now-card li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
}
.now-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}
.now-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
}
.now-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Focus accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.chat-prompt:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline-offset: 3px;
}

/* Link underline for article body */
.article-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color var(--transition);
}
.article-body a:hover {
    color: var(--accent-hover);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-soft) 50%, var(--bg-muted) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.2s infinite;
    border-radius: var(--radius-md);
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mobile refinements */
@media (max-width: 480px) {
    .hero {
        padding: 60px 20px;
    }
    .hero__stats {
        gap: 32px;
    }
    .inspiration-widget {
        padding: 28px 20px;
    }
    .cta-section {
        padding: 40px 20px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
