/* ===========================================
   DIRT RIVER DESIGN - UX/UI Redesign
   Theme: Techy nerd + blue-collar approachable
   Target: Farms, contractors, small businesses
   =========================================== */

/* --- CSS VARIABLES --- */
:root {
    /* Color Scheme - Techy + Blue-Collar */
    --color-bg: #f8f9fa;              /* Very light gray background */
    --color-surface: #ffffff;          /* White cards/surfaces */
    --color-primary: #2C5F77;          /* Muted teal - techy but grounded */
    --color-accent: #D97642;           /* Earthy orange - blue-collar warmth */
    --color-text: #1a1a1a;             /* Dark gray text */
    --color-muted: #6c757d;            /* Medium gray for secondary text */
    --color-border: #dee2e6;           /* Light borders */
    --color-hover: #234a5c;            /* Darker primary for hovers */

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 4rem;

    /* Layout */
    --container-width: 1140px;
    --border-radius: 6px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* --- DARK MODE VARIABLES --- */
[data-theme="dark"] {
    --color-bg: #1a1a1a;
    --color-surface: #2a2a2a;
    --color-primary: #5fa3c4;          /* Lighter teal for dark mode */
    --color-accent: #e89563;           /* Lighter orange */
    --color-text: #e0e0e0;
    --color-muted: #a0a0a0;
    --color-border: #404040;
    --color-hover: #7bbddb;

    /* Adjusted shadows for dark mode */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Dark mode specific adjustments */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #234a5c 0%, #1a3844 100%);
}

[data-theme="dark"] .section-dark {
    background: #1e3a47;
}

[data-theme="dark"] .feature {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] footer {
    background: linear-gradient(135deg, #234a5c 0%, #1a3844 100%);
}

[data-theme="dark"] .client-logo-slot {
    border-color: var(--color-border);
    color: var(--color-muted);
}

[data-theme="dark"] .btn-secondary {
    background: #3a3a3a;
    color: #e0e0e0;
    border-color: #555555;
}

/* --- GLOBAL RESET & BASE STYLES --- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    margin: 0;
    padding: 0;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    color: var(--color-primary);
    line-height: 1.3;
    font-weight: 700;
    margin-top: 0;
}

h1 { font-size: 3rem; margin-bottom: var(--space-lg); }
h2 { font-size: 2.25rem; margin-bottom: var(--space-md); }
h3 { font-size: 1.5rem; margin-bottom: var(--space-sm); }
h4 { font-size: 1.25rem; margin-bottom: var(--space-sm); }

p {
    margin: 0 0 var(--space-md) 0;
    line-height: 1.7;
}

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

ul, ol {
    margin: 0 0 var(--space-md) 0;
    padding-left: var(--space-lg);
}

li {
    margin-bottom: var(--space-xs);
    line-height: 1.6;
}

/* --- HEADER --- */
header {
    background: var(--color-surface);
    border-bottom: 2px solid var(--color-border);
    padding: var(--space-md) 0;
    box-shadow: var(--shadow-sm);
    transition: padding 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.02em;
    display: block;
}

/* Site Logo - Image based with dark mode support */
.site-logo {
    max-height: 85px;
    height: auto;
    width: auto;
    display: block;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.site-logo--dark {
    display: none;
}

/* Light theme */
:root[data-theme="light"] .site-logo--light {
    display: block;
}

:root[data-theme="light"] .site-logo--dark {
    display: none;
}

/* Dark theme */
:root[data-theme="dark"] .site-logo--light {
    display: none;
}

:root[data-theme="dark"] .site-logo--dark {
    display: block;
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: var(--space-lg);
}

header nav li {
    margin: 0;
}

header nav a {
    font-weight: 500;
    color: var(--color-text);
    padding: var(--space-xs) 0;
    position: relative;
    transition: color 0.2s ease;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

header nav a:hover,
header nav a.active {
    color: var(--color-primary);
}

header nav a:hover::after,
header nav a.active::after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0.5rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Dark Mode Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-text);
    font-size: 1.25rem;
    margin-left: var(--space-md);
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    transform: rotate(180deg);
}

.theme-toggle-icon {
    line-height: 1;
    pointer-events: none;
}

/* --- FOOTER --- */
footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.9);
    padding: var(--space-xl) 0;
    margin-top: var(--space-xxl);
    text-align: center;
}

