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

body { 
    font-family: 'Inter', sans-serif; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-serif { font-family: 'Merriweather', serif; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 4px; }
.dark ::-webkit-scrollbar-thumb { background: #3f3f46; }
::-webkit-scrollbar-thumb:hover { background: #a1a1aa; }

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in-up { animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* Markdown Styles overrides */
.prose h1, .prose h2, .prose h3 { letter-spacing: -0.025em; }
.prose blockquote { font-style: italic; border-left-color: #09090b; }
.dark .prose blockquote { border-left-color: #fff; }

/* --- 2025 Masonry Gallery Styles (High Density) --- */
.masonry-grid {
    column-count: 2; /* Mobile: 2 cols */
    column-gap: 1rem; /* Tighter gap */
}

/* Increase density rapidly as screen gets wider */
@media (min-width: 640px) { .masonry-grid { column-count: 3; } }
@media (min-width: 768px) { .masonry-grid { column-count: 4; } }
@media (min-width: 1024px) { .masonry-grid { column-count: 5; } }
@media (min-width: 1280px) { .masonry-grid { column-count: 6; } }
@media (min-width: 1536px) { .masonry-grid { column-count: 7; } }

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem; /* Tighter vertical spacing */
    opacity: 0; /* Initially hidden for animation */
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}