@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #1a1a1a;
    --text-color: #b8b8b8;
    --heading-color: #ffffff;
    --link-color: #b8b8b8;
    --accent-color: #f97316;
    --muted-color: #666666;
    --code-bg: #2a2a2a;
    --border-color: #333333;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

body.light-mode {
    --bg-color: #ffffff;
    --text-color: #555555;
    --heading-color: #1a1a1a;
    --link-color: #555555;
    --muted-color: #888888;
    --code-bg: #f5f5f5;
    --border-color: #eaeaea;
}

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

html {
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
}

/* Header */
.site-header {
    margin-bottom: 40px;
}

.logo {
    margin-bottom: 24px;
}

.logo a {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--heading-color);
    letter-spacing: -0.02em;
    position: relative;
}

.logo a::after {
    content: '.';
    color: var(--accent-color);
}

.logo a:hover {
    color: var(--heading-color);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.site-nav a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--link-color);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--muted-color);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    margin-left: auto;
}

#theme-toggle:hover {
    color: var(--accent-color);
}

/* Wavy Separator */
.wavy-separator {
    width: 100%;
    height: 20px;
    margin: 50px 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 20'%3E%3Cpath d='M0 10 Q 15 0 30 10 T 60 10 T 90 10 T 120 10 T 150 10 T 180 10 T 210 10 T 240 10 T 270 10 T 300 10 T 330 10 T 360 10 T 390 10 T 420 10 T 450 10 T 480 10 T 510 10 T 540 10 T 570 10 T 600 10 T 630 10 T 660 10 T 690 10 T 720 10 T 750 10 T 780 10 T 810 10 T 840 10 T 870 10 T 900 10 T 930 10 T 960 10 T 990 10 T 1020 10 T 1050 10 T 1080 10 T 1110 10 T 1140 10 T 1170 10 T 1200 10' fill='none' stroke='%23555' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--heading-color);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2rem;
    margin-bottom: 24px;
}

h2 {
    font-size: 1.5rem;
    margin-top: 48px;
    margin-bottom: 16px;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1.5em;
}

/* Intro Section */
.intro {
    margin-bottom: 20px;
}

.intro h1 {
    font-size: 1.75rem;
}

.intro p {
    font-size: 1.1rem;
    max-width: 600px;
}

.intro p strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* Section Title */
.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted-color);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 12px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Post List */
.post-list {
    list-style: none;
}

.post-list li {
    margin-bottom: 32px;
}

.post-list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.post-list-content {
    flex: 1;
}

.post-list-content h3 {
    margin-bottom: 8px;
}

.post-list-content h3 a {
    color: var(--heading-color);
}

.post-list-content h3 a:hover {
    color: var(--accent-color);
}

.post-list-excerpt {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-list-date {
    font-size: 0.85rem;
    color: var(--muted-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-list-date::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
}

.post-list-thumbnail {
    width: 140px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Simple List (without thumbnails) */
.simple-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.simple-list li:first-child {
    border-top: 1px solid var(--border-color);
}

.simple-list .date {
    font-size: 0.85rem;
    color: var(--muted-color);
    font-family: var(--font-mono);
}

.more-link {
    margin-top: 24px;
}

.more-link a {
    color: var(--accent-color);
    font-weight: 500;
}

/* Post Single */
.post-header {
    margin-bottom: 48px;
}

.post-title {
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--muted-color);
}

.post-content {
    font-size: 1.05rem;
}

.post-content strong {
    color: var(--accent-color);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

.post-content a {
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
}

.post-content a:hover {
    opacity: 0.8;
}

blockquote {
    border-left: 3px solid var(--accent-color);
    margin: 24px 0;
    padding: 16px 24px;
    background: var(--code-bg);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

code {
    background-color: var(--code-bg);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

pre {
    background-color: var(--code-bg);
    padding: 20px;
    overflow-x: auto;
    border-radius: 8px;
    margin: 24px 0;
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* Footer */
.site-footer {
    margin-top: 100px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--muted-color);
}

.site-footer p {
    margin: 0;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--muted-color);
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Page Header */
.page-header {
    margin-bottom: 48px;
}

.page-header h1 {
    margin-bottom: 16px;
}

/* 404 */
.not-found {
    text-align: center;
    padding: 80px 0;
}

.not-found h1 {
    font-size: 6rem;
    color: var(--muted-color);
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .container {
        padding: 40px 20px;
    }

    .site-header {
        margin-bottom: 32px;
    }

    .site-nav {
        gap: 20px;
        flex-wrap: wrap;
    }

    .logo a {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .post-list-item {
        flex-direction: column-reverse;
    }

    .post-list-thumbnail {
        width: 100%;
        height: 180px;
    }

    .simple-list li {
        flex-direction: column;
        gap: 4px;
    }

    .site-footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .wavy-separator {
        margin: 32px 0;
    }
}