footer p {
    margin: var(--space-xs) 0;
    opacity: 0.9;
}

footer a {
    color: white;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    text-underline-offset: 3px;
}

footer a:hover {
    color: var(--color-accent);
    text-decoration-color: var(--color-accent);
}

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-hover) 100%);
    color: white;
    padding: var(--space-xxl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle grid pattern overlay for techy feel */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

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

.hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: var(--space-md);
    font-weight: 800;
}

.hero .tagline {
    font-size: 1.25rem;
    max-width: 750px;
    margin: 0 auto var(--space-xl);
    opacity: 0.95;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background: #c2642a;
    border-color: #c2642a;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: #ffffff;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f5f5f5;
    color: #444444;
    border-color: #cccccc;
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary:active {
    transform: translateY(0);
}

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

.btn-outline:hover {
    background: var(--color-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline:active {
    transform: translateY(0);
}

/* --- SECTIONS --- */
.section {
    padding: calc(var(--space-xxl) + var(--space-lg)) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.section-subtitle {
    text-align: center;
    font-size: 1.15rem;
    color: var(--color-muted);
    max-width: 700px;
    margin: 0 auto var(--space-xl);
    line-height: 1.6;
}

.section-dark {
    background: var(--color-primary);
    color: white;
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: white;
}

.section-dark p,
.section-dark li {
    color: rgba(255, 255, 255, 0.9);
}

.section-alt {
    background: var(--color-surface);
}

/* --- GRID SYSTEM --- */
.grid {
    display: grid;
    gap: var(--space-lg);
}

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

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

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

/* --- CARDS --- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

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

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card h3 {
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
}

.card p {
    color: var(--color-muted);
    margin-bottom: var(--space-md);
}

.card ul {
    margin-bottom: 0;
}

.card-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
}

.card-price small {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-muted);
}

/* --- FEATURES (TRUST BLOCKS) --- */
.feature {
    background: rgba(255, 255, 255, 0.08);
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--color-accent);
}

.feature h3 {
    margin-bottom: var(--space-sm);
    color: white;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-md);
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- SECTION ICONS --- */
.section-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: var(--space-sm);
    display: inline-block;
}

/* --- PRICING CARDS --- */
.pricing-card {
    position: relative;
}

.pricing-card.featured {
    border: 2px solid var(--color-accent);
    transform: scale(1.02);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    right: var(--space-md);
    background: var(--color-accent);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* --- FORMS --- */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--color-text);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem var(--space-sm);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(44, 95, 119, 0.1);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-muted);
    opacity: 0.7;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form microcopy */
.form-helper {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin-top: var(--space-xs);
    font-style: italic;
}

/* --- FAQ ITEMS --- */
.faq-item {
    margin-bottom: var(--space-lg);
}

.faq-item h4 {
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.faq-item p {
    color: var(--color-muted);
    margin-bottom: 0;
}

/* --- CONTACT INFO --- */
.contact-info {
    background: var(--color-surface);
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.contact-info h3 {
    margin-top: 0;
    margin-bottom: var(--space-md);
}

.contact-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    margin-bottom: var(--space-sm);
}

/* --- UTILITY CLASSES --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }

.px-sm { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }

/* --- ABOUT PAGE --- */
.about-headshot {
    max-width: 320px;
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    object-fit: cover;
}

/* --- CLIENT LOGOS --- */
/* Dark background for client logos section in both light and dark mode */
.section-client-logos {
    background: var(--color-primary);
    color: white;
}

.section-client-logos .section-title {
    color: white;
}

.section-client-logos .section-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

.client-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: var(--space-lg);
}

.client-logo {
    max-height: 60px;
    width: auto;
    object-fit: contain;
    filter: grayscale(0.1);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.client-logo:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.05);
}

/* --- PROCESS STEPS --- */
.process-steps {
    max-width: 900px;
    margin: 0 auto;
}

.process-step {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    align-items: flex-start;
}

.process-step:last-child {
    margin-bottom: 0;
}

.process-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.process-content h3 {
    margin-top: 0;
    margin-bottom: var(--space-xs);
}

