/* ═══════════════════════════════════════════════════════════
   fatalmeh — blog styles
   Light: Cloud Industrial (B)
   Dark: Neon Garden (A)
   ═══════════════════════════════════════════════════════════ */

:root {
    /* Light theme (B: Cloud Industrial) */
    --bg: #f5f3f0;
    --bg-secondary: #eae7e3;
    --text: #2d2d2d;
    --text-muted: #6b6b6b;
    --accent: #8B5CF6;
    --accent-hover: #CD5C5C;
    --border: #d0ccc6;
    
    --font-mono: "Segoe UI", Roboto, "Helvetica Neue", Ubuntu, "Noto Sans", Arial, sans-serif;
    --font-size: 18px;
    --max-width: 680px;
}

[data-theme="dark"] {
    /* Dark theme (A: Neon Garden) */
    --bg: #0a0a14;
    --bg-secondary: #12121f;
    --text: #f0f0f0;
    --text-muted: #8888aa;
    --accent: #FF6B9D;
    --accent-hover: #00FFFF;
    --border: #2a2a3a;
}

/* ═══════════════════════════════════════════════════════════
   Base
   ═══════════════════════════════════════════════════════════ */

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

html {
    font-size: var(--font-size);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
}

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

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

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* ═══════════════════════════════════════════════════════════
   Header
   ═══════════════════════════════════════════════════════════ */

header {
    padding: 2rem 1.5rem;
    border-bottom: 1px dashed var(--border);
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

header h1 {
    font-size: 1.8rem;
    font-weight: normal;
    letter-spacing: -0.02em;
}

/* Title colors - fatal yellow, meh orange */
header h1 a {
    position: relative;
    font-weight: bold;
    text-decoration: none;
}

header h1 a .fatal {
    color: #FFD700; /* yellow/gold */
}

header h1 a .meh {
    color: #FF6B35; /* burnt orange */
}

header h1 a:hover {
    text-decoration: none;
}

/* Glitch effect on title hover */
header h1 a:hover::before,
header h1 a:hover::after {
    content: 'fatalmeh';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-weight: 900;
}

/* Glitch with red lines */
header h1 a:hover::before {
    color: #FF0040; /* red */
    text-shadow: 0 0 10px #FF0040, 0 0 20px #FF0040;
    animation: glitch-1 0.6s infinite ease-in-out alternate;
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
}

/* Light mode: hot pink */
header h1 a:hover::after {
    color: #FF1493;
    text-shadow: 0 0 10px #FF1493, 0 0 20px #FF1493;
    animation: glitch-2 0.6s infinite ease-in-out alternate;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
}

/* Dark mode: neon magenta */
[data-theme="dark"] header h1 a:hover::after {
    color: #FF00FF;
    text-shadow: 0 0 10px #FF00FF, 0 0 20px #FF00FF;
}

@keyframes glitch-1 {
    0% { transform: translateX(0); }
    100% { transform: translateX(-3px); }
}

@keyframes glitch-2 {
    0% { transform: translateX(0); }
    100% { transform: translateX(3px); }
}

nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

nav .separator {
    color: var(--text-muted);
}

#theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

/* ═══════════════════════════════════════════════════════════
   Main Content
   ═══════════════════════════════════════════════════════════ */

main {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.intro {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed var(--border);
}

.intro p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════
   Posts List
   ═══════════════════════════════════════════════════════════ */

.posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post {
    padding-bottom: 2rem;
    border-bottom: 1px dashed var(--border);
    transition: opacity 0.2s ease;
}

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

.post:hover {
    opacity: 1;
}

.post time {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.post h2 {
    font-size: 1.25rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
}

.post h2 a {
    color: var(--text);
}

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

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

/* ═══════════════════════════════════════════════════════════
   Single Post Page
   ═══════════════════════════════════════════════════════════ */

.post-single {
    padding-bottom: 0;
    border-bottom: none;
}

.post-single h2 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.post-content {
    margin-top: 2rem;
    line-height: 1.8;
}

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

.post-content h3 {
    font-size: 1.1rem;
    font-weight: normal;
    margin: 2rem 0 1rem;
    color: var(--accent);
}

.post-content blockquote {
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-content code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--bg-secondary);
    padding: 1rem;
    overflow-x: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
}

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

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
}

.post-content a {
    text-decoration: underline;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

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

.back-link {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border);
}

/* ═══════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════ */

footer {
    padding: 2rem 1.5rem;
    border-top: 1px dashed var(--border);
    text-align: center;
}

footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

footer a {
    color: var(--text-muted);
}

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

footer .hint {
    margin-top: 1rem;
    font-size: 0.7rem;
    opacity: 0.4;
    letter-spacing: 2px;
}

.blink {
    animation: blink 1.5s infinite;
    color: var(--accent);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════
   Retro Touches (subtle)
   ═══════════════════════════════════════════════════════════ */

/* Scanlines effect - uncomment if you want it */
/*
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03),
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 1000;
}
*/

/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    :root {
        --font-size: 15px;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    main {
        padding: 1.5rem 1rem;
    }
    
    footer {
        padding: 1.5rem 1rem;
    }
}
