/* VLAH Portfolio Styles v0.5.26 - Light Neutral Theme */

/* ============================================
   LIGHT NEUTRAL PALETTE
   ============================================
   Background:     #F2F1ED (dirty white / warm light gray)
   Surface:        #F8F7F4 (slightly lighter for cards)
   Text Primary:   #1F2328 (near-black)
   Text Secondary: #3A4048 (muted dark gray)
   Border:         #D8D6D1 (warm gray)
   Accent:         #2F5D7C (deep blue)
   ============================================ */

:root {
    /* Typography */
    --vlah-font-heading: "Roboto Slab", serif;
    --vlah-font-body: "Roboto", sans-serif;
    --vlah-font-weight-normal: 400;
    --vlah-font-weight-medium: 500;
    --vlah-font-weight-bold: 700;
    --vlah-gap: 2rem;
    --vlah-radius: 20px;
    --vlah-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);

    /* Card Design Tokens */
    --vlah-card-padding: 1.5rem;
    --vlah-card-gap: 0.75rem;
    --vlah-meta-size: 0.85rem;
    --vlah-title-size: 1.25rem;
    --vlah-title-leading: 1.3;

    /* Light Neutral Theme Colors */
    --vlah-bg: #F2F1ED;
    --vlah-bg-surface: #F8F7F4;
    --vlah-bg-soft: rgba(0, 0, 0, 0.03);
    --vlah-border: #D8D6D1;

    --vlah-color-text: #1F2328;
    --vlah-color-muted: #3A4048;
    --vlah-meta-color: #3A4048;
    --vlah-color-accent: #2F5D7C;

    /* Link/Title Colors */
    --vlah-link: #1F2328;
    --vlah-link-hover: #2F5D7C;
    --vlah-focus: #2F5D7C;

    /* Type Badge Colors (kept vibrant for contrast) */
    --vlah-color-app: #2563eb;
    --vlah-color-project: #7c3aed;
    --vlah-color-post: #059669;
}

/* Scoped variables for consistent light theme */
.vlah-portfolio,
.vlah-portfolio-admin {
    --vlah-bg-surface: #F8F7F4;
    --vlah-border: #D8D6D1;
}

/* Global Typography - Applied site-wide */
body {
    font-family: var(--vlah-font-body);
    line-height: 1.6;
    background-color: var(--vlah-bg);
    color: var(--vlah-color-text);
    font-size: 1rem;
}

/* =============================================================================
   MODERN TYPOGRAPHY SCALE
   Concept: Oversized display headings with tight letter-spacing for impact
   ============================================================================= */

/* Typography - All Headings (global) */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--vlah-font-heading);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--vlah-color-text);
}

/* Display/Hero Headings - Oversized, dramatic */
h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}

/* Page Titles - Large and bold */
h2 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    letter-spacing: -0.025em;
}

/* Section Headings */
h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Subsection Headings */
h4 {
    font-size: 1.25rem;
    font-weight: 700;
}

h5 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

h6 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--vlah-color-muted);
}

/* Typography - Headings */
.vlah-portfolio h1,
.vlah-portfolio h2,
.vlah-portfolio h3,
.vlah-portfolio h4,
.vlah-portfolio h5,
.vlah-portfolio h6,
.vlah-single-wrapper h1,
.vlah-single-wrapper h2,
.vlah-single-wrapper h3,
.vlah-single-wrapper h4,
.vlah-single-wrapper h5,
.vlah-single-wrapper h6 {
    font-family: var(--vlah-font-heading);
    font-weight: var(--vlah-font-weight-bold);
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

/* Base Surface - Glassmorphism Look */
.vlah-surface {
    background: var(--vlah-bg-surface);
    color: var(--vlah-color-text);
    border: 1px solid var(--vlah-border);
    border-radius: var(--vlah-radius);
    padding: 2.5rem;
    box-shadow: var(--vlah-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.vlah-surface--tight {
    padding: 1rem;
}

.vlah-surface--hover {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .vlah-surface--hover:hover {
        transform: translateY(-4px);
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    }
}



/* --- Archive / Work Grid --- */
.vlah-app-grid,
.vlah-work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin: 2rem 0;
}

/* Unified Card Class */
.vlah-card,
.vlah-app-card,
.vlah-work-card {
    background: var(--vlah-bg-surface);
    color: var(--vlah-color-text);
    border: 1px solid var(--vlah-border);
    border-radius: var(--vlah-radius);
    box-shadow: var(--vlah-shadow);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    will-change: transform, opacity;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.vlah-card-animate {
    animation: vlahCardFadeIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes vlahCardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.99);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.vlah-card:hover,
.vlah-app-card:hover,
.vlah-work-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--vlah-border);
    background: var(--vlah-bg);
}

.vlah-card-thumbnail,
.vlah-app-thumbnail {
    aspect-ratio: 1 / 1;
    background: var(--vlah-bg-soft);
    overflow: hidden;
    border-bottom: 1px solid var(--vlah-border);
    position: relative;
}

.vlah-card-thumbnail img,
.vlah-app-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease-out;
}

