/* ============================================
   NEURAL TRANSIT - Premium Academic Theme
   AI + Transportation/Mobility Research
   Author: MAHBUB
   Version: 2.0
   ============================================ */

/* ============================================
   GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   Easy to customize - change colors here only!
   ============================================ */
:root {
    /* ========== PRIMARY COLORS ========== */
    --primary-900: #0A1628;    /* Darkest - backgrounds */
    --primary-800: #0F2137;    /* Dark sections */
    --primary-700: #152A46;    /* Cards in dark mode */
    --primary-600: #1E3A5F;    /* Primary brand */
    --primary-500: #2E5077;    /* Primary lighter */
    --primary-400: #4A6FA5;    /* Hover states */
    --primary-300: #7B9CC7;    /* Borders */
    --primary-200: #B5CAE4;    /* Subtle elements */
    --primary-100: #E8F0F8;    /* Light backgrounds */
    --primary-50:  #F5F8FC;    /* Lightest */

    /* ========== ACCENT COLORS ========== */
    /* Cyan - AI, Technology, Innovation */
    --accent-cyan-600: #0891B2;
    --accent-cyan-500: #00D4FF;
    --accent-cyan-400: #22D3EE;
    --accent-cyan-300: #67E8F9;
    --accent-cyan-200: #A5F3FC;
    --accent-cyan-glow: rgba(0, 212, 255, 0.4);
    
    /* Green - Sustainability, EV, Growth */
    --accent-green-600: #059669;
    --accent-green-500: #10B981;
    --accent-green-400: #34D399;
    --accent-green-300: #6EE7B7;
    --accent-green-glow: rgba(16, 185, 129, 0.4);
    
    /* Amber - Energy, Alerts, Highlights */
    --accent-amber-600: #D97706;
    --accent-amber-500: #F59E0B;
    --accent-amber-400: #FBBF24;
    --accent-amber-300: #FCD34D;
    --accent-amber-glow: rgba(245, 158, 11, 0.4);
    
    /* Purple - Premium, Innovation */
    --accent-purple-600: #7C3AED;
    --accent-purple-500: #8B5CF6;
    --accent-purple-400: #A78BFA;
    --accent-purple-glow: rgba(139, 92, 246, 0.4);

    /* ========== SEMANTIC COLORS ========== */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #00D4FF;

    /* ========== NEUTRAL COLORS ========== */
    /* Dark Mode */
    --dark-bg-primary: #0A0F1C;
    --dark-bg-secondary: #111827;
    --dark-bg-tertiary: #1F2937;
    --dark-bg-card: rgba(17, 24, 39, 0.8);
    --dark-border: rgba(255, 255, 255, 0.08);
    --dark-border-hover: rgba(255, 255, 255, 0.15);
    --dark-text-primary: #F9FAFB;
    --dark-text-secondary: #9CA3AF;
    --dark-text-tertiary: #6B7280;
    
    /* Light Mode */
    --light-bg-primary: #FFFFFF;
    --light-bg-secondary: #F9FAFB;
    --light-bg-tertiary: #F3F4F6;
    --light-bg-card: #FFFFFF;
    --light-border: rgba(0, 0, 0, 0.08);
    --light-border-hover: rgba(0, 0, 0, 0.15);
    --light-text-primary: #111827;
    --light-text-secondary: #4B5563;
    --light-text-tertiary: #9CA3AF;

    /* ========== GRADIENTS ========== */
    --gradient-primary: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-700) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-cyan-500) 0%, var(--accent-green-500) 100%);
    --gradient-accent-reverse: linear-gradient(135deg, var(--accent-green-500) 0%, var(--accent-cyan-500) 100%);
    --gradient-purple: linear-gradient(135deg, var(--accent-purple-500) 0%, var(--accent-cyan-500) 100%);
    --gradient-warm: linear-gradient(135deg, var(--accent-amber-500) 0%, var(--accent-green-500) 100%);
    --gradient-hero: linear-gradient(180deg, var(--dark-bg-primary) 0%, var(--primary-900) 50%, var(--primary-800) 100%);
    --gradient-card: linear-gradient(145deg, rgba(30, 58, 95, 0.4) 0%, rgba(10, 22, 40, 0.6) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    --gradient-text: linear-gradient(135deg, var(--accent-cyan-400) 0%, var(--accent-green-400) 50%, var(--accent-cyan-400) 100%);

    /* ========== SHADOWS ========== */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
    --shadow-2xl: 0 24px 64px rgba(0, 0, 0, 0.3);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    
    /* Glow Shadows */
    --shadow-glow-cyan: 0 0 40px var(--accent-cyan-glow);
    --shadow-glow-green: 0 0 40px var(--accent-green-glow);
    --shadow-glow-purple: 0 0 40px var(--accent-purple-glow);
    --shadow-glow-amber: 0 0 40px var(--accent-amber-glow);

    /* ========== TYPOGRAPHY ========== */
    --font-display: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Font Sizes - Fluid Typography */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --text-3xl: clamp(2rem, 1.7rem + 1.5vw, 2.5rem);
    --text-4xl: clamp(2.5rem, 2rem + 2.5vw, 3.5rem);
    --text-5xl: clamp(3rem, 2.5rem + 3vw, 4.5rem);
    --text-6xl: clamp(3.5rem, 3rem + 3.5vw, 5.5rem);
    
    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.15;
    --leading-snug: 1.3;
    --leading-normal: 1.5;
    --leading-relaxed: 1.65;
    --leading-loose: 1.8;
    
    /* Letter Spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    /* ========== SPACING ========== */
    --space-0: 0;
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    --space-32: 8rem;     /* 128px */
    --space-40: 10rem;    /* 160px */
    --space-48: 12rem;    /* 192px */

    /* ========== BORDER RADIUS ========== */
    --radius-none: 0;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-3xl: 32px;
    --radius-full: 9999px;

    /* ========== TRANSITIONS ========== */
    --ease-linear: linear;
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    --duration-75: 75ms;
    --duration-100: 100ms;
    --duration-150: 150ms;
    --duration-200: 200ms;
    --duration-300: 300ms;
    --duration-500: 500ms;
    --duration-700: 700ms;
    --duration-1000: 1000ms;

    /* ========== Z-INDEX SCALE ========== */
    --z-below: -1;
    --z-base: 0;
    --z-raised: 10;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-popover: 500;
    --z-tooltip: 600;
    --z-toast: 700;
    --z-max: 9999;

    /* ========== LAYOUT ========== */
    --container-xs: 480px;
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1440px;
    --container-padding: clamp(1rem, 5vw, 2rem);
    
    /* Navbar */
    --navbar-height: 80px;
    --navbar-height-scrolled: 64px;
}

