/* ============================================
   NovaRadioCMS Professional Theme
   Based on TypeScript Project Design System
   Primary: hsl(14 100% 50%) - Orange
   Fonts: Inter + Roboto Mono
   ============================================ */

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

/* ============================================
   CSS Variables - Matching TypeScript Project
   ============================================ */

:root {
    /* Core Colors - HSL format matching TypeScript project */
    --background: 0 0% 99%;
    --foreground: 220 20% 14%;
    
    --card: 0 0% 100%;
    --card-foreground: 220 20% 14%;
    
    --popover: 0 0% 100%;
    --popover-foreground: 220 20% 14%;
    
    --primary: 14 100% 50%;
    --primary-foreground: 0 0% 100%;
    
    --secondary: 220 14% 96%;
    --secondary-foreground: 220 20% 14%;
    
    --muted: 220 14% 96%;
    --muted-foreground: 220 10% 46%;
    
    --accent: 14 100% 50%;
    --accent-foreground: 0 0% 100%;
    
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;
    
    --border: 220 13% 91%;
    --input: 220 13% 91%;
    --ring: 14 100% 50%;
    
    --radius: 0.5rem;
    
    /* Sidebar */
    --sidebar-background: 220 14% 97%;
    --sidebar-foreground: 220 20% 14%;
    --sidebar-primary: 14 100% 50%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 220 14% 93%;
    --sidebar-accent-foreground: 220 20% 14%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 14 100% 50%;
    
    /* Custom tokens */
    --surface: 220 14% 97%;
    --surface-hover: 220 14% 94%;
    --code-bg: 220 16% 96%;
    --highlight: 14 100% 50%;
    --highlight-soft: 14 100% 97%;
    --highlight-medium: 14 100% 92%;
    --text-dim: 220 10% 55%;
    --hero-bg: 220 20% 14%;
    --hero-fg: 0 0% 98%;
    
    /* Legacy compatibility */
    --primary-dark: hsl(14, 100%, 45%);
    --primary-light: hsl(14, 100%, 97%);
    --primary-medium: hsl(14, 100%, 92%);
    --success: hsl(142, 76%, 36%);
    --warning: hsl(38, 92%, 50%);
    --error: hsl(0, 84%, 60%);
    
    /* Typography */
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Roboto Mono', 'Courier New', monospace;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================
   Base Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: hsl(var(--foreground));
    background-color: hsl(var(--background));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mono);
    font-weight: 700;
    line-height: 1.2;
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; letter-spacing: -0.02em; }
h2 { font-size: 1.875rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 1.75rem; }
}

p {
    margin-bottom: 1rem;
}

a {
    color: hsl(var(--primary));
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

::selection {
    background: hsl(var(--highlight) / 0.15);
    color: hsl(var(--foreground));
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--background));
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--border));
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground));
}

/* ============================================
   Layout Components
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

.content-column {
    max-width: 64rem;
    margin: 0 auto;
    width: 100%;
    padding: 0 1.5rem;
}

.section-module {
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .section-module {
        padding: 6rem 0;
    }
}

.glow-line {
    height: 1px;
    background: hsl(var(--border));
}

/* ============================================
   Header
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: hsl(var(--background) / 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border));
}

.header-content {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
}

.logo {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    color: hsl(var(--foreground));
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0;
}

.logo span {
    color: hsl(var(--primary));
}

.nav {
    display: none;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    
    .nav a {
        font-family: var(--font-mono);
        font-size: 0.75rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: hsl(var(--muted-foreground));
        text-decoration: none;
        transition: color 0.2s ease;
    }
    
    .nav a:hover {
        color: hsl(var(--foreground));
    }
    
    .nav a.active {
        color: hsl(var(--primary));
    }
}

/* Mobile menu button */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: hsl(var(--foreground));
    -webkit-tap-highlight-color: transparent;
    z-index: 50;
    position: relative;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    background: hsl(var(--hero-bg));
    color: hsl(var(--hero-fg));
    padding: 5rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 60, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 60, 0, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero .content-column {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: hsl(var(--primary));
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 2.25rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: hsl(var(--hero-fg));
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3.75rem;
    }
}

.primary-text {
    color: hsl(var(--primary));
}

.hero-description {
    font-size: 1rem;
    line-height: 1.7;
    color: hsl(var(--hero-fg) / 0.7);
    max-width: 36rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.125rem;
    }
}

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

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    background: hsl(var(--primary) / 0.9);
    color: hsl(var(--primary-foreground));
}

.btn-secondary {
    background: transparent;
    color: hsl(var(--hero-fg));
    border: 1px solid hsl(var(--hero-fg) / 0.2);
}

.btn-secondary:hover {
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
}

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