.vlah-card:hover .vlah-card-thumbnail img,
.vlah-app-card:hover .vlah-app-thumbnail img {
    transform: scale(1.05);
}

.vlah-card-thumbnail a:focus-visible,
.vlah-app-thumbnail a:focus-visible {
    outline: 2px solid var(--vlah-focus);
    outline-offset: -2px;
}

.vlah-card-content,
.vlah-app-content {
    padding: var(--vlah-card-padding);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--vlah-card-gap);
}

.vlah-card-header {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vlah-card-footer,
.vlah-app-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.vlah-view-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vlah-link);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 150ms ease;
}

.vlah-view-link:hover {
    text-decoration: underline;
    color: var(--vlah-link-hover);
}

.vlah-view-link:focus-visible {
    outline: 2px solid var(--vlah-focus);
    outline-offset: 2px;
    border-radius: 2px;
}

.vlah-card-title,
.vlah-app-title {
    margin: 0;
    font-size: var(--vlah-title-size);
    line-height: var(--vlah-title-leading);
    font-weight: 700;
}

.vlah-card-title a,
.vlah-app-title a {
    text-decoration: none;
    color: var(--vlah-link);
    transition: color 150ms ease;
}

.vlah-card-title a:hover,
.vlah-app-title a:hover {
    color: var(--vlah-link-hover);
}

.vlah-card-title a:focus-visible,
.vlah-app-title a:focus-visible {
    outline: 2px solid var(--vlah-focus);
    outline-offset: 2px;
    border-radius: 2px;
}

.vlah-card-meta,
.vlah-app-meta {
    font-size: 0.8rem;
    color: var(--vlah-color-muted);
    margin-bottom: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    line-height: 1.4;
}

.vlah-card-excerpt {
    font-size: 0.95rem;
    color: var(--vlah-color-muted);
    margin: 0.5rem 0 0;
    line-height: 1.5;
}

/* --- Type Badges --- */
.vlah-type-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.vlah-type-app {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.vlah-type-project {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.vlah-type-prototype {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.vlah-type-post {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

/* Card Metadata Row */
.vlah-card-metadata {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0 0.5rem;
}

/* Industry Pill */
.vlah-industry-pill {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--vlah-color-text);
    padding: 0.15rem 0.5rem;
    background: var(--vlah-bg-soft);
    border-radius: 4px;
    white-space: nowrap;
}

/* Tag Chips Container */
.vlah-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Tag Chip */
.vlah-tag-chip {
    font-size: 0.75rem;
    color: var(--vlah-color-muted);
}

.vlah-tag-chip::after {
    content: "•";
    margin-left: 0.4rem;
    opacity: 0.5;
}

.vlah-tag-chip:last-child::after {
    display: none;
}

/* --- Tags --- */
.vlah-tag {
    background: var(--vlah-bg-soft);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--vlah-color-muted);
    border: 1px solid var(--vlah-border);
}

/* --- Clickable Cards --- */
.vlah-card-clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.vlah-card-clickable:focus-visible {
    outline: 2px solid var(--vlah-focus);
    outline-offset: 2px;
}

/* --- Card Chips (Industry + Tags) --- */
.vlah-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

/* Industry Pill */
.vlah-chip-industry {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--vlah-border);
    border-radius: 4px;
    background: transparent;
    color: var(--vlah-color-muted);
    transition: all 0.15s ease;
}

.vlah-chip-industry:hover {
    background: var(--vlah-bg-soft);
    border-color: var(--vlah-color-text);
}

/* Tag Chip */
.vlah-chip-tag {
    font-size: 0.75rem;
    text-transform: lowercase;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--vlah-border);
    border-radius: 4px;
    background: transparent;
    color: var(--vlah-color-muted);
    transition: all 0.15s ease;
}

