:root {
    /* Off-white color scheme */
    --background: 45 15% 98%; /* #FAF9F7 */
    --surface: 40 12% 95%; /* #F3F2F0 */
    --surface-variant: 35 8% 92%; /* #EBEAE8 */
    --primary-color: 210 100% 50%; /* #0080FF */
    --accent-color: 280 60% 60%; /* #B366D9 */
    --text-primary: 220 15% 15%; /* #262A33 */
    --text-secondary: 215 10% 40%; /* #5A6169 */
    --text-muted: 210 8% 55%; /* #7A828A */
    --border-color: 30 5% 88%; /* #E1E0DD */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: hsl(var(--text-primary));
    background-color: hsl(var(--background));
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: hsl(var(--text-primary));
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }

p {
    color: hsl(var(--text-secondary));
    margin-bottom: 1rem;
}

/* Navigation */
.navbar {
    background-color: hsla(220, 15%, 10%, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid hsla(220, 15%, 20%, 0.3);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    color: white !important;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-thin {
    font-weight: 200;
}

.brand-bold {
    font-weight: 600;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: hsl(var(--text-secondary)) !important;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: hsl(var(--primary-color)) !important;
}

/* Buttons */
.btn {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-primary {
    background-color: hsl(var(--primary-color));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: hsl(210 100% 45%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-outline-primary {
    border: 2px solid hsl(var(--primary-color));
    color: hsl(var(--primary-color));
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: hsl(var(--primary-color));
    color: white;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: linear-gradient(135deg, 
        hsl(var(--background)) 0%, 
        hsl(var(--surface)) 100%);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, 
        hsl(var(--primary-color)) 0%, 
        hsl(var(--accent-color)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: hsl(var(--text-secondary));
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.probability-diagram {
    max-width: 400px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Sections */
.section-padding {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: hsl(var(--text-secondary));
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.bg-light {
    background-color: hsl(var(--surface)) !important;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background-color: white;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: 1px solid hsl(var(--border-color));
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, 
        hsl(var(--primary-color)) 0%, 
        hsl(var(--accent-color)) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.feature-icon i {
    width: 24px;
    height: 24px;
}

/* Application Cards */
.application-card {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid hsl(var(--border-color));
    height: 100%;
}

.application-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.application-icon {
    width: 48px;
    height: 48px;
    color: hsl(var(--primary-color));
}

/* Contact Form */
.contact-form {
    background-color: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid hsl(var(--border-color));
}

.form-control {
    font-family: 'Space Grotesk', sans-serif;
    border: 2px solid hsl(var(--border-color));
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: hsl(var(--background));
}

.form-control:focus {
    border-color: hsl(var(--primary-color));
    box-shadow: 0 0 0 0.2rem hsla(var(--primary-color), 0.25);
    background-color: white;
}

.form-label {
    font-weight: 500;
    color: hsl(var(--text-primary));
    margin-bottom: 0.5rem;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: 90%;
    max-width: 500px;
}

.alert {
    border-radius: 0.75rem;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
}

/* Footer */
.footer-black {
    background-color: #000000;
    color: white;
    margin-top: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    height: 32px;
    width: 32px;
}

.footer-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: white;
}

.footer-description {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-heading {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: 'Space Grotesk', sans-serif;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
        margin-top: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .application-card {
        padding: 1.5rem;
    }
    
    .application-card .row {
        text-align: center;
    }
    
    .application-card .col-md-3 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    .feature-card {
        padding: 2rem 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.probability-diagram svg {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Code Widget - Glassmorphism */
.code-widget {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.code-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.control.red {
    background: #ff5f57;
}

.control.yellow {
    background: #ffbd2e;
}

.control.green {
    background: #28ca42;
}

.filename {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.9rem;
    color: hsl(var(--text-secondary));
    font-weight: 500;
}

.code-content {
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
}

.code-content pre {
    margin: 0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: hsl(var(--text-primary));
    overflow-x: auto;
}

.code-content code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* Syntax Highlighting */
.keyword {
    color: #8b5cf6;
    font-weight: 600;
}

.module {
    color: #06b6d4;
    font-weight: 500;
}

.function {
    color: #eab308;
    font-weight: 500;
}

.param {
    color: #f97316;
}

.variable {
    color: #10b981;
}

.comment {
    color: #6b7280;
    font-style: italic;
}

.string {
    color: #dc2626;
}

.number {
    color: #7c3aed;
}

.output {
    color: #059669;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.typewriter {
    color: #f97316;
    font-weight: 500;
    margin-left: 10px;
}

.typewriter::after {
    content: '|';
    color: #f97316;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Responsive Code Widget */
@media (max-width: 768px) {
    .code-widget {
        margin: 0 1rem;
        max-width: none;
    }
    
    .code-content {
        padding: 15px;
    }
    
    .code-content pre {
        font-size: 12px;
    }
    
    .filename {
        font-size: 0.8rem;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, 
        hsl(var(--primary-color)) 0%, 
        hsl(var(--accent-color)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-radius-lg {
    border-radius: 1rem !important;
}

.shadow-custom {
    box-shadow: var(--shadow) !important;
}

.shadow-lg-custom {
    box-shadow: var(--shadow-lg) !important;
}

/* Authentication Styles */
.btn-login {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease !important;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.profile-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-menu {
    background: rgba(45, 55, 72, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}
