@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Intel+One+Mono:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

:root {
    /* Fonts */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Intel One Mono', 'Fira Code', 'Roboto Mono', monospace;

    /* Transition */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default Theme (Dark Mode) */
body, body.dark-mode {
    --bg: #0A0A0A;
    --bg-card: #121212;
    --card-bg: var(--bg-card);
    --text-primary: #EDEDED;
    --text-secondary: #8E8E93;
    --text-muted: var(--text-secondary);
    --text-white: var(--text-primary);
    --border: #222222;
    --border-hover: #444444;
    --border-color: var(--border);
    --accent: #FFFFFF;
    --accent-bg: #FFFFFF;
    --accent-text: #000000;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --dot-color: #34C759;
    --chart-invert: invert(0.9) hue-rotate(180deg) brightness(1.2);
}

/* Light Theme overrides */
body.light-mode {
    --bg: #F9F9F9;
    --bg-card: #FFFFFF;
    --card-bg: var(--bg-card);
    --text-primary: #171717;
    --text-secondary: #6B7280;
    --text-muted: var(--text-secondary);
    --text-white: var(--text-primary);
    --border: #E5E7EB;
    --border-hover: #D1D5DB;
    --border-color: var(--border);
    --accent: #000000;
    --accent-bg: #000000;
    --accent-text: #FFFFFF;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    --dot-color: #28CD41;
    --chart-invert: grayscale(1) contrast(1.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    padding-bottom: 4rem;
    padding-top:4rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* App Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
/* Minimal Navigation */
.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    padding: 0 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a, .nav-links button {
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links button:hover {
    color: var(--accent);
}

/* Card and Header Styling */
.post-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 3rem;
    /* box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2); */
}

.post-header {
    margin-bottom: 2.5rem;
    text-align: left;
}

.blog-name {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--accent);
    margin-bottom: 1rem;
    font-family: "Iosevka Charon Mono", monospace;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-date {
    font-weight: 500;
}

.post-tag {
    background-color: rgba(255,255,255,0.05);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

/* Typography & Images */
.post-content {
    font-size: 1.125rem;
    color: var(--text-white);
}

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

.featured-image, .inline-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    object-fit: cover;
    transition: var(--transition);
}

.featured-image:hover, .inline-image:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.first-syllabal {
    float: left;
    font-size: 3.5rem;
    line-height: 0.85;
    margin-top: 0.08em;
    margin-right: 0.15em;
    font-weight: 700;
}

/* Center short paragraph text next to drop-cap vertically */
p.single-line-dropcap {
    display: flex;
    align-items: center;
}

p.single-line-dropcap .first-syllabal {
    float: none;
    line-height: 1;
    margin-top: 0;
    margin-bottom: 0;
    margin-right: 0.15em;
    display: inline-block;
}

/* GitHub style image template */
.markdown-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 6px; /* Similar to github */
    border: 1px solid var(--border-color); /* Subtle border like github */
}

.markdown-image:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .post-card {
        padding: 2rem 1.5rem;
    }
    .post-title {
        font-size: 2rem;
    }
    .post-content {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .nav-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background-color: var(--bg-card);
}

body.dark-mode .sun-icon {
    display: block;
}
body.dark-mode .moon-icon {
    display: none;
}
body.light-mode .sun-icon {
    display: none;
}
body.light-mode .moon-icon {
    display: block;
}

/* Custom Blog Callouts */
.disclaimer {
    background-color: rgba(255, 255, 255, 0.03);
    border-right: 4px solid var(--accent);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

body.light-mode .disclaimer {
    background-color: rgba(0, 0, 0, 0.03);
}

.note {
    background-color: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--text-secondary);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

body.light-mode .note {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Blog Content Lists */
.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

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