.vlah-chip-tag:hover {
    background: var(--vlah-bg-soft);
}

.vlah-chip-industry:focus-visible,
.vlah-chip-tag:focus-visible {
    outline: 2px solid var(--vlah-focus);
    outline-offset: 2px;
}

/* --- Active Filters Row --- */
.vlah-active-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.vlah-remove-chip:hover {
    opacity: 1 !important;
    color: var(--vlah-color-accent);
}

.vlah-advanced-filters {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vlah-filter-btn.active {
    box-shadow: 0 4px 12px rgba(var(--vlah-color-accent-rgb), 0.3);
}

/* --- Hero Styles (Unified) --- */
.vlah-case-study-hero {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--vlah-border);
}

.vlah-hero-breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.vlah-parent-link {
    color: var(--vlah-color-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.vlah-parent-link:hover {
    opacity: 0.8;
}

.vlah-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    font-weight: 800;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    color: var(--vlah-color-text);
}

.vlah-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--vlah-color-muted);
    margin-bottom: 1.5rem;
}

.vlah-hero-type {
    color: var(--vlah-color-accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.vlah-sep {
    color: var(--vlah-border);
    font-size: 0.8em;
}

.vlah-hero-excerpt {
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 800px;
    margin-bottom: 2rem;
    color: var(--vlah-color-muted);
}

.vlah-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.vlah-hero-chip {
    padding: 0.35rem 0.85rem;
    background: var(--vlah-bg-soft);
    border: 1px solid var(--vlah-border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--vlah-color-muted);
}

.vlah-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

/* --- Single Views --- */
.vlah-single-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.vlah-single-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 900px) {
    .vlah-single-container {
        grid-template-columns: 2fr 1fr;
    }
}

.vlah-project-details {
    background: var(--vlah-bg-surface);
    color: var(--vlah-color-text);
    padding: 2rem;
    border-radius: var(--vlah-radius);
    border: 1px solid var(--vlah-border);
    position: sticky;
    top: calc(56px + 1.5rem);
    /* Account for sticky header height */
}

.vlah-detail-row {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--vlah-border);
}

.vlah-detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.vlah-detail-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--vlah-color-muted);
    margin-bottom: 0.25rem;
}

.vlah-detail-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--vlah-color-text);
}

/* --- Buttons --- */
.vlah-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--vlah-color-accent);
    color: var(--vlah-bg);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.vlah-btn:hover {
    background: var(--vlah-color-text);
    transform: translateY(-2px);
    color: var(--vlah-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vlah-btn:focus-visible {
    outline: 2px solid var(--vlah-focus);
    outline-offset: 2px;
}

.vlah-btn-primary {
    background: var(--vlah-color-accent);
    color: var(--vlah-bg);
}

.vlah-btn-primary:hover {
    background: var(--vlah-color-text);
    color: var(--vlah-bg);
}

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

.vlah-btn-outline:hover {
    background: var(--vlah-bg-soft);
    border-color: var(--vlah-color-text);
    color: var(--vlah-color-text);
}

/* --- Related Section --- */
.vlah-related-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--vlah-border);
}

.vlah-related-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vlah-related-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--vlah-shadow);
}

/* --- Table of Contents (TOC) --- */
.vlah-toc {
    margin-bottom: 1.5rem;
}

