/* assets/css/4-pages.css */

/* --- Post Detail (from post.html) --- */
.post-detail-clean {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 0;
}

.post-header-clean {
    text-align: center;
    margin-bottom: 48px;
}

.post-meta-clean {
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.post-meta-clean .post-date {
    flex-shrink: 0;
}

.focus-mode .post-meta-clean {
    justify-content: flex-start;
}

.post-title-clean {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

/* Typography Reset for Content */
.post-content-clean {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-main);
    font-family: var(--font-sans);
    word-wrap: break-word;
    overflow-wrap: break-word;
    /* Or serif if preferred for reading */
}

.post-content-clean p {
    margin-bottom: 1.5em;
}

.post-content-clean h2 {
    font-size: 1.8rem;
    margin-top: 2em;
    margin-bottom: 0.8em;
    font-weight: 600;
    color: var(--text-main);
}

.post-content-clean h3 {
    font-size: 1.4rem;
    margin-top: 1.5em;
    margin-bottom: 0.6em;
    font-weight: 600;
}

.post-content-clean ul,
.post-content-clean ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.post-content-clean li {
    margin-bottom: 0.5em;
}

.post-content-clean code {
    background-color: var(--bg-panel-hover);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--accent-primary);
}

.post-content-clean img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .post-detail-clean {
        padding: 24px 14px 40px;
        max-width: 100%;
    }

    .post-title-clean {
        font-size: 2rem;
    }
}

.post-content-clean table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    display: block;
}

.post-content-clean table thead {
    background: var(--bg-panel-hover);
    font-weight: 600;
}

.post-content-clean table tr {
    border-bottom: 1px solid var(--border-subtle);
}

.post-content-clean table tr:last-child {
    border-bottom: none;
}

.post-content-clean th,
.post-content-clean td {
    padding: 14px 16px;
    text-align: left;
}

.post-content-clean tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.post-content-clean table {
    overflow-x: auto;
}

.post-footer-clean {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.post-footer-clean .action-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 14px;
}

/* --- About Page (from about.html) --- */
.about-container {
    /* Inherits from .surface-card */
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background-color: var(--accent-primary);
    color: white;
    font-size: 40px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
}

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

.profile-tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.about-content h3 {
    margin-top: 30px;
    font-size: 1.4rem;
    color: var(--text-main);
}

.skill-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.skill-list li {
    margin-bottom: 12px;
    padding: 12px 16px;
    background-color: var(--bg-panel-hover);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 1rem;
}

.skill-list li strong {
    color: var(--text-main);
    margin-right: 8px;
}

/* --- Archive Page (from archive.html) --- */
.archive-container {
    /* Inherits from .surface-card */
}

.archive-list {
    margin-top: 30px;
}

.archive-item {
    display: flex;
    align-items: baseline;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.2s ease;
}

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

.archive-item:hover {
    background-color: var(--bg-panel-hover);
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: var(--radius-sm);
}

.archive-date {
    width: 80px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.archive-content {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.archive-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
}

.archive-title:hover {
    color: var(--accent-primary);
}

.archive-year {
    font-size: 0.8rem;
    color: var(--bg-app);
    /* Hidden by default or subtle */
    background-color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.5;
}

/* Table of Contents */
.table-of-contents {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 32px 0;
    transition: all 0.3s ease;
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 16px;
    cursor: pointer;
    user-select: none;
}

.toc-header i {
    font-size: 1.2rem;
    color: var(--accent-primary);
}

.toc-toggle {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toc-toggle:hover {
    color: var(--text-main);
}

.toc-nav {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 1000px;
    opacity: 1;
}

.table-of-contents.collapsed .toc-nav {
    max-height: 0;
    opacity: 0;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin: 0;
    padding: 0;
}

.toc-h2 {
    margin-top: 8px;
}

.toc-h3 {
    padding-left: 20px;
}

.toc-link {
    display: block;
    padding: 6px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    line-height: 1.4;
}

.toc-link:hover {
    background: var(--bg-panel-hover);
    color: var(--text-main);
}

.toc-link.active {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-weight: 500;
}

/* Heading highlight effect when clicked from TOC */
.toc-highlight {
    animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
    0%, 100% {
        background: transparent;
    }
    10%, 30% {
        background: rgba(66, 133, 244, 0.1);
        padding-left: 16px;
    }
}

/* Hide TOC in focus mode */
.focus-mode .table-of-contents {
    display: block;
}

/* Share Container */
.share-container {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 32px;
}

.share-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 16px;
}

.share-header i {
    font-size: 1.2rem;
    color: var(--accent-primary);
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-app);
    color: var(--text-main);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.share-btn.share-twitter:hover {
    background: #1DA1F2;
    color: white;
    border-color: #1DA1F2;
}

.share-btn.share-linkedin:hover {
    background: #0A66C2;
    color: white;
    border-color: #0A66C2;
}

.share-btn.share-facebook:hover {
    background: #1877F2;
    color: white;
    border-color: #1877F2;
}

.share-btn.share-copy:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.share-btn.copied {
    background: #34A853;
    color: white;
    border-color: #34A853;
}

/* Show share even in focus mode */
.focus-mode .share-container {
    display: block;
}
