/* Fonts loaded via /assets/fonts/fonts.css (self-hosted) */

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --secondary: #ec4899;
    --secondary-light: #f472b6;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    --bg-main: var(--slate-50);
    --text-main: var(--slate-900);
    --text-muted: var(--slate-500);
    --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-heading: 'Outfit', system-ui, sans-serif;
    
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

::selection {
    background: var(--primary-light);
    color: white;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

/* Glassmorphism Evolution */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Premium Typography */
h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

/* Modern Layout Utilities */
.container-custom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(50px, -70px) scale(1.2); }
    66% { transform: translate(-40px, 40px) scale(0.8); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
    animation: blob 10s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

/* High-End Components */
.btn-premium {
    position: relative;
    overflow: hidden;
    padding: 1rem 2rem;
    border-radius: var(--radius-xl);
    font-weight: 900;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-premium:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(99, 102, 241, 0.6);
}

.card-premium {
    background: white;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--slate-100);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.03), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1rem; /* Default safe padding for radius */
}

.card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 60px -15px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

/* Mesh Background Evolution */
.mesh-bg {
    background-color: #ffffff;
    background-image: 
        radial-gradient(at 0% 0%, hsla(244,100%,98%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(199,100%,97%,1) 0, transparent 50%), 
        radial-gradient(at 50% 100%, hsla(339,100%,98%,1) 0, transparent 50%);
}

/* Scroll Reveal Tweaks */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Prose Excellence */
.prose-premium {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--slate-600);
}

.prose-premium h2 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-top: 4rem;
    margin-bottom: 2rem;
    color: var(--slate-950);
    letter-spacing: -0.05em;
}

.prose-premium p {
    margin-bottom: 2rem;
}

.prose-premium blockquote {
    border-left: 6px solid var(--primary);
    padding: 2rem 3rem;
    background: var(--slate-50);
    border-radius: 0 var(--radius-3xl) var(--radius-3xl) 0;
    font-style: italic;
    font-weight: 500;
    font-size: 1.4rem;
    margin: 3.5rem 0;
    color: var(--slate-800);
}

/* Custom Scrollbar Premium */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--slate-200); border-radius: 20px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--slate-300); }

/* Text Handling Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.break-words {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* Global Dark Mode Overrides */
html.dark body {
    background-color: #0f1123;
    color: #e0e4f4;
}

html.dark .bg-slate-50, 
html.dark .bg-slate-100,
html.dark .bg-gray-50,
html.dark .bg-gray-100,
html.dark .bg-gray-50\/50,
html.dark .bg-white\/50,
html.dark .bg-white\/90,
html.dark .bg-white\/95,
html.dark .bg-white {
    background-color: #0f1123 !important;
}

html.dark .bg-white\/60 {
    background-color: rgba(15, 17, 35, 0.8) !important;
}

html.dark .card-premium {
    background: #131526;
    border-color: #222543;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
}

html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-slate-700,
html.dark .text-gray-900,
html.dark .text-gray-800,
html.dark .text-gray-700,
html.dark .text-black {
    color: #ffffff !important;
}

html.dark .text-slate-600,
html.dark .text-slate-500,
html.dark .text-slate-400,
html.dark .text-gray-600,
html.dark .text-gray-500,
html.dark .text-gray-400 {
    color: #aab0d5 !important;
}

html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-50,
html.dark .border-gray-100,
html.dark .border-gray-200,
html.dark .border-gray-50 {
    border-color: #222543 !important;
}

html.dark .mesh-bg {
    background-color: #0f1123 !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.1) 0, transparent 50%), 
        radial-gradient(at 50% 100%, rgba(139, 92, 246, 0.1) 0, transparent 50%) !important;
}

html.dark header {
    background-color: rgba(19, 21, 38, 0.8) !important;
    border-color: #222543 !important;
}

html.dark input, 
html.dark textarea, 
html.dark select {
    background-color: #1c1f39 !important;
    color: #ffffff !important;
    border-color: #222543 !important;
}

html.dark table thead {
    background-color: #1c1f39 !important;
}
html.dark table tbody tr {
    border-color: #222543 !important;
}

/* Fix Dropdowns in Dark Mode */
html.dark .group-hover\:visible > div,
html.dark .group-hover\:block > div {
    background-color: #131526 !important;
    border-color: #222543 !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5) !important;
}
html.dark .group-hover\:visible > div > div,
html.dark .group-hover\:block > div > div {
    background-color: #1c1f39 !important;
    border-color: #222543 !important;
}
html.dark .group-hover\:visible a, 
html.dark .group-hover\:visible button,
html.dark .group-hover\:block a, 
html.dark .group-hover\:block button {
    color: #aab0d5 !important;
}
html.dark .group-hover\:visible a:hover, 
html.dark .group-hover\:visible button:hover,
html.dark .group-hover\:block a:hover, 
html.dark .group-hover\:block button:hover {
    background-color: rgba(255,255,255,0.05) !important;
    color: #ffffff !important;
}

html.dark .glass {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