.vlah-toc-title {
    color: var(--vlah-color-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 1rem;
}

.vlah-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vlah-toc-item {
    margin-bottom: 0.5rem;
}

.vlah-toc-item.vlah-toc-h3 {
    padding-left: 1rem;
    font-size: 0.9em;
}

.vlah-toc-link {
    color: var(--vlah-color-muted);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.25rem 0 0.25rem 0.75rem;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.vlah-toc-link:hover {
    color: var(--vlah-color-text);
    border-left-color: var(--vlah-color-muted);
}

.vlah-toc-link.active,
.vlah-toc-link.vlah-toc-active {
    color: var(--vlah-color-text);
    border-left-color: var(--vlah-link-hover);
    font-weight: 500;
}

/* Scroll offset for TOC anchor links (accounts for sticky header + margin) */
.vlah-single-wrapper h2[id],
.vlah-single-wrapper h3[id],
.vlah-entry-content h2[id],
.vlah-entry-content h3[id] {
    scroll-margin-top: 80px;
    /* 56px header + 24px margin */
}


/* --- Page Wrapper for Shortcode --- */
.vlah-archive-container,
.page .vlah-work-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* --- Work Section Wrapper --- */
.vlah-work {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* --- Filter Bar --- */
.vlah-filter-bar {
    background: var(--vlah-bg-surface);
    border: 1px solid var(--vlah-border);
    border-radius: var(--vlah-radius);
    padding: 2rem;
    margin-bottom: 3rem;
}

.vlah-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.vlah-filter-row+.vlah-filter-row {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--vlah-border);
}

.vlah-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vlah-filter-type {
    flex-shrink: 0;
}

.vlah-filter-search {
    flex: 1;
    min-width: 200px;
}

.vlah-filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--vlah-color-muted);
}

/* Type Buttons & Tabs */
.vlah-filter-buttons,
.vlah-kind-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.vlah-filter-btn,
.vlah-filter-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    min-height: 44px;
    /* Touch target */
    border: 1px solid var(--vlah-border);
    background: transparent;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--vlah-color-muted);
    cursor: pointer;
    text-decoration: none;
    /* For A tags */
    transition: all 0.15s ease;
    white-space: nowrap;
}

.vlah-filter-btn:hover,
.vlah-filter-tab:hover {
    border-color: var(--vlah-color-text);
    color: var(--vlah-color-text);
    background: var(--vlah-bg-soft);
}

.vlah-filter-btn.active,
.vlah-filter-tab.active {
    background: var(--vlah-color-text);
    border-color: var(--vlah-color-text);
    color: #000;
}

.vlah-filter-btn:focus-visible,
.vlah-filter-tab:focus-visible {
    outline: 2px solid var(--vlah-focus);
    outline-offset: 2px;
}

/* Search Input & Select */
.vlah-search-input,
.vlah-select {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--vlah-border);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--vlah-color-text);
    background: var(--vlah-bg-soft);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    /* For Select */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.vlah-search-input {
    background-image: none;
}

.vlah-search-input::placeholder {
    color: var(--vlah-color-muted);
}

.vlah-search-input:focus,
.vlah-select:focus {
    outline: none;
    border-color: var(--vlah-color-accent);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2);
}

.vlah-select:focus-visible {
    outline: 2px solid var(--vlah-focus);
    outline-offset: 2px;
}

/* Taxonomy Pills */
.vlah-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vlah-pill {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.vlah-pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vlah-pill span {
    padding: 0.35rem 0.75rem;
    background: var(--vlah-bg-soft);
    border: 1px solid transparent;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--vlah-color-muted);
    transition: all 0.15s ease;
}

.vlah-pill:hover span {
    background: var(--vlah-border);
    color: var(--vlah-color-text);
}

.vlah-pill input:checked+span {
    background: var(--vlah-color-accent);
    color: var(--vlah-bg);
}

/* Filter Status Row */
.vlah-filter-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vlah-result-count {
    font-size: 0.85rem;
    color: var(--vlah-color-muted);
}

.vlah-result-count strong {
    color: var(--vlah-color-text);
}