/* ============================================
   BASE RESET & DEFAULTS
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    background-color: var(--dark-bg-primary);
    color: var(--dark-text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color var(--duration-300) var(--ease-in-out),
                color var(--duration-300) var(--ease-in-out);
}

/* Light Mode */
body.light-mode {
    background-color: var(--light-bg-primary);
    color: var(--light-text-primary);
}

/* ============================================
   SELECTION & SCROLLBAR
   ============================================ */
::selection {
    background: var(--accent-cyan-500);
    color: var(--primary-900);
}

::-moz-selection {
    background: var(--accent-cyan-500);
    color: var(--primary-900);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-600);
    border-radius: var(--radius-full);
    border: 2px solid var(--dark-bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan-500);
}

body.light-mode::-webkit-scrollbar-track {
    background: var(--light-bg-tertiary);
}

body.light-mode::-webkit-scrollbar-thumb {
    border-color: var(--light-bg-tertiary);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--dark-text-primary);
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6 {
    color: var(--light-text-primary);
}

h1 { font-size: var(--text-5xl); font-weight: 800; }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--dark-text-secondary);
}

body.light-mode p {
    color: var(--light-text-secondary);
}

/* Text Gradient Effect */
.text-gradient {
    background: var(--gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* Mono Text */
.text-mono {
    font-family: var(--font-mono);
}

/* ============================================
   LINKS
   ============================================ */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--duration-200) var(--ease-out);
}

a:hover {
    color: var(--accent-cyan-500);
}

/* ============================================
   IMAGES & MEDIA
   ============================================ */
img, video, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

img {
    object-fit: cover;
}

/* ============================================
   LISTS
   ============================================ */
ul, ol {
    list-style: none;
}

/* ============================================
   BUTTONS BASE
   ============================================ */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

button:focus-visible {
    outline: 2px solid var(--accent-cyan-500);
    outline-offset: 2px;
}

/* ============================================
   FORM ELEMENTS BASE
   ============================================ */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
    background: none;
}

input:focus, textarea:focus, select:focus {
    outline: none;
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-xl { max-width: var(--container-xl); }
.container-2xl { max-width: var(--container-2xl); }

/* Full Width Container */
.container-full {
    width: 100%;
    padding: 0 var(--container-padding);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--space-24) 0;
    position: relative;
}

.section-sm { padding: var(--space-16) 0; }
.section-lg { padding: var(--space-32) 0; }

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-header h2 {
    margin-bottom: var(--space-4);
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: var(--text-lg);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Display */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flexbox */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Font Weight */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }

/* Width & Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Margin & Padding Utilities */
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
/* 
   Mobile First Approach:
   - Default: Mobile (< 640px)
   - sm: >= 640px
   - md: >= 768px
   - lg: >= 1024px
   - xl: >= 1280px
   - 2xl: >= 1440px
*/

/* Tablet and up */
@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
    .md\:grid { display: grid; }
}

/* Desktop and up */
@media (min-width: 1024px) {
    .lg\:flex { display: flex; }
    .lg\:hidden { display: none; }
    .lg\:grid { display: grid; }
}

/* Large Desktop */
@media (min-width: 1280px) {
    .xl\:flex { display: flex; }
    .xl\:hidden { display: none; }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none !important;
    }
}
