/* ==========================================================================
   William Hleucka - Frontend Stylesheet
   Dark theme with teal accents (neovim-inspired)
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Variables)
   -------------------------------------------------------------------------- */
:root {
    /* Background colors */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: #1c2128;
    
    /* Text colors */
    --text-primary: #f0f6fc;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    
    /* Accent colors - Blue (TokyoNight-inspired) */
    --accent-blue: #7aa2f7;
    --accent-blue-dim: #3d59a1;
    --accent-blue-glow: rgba(122, 162, 247, 0.3);
    
    /* Secondary accent - Purple */
    --accent-purple: #bb9af7;
    --accent-purple-dim: #9d7cd8;
    --accent-purple-glow: rgba(187, 154, 247, 0.3);
    
    /* Legacy teal/green for compatibility */
    --accent-teal: #7aa2f7;
    --accent-teal-glow: rgba(122, 162, 247, 0.3);
    --accent-green: #9ece6a;
    --accent-green-glow: rgba(158, 206, 106, 0.3);
    --accent-green-dim: #73a657;
    
    /* Borders */
    --border-color: #30363d;
    --border-color-light: #484f58;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    --gradient-teal: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    --gradient-dark: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-teal-glow);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    
    /* Spacing */
    --section-padding: 6rem;
    --container-max: 1200px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* --------------------------------------------------------------------------
   Base Styles
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background-color: var(--accent-teal);
    color: var(--bg-primary);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--accent-teal);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* --------------------------------------------------------------------------
   Icon Styles
   -------------------------------------------------------------------------- */
.icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(100%) invert(85%) sepia(5%) saturate(200%) hue-rotate(180deg);
    transition: filter var(--transition-fast);
}

.icon-inline {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(100%) invert(76%) sepia(58%) saturate(1642%) hue-rotate(142deg) brightness(101%) contrast(104%);
    vertical-align: middle;
}

.icon-small {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(60%) sepia(10%) saturate(300%) hue-rotate(180deg);
    vertical-align: middle;
}

.icon-btn {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    vertical-align: middle;
}

.footer-social a:hover .icon {
    filter: brightness(0) saturate(100%) invert(5%) sepia(10%) saturate(500%) hue-rotate(180deg);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.navbar {
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

.navbar-scrolled {
    background: rgba(13, 17, 23, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

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

.navbar-nav .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color var(--transition-fast);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-teal);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover {
    color: var(--text-primary);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

.navbar-toggler {
    border-color: var(--border-color);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px var(--accent-teal-glow);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 var(--section-padding);
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, var(--accent-blue-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--accent-purple-glow) 0%, transparent 50%);
    pointer-events: none;
}

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

.hero-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
}

.hero-image-wrapper {
    flex: 0 0 auto;
}

.hero-image {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hero-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 40px var(--accent-purple-glow);
}

.hero-text {
    max-width: 600px;
}

.hero-greeting {
    color: var(--accent-teal);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-title {
    font-size: 1.75rem;
    color: var(--accent-teal);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-location {
    color: var(--accent-green);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hero-location .icon-inline {
    filter: brightness(0) saturate(100%) invert(83%) sepia(25%) saturate(587%) hue-rotate(43deg) brightness(95%) contrast(92%);
}

.hero-tagline {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--gradient-teal);
    color: snow;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    color: snow;
}

.btn-secondary-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all var(--transition-normal);
}

.btn-secondary-custom:hover {
    border-color: var(--accent-teal);
    color: var(--accent-teal);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
section {
    padding: var(--section-padding) 0;
}

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

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-teal);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-highlight {
    color: var(--accent-blue);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Skills Section
   -------------------------------------------------------------------------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition-normal);
}

.skill-category:hover {
    border-color: var(--accent-teal-dim);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.skill-category-title {
    font-size: 1.25rem;
    color: var(--accent-teal);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}



.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(158, 206, 106, 0.1);
}

/* --------------------------------------------------------------------------
   Experience Section
   -------------------------------------------------------------------------- */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 3rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--accent-teal);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-teal-glow);
}

.timeline-item.current .timeline-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px var(--accent-teal-glow);
    }
    50% {
        box-shadow: 0 0 0 8px var(--accent-teal-glow);
    }
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    border-color: var(--border-color-light);
    box-shadow: var(--shadow-md);
}

.timeline-header {
    margin-bottom: 1rem;
}

