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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background-color: #000;
    color: #f5f5f7;
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 20px;
    }
}

/* ===== Header ===== */
header {
    padding: 60px 0 40px;
    text-align: center;
    border-bottom: 1px solid #1d1d1f;
}

@media (min-width: 1200px) {
    header {
        padding: 140px 0 100px;
    }
}

.site-title {
    font-size: clamp(2.8em, 5vw, 5.5em);
    font-weight: 700;
    letter-spacing: 8px;
    color: #fff;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(20px);
    animation: titleFadeIn 0.6s ease forwards;
}

.site-subtitle {
    font-size: 0.9em;
    color: #86868b;
    font-weight: 300;
    letter-spacing: 3px;
    opacity: 0;
    transform: translateY(20px);
    animation: titleFadeIn 0.6s ease forwards;
    animation-delay: 0.15s;
}

@keyframes titleFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Main ===== */
main {
    flex: 1;
    padding: 80px 0;
}

.section-title {
    font-size: 0.75em;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #86868b;
    margin-bottom: 56px;
}

/* ===== Posts List ===== */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-card {
    padding: 40px 0;
    border-bottom: 1px solid #1d1d1f;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.3s ease;
}

.post-card:last-child {
    border-bottom: none;
}

.post-card:hover {
    transform: translateY(-3px);
}

.post-card .post-date {
    font-size: 0.8em;
    color: #86868b;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.post-card .post-title {
    font-size: clamp(1.4em, 2.5vw, 2em);
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-card .post-summary {
    font-size: 0.95em;
    color: #86868b;
    line-height: 1.7;
    max-width: 90%;
}

.post-card .post-tags {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-card .tag {
    color: #86868b;
    font-size: 0.75em;
    letter-spacing: 1px;
    border: 1px solid #2d2d2f;
    padding: 4px 14px;
}

/* ===== Post Detail Page ===== */
.post-detail {
    padding: 0;
}

.post-detail .post-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid #1d1d1f;
}

.post-detail .post-title {
    font-size: 2.4em;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    color: #fff;
}

.post-detail .post-meta {
    font-size: 0.85em;
    color: #86868b;
    letter-spacing: 1px;
}

.post-detail .post-meta span {
    margin-right: 24px;
}

.post-detail .post-content {
    font-size: 1.05em;
    line-height: 2;
    color: #d1d1d6;
}

.post-detail .post-content p {
    margin-bottom: 1.4em;
}

.post-detail .post-content h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 2em 0 0.8em;
    color: #fff;
}

.post-detail .post-content h3 {
    font-size: 1.2em;
    font-weight: 600;
    margin: 1.6em 0 0.6em;
    color: #fff;
}

.post-detail .post-content img {
    max-width: 100%;
    margin: 1.5em 0;
}

.post-detail .post-content blockquote {
    border-left: 2px solid #fff;
    padding: 16px 24px;
    margin: 1.5em 0;
    color: #86868b;
    font-style: italic;
}

.post-detail .post-content code {
    background: #1d1d1f;
    padding: 2px 8px;
    font-size: 0.9em;
    color: #f5f5f7;
}

.post-detail .post-content pre {
    background: #1d1d1f;
    padding: 24px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.post-detail .post-content pre code {
    background: none;
    padding: 0;
}

.post-detail .post-content ul, 
.post-detail .post-content ol {
    padding-left: 24px;
    margin: 1em 0;
}

.post-detail .post-content li {
    margin-bottom: 0.4em;
    color: #d1d1d6;
}

.post-detail .post-content a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ===== Back Button ===== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #86868b;
    text-decoration: none;
    font-size: 0.85em;
    letter-spacing: 1px;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #fff;
}

/* ===== Scroll Progress Bar ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    z-index: 1000;
    transition: width 0.1s ease;
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== Header Parallax ===== */
header {
    will-change: transform;
    transform: translateZ(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ===== Loading & Error ===== */
.loading, .error {
    text-align: center;
    padding: 60px 40px;
    color: #86868b;
    font-size: 0.95em;
    letter-spacing: 1px;
}

.error {
    color: #ff4444;
}

/* ===== Footer ===== */
footer {
    border-top: 1px solid #1d1d1f;
    color: #86868b;
    text-align: center;
    padding: 48px 0;
    font-size: 0.8em;
    letter-spacing: 1px;
    margin-top: auto;
}

/* ===== Responsive (mobile) ===== */
@media (max-width: 767px) {
    .post-card .post-summary {
        max-width: 100%;
    }

    .post-detail .post-title {
        font-size: 1.6em;
    }

    .post-detail {
        padding: 0;
    }
}

/* ===== Interaction Bar ===== */
.interaction-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    margin-top: 48px;
    border-top: 1px solid #1d1d1f;
    border-bottom: 1px solid #1d1d1f;
}

.interaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #2d2d2f;
    color: #86868b;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 0.9em;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.interaction-btn:hover {
    border-color: #fff;
    color: #fff;
}

.interaction-btn.liked {
    border-color: #ff4444;
    color: #ff4444;
}

.interaction-btn.liked #like-icon {
    color: #ff4444;
}

#like-icon {
    font-size: 1.2em;
    transition: transform 0.2s;
}

.interaction-btn:hover #like-icon {
    transform: scale(1.2);
}

.interaction-info {
    color: #86868b;
    font-size: 0.85em;
    letter-spacing: 1px;
}

/* ===== Comments Section ===== */
.comments-section {
    display: none;
    margin-top: 48px;
    padding-bottom: 48px;
}

.comments-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.giscus-loading {
    text-align: center;
    padding: 40px;
    color: #86868b;
    font-size: 0.9em;
    letter-spacing: 1px;
}