.btn-outline:hover {
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

.btn-danger {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.btn-danger:hover {
    background: hsl(var(--destructive) / 0.9);
    color: hsl(var(--destructive-foreground));
}

/* ============================================
   Terminal
   ============================================ */

.terminal {
    background: hsl(220, 16%, 10%);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 3rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid hsl(220, 12%, 20%);
}

.terminal-header {
    background: hsl(220, 12%, 20%);
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid hsl(220, 12%, 20%);
}

.terminal-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: hsl(var(--hero-fg) / 0.3);
}

.terminal-dot-active {
    background: hsl(var(--primary) / 0.6);
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: hsl(var(--hero-fg) / 0.4);
    margin-left: 0.5rem;
}

.terminal-body {
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
    color: hsl(var(--hero-fg) / 0.9);
}

.terminal-body p {
    margin-bottom: 0.25rem;
}

.terminal-prompt {
    color: hsl(var(--hero-fg) / 0.4);
    margin-right: 0.5rem;
}

.terminal-comment {
    color: hsl(var(--hero-fg) / 0.4);
}

.terminal-success {
    color: hsl(var(--primary));
}

/* ============================================
   Section Labels
   ============================================ */

.label-mono {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: hsl(var(--primary));
}

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: hsl(var(--primary));
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1rem;
    line-height: 1.7;
    color: hsl(var(--muted-foreground));
    margin-bottom: 2rem;
    max-width: 32rem;
}

/* ============================================
   Features Grid
   ============================================ */

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.doc-card {
    padding: 1.25rem;
    border-radius: var(--radius);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    transition: all 0.2s ease;
    cursor: pointer;
}

.doc-card:hover {
    border-color: hsl(var(--primary) / 0.3);
    box-shadow: var(--shadow-sm);
}

.doc-card-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    background: hsl(var(--highlight-soft));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.doc-card h3 {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

.doc-card p {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0;
    line-height: 1.5;
}

.feature-card {
    background: hsl(var(--surface));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.feature-card:hover {
    border-color: hsl(var(--primary) / 0.3);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

/* ============================================
   Steps
   ============================================ */

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2.5rem;
    max-width: 40rem;
}

.step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
}

.step-content h3 {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: hsl(var(--foreground));
}

.step-content p {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0;
    line-height: 1.5;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--border));
}

.card-title {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* ============================================
   Forms
   ============================================ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.5;
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-control::placeholder {
    color: hsl(var(--muted-foreground));
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-text {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

/* ============================================
   Tables
   ============================================ */

.table {
width: 100%;
border-collapse: collapse;
font-size: 0.875rem;
}

.table thead {
    background: hsl(var(--secondary));
    border-bottom: 1px solid hsl(var(--border));
}

.table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--foreground));
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
}

.table tbody tr:hover {
    background: hsl(var(--secondary));
}

/* ============================================
   Badges
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-primary {
    background: hsl(var(--highlight-soft));
    color: hsl(var(--primary));
}

.badge-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.badge-success {
    background: hsl(142, 76%, 96%);
    color: hsl(142, 76%, 36%);
}

.badge-warning {
    background: hsl(38, 92%, 96%);
    color: hsl(38, 92%, 40%);
}

.badge-error {
    background: hsl(0, 84%, 96%);
    color: hsl(0, 84%, 50%);
}

.badge-info {
    background: hsl(210, 100%, 96%);
    color: hsl(210, 100%, 40%);
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
    font-size: 0.875rem;
}

.alert-success {
    background: hsl(142, 76%, 96%);
    border-color: hsl(142, 76%, 36%);
    color: hsl(142, 76%, 26%);
}

.alert-error {
    background: hsl(0, 84%, 96%);
    border-color: hsl(var(--destructive));
    color: hsl(0, 84%, 40%);
}

.alert-info {
    background: hsl(210, 100%, 96%);
    border-color: hsl(210, 100%, 50%);
    color: hsl(210, 100%, 30%);
}

.alert-warning {
    background: hsl(38, 92%, 96%);
    border-color: hsl(38, 92%, 50%);
    color: hsl(38, 92%, 30%);
}

/* ============================================
   Info Boxes
   ============================================ */

.info-box {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border-left: 4px solid hsl(var(--highlight));
    background: hsl(var(--highlight-soft));
    margin-bottom: 1rem;
}

.warning-box {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border-left: 4px solid hsl(40, 100%, 50%);
    background: hsl(40, 100%, 97%);
    margin-bottom: 1rem;
}

.code-block {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: hsl(var(--code-bg));
    border: 1px solid hsl(var(--border));
    overflow-x: auto;
    margin-bottom: 1rem;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    border-top: 1px solid hsl(var(--border));
    padding: 3rem 0;
    background: hsl(var(--secondary));
}