.timeline-title {
    font-size: 1.375rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.timeline-company {
    font-size: 1.125rem;
    color: var(--accent-teal);
    font-weight: 500;
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.timeline-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}



.timeline-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.timeline-projects {
    margin-top: 1rem;
}

.timeline-projects-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.timeline-projects ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-projects li {
    padding: 0.375rem 0.875rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 0.8125rem;
    color: var(--accent-green);
    border: 1px solid var(--accent-green-dim);
}

/* --------------------------------------------------------------------------
   Education Section
   -------------------------------------------------------------------------- */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.education-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition-normal);
}

.education-card:hover {
    border-color: var(--accent-teal-dim);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.education-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-teal);
}



.education-degree {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.education-school {
    color: var(--accent-teal);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.education-year {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.education-note {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta-section {
    background: var(--bg-secondary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 50% 100%, var(--accent-teal-glow) 0%, transparent 60%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}



/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-title {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.footer-social a:hover {
    background: var(--accent-teal);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    :root {
        --section-padding: 4rem;
    }
    
    .hero {
        padding: 7rem 0 var(--section-padding);
    }
    
    .hero-image {
        width: 220px;
        height: 220px;
    }
    
    .hero-name {
        font-size: 2.75rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    :root {
        --section-padding: 3rem;
    }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    
    .hero-name {
        font-size: 2.25rem;
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .hero-image {
        width: 180px;
        height: 180px;
    }
    
    .btn-primary-custom,
    .btn-secondary-custom {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .timeline::before {
        left: 6px;
    }
    
    .timeline-item {
        padding-left: 2.5rem;
    }
    
    .timeline-dot {
        left: 0;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .cta-title {
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .hero-greeting {
        font-size: 1rem;
    }
    
    .hero-name {
        font-size: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta .btn-primary-custom,
    .hero-cta .btn-secondary-custom {
        width: 100%;
        justify-content: center;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
}

/* --------------------------------------------------------------------------
   Contact Form
   -------------------------------------------------------------------------- */
.contact-section {
    min-height: calc(100vh - 80px);
    padding-top: 8rem;
    background: var(--gradient-dark);
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, var(--accent-teal-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(88, 166, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.contact-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

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

@media (max-width: 575.98px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

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

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

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px var(--accent-teal-glow);
}

.form-input.is-invalid {
    border-color: #f85149;
    box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.2);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%238b949e' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-select option {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

.form-actions {
    margin-top: 2rem;
    text-align: center;
}

.form-actions .btn-primary-custom {
    min-width: 200px;
}

/* Validation error styling for contact form */
.contact-form .invalid-feedback {
    color: #f85149;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Flash messages for dark theme */
.contact-form .alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.contact-form .alert-success {
    background: rgba(158, 206, 106, 0.1);
    border-color: var(--accent-green-dim);
    color: var(--accent-green);
}

.contact-form .alert-success svg {
    fill: var(--accent-green);
    width: 20px;
    height: 20px;
}

.contact-form .alert-danger,
.contact-form .alert-warning {
    background: rgba(248, 81, 73, 0.1);
    border-color: #f85149;
    color: #f85149;
}

.contact-form .alert-danger svg,
.contact-form .alert-warning svg {
    fill: #f85149;
    width: 20px;
    height: 20px;
}

.contact-form .alert-info {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--accent-teal-dim);
    color: var(--accent-teal);
}

.contact-form .alert-info svg {
    fill: var(--accent-teal);
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   Blog Section
   -------------------------------------------------------------------------- */
.blog-section {
    min-height: calc(100vh - 80px);
    padding-top: 8rem;
    padding-bottom: var(--section-padding);
    background: var(--gradient-dark);
    position: relative;
}

.blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 30%, var(--accent-teal-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, var(--accent-purple-glow) 0%, transparent 50%);
    pointer-events: none;
}

.blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 767.98px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Blog Card */
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.blog-card:hover {
    border-color: var(--accent-blue-dim);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 30px var(--accent-blue-glow);
}

.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image-placeholder .placeholder-pattern {
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, var(--bg-tertiary) 25%, transparent 25%),
        linear-gradient(225deg, var(--bg-tertiary) 25%, transparent 25%),
        linear-gradient(45deg, var(--bg-tertiary) 25%, transparent 25%),
        linear-gradient(315deg, var(--bg-tertiary) 25%, var(--bg-secondary) 25%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 0, 10px -10px, 0 10px;
    opacity: 0.5;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.meta-separator {
    color: var(--border-color);
}

.read-time {
    color: var(--accent-blue);
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--accent-purple);
    transition: all var(--transition-fast);
}

.blog-card:hover .blog-tag {
    border-color: var(--accent-purple-dim);
}

/* Blog Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(.pagination-disabled) {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.pagination-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Blog Post Detail
   -------------------------------------------------------------------------- */
.blog-post {
    min-height: 100vh;
}

/* Preview Banner */
.preview-banner {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1a1a1a;
    padding: 0.75rem 0;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.preview-badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-right: 0.75rem;
    font-weight: 600;
}

/* Blog Post Hero (with cover image) */
.blog-post-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: flex-end;
    padding: 4rem 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

@media (max-width: 767.98px) {
    .blog-post-hero {
        min-height: 50vh;
        background-attachment: scroll;
    }
}

.blog-post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(13, 17, 23, 0.95) 0%,
        rgba(13, 17, 23, 0.7) 50%,
        rgba(13, 17, 23, 0.4) 100%
    );
}

.blog-post-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

/* Blog Post Header (no cover) */
.blog-post-header {
    padding-top: 8rem;
    padding-bottom: 3rem;
    background: var(--gradient-dark);
}

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    transition: color var(--transition-fast);
}

.blog-back-link:hover {
    color: var(--accent-blue);
}

.blog-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.blog-post-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
    .blog-post-title {
        font-size: 2rem;
    }
}

.blog-post-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-post-tags .blog-tag {
    background: rgba(187, 154, 247, 0.15);
    border-color: var(--accent-purple-dim);
}

/* Blog Post Body */
.blog-post-body {
    padding: 3rem 0;
    background: var(--bg-primary);
}

.blog-post-body > .container {
    max-width: 800px;
}

/* Prose Content Styling */
.prose {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h2 {
    font-size: 1.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.prose h3 {
    font-size: 1.375rem;
}

.prose p {
    margin-bottom: 1.5rem;
}

.prose a {
    color: var(--accent-blue);
    text-decoration: underline;
    text-decoration-color: var(--accent-blue-dim);
    text-underline-offset: 2px;
    transition: all var(--transition-fast);
}

.prose a:hover {
    text-decoration-color: var(--accent-blue);
}

.prose strong {
    color: var(--text-primary);
    font-weight: 600;
}

.prose ul,
.prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose li::marker {
    color: var(--accent-blue);
}

.prose blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-blue);
    border-radius: 0 8px 8px 0;
}

.prose blockquote p {
    margin-bottom: 0.5rem;
}

.prose blockquote cite {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: normal;
}

.prose pre {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow-x: auto;
}

.prose code {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

.prose :not(pre) > code {
    padding: 0.2rem 0.4rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: var(--accent-purple);
}

.prose hr {
    margin: 3rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.prose img,
.prose figure {
    margin: 2rem 0;
    border-radius: 8px;
    max-width: 100%;
}

.prose figure img {
    margin: 0;
}

.prose figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* Editor.js specific styles */
.editorjs-image {
    text-align: center;
}

.editorjs-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.editorjs-embed {
    margin: 2rem 0;
}

.editorjs-embed iframe {
    max-width: 100%;
    border-radius: 8px;
}

/* Blog Post Author */
.blog-post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.author-title {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Blog Post Share */
.blog-post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.share-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.share-links {
    display: flex;
    gap: 0.5rem;
}

.share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.share-link:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--bg-primary);
}

.share-link.copied {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: var(--bg-primary);
}

/* --------------------------------------------------------------------------
   Comments Section
   -------------------------------------------------------------------------- */
.blog-comments-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.blog-comments-section > .container {
    max-width: 800px;
}

.comments-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.comments-empty {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 2rem;
}

.comments-list {
    margin-bottom: 3rem;
}

.comment {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary);
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.comment-body {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Comment Form */
.comment-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.comment-form-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 575.98px) {
    .comment-form .form-row {
        grid-template-columns: 1fr;
    }
}

.comment-form .form-group {
    margin-bottom: 1.5rem;
}

.comment-form .form-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.comment-form .form-actions {
    margin-top: 1.5rem;
    text-align: left;
}

.comment-form .invalid-feedback {
    color: #f85149;
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

.comment-form-disabled {
    color: var(--text-muted);
    font-style: italic;
}

/* Flash messages in comment form */
.comment-form .alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.comment-form .alert-success {
    background: rgba(158, 206, 106, 0.1);
    border-color: var(--accent-green-dim);
    color: var(--accent-green);
}

.comment-form .alert-danger {
    background: rgba(248, 81, 73, 0.1);
    border-color: #f85149;
    color: #f85149;
}

/* --------------------------------------------------------------------------
   Error Pages
   -------------------------------------------------------------------------- */
.error-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 8rem;
    background: var(--gradient-dark);
    text-align: center;
}

.error-content {
    max-width: 500px;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--accent-blue);
    line-height: 1;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