.vlah-clear-btn {
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: 1px solid var(--vlah-border);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--vlah-color-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.vlah-clear-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Hide empty taxonomy rows */
.vlah-filter-taxonomies:empty {
    display: none;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .vlah-filter-row {
        flex-direction: column;
        gap: 1rem;
    }

    /* Override for Kind Selector to allow Horizontal Scroll */
    .vlah-kind-selector {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
        /* Space for scrollbar if visible */
        margin-left: -1rem;
        /* Negative margins to span full width in padded container */
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        /* Scrollbar styling */
        scrollbar-width: none;
        /* Firefox */
    }

    .vlah-kind-selector::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .vlah-filter-type,
    .vlah-filter-search {
        width: 100%;
    }

    .vlah-filter-buttons {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .vlah-filter-btn {
        flex: 0 0 auto;
        /* Stop shrinking in scroll view */
        /* Remove text-align center, let it be natural */
    }

    .vlah-filter-status {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    /* Ensure Inputs are tall enough */
    .vlah-search-input,
    .vlah-select {
        min-height: 44px;
    }
}

@media (max-width: 600px) {
    .vlah-work {
        padding: 1rem;
    }

    .vlah-filter-bar {
        padding: 1rem;
    }

    .vlah-app-grid,
    .vlah-work-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .vlah-single-container {
        grid-template-columns: 1fr;
    }

    .vlah-app-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* --- CTA Module --- */
.vlah-cta-module {
    background: var(--vlah-bg-surface);
    border: 1px solid var(--vlah-border);
    border-radius: var(--vlah-radius);
    padding: 3rem;
    margin-top: 4rem;
    text-align: center;
    box-shadow: var(--vlah-shadow);
}

.vlah-cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--vlah-color-text);
    margin: 0 0 1rem 0;
}

.vlah-cta-body {
    font-size: 1.1rem;
    color: var(--vlah-color-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

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

.vlah-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 140px;
}

.vlah-cta-btn:focus-visible {
    outline: 3px solid var(--vlah-color-accent);
    outline-offset: 2px;
}

.vlah-cta-btn-primary {
    background: var(--vlah-color-accent);
    color: var(--vlah-bg);
}

.vlah-cta-btn-primary:hover {
    background: var(--vlah-color-text);
    transform: translateY(-2px);
    color: var(--vlah-bg);
}

.vlah-cta-btn-secondary {
    background: transparent;
    color: var(--vlah-color-text);
    border: 1px solid var(--vlah-border);
}

.vlah-cta-btn-secondary:hover {
    background: var(--vlah-bg-soft);
    border-color: var(--vlah-color-text);
    color: var(--vlah-color-text);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .vlah-cta-buttons {
        flex-direction: column;
    }

    .vlah-cta-btn {
        width: 100%;
    }
}

/* --- New Controls (v0.5.3/v0.5.4) --- */

.vlah-filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.vlah-filter-sort {
    min-width: 140px;
}

.vlah-select {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid var(--vlah-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--vlah-color-muted);
    background-color: var(--vlah-bg-soft);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aaa' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    transition: all 0.15s ease;
}

.vlah-select:hover,
.vlah-select:focus {
    border-color: var(--vlah-color-text);
    color: var(--vlah-color-text);
    outline: none;
}

.vlah-filter-featured-toggle {
    display: flex;
    align-items: center;
}

.vlah-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--vlah-color-muted);
    cursor: pointer;
    user-select: none;
}

.vlah-toggle-label:hover {
    color: var(--vlah-color-text);
}

.vlah-toggle-label input[type="checkbox"] {
    accent-color: var(--vlah-color-accent);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.vlah-meta-row {
    font-size: var(--vlah-meta-size);
    color: var(--vlah-meta-color);
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.4;
    align-items: center;
}

.vlah-meta-sep {
    color: var(--vlah-border);
    font-size: 0.7rem;
    position: relative;
    top: -1px;
}

@media (max-width: 768px) {
    .vlah-filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .vlah-filter-spacer {
        display: none;
    }

    /* Result count styled elsewhere */

    /* --- No Image Placeholder --- */
    .vlah-no-image {
        width: 100%;
        height: 100%;
        min-height: 180px;
        background: var(--vlah-bg-soft);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23333' stroke-width='0.5' opacity='0.3'%3E%3Cpath d='M30 10 L50 30 L30 50 L10 30 Z'/%3E%3Ccircle cx='30' cy='30' r='8'/%3E%3C/g%3E%3C/svg%3E");
        background-repeat: repeat;
        background-position: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* --- Phase 5 Stage 3: Layout Simplification --- */
/* Reduce top spacing on pages using the work grid */
.page .vlah-work-grid,
.page .vlah-archive-container,
.page #vlah-grid-root,
.page .vlah-work {
    margin-top: 0 !important;
    padding-top: 1rem !important;
}

/* Pull the filter bar up if it feels disconnected */
.page .vlah-filter-bar {
    margin-top: 0;
}

/* Mobile specific spacing tightening */
@media (max-width: 600px) {
    .vlah-archive-wrapper {
        padding-top: 2rem !important;
    }

    .page .vlah-work-grid,
    .page .vlah-work {
        padding-top: 0.5rem !important;
    }
}

/* --- Portfolio Strip (Single Pages) --- */
.vlah-portfolio-strip {
    background: var(--vlah-bg-surface);
    border-bottom: 1px solid var(--vlah-border);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.vlah-strip-back {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--vlah-color-text);
    text-decoration: none;
    transition: color 0.15s ease;
}

.vlah-strip-back:hover {
    color: var(--vlah-link-hover);
}

.vlah-strip-nav {
    display: flex;
    gap: 1rem;
}

.vlah-strip-nav a {
    font-size: 0.8rem;
    color: var(--vlah-color-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.vlah-strip-nav a:hover {
    color: var(--vlah-color-text);
}

/* Mobile: stack layout */
@media (max-width: 600px) {
    .vlah-portfolio-strip {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 1rem;
    }

    .vlah-strip-nav {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

/* --- Single Page Spacing Reduction --- */
body.single-project .vlah-single-wrapper,
body.single-app .vlah-single-wrapper,
body.single-deliverable .vlah-single-wrapper,
body.single-post .vlah-single-wrapper {
    padding-top: 1rem !important;
}

/* Hide the default theme header components to prevent duplication with our sticky bar */
.wp-site-blocks>header:not(.vlah-global-header),
.wp-site-blocks>.wp-block-template-part:first-child,
body:not(.wp-admin) header.wp-block-template-part,
body:not(.wp-admin) footer.wp-block-template-part,
body:not(.wp-admin) .site-header,
body:not(.wp-admin) .site-footer,
body:not(.wp-admin) #masthead,
body:not(.wp-admin) #colophon {
    display: none !important;
}




/* Global Header Container */
.vlah-global-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--vlah-bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--vlah-border);
    padding: 0 1.5rem;
    transition: background 0.3s ease;
}

.vlah-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 56px;
}

/* Logo */
.vlah-header-logo {
    text-decoration: none;
    flex-shrink: 0;
}

.vlah-logo-text {
    font-family: var(--vlah-font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--vlah-color-text);
    letter-spacing: -0.03em;
    text-transform: lowercase;
}

.vlah-header-logo:hover .vlah-logo-text {
    color: var(--vlah-link-hover, #f5c542);
}

/* Navigation - Takes up remaining space, centered */
.vlah-header-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    justify-content: center;
}

.vlah-nav-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--vlah-color-muted);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.vlah-nav-tab:hover {
    color: var(--vlah-color-text);
    background: var(--vlah-bg-soft);
}

.vlah-nav-tab.active {
    background: var(--vlah-color-accent);
    color: var(--vlah-bg);
    font-weight: 600;
}

/* Header Search - Icon that expands on click */
.vlah-header-search {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    position: relative;
}

.vlah-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--vlah-color-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.vlah-search-toggle:hover {
    color: var(--vlah-color-text);
    background: var(--vlah-bg-soft);
}

.vlah-header-search .vlah-search-input {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 99px;
    font-size: 0.85rem;
    color: var(--vlah-color-text);
    background: var(--vlah-bg);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vlah-header-search .vlah-search-input::placeholder {
    color: var(--vlah-color-muted);
}

.vlah-header-search.expanded .vlah-search-toggle {
    opacity: 0;
    pointer-events: none;
}

.vlah-header-search.expanded .vlah-search-input {
    width: 200px;
    padding: 0.5rem 1rem;
    opacity: 1;
    pointer-events: auto;
    border-color: var(--vlah-border);
}

.vlah-header-search .vlah-search-input:focus {
    outline: none;
    border-color: var(--vlah-color-accent);
    background: var(--vlah-bg);
}


/* Responsive - Tablet */
@media (max-width: 900px) {
    .vlah-global-header {
        padding: 0 1rem;
    }

    .vlah-header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 0.6rem 0;
        gap: 0.6rem;
    }

    .vlah-header-logo {
        order: 1;
    }

    .vlah-header-search {
        order: 2;
        margin-left: auto;
    }

    .vlah-header-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.4rem 0;
        margin: 0;
        gap: 0.4rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .vlah-header-nav::-webkit-scrollbar {
        display: none;
    }

    .vlah-nav-tab {
        flex: 0 0 auto;
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 600px) {
    .vlah-header-inner {
        gap: 0.5rem;
    }

    .vlah-logo-text {
        font-size: 1rem;
    }
}

/* Hide theme headers/footers and redundant titles */
header.site-header,
.site-header,
#masthead,
.wp-block-template-part.header {
    display: none !important;
}

/* Hide any theme titles or clashing headings when in portfolio mode */
.vlah-portfolio .wp-block-post-title,
.vlah-portfolio .entry-title,
.vlah-portfolio .page-title:not(.vlah-archive-title),
.vlah-portfolio .vlah-archive-header~.wp-block-heading,
.vlah-portfolio main h1:not(.vlah-archive-title):not(.vlah-hero-title) {
    display: none !important;
}

/* Dynamic Title Morphing */
[data-vlah-title],
[data-vlah-subtitle] {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.vlah-title-morphing [data-vlah-title],
.vlah-title-morphing [data-vlah-subtitle] {
    opacity: 0;
    transform: translateY(-15px);
}

/* Ensure consistent centering and layout for archive headers */
.vlah-archive-header,
.page-header {
    text-align: center;
    margin-bottom: 2rem !important;
    padding-top: 0;
    min-height: 120px;
    /* Prevent layout jump */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.vlah-archive-title,
.page-title {
    font-family: var(--vlah-font-heading) !important;
    font-size: clamp(3rem, 8vw, 6rem) !important;
    font-weight: 900 !important;
    letter-spacing: -0.05em !important;
    line-height: 0.9 !important;
    margin-bottom: 1rem !important;
    color: var(--vlah-color-text);
    text-transform: uppercase;
}


.vlah-archive-desc {
    font-size: 1.25rem !important;
    opacity: 0.6;
    max-width: 700px;
    margin: 0 auto !important;
    line-height: 1.5;
}

/* =============================================================================
   GLOBAL FOOTER STYLES
   ============================================================================= */

.vlah-global-footer {
    background: var(--vlah-bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--vlah-border);
    padding: 6rem 1.5rem 3rem;
    margin-top: 6rem;
    color: var(--vlah-color-text);
}

.vlah-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}

.vlah-footer-logo {
    margin-bottom: 1.5rem;
}

.vlah-footer-logo .vlah-logo-text {
    font-size: 1.5rem;
    /* Font inherited from header logo text */
}

.vlah-footer-tagline {
    font-size: 1.1rem;
    color: var(--vlah-color-muted);
    max-width: 400px;
    line-height: 1.6;
}

.vlah-footer-heading {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--vlah-color-muted);
    margin-bottom: 1.5rem;
}

.vlah-footer-nav,
.vlah-footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vlah-footer-nav a,
.vlah-footer-social a {
    color: var(--vlah-color-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.vlah-footer-nav a:hover,
.vlah-footer-social a:hover {
    color: var(--vlah-color-accent);
    transform: translateX(4px);
}

.vlah-footer-bottom {
    max-width: 1200px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--vlah-border);
    font-size: 0.85rem;
    color: var(--vlah-color-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 900px) {
    .vlah-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 600px) {
    .vlah-global-footer {
        padding: 4rem 1.5rem 2rem;
    }

    .vlah-footer-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .vlah-footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .vlah-archive-title,
    .page-title {
        font-size: 3.5rem !important;
    }
}

/* Spacing Overrides: Remove WordPress forced top spacing */
body.vlah-portfolio main,
body.vlah-portfolio main.wp-block-group,
body.vlah-portfolio #wp--skip-link--target {
    margin-top: 0 !important;
}

body.vlah-portfolio main .wp-block-group,
body.vlah-portfolio main .alignfull,
body.vlah-portfolio main .has-global-padding {
    padding-top: 0 !important;
}

/* Ensure global padding top is zeroed out for the first block group inside main */
body.vlah-portfolio main>div:first-child {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Reduce extra spacing from theme */
body:not(.wp-admin) {
    padding-top: 0 !important;
}

.wp-site-blocks {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* --- Block Theme Compatible Cards (Recipe) --- */
.vlah-block-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.vlah-block-card .vlah-app-thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: transparent;
    border: none;
}

.vlah-block-card .vlah-app-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.5s ease;
}

.vlah-block-card:hover .vlah-app-thumbnail img {
    transform: scale(1.05);
}

.vlah-block-card .vlah-app-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vlah-block-card .vlah-card-header {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vlah-block-card .vlah-app-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.vlah-block-card .vlah-card-excerpt {
    font-size: 0.95rem;
    margin: 0.5rem 0 0;
    opacity: 0.8;
}

.vlah-block-card .vlah-card-metadata {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vlah-block-card .vlah-tag-chip {
    font-size: 0.75em;
    opacity: 0.7;
}