:root {
    --bg: #050505;
    --surface: #0a0a0a;
    --surface-hover: #121212;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    --text-main: #ededed;
    --text-muted: #888888;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --glass: rgba(5, 5, 5, 0.7);
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    overflow-x: hidden; /* Prevents horizontal scroll on mobile */
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: color 0.3s var(--ease); }
ul { list-style: none; }

/* --- Utility & Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.grid { display: grid; gap: 24px; }
.flex { display: flex; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.justify-between { justify-content: space-between; }
.center { justify-content: center; text-align: center; }

.section-padding { padding: 120px 0; }

/* --- Typography --- */
h1, h2, h3 { letter-spacing: -0.04em; font-weight: 600; line-height: 1.1; }
h1 { font-size: 4.5rem; background: linear-gradient(180deg, #fff, #888); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: 2.5rem; margin-bottom: 24px; }
h3 { font-size: 1.25rem; margin-bottom: 8px; }
p { color: var(--text-muted); font-size: 1.1rem; }
.small { font-size: 0.875rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-muted); }

/* --- Components --- */
/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Safari support */
    border-bottom: 1px solid var(--border);
    background: var(--glass);
}

.logo { font-weight: 700; letter-spacing: -0.05em; font-size: 1.2rem; flex-shrink: 0; }
.nav-links { gap: 32px; font-size: 0.9rem; color: var(--text-muted); display: flex; align-items: center; }
.nav-links a:hover { color: var(--text-main); }

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.4s var(--ease);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-block;
    white-space: nowrap; /* Prevents text wrap on mobile */
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg);
}

.btn-primary:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.btn-secondary {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-main);
}

.btn-secondary:hover { border-color: var(--text-main); background: var(--surface); }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: 12px;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    background: var(--surface-hover);
}

/* Forms */
.input-group { margin-bottom: 24px; }
label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }

input, textarea, select {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s var(--ease);
    outline: none;
    appearance: none; /* Removes native UI on mobile */
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Tags */
.tag {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    white-space: nowrap;
}

.tag.accent { border-color: var(--accent); color: var(--accent); background: rgba(99, 102, 241, 0.05); }

/* --- Specific Sections --- */
.hero {
    min-height: 90vh; /* Changed from fixed height to min-height */
    padding-top: 100px; /* Space for navbar */
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.2;
    z-index: -1;
    filter: blur(80px);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.sidebar {
    border-right: 1px solid var(--border);
    padding: 100px 24px;
}

.sidebar li { margin-bottom: 16px; }
.sidebar a { display: block; padding: 8px 0; color: var(--text-muted); font-size: 0.95rem; }
.sidebar a.active { color: var(--text-main); font-weight: 500; }

.dashboard-content { padding: 100px 48px; }

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s var(--ease) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* --- MOBILE OPTIMIZATIONS --- */
@media (max-width: 768px) {
    /* Layout Adjustments */
    .container { padding: 0 20px; }
    .section-padding { padding: 80px 0; }
    
    /* Typography Scaling */
    h1 { font-size: 2.8rem; line-height: 1.1; }
    h2 { font-size: 1.8rem; }
    p { font-size: 1rem; }
    
    /* Navbar Mobile */
    nav { padding: 16px 0; }
    nav .container {
        flex-wrap: wrap;
        gap: 16px;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 20px;
        font-size: 0.85rem;
    }
    
    /* Grid Adjustments */
    /* Forces single column on mobile for ease of reading */
    .grid { grid-template-columns: 1fr !important; gap: 20px; }
    
    /* Hero Adjustments */
    .hero { min-height: 80vh; }
    .hero::after { width: 300px; height: 300px; } /* Smaller glow */
    
    /* Dashboard Mobile Layout */
    .dashboard-layout { 
        display: flex; 
        flex-direction: column; 
    }
    
    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 80px 20px 20px 20px;
        width: 100%;
        overflow-x: auto; /* Horizontal scroll for menu */
    }
    
    .sidebar ul {
        display: flex;
        gap: 24px;
        white-space: nowrap;
    }
    
    .sidebar li { margin-bottom: 0; }
    
    .dashboard-content { padding: 40px 20px; }
    
    /* Card Adjustments */
    .card { padding: 24px; }
    
    /* Form Adjustments */
    .input-group input, .input-group select { font-size: 16px; } /* Prevents iOS zoom */
    
    /* Buttons */
    .hero .flex { flex-direction: column; width: 100%; }
    .hero .btn { width: 100%; margin-right: 0 !important; margin-bottom: 12px; }
}