.process-content p {
    margin: 0;
    color: var(--color-muted);
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

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

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

    .hero h1 {
        font-size: 2.75rem;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero .tagline {
        font-size: 1.1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Mobile Navigation */
    header {
        position: relative;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--color-surface);
        box-shadow: var(--shadow-lg);
        padding: var(--space-md) 0;
        z-index: 1000;
        border-top: 2px solid var(--color-border);
    }

    header nav.active {
        display: block;
    }

    header nav ul {
        flex-direction: column;
        gap: 0;
    }

    header nav a {
        display: block;
        padding: var(--space-md);
        border-bottom: 1px solid var(--color-border);
    }

    header nav a::after {
        display: none;
    }

    .mobile-nav-toggle {
        display: block;
        margin-left: var(--space-md);
    }

    .theme-toggle {
        margin-left: 0;
        margin-right: var(--space-xs);
    }

    /* Mobile Logo Sizing */
    .site-logo {
        max-height: 60px;
    }

    /* Shrink logo on scroll (mobile only) */
    header.scrolled {
        padding: var(--space-xs) 0;
    }

    header.scrolled .site-logo {
        max-height: 0;
        opacity: 0;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .process-step {
        flex-direction: column;
        gap: var(--space-md);
    }

    .pricing-card.featured {
        transform: none;
    }
}

/* --- TECHY ENHANCEMENTS --- */

/* Add subtle monospace touches to technical elements */
.card-price {
    font-family: var(--font-family);
    letter-spacing: -0.02em;
}

.process-number {
    font-family: var(--font-family-mono);
    letter-spacing: -0.02em;
}

/* Subtle code-style border for certain containers */
.pricing-badge {
    font-family: var(--font-family-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

/* Terminal-like aesthetic for config note boxes */
.config-note,
.tech-note {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--color-primary);
    font-family: var(--font-family-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: var(--space-lg) 0;
}

.config-note::before {
    content: '$ ';
    color: var(--color-accent);
    font-weight: bold;
}

/* Subtle data/grid feel for footer */
footer {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1e3a47 100%);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    opacity: 0.5;
}

footer .container {
    position: relative;
    z-index: 1;
}

/* Footer Social Links */
.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    justify-content: center;
}

.footer-social .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
}

.footer-social .social-link:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.footer-social .social-icon {
    width: 18px;
    height: 18px;
    display: block;
    color: rgba(255, 255, 255, 0.9);
}

/* Subtle tech accent on section dividers */
.section-alt {
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

/* Enhanced pricing card featured state */
.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    border-radius: var(--border-radius);
    z-index: -1;
    opacity: 0.1;
}

/* Monospace touch for form labels  */
label {
    font-family: var(--font-family);
    font-size: 0.95rem;
}

/* Code-style for certain helper text */
.form-helper {
    font-family: var(--font-family);
    opacity: 0.8;
}

/* Subtle pixel corners for buttons (techy detail) */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
    opacity: 1;
}

/* Subtle scan line effect on hero (very subtle) */
@keyframes scan {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100vh);
    }
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent
    );
    animation: scan 8s linear infinite;
    pointer-events: none;
    opacity: 0.3;
}

/* Version number aesthetic (can be used in footer) */
.version {
    font-family: var(--font-family-mono);
    font-size: 0.75rem;
    opacity: 0.5;
    letter-spacing: 0.1em;
}

/* Enhanced process numbers with tech feel */
.process-number {
    background: linear-gradient(135deg, var(--color-accent) 0%, #c2642a 100%);
    box-shadow: 0 4px 12px rgba(217, 118, 66, 0.3);
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-hover);
    transform: translateY(-4px);
}

.back-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}

/* ========================================
   BLOG STYLES
   ======================================== */

/* Blog Post Page */
.blog-post {
    padding: var(--space-xxl) 0;
}

.blog-header {
    text-align: center;
    margin-bottom: var(--space-xxl);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--color-border);
}

.blog-meta {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: var(--space-sm);
}

.blog-intro {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--color-muted);
    margin-top: var(--space-md);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.blog-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text);
}

