@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;
    --text-primary: #EDEDED;
    --text-secondary: #8E8E93;
    --border: #222222;
    --border-hover: #444444;
    --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;
    --text-primary: #171717;
    --text-secondary: #6B7280;
    --border: #E5E7EB;
    --border-hover: #D1D5DB;
    --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;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* App Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation Header */
.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3.5rem;
}

.nav-brand {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.nav-brand span {
    color: var(--text-secondary);
    font-weight: 400;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link {
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-separator {
    color: var(--border);
    user-select: none;
}

/* 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;
}


.back-link {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: var(--text-heading);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.main-container {
    max-width: 54rem;
    margin: 0 auto;
    background-color: var(--container-bg);
    border: 2px solid var(--border-color);
    padding: 1.5rem 3rem;
}

h1 {
    color: var(--text-heading);
    font-size: 2.25rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0 2rem 0;
}

p {
    margin-bottom: 1.5rem;
    color : var(--text-white);
}

h2 {
    color: var(--text-heading);
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
}

h3 {
    color: var(--text-heading);
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

ul {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.25rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--text-heading);
}

/* Responsive */
@media (max-width: 768px) {
    .back-link {
        position: static;
        display: block;
        margin-bottom: 1.5rem;
    }
    .main-container {
        padding: 1.5rem 1.5rem;
}
}

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tags-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tags-label {
    font-size: 0.85rem;
    color: #9a9a9a;
    font-weight: bold;
}

.post-tag {
    background-color: rgba(255,255,255,0.05);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #9a9a9a;
    font-weight : bold;
    display: inline-block;
}
