/* CSS Variables & Obsidian Palette */
:root {
    --bg-obsidian: #080a0f;
    --bg-card: #0f131a;
    --border-card: rgba(255, 255, 255, 0.07);
    --sapphire: #1f6feb;
    --sapphire-glow: rgba(31, 111, 235, 0.35);
    --amber: #f59e0b;
}

body {
    background-color: var(--bg-obsidian);
    color: #e2e8f0;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Glass Card */
.glass-card {
    background: rgba(15, 19, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: rgba(31, 111, 235, 0.3);
    box-shadow: 0 10px 30px -10px var(--sapphire-glow);
}

/* Typography Helpers */
.font-display {
    font-family: 'Playfair Display', Georgia, serif;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Sapphire Glow Button */
.btn-sapphire {
    background: linear-gradient(135deg, #1f6feb 0%, #0d47a1 100%);
    color: white;
    padding: 0.65rem 1.4rem;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(31, 111, 235, 0.4);
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    text-decoration: none;
}

.btn-sapphire:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(31, 111, 235, 0.6);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 0.65rem 1.4rem;
    border-radius: 9999px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.lightbox-modal.active {
    display: flex;
}

/* Tailwind-like utility classes */
.bg-obsidian { background-color: var(--bg-obsidian); }
.text-sapphire-300 { color: #93c5fd; }
.text-sapphire-400 { color: #60a5fa; }
.text-sapphire-500 { color: #3b82f6; }
.bg-sapphire-600 { background-color: #2563eb; }
.bg-sapphire-500 { background-color: #3b82f6; }
.border-sapphire-500 { border-color: #3b82f6; }

/* Fallback Layout Rules */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

input, textarea, select, button {
    font-family: inherit;
}
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #080a0f;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Journal Article Content (Markdown Typography) */
.journal-content {
    color: #cbd5e1;
    font-size: 1.0625rem;
    line-height: 1.85;
}

.journal-content h1,
.journal-content h2,
.journal-content h3,
.journal-content h4 {
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
    line-height: 1.35;
}

.journal-content h1 {
    font-size: 2.25rem;
}

.journal-content h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
}

.journal-content h3 {
    font-size: 1.35rem;
    color: #93c5fd;
}

.journal-content p {
    margin-bottom: 1.35rem;
}

.journal-content blockquote {
    border-left: 3px solid #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    padding: 1rem 1.25rem;
    margin: 1.75rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: italic;
    color: #e2e8f0;
}

.journal-content ul,
.journal-content ol {
    margin: 1.25rem 0 1.5rem 1.5rem;
    padding-left: 0.5rem;
}

.journal-content ul {
    list-style-type: disc;
}

.journal-content ol {
    list-style-type: decimal;
}

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

.journal-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: #93c5fd;
}

.journal-content pre {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.journal-content pre code {
    background: transparent;
    padding: 0;
    color: #f1f5f9;
}

.journal-content strong {
    color: #ffffff;
    font-weight: 600;
}

.journal-content em {
    color: #93c5fd;
}

.journal-content hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2.5rem 0;
}