.blog-content h2 {
    margin-top: var(--space-xxl);
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.blog-content h3 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.blog-content p {
    margin-bottom: var(--space-md);
}

.blog-content ul,
.blog-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.blog-content li {
    margin-bottom: var(--space-xs);
}

.blog-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(44, 95, 119, 0.3);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.blog-content a:hover {
    color: var(--color-accent);
    text-decoration-color: var(--color-accent);
}

/* Override link styles for buttons inside blog content */
.blog-content .btn,
.blog-content .btn-primary,
.blog-content .btn-secondary,
.blog-content .btn-outline {
    text-decoration: none;
    text-decoration-color: transparent;
}

.blog-content .btn-primary {
    color: #ffffff;
}

.blog-content .btn-primary:hover {
    color: #ffffff;
}

.blog-content .btn-secondary:hover {
    color: #ffffff;
}

.blog-content .btn-outline {
    color: var(--color-primary);
}

.blog-content .btn-outline:hover {
    color: #ffffff;
}

/* Blog CTA */
.blog-cta {
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    margin: var(--space-xxl) 0;
    text-align: center;
}

.blog-cta h3 {
    margin-top: 0;
    color: var(--color-primary);
}

.blog-cta p {
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

/* Related Posts */
.related-posts {
    margin-top: var(--space-xxl);
    padding-top: var(--space-xl);
    border-top: 2px solid var(--color-border);
}

.related-posts h3 {
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.related-post-card {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    text-decoration: none;
    transition: all 0.2s ease;
}

.related-post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.related-post-card h4 {
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.related-post-card p {
    color: var(--color-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* Author Bio */
.author-bio {
    background: var(--color-bg);
    border-left: 4px solid var(--color-accent);
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    margin-top: var(--space-xxl);
}

.author-bio h4 {
    margin-top: 0;
    color: var(--color-primary);
}

.author-bio p {
    margin-bottom: var(--space-sm);
}

.author-bio p:last-child {
    margin-bottom: 0;
}

/* Blog Index Page */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.blog-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.blog-card-content {
    padding: var(--space-lg);
}

.blog-card-meta {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: var(--space-sm);
}

.blog-badge {
    display: inline-block;
    background: var(--color-accent);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: var(--space-xs);
}

.blog-card h3 {
    margin: 0 0 var(--space-sm);
    font-size: 1.3rem;
}

.blog-card h3 a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card h3 a:hover {
    color: var(--color-accent);
}

.blog-card p {
    color: var(--color-muted);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.blog-read-more {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-read-more:hover {
    color: var(--color-accent);
}

/* Featured Blog Card */
.blog-card-featured {
    grid-column: 1 / -1;
    border: 2px solid var(--color-primary);
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 100%);
}

.blog-card-featured h2 {
    margin: 0 0 var(--space-md);
    font-size: 1.8rem;
}

.blog-card-featured h2 a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-featured h2 a:hover {
    color: var(--color-accent);
}

.blog-card-featured p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

/* ==================================================
   TIMELINE SECTION
   ================================================== */

.about-timeline {
    position: relative;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
}

/* Vertical line running through timeline */
.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-primary);
    opacity: 0.3;
}

.timeline__item {
    position: relative;
    padding-left: 80px;
    margin-bottom: var(--space-xxl);
}

.timeline__item:last-child {
    margin-bottom: 0;
}

/* Circular marker on the timeline */
.timeline__marker {
    position: absolute;
    left: 18px;
    top: 8px;
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    border: 4px solid var(--color-background);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--color-primary);
    z-index: 1;
}

.timeline__content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    transition: all 0.3s ease;
}

.timeline__content:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.timeline__year {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

.timeline__title {
    font-size: 1.25rem;
    margin: 0 0 var(--space-sm) 0;
    color: var(--color-text);
}

.timeline__content p {
    margin: 0;
    line-height: 1.6;
    color: var(--color-muted);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-header h1 {
        font-size: 1.8rem;
    }

    .blog-intro {
        font-size: 1.05rem;
    }

    .blog-content {
        font-size: 1rem;
    }

    /* Timeline mobile adjustments */
    .timeline::before {
        left: 20px;
    }

    .timeline__item {
        padding-left: 60px;
    }

    .timeline__marker {
        left: 8px;
        width: 24px;
        height: 24px;
    }

    .timeline__content:hover {
        transform: translateX(4px);
    }

    .timeline__title {
        font-size: 1.1rem;
    }
}
