/* Catppuccin Minimalist Blog — retrowave edition */

/* Catppuccin Mocha Color Palette */
:root {
    --ctp-rosewater: #f5e0dc;
    --ctp-flamingo: #f2cdcd;
    --ctp-pink: #f5c2e7;
    --ctp-mauve: #cba6f7;
    --ctp-red: #f38ba8;
    --ctp-maroon: #eba0ac;
    --ctp-peach: #fab387;
    --ctp-yellow: #f9e2af;
    --ctp-green: #a6e3a1;
    --ctp-teal: #94e2d5;
    --ctp-sky: #89dceb;
    --ctp-sapphire: #74c7ec;
    --ctp-blue: #87ceeb;
    --ctp-lavender: #b4befe;
    --ctp-text: #cdd6f4;
    --ctp-subtext1: #bac2de;
    --ctp-subtext0: #a6adc8;
    --ctp-overlay2: #9399b2;
    --ctp-overlay1: #7f849c;
    --ctp-overlay0: #6c7086;
    --ctp-surface2: #585b70;
    --ctp-surface1: #45475a;
    --ctp-surface0: #313244;
    --ctp-base: #1e1e2e;
    --ctp-mantle: #181825;
    --ctp-crust: #11111b;

    --glow-pink: #f5c2e7;
    --glow-cyan: #89dceb;
}

[data-theme="light"] {
    --ctp-text: #4c4f69;
    --ctp-subtext1: #5c5f77;
    --ctp-subtext0: #6c6f85;
    --ctp-overlay2: #7c7f93;
    --ctp-overlay1: #8c8fa1;
    --ctp-overlay0: #9ca0b0;
    --ctp-surface2: #acb0be;
    --ctp-surface1: #bcc0cc;
    --ctp-surface0: #ccd0da;
    --ctp-base: #eff1f5;
    --ctp-mantle: #e6e9ef;
    --ctp-crust: #dce0e8;

    --glow-pink: #8839ef;
    --glow-cyan: #179299;
}

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

html {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    line-height: 1.6;
}

body {
    color: var(--ctp-text);
    background-color: var(--ctp-crust);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Faint scanlines */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    z-index: 9999;
}

/* Centered Layout */
.site-header,
.site-main,
.site-footer {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    padding-top: 3.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--glow-pink), var(--glow-cyan)) 1;
    margin-bottom: 2.5rem;
    text-align: center;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.site-title a {
    color: var(--ctp-text);
    text-decoration: none;
    transition: text-shadow 0.3s ease, color 0.3s ease;
}

.site-title a:hover {
    color: var(--glow-pink);
    text-shadow:
        0 0 7px var(--glow-pink),
        0 0 20px rgba(245, 194, 231, 0.3);
}

.site-tagline {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--ctp-overlay1);
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

/* Blinking cursor after tagline */
.site-tagline:last-of-type::after {
    content: '▌';
    color: var(--glow-cyan);
    animation: blink 1s step-end infinite;
    margin-left: 0.15em;
}

@keyframes blink {
    50% { opacity: 0; }
}

.header-controls {
    margin-top: 1.25rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--ctp-surface1);
    color: var(--ctp-overlay1);
    border-radius: 4px;
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--glow-cyan);
    color: var(--glow-cyan);
    box-shadow: 0 0 8px rgba(137, 220, 235, 0.2);
}

/* Main Content */
.site-main {
    min-height: 60vh;
    padding-bottom: 3rem;
}

/* Post Cards (listing) */
.post {
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--ctp-surface0);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease forwards;
}

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

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

.post-title {
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.post-title a {
    color: var(--ctp-text);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.post-title a:hover {
    color: var(--glow-pink);
    text-shadow: 0 0 10px rgba(245, 194, 231, 0.25);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--ctp-overlay1);
    margin-bottom: 0.75rem;
}

.post-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ctp-subtext0);
    font-family: 'Libre Franklin', sans-serif;
}

/* Individual Post Body */
.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ctp-text);
    font-family: 'Libre Franklin', sans-serif;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
}

.post-body h1 { font-size: 1.6rem; }
.post-body h2 { font-size: 1.35rem; }
.post-body h3 { font-size: 1.15rem; }

.post-body p {
    margin-bottom: 1.25rem;
}

.post-body a {
    color: var(--glow-cyan);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, text-shadow 0.2s ease;
}

.post-body a:hover {
    border-bottom-color: var(--glow-cyan);
    text-shadow: 0 0 8px rgba(137, 220, 235, 0.3);
}

.post-body blockquote {
    border-left: 2px solid var(--glow-pink);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--ctp-subtext1);
    font-style: italic;
}

.post-body ul,
.post-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.post-body li {
    margin-bottom: 0.4rem;
}

.post-body img {
    max-width: 100%;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.post-body code {
    padding: 0.15rem 0.35rem;
    font-size: 85%;
    color: var(--ctp-peach);
    background-color: var(--ctp-surface0);
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
}

.post-body pre {
    background-color: var(--ctp-mantle);
    border: 1px solid var(--ctp-surface0);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.post-body pre code {
    padding: 0;
    color: var(--ctp-text);
    background: none;
    font-size: 0.85rem;
    line-height: 1.5;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.post-body th,
.post-body td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--ctp-surface1);
    text-align: left;
}

.post-body th {
    background-color: var(--ctp-surface0);
    font-weight: 600;
}

.post-body hr {
    border: none;
    border-top: 1px solid var(--ctp-surface0);
    margin: 2rem 0;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--ctp-overlay1);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--glow-cyan);
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 4rem 0;
    color: var(--ctp-overlay1);
}

.no-posts h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--ctp-overlay1);
}

.hidden {
    display: none !important;
}

/* Footer */
.site-footer {
    padding-top: 2rem;
    padding-bottom: 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--ctp-overlay0);
    line-height: 1.5;
}

.site-footer .accent {
    color: var(--glow-pink);
    font-weight: 500;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--ctp-text);
}

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

a:hover {
    color: var(--glow-pink);
}

/* Responsive */
@media (max-width: 480px) {
    .site-header {
        padding-top: 2rem;
        padding-bottom: 1.5rem;
    }

    .site-title {
        font-size: 1.6rem;
    }

    .post-title {
        font-size: 1.2rem;
    }

    .post-body {
        font-size: 1rem;
    }
}
