/* ===== CSS Variables / Theme ===== */
:root {
    --bg: #171717;
    --text: #fbfbfb;
    --text-secondary: #888;
    --border: #333;
    --nav-bg: #171717;
    --hover: #222;
    --link: #ccc;
    --link-hover: #fff;
}

[data-theme="light"] {
    --bg: #f8f8f8;
    --text: #111;
    --text-secondary: #666;
    --border: #ddd;
    --nav-bg: #f8f8f8;
    --hover: #eee;
    --link: #444;
    --link-hover: #000;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

/* ===== Navigation ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    background-color: var(--nav-bg);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: color 0.2s;
    padding: 4px 0;
}

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

.nav-link.active {
    border-bottom: 1.5px solid var(--text);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
    line-height: 1;
}

.theme-toggle:hover {
    background-color: var(--hover);
}

/* ===== Main Content ===== */
.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* ===== ASCII Art ===== */
.ascii-art {
    font-family: monospace;
    font-size: 10px;
    line-height: 1.1;
    color: var(--text);
    text-align: center;
    white-space: pre;
    padding: 20px 0;
    max-width: 100%;
    overflow-x: auto;
    transition: color 0.3s;
}

/* ===== Chipi Animation ===== */
.chipi-animation {
    font-family: monospace;
    font-size: 8px;
    line-height: 1;
    color: var(--text);
    text-align: center;
    white-space: pre;
    max-width: 100%;
    overflow-x: auto;
    transition: color 0.3s;
}

/* ===== Recent Posts ===== */
.recent-posts {
    width: 100%;
}

.section-title {
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    display: block;
    padding: 16px;
    background: var(--hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.recent-item:hover {
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

.recent-source {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.recent-tag {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.recent-tag.music {
    color: #6ee7b7;
    border-color: rgba(110, 231, 183, 0.3);
}

.recent-tag.perfume {
    color: #d4a574;
    border-color: rgba(212, 165, 116, 0.3);
}

.recent-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.recent-title {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.4;
}

.recent-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Categories ===== */
.categories {
    width: 100%;
    margin-top: 20px;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border-top: 1px solid var(--border);
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8px;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.15s;
}

.category-item:hover {
    background-color: var(--hover);
}

.category-title {
    font-size: 16px;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

.category-item:hover .category-title {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

.category-desc {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.3s;
}

/* ===== Responsive ===== */
@media screen and (max-width: 768px) {
    .navbar {
        padding: 16px 20px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-link {
        font-size: 13px;
    }

    .ascii-art {
        font-size: 5px;
        line-height: 1;
    }

    .chipi-animation {
        font-size: 5px;
    }

    .content {
        padding: 24px 16px;
    }

    .category-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 16px 8px;
    }
}

@media screen and (max-width: 375px) {
    .ascii-art {
        font-size: 3.5px;
        line-height: 1;
    }

    .chipi-animation {
        font-size: 3.5px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-link {
        font-size: 12px;
    }
}