.footer-content {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-brand-col {
    flex-shrink: 0;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    color: hsl(var(--muted-foreground));
    font-size: 1.25rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.footer-social a:hover {
    color: hsl(var(--primary));
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 3rem;
    }
}

.footer-brand {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.footer-brand span {
    color: hsl(var(--primary));
}

.footer-description {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: hsl(var(--primary));
    margin-bottom: 0.75rem;
}

.footer-section a {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: hsl(var(--primary));
}

.footer-bottom {
    max-width: 56rem;
    margin: 2rem auto 0;
    padding: 1.5rem 1.5rem 0;
    border-top: 1px solid hsl(var(--border));
    text-align: center;
}

.footer-copyright {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* ============================================
   Utilities
   ============================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-muted {
    color: hsl(var(--muted-foreground));
}

.text-primary {
    color: hsl(var(--primary));
}

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.font-mono { font-family: var(--font-mono); }
.font-body { font-family: var(--font-body); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.grid {
    display: grid;
    gap: 1rem;
}

.grid-2 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Background utilities */
.bg-secondary { background: hsl(var(--secondary)); }
.bg-primary { background: hsl(var(--primary)); }
.bg-card { background: hsl(var(--card)); }
.bg-surface { background: hsl(var(--surface)); }

/* Prose - for rich content */
.prose h1, .prose h2, .prose h3, .prose h4 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 600;
    line-height: 1.3;
}
.prose h1 { font-size: 1.5rem; }
.prose h2 { font-size: 1.25rem; }
.prose h3 { font-size: 1.125rem; }
.prose h4 { font-size: 1rem; }
.prose p { margin-bottom: 1em; }
.prose ul, .prose ol { margin-bottom: 1em; padding-left: 1.5em; }
.prose li { margin-bottom: 0.375em; }
.prose code {
    font-family: var(--font-mono);
    font-size: 0.8125em;
    background: hsl(var(--code-bg));
    padding: 0.125em 0.375em;
    border-radius: 0.25rem;
}
.prose pre {
    background: hsl(var(--code-bg));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1em;
}
.prose pre code {
    background: none;
    padding: 0;
}
.prose a {
    color: hsl(var(--primary));
    text-decoration: underline;
}
.prose blockquote {
    border-left: 3px solid hsl(var(--primary));
    padding-left: 1rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1em;
}
.prose img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 1em 0;
}

/* ============================================
   Cookie Consent Popup (bottom-right)
   ============================================ */

.cookie-popup {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 1.25rem;
    width: 20rem;
    max-width: calc(100vw - 2rem);
}

.cookie-popup-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
}

.cookie-popup-header strong {
    font-size: 0.875rem;
    color: hsl(var(--foreground));
}

.cookie-popup-text {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.5;
    margin: 0 0 0.875rem;
}

.cookie-popup-text a {
    color: hsl(var(--primary));
    text-decoration: underline;
}

.cookie-popup-actions {
    display: flex;
    gap: 0.5rem;
}

.cookie-reopen-btn {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 9998;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: hsl(var(--primary));
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cookie-reopen-btn:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: scale(1.05);
}

/* ============================================
   Blog Cards
   ============================================ */

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.blog-card-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    background: hsl(var(--secondary));
}

.blog-card-body {
    padding: 1.25rem;
}

.blog-card-meta {
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-card-excerpt {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card-link {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: hsl(var(--primary));
    font-weight: 600;
}

/* ============================================
   Mobile Menu
   ============================================ */

.nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 3.5rem;
    left: 0;
    right: 0;
    bottom: 0;
    background: hsl(var(--background) / 0.98);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    gap: 0;
    z-index: 40;
    overflow-y: auto;
}

.nav.mobile-open a {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: hsl(var(--foreground));
    text-decoration: none;
    padding: 1rem 0;
    border-bottom: 1px solid hsl(var(--border));
    transition: color 0.2s ease;
}

.nav.mobile-open a:hover {
    color: hsl(var(--primary));
}

.nav.mobile-open a.active {
    color: hsl(var(--primary));
}

/* ============================================
   Mobile & Responsive
   ============================================ */

@media (max-width: 767px) {
    /* General mobile fixes */
    .content-column,
    .container {
        padding: 0 1rem;
    }
    
    .section-module {
        padding: 2.5rem 0;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    
    /* Hero */
    .hero {
        padding: 3rem 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Forum posts: stack author + content vertically */
    .forum-post > div {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .forum-post > div > div:first-child {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        text-align: left;
        min-width: auto;
    }
    
    .forum-post > div > div:first-child > div:first-child {
        margin: 0;
    }
    
    .forum-post-content {
        font-size: 0.8125rem;
    }
    
    /* Tables: horizontal scroll wrapper */
    .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Forms */
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Cards */
    .card {
        padding: 1rem;
    }
    
    /* Footer */
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    /* Terminal */
    .terminal-body {
        font-size: 0.75rem;
        padding: 1rem;
    }
    
    /* Cookie popup */
    .cookie-popup {
        left: 1rem;
        right: 1rem;
        width: auto;
    }
}
