/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* ========== Theme System ========== */

/* Light theme (default) */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-nav: rgba(255, 255, 255, 0.85);
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-input: rgba(0, 0, 0, 0.05);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.08);
    --hover-bg: rgba(0, 0, 0, 0.05);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --footer-bg: rgba(248, 250, 252, 0.8);
}

/* Dark theme */
.dark {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-nav: rgba(17, 24, 39, 0.7);
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-input: rgba(255, 255, 255, 0.1);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #6b7280;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(255, 255, 255, 0.05);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --footer-bg: rgba(17, 24, 39, 0.5);
}

/* Theme transition */
body,
nav,
main,
footer,
.glass-panel,
.theme-transition {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Glass panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* Theme-aware body */
body.theme-body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Theme-aware nav */
nav.theme-nav {
    background-color: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
}

/* Theme-aware footer */
footer.theme-footer {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-color);
}

/* Theme-aware inputs */
.theme-input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.theme-input:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.3);
}

.theme-input::placeholder {
    color: var(--text-muted);
}

/* Theme-aware cards */
.theme-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Text utility classes */
.theme-text {
    color: var(--text-primary);
}

.theme-text-secondary {
    color: var(--text-secondary);
}

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

/* Mobile menu */
.theme-mobile-menu {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

/* Selection */
.dark ::selection {
    background: #ec4899;
    color: white;
}

::selection {
    background: #ec4899;
    color: white;
}

/* Markdown Content Styling */
.content-markdown h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.content-markdown h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.content-markdown h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.content-markdown strong {
    font-weight: 700;
    color: var(--text-primary);
}

.content-markdown em {
    font-style: italic;
}

.content-markdown ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-markdown ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-markdown li {
    margin-bottom: 0.25rem;
}

.content-markdown blockquote {
    border-left: 4px solid var(--text-muted);
    padding-left: 1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin: 1rem 0;
}

.content-markdown a {
    color: #ec4899;
    /* Pink-500 */
    text-decoration: underline;
}

.content-markdown a:hover {
    color: #db2777;
    /* Pink-600 */
}