/* ============================================
   ARDEV PREMIUM - MAIN STYLES (FIXED)
   ============================================ */

:root {
    --bg-primary: #0b0d10;
    --bg-secondary: #12151a;
    --bg-tertiary: #1a1e24;
    --bg-elevated: #232830;
    --bg-card: rgba(26, 30, 36, 0.8);
    --text-primary: #f2f0ea;
    --text-secondary: #9aa0a6;
    --text-muted: #666d75;
    --text-inverse: #0b0d10;
    --accent-primary: #9b6dd6;
    --accent-secondary: #7048b8;
    --accent-tertiary: #2dd9c0;
    --accent-gradient: linear-gradient(135deg, #b48ce8 0%, #9b6dd6 45%, #7048b8 100%);
    --accent-glow: rgba(155, 109, 214, 0.35);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', var(--font-primary);
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.65vw, 1.375rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
    --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
    --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
    --text-4xl: clamp(2.5rem, 1.8rem + 3.5vw, 5rem);
    --text-5xl: clamp(3rem, 2rem + 5vw, 7rem);
    --text-6xl: clamp(4rem, 2.5rem + 7.5vw, 10rem);
    --space-xs: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
    --space-sm: clamp(0.75rem, 0.6rem + 0.75vw, 1.25rem);
    --space-md: clamp(1rem, 0.8rem + 1vw, 2rem);
    --space-lg: clamp(1.5rem, 1.2rem + 1.5vw, 3rem);
    --space-xl: clamp(2rem, 1.5rem + 2.5vw, 5rem);
    --space-2xl: clamp(3rem, 2rem + 5vw, 8rem);
    --space-3xl: clamp(4rem, 2.5rem + 7.5vw, 12rem);
    --container-max: 1400px;
    --container-padding: clamp(1.5rem, 5vw, 3rem);
    --header-height: 80px;
    --header-height-scrolled: 64px;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 700ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --z-cursor: 9999;
    --z-toast: 9000;
    --z-modal: 8000;
    --z-nav: 7000;
    --z-header: 6000;
    --z-scroll-progress: 5000;
    --z-overlay: 4000;
    --z-content: 1;
    --blur-sm: blur(8px);
    --blur-md: blur(16px);
    --blur-lg: blur(32px);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);
}

[data-theme="light"] {
    --bg-primary: #f7f7fa;
    --bg-secondary: #eeedf3;
    --bg-tertiary: #e3e1ec;
    --bg-elevated: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.92);
    --text-primary: #16141c;
    --text-secondary: #524f5c;
    --text-muted: #85818f;
    --text-inverse: #f7f7fa;
    --accent-primary: #7c4fd1;
    --accent-secondary: #5f3aa8;
    --accent-tertiary: #1a9c87;
    --accent-gradient: linear-gradient(135deg, #9166dd 0%, #7c4fd1 45%, #5f3aa8 100%);
    --accent-glow: rgba(124, 79, 209, 0.22);
    --border-subtle: rgba(30, 20, 50, 0.08);
    --border-medium: rgba(30, 20, 50, 0.13);
    --border-strong: rgba(30, 20, 50, 0.2);
    --shadow-sm: 0 1px 2px rgba(30, 20, 50, 0.06);
    --shadow-md: 0 4px 12px rgba(30, 20, 50, 0.08);
    --shadow-lg: 0 8px 32px rgba(30, 20, 50, 0.1);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

::selection {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

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

.container-narrow { max-width: 900px; }
.container-wide { max-width: 1600px; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { color: var(--text-secondary); max-width: 65ch; }

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

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-sm);
    letter-spacing: 0.01em;
    border-radius: 14px;
    border: none;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239b6dd6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3l16 9.5L12 14l-3 8L5 3z'/%3E%3C/svg%3E") 4 4, pointer;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

/* Arrow inside button: solid purple, hover = white with purple outline */
.btn svg {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), fill 0.35s ease, stroke 0.35s ease;
    flex-shrink: 0;
    fill: var(--accent-primary);
    stroke: none;
}

.btn:hover svg {
    transform: translateX(4px);
    fill: white;
    stroke: var(--accent-primary);
    stroke-width: 2;
}

/* ============================================
   PRIMARY BUTTON
   ============================================ */

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    background: white;
    color: var(--accent-secondary);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   SECONDARY BUTTON
   ============================================ */

.btn-secondary {
    background: rgba(155, 109, 214, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(155, 109, 214, 0.25);
}

.btn-secondary:hover {
    background: white;
    border-color: white;
    color: var(--accent-secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.btn-secondary:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   OUTLINE BUTTON
   ============================================ */

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    background: rgba(155, 109, 214, 0.08);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* ============================================
   GIANT SIZE (hero CTAs)
   ============================================ */

.btn-giant {
    padding: 18px 36px;
    font-size: var(--text-base);
    border-radius: 16px;
    gap: 12px;
}

/* ============================================
   GLOW PULSE
   ============================================ */

.btn-glow {
    position: relative;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(155, 109, 214, 0.3), 0 0 0 1px rgba(255,255,255,0.06) inset;
}

.btn-glow::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    box-shadow: 0 8px 40px rgba(155, 109, 214, 0.5), 0 0 60px rgba(155, 109, 214, 0.15);
    opacity: 0;
    animation: glow-pulse-opacity 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes glow-pulse-opacity {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .btn-glow::after { animation: none; }
}

/* ============================================
   TEXT-ONLY BUTTON
   ============================================ */

.btn-text-only {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent-primary);
    font-weight: 500;
}

.btn-text-only:hover {
    color: var(--accent-secondary);
    transform: translateX(4px);
}

/* Section Base */
.section {
    position: relative;
    padding: var(--space-3xl) 0;
    overflow: hidden;
}

.section-header { margin-bottom: var(--space-2xl); }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-primary);
    margin-bottom: var(--space-sm);
}

.section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.section-title { margin-bottom: var(--space-md); }

.section-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    max-width: 60ch;
}

/* When a section header (or its section) is centered, the subtitle is a
   max-width block, so it must also center its own box — otherwise the text
   is centered inside a box that stays pinned to the left. */
.section-header[style*="center"] .section-subtitle,
.section[style*="center"] .section-subtitle,
[style*="text-align: center"] > .section-subtitle,
[style*="text-align:center"] > .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: var(--space-lg);
    backdrop-filter: var(--blur-sm);
    transition: all var(--transition-base);
}

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

/* Grid */
.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); }

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    height: var(--header-height);
    transition: height var(--transition-base), background var(--transition-base);
}

.site-header.scrolled { height: var(--header-height-scrolled); }

.header-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    border-bottom: 1px solid var(--border-subtle);
    opacity: 0;
    transition: opacity var(--transition-base);
    transform: translateZ(0);
}

.site-header.scrolled .header-backdrop { opacity: 1; }

[data-theme="light"] .header-backdrop { background: rgba(247, 247, 250, 0.85); }

/* On touch devices, a blurred position:fixed header recalculates its
   blur on every scroll frame — a well-documented cause of janky mobile
   scrolling. Swap to a plain, cheap, near-opaque background there; the
   glass-blur effect stays on desktop where it doesn't cost anything.
   Also always-on (not gated behind the .scrolled class) so there's no
   dependency on JS scroll-position detection timing — the header must
   never let content show/ghost through underneath it. */
@media (pointer: coarse), (max-width: 768px) {
    .header-backdrop {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(11, 13, 16, 0.97);
        opacity: 1 !important;
    }
    [data-theme="light"] .header-backdrop {
        background: rgba(247, 247, 250, 0.97);
    }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Logo */
.site-branding { flex-shrink: 0; }

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
}

/* Logo: {A.R.} initials mark */
.logo-text {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    letter-spacing: -0.02em;
}

.logo-fullname {
    font-family: var(--font-display);
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    margin-left: var(--space-sm);
}

.logo-ar {
    color: var(--text-primary);
    transition: all 0.4s ease;
}

.logo-dev {
    color: var(--accent-primary);
    transition: all 0.4s ease;
}

.logo-brace {
    color: var(--accent-primary);
    opacity: 0.7;
    transition: all 0.4s ease;
}

.logo-brace-l { margin-right: 1px; }
.logo-brace-r { margin-left: 1px; }

.logo-link:hover .logo-brace-r { margin-left: 0; }
.logo-link:hover .logo-dev { color: var(--accent-secondary); }
.logo-link:hover .logo-brace { opacity: 1; }

/* Navigation */
.main-navigation { display: none; }

@media (min-width: 1024px) { .main-navigation { display: block; } }

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
}

.nav-menu > li { position: relative; }

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-xs) var(--space-sm);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-parent > a {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}



/* Dropdown */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    padding: var(--space-xs);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.nav-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.sub-menu li a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Language Switcher (flag toggle) */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    padding: 3px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 100px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
    line-height: 1;
}

.lang-option .lang-flag {
    font-size: 14px;
    line-height: 1;
}

.lang-option:hover {
    color: var(--text-primary);
}

.lang-option.is-active {
    background: var(--accent-gradient);
    color: #fff;
}

.lang-switcher-mobile {
    margin: var(--space-md) 0;
    align-self: flex-start;
}

/* Persistent language bar — mobile only. Sits fixed just below the navbar,
   top-right, so switching language never requires opening the hamburger
   menu. Desktop already shows the switcher directly in the header. */
.ardev-mobile-lang-bar {
    display: none;
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: var(--space-md);
    z-index: calc(var(--z-header) - 100);
}

@media (max-width: 900px) {
    .ardev-mobile-lang-bar {
        display: block;
    }
}

body.mobile-menu-open .ardev-mobile-lang-bar {
    display: none;
}

@media (max-width: 480px) {
    .ardev-mobile-lang-bar {
        top: calc(var(--header-height) + 6px);
        right: var(--space-sm);
    }
}

@media (max-width: 900px) {
    .lang-switcher-desktop {
        display: none;
    }
}

.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.theme-toggle:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.theme-icon-light,
.theme-icon-dark {
    position: absolute;
    transition: all var(--transition-base);
}

[data-theme="light"] .theme-icon-light {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .theme-icon-dark {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.header-cta { display: none; }

@media (min-width: 768px) { .header-cta { display: inline-flex; } }

/* Mobile Menu Toggle */
.menu-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: calc(var(--z-nav) + 1);
}

@media (min-width: 1024px) { .menu-toggle { display: none; } }

.menu-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
    transform-origin: center;
}

.menu-toggle.active .menu-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active .menu-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.active .menu-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: var(--z-nav);
    visibility: hidden;
    opacity: 0;
    transition: all var(--transition-slow);
}

.mobile-menu.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: var(--blur-lg);
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--bg-secondary);
    padding: var(--space-md) var(--space-lg) var(--space-lg);
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu.active .mobile-menu-content { transform: translateX(0); }

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    margin-bottom: var(--space-lg);
}

.mobile-menu-logo { display: inline-flex; }
.mobile-menu-logo .logo-text { font-size: 1.5rem; }

.mobile-menu-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mobile-menu-close:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.mobile-menu-label {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.mobile-nav-menu {
    list-style: none;
    flex: 1;
}

.mobile-nav-menu li { border-bottom: 1px solid var(--border-subtle); }

.mobile-nav-menu li a {
    display: block;
    padding: var(--space-sm) 0;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.mobile-nav-menu li a:hover {
    color: var(--accent-primary);
    padding-left: var(--space-sm);
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.mobile-email {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-base);
    color: var(--accent-primary);
    margin-bottom: var(--space-xs);
}

.mobile-location {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.mobile-social {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.mobile-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.mobile-social a:hover {
    background: var(--accent-primary);
    color: white;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: var(--z-cursor);
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}

.cursor-circle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor-label {
    position: absolute;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: white;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
}

.custom-cursor.hovering .cursor-dot {
    width: 0;
    height: 0;
}

.custom-cursor.hovering .cursor-circle {
    width: 60px;
    height: 60px;
    border-color: var(--accent-primary);
    background: rgba(155, 109, 214, 0.1);
}

.custom-cursor.hovering .cursor-label { opacity: 1; }

@media (pointer: coarse) { .custom-cursor { display: none; } }

/* ============================================
   SCROLL PROGRESS
   ============================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: var(--z-scroll-progress);
    background: var(--bg-tertiary);
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    transition: width 0.1s linear;
}

/* ============================================
   PAGE TRANSITION
   ============================================ */

.page-transition {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) + 100);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}

.transition-line {
    position: absolute;
    width: 100%;
    height: 34%;
    background: var(--accent-primary);
    transform: scaleX(0);
    transform-origin: left;
}

.transition-line:nth-child(1) { top: 0; }
.transition-line:nth-child(2) { top: 33%; }
.transition-line:nth-child(3) { top: 66%; }

.transition-text {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 800;
    letter-spacing: 0.2em;
    color: white;
    display: flex;
    gap: 0.1em;
}

.transition-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-particles {
    display: none;
}

/* Subtle blueprint-grid backdrop — replaces the particle canvas as the
   hero's ambient texture. Ties to the "engineering drafting table" feel
   instead of a generic glowing-orb SaaS background. */
.hero-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(155, 109, 214, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(155, 109, 214, 0.06) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 85%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 85%);
}

/* Hero wrapper: two-column — agency positioning left, live AI assistant right */
.hero-wrap {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    width: 100%;
    height: calc(100vh - var(--header-height));
    min-height: 560px;
    padding: 0 var(--container-padding);
    max-width: var(--container-max);
    margin: 0 auto;
}

.hero-wrap-single {
    flex-direction: column;
    justify-content: center;
    height: auto;
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-xl);
}

.hero-intro {
    max-width: 720px;
}

.hero-title-terminal {
    font-size: clamp(2.3rem, 4.5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.hero-title-terminal .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* "Ask a question" bar — the hero's primary, immediately-visible entry
   point into the AI assistant. Submitting opens the full conversation
   in its own window with the question already asked. */
.hero-ask-form {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: #ffffff;
    border: 2px solid var(--border-strong);
    border-radius: 16px;
    padding: 8px 8px 8px 20px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15), var(--shadow-md);
    max-width: 640px;
    margin-bottom: var(--space-lg);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.hero-ask-form:hover {
    border-color: var(--accent-primary);
}

.hero-ask-form:focus-within {
    border-color: var(--accent-primary);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15), 0 0 0 4px var(--accent-glow);
}

.hero-ask-icon {
    flex-shrink: 0;
    color: var(--accent-primary);
}

.hero-ask-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    color: #1a1a1a;
    min-width: 0;
    padding: 12px 0;
    cursor: text;
}

.hero-ask-input::placeholder {
    color: #8a8a8a;
}

.hero-ask-submit {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.hero-ask-submit:hover {
    transform: translateY(-1px);
}

.hero-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: var(--space-lg) 0;
}

.hero-cap-tag {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: 100px;
    padding: 6px 14px;
}

/* --- LEFT COLUMN: Text --- */
.hero-text-col {
    flex: 0 0 46%;
    max-width: 560px;
    position: relative;
    z-index: 20;
    padding-right: var(--space-lg);
}

.hero-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: var(--space-md);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(155, 109, 214, 0.08);
    border: 1px solid rgba(155, 109, 214, 0.18);
    border-radius: 100px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--accent-primary);
}

.hero-badge-live {
    background: rgba(45, 217, 192, 0.08);
    border-color: rgba(45, 217, 192, 0.25);
    color: var(--accent-tertiary);
}

.hero-badge-dot-live {
    background: var(--accent-tertiary);
}

.hero-ask-hint {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 10px 0 var(--space-lg);
}

.hero-cap-tag-accent {
    background: rgba(155, 109, 214, 0.1);
    border-color: rgba(155, 109, 214, 0.3);
    color: var(--accent-primary);
    font-weight: 600;
}

.hero-badge-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* ROTATING TITLE - FIXED HEIGHT, NO JUMP */
.hero-title {
    font-size: clamp(2.6rem, 4.5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    min-height: 1.2em;
    white-space: nowrap;
}

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

.ht-rotator {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ht-cursor {
    display: inline-block;
    width: 3px;
    height: 0.8em;
    background: var(--accent-primary);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink-cursor 0.75s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Subtitle */
.hero-sub {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 460px;
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

/* CTA - always visible */
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* --- RIGHT COLUMN: Terminals (legacy, kept in case a child theme still references it) --- */
.hero-term-col {
    flex: 1;
    position: relative;
    height: 100%;
    min-width: 420px;
    z-index: 5;
    padding-left: var(--space-lg);
}

/* --- RIGHT COLUMN: Live AI Assistant --- */
.hero-chat-col {
    flex: 1;
    position: relative;
    min-width: 380px;
    max-width: 460px;
    z-index: 15;
    padding-left: var(--space-lg);
    display: flex;
    align-items: stretch;
}

/* Terminal cards - absolute positioned, overlapping */
.tcard {
    position: absolute;
    background: rgba(13, 13, 22, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', ui-monospace, monospace;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    cursor: default;
}

.tcard:hover {
    opacity: 1 !important;
    z-index: 200 !important;
    border-color: rgba(155, 109, 214, 0.4);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.65), 0 0 25px rgba(155, 109, 214, 0.1);
    transform: translateY(-3px);
}

/* Terminal code */
.tcard .tpre {
    margin: 0;
    padding: 12px 14px;
    color: #b0b0c8;
    line-height: 1.65;
    white-space: pre;
    overflow: hidden;
    font-family: inherit;
}



/* Terminal bar */
.tbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tbar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
}

.tbar i:nth-child(1) { background: #ff5f56; }
.tbar i:nth-child(2) { background: #ffbd2e; }
.tbar i:nth-child(3) { background: #27c93f; }

.tbar em {
    margin-left: auto;
    font-size: 10px;
    color: #5c5c6e;
    font-weight: 500;
    font-style: normal;
    font-family: var(--font-display);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    z-index: 30;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-wrap { flex-wrap: wrap; height: auto; min-height: 0; align-items: flex-start; padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
    .hero-intro { max-width: 100%; }
    .hero-title-terminal { font-size: clamp(2rem, 6vw, 3rem); }
}

@media (max-width: 640px) {
    .hero-wrap { align-items: flex-start; padding-top: var(--space-2xl); height: auto; }
    .hero-wrap-single { padding-top: var(--space-xl); }
    .hero-title-terminal { font-size: clamp(1.7rem, 8vw, 2.3rem); }
    .hero-sub { font-size: var(--text-base); }
    .hero-ask-form { flex-wrap: wrap; padding: 10px; border-radius: 14px; }
    .hero-ask-input { flex-basis: 100%; padding: 6px 4px; }
    .hero-ask-submit { flex: 1; justify-content: center; }
    .hero-cta { flex-direction: column; align-items: stretch; gap: 12px; }
    .hero-cta .btn { width: 100%; }
}

/* ============================================
   SERVICES SECTION
   ============================================ */

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

.service-index {
    border-top: 1px solid var(--border-medium);
}

.service-row {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr auto 40px;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-sm);
    border-bottom: 1px solid var(--border-medium);
    text-decoration: none;
    color: inherit;
    transition: background var(--transition-base), padding-left var(--transition-base);
}

a.service-row { cursor: pointer; }

.service-row:hover {
    background: var(--bg-tertiary);
    padding-left: var(--space-md);
}

.service-row-num {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-muted);
    transition: color var(--transition-base);
}

.service-row:hover .service-row-num {
    color: var(--accent-primary);
}

.service-row-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.service-row-desc {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
    max-width: 560px;
}

.service-row-tags {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    max-width: 220px;
}

.service-row-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    color: var(--text-muted);
    white-space: nowrap;
}

.service-row-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-muted);
    transform: translateX(-6px);
    opacity: 0;
    transition: all var(--transition-base);
}

.service-row:hover .service-row-arrow {
    opacity: 1;
    transform: translateX(0);
    background: var(--accent-primary);
    color: white;
}

@media (min-width: 1000px) {
    .service-row-tags { display: flex; }
}

@media (max-width: 768px) {
    .service-row {
        grid-template-columns: 40px 1fr;
        grid-template-areas:
            "num title"
            ". desc";
        padding: var(--space-md) var(--space-xs);
    }
    .service-row-num { grid-area: num; }
    .service-row-main { grid-area: title; }
    .service-row-desc { grid-area: desc; max-width: none; margin-top: 4px; }
    .service-row-arrow, .service-row-tags { display: none; }
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */

.portfolio-section { position: relative; }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-lg) var(--space-md);
}

.portfolio-item {
    grid-column: span 6;
    display: block;
    color: inherit;
    text-decoration: none;
}

.portfolio-image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
    background: var(--bg-tertiary);
}

.portfolio-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow), filter var(--transition-slow);
    filter: saturate(1.15) contrast(1.05) brightness(0.92);
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.04);
    filter: saturate(1.3) contrast(1.05) brightness(1);
}

.portfolio-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(155, 109, 214, 0.22) 0%, rgba(11, 13, 16, 0.08) 55%);
    mix-blend-mode: multiply;
    pointer-events: none;
}

.portfolio-caption {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: start;
    gap: var(--space-sm) var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-md);
}

.portfolio-num {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-muted);
    padding-top: 2px;
}

.portfolio-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.portfolio-category {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
}

.portfolio-tags {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

.portfolio-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

@media (max-width: 640px) {
    .portfolio-caption { grid-template-columns: 28px 1fr; }
    .portfolio-tags { display: none; }
}

/* ============================================
   STATS / MARQUEE SECTION
   ============================================ */

.stats-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-xl) 0;
}

.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 140px;
}

.stat-block .stat-number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-block .stat-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 6px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-medium);
}

@media (max-width: 768px) {
    .stat-divider { display: none; }
    .stats-bar { gap: var(--space-xl) var(--space-2xl); }
}

/* ============================================
   TESTIMONIALS
   ============================================ */

.testimonials-section { position: relative; }

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    align-items: start;
}

.testimonial-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    text-align: left;
    padding: var(--space-lg);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-quote {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    flex: 1;
    position: relative;
}

@media (max-width: 900px) {
    .testimonials-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
}

.testimonial-quote::before {
    content: '"';
    position: absolute;
    top: -0.3em;
    left: -0.1em;
    font-size: 3rem;
    color: var(--accent-primary);
    opacity: 0.2;
    line-height: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-md);
}

.testimonial-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

.testimonial-info { text-align: left; }

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

.testimonial-role {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.testimonial-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.testimonial-btn:hover {
    background: var(--accent-primary);
    color: white;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    flex-wrap: wrap;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
}

.testimonial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.testimonial-dot.active {
    background: var(--accent-primary);
    width: 24px;
    border-radius: 4px;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    position: relative;
    padding: var(--space-3xl) 0;
    text-align: center;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0.05;
}

.cta-glow-orb {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: cta-glow-pulse 4s ease-in-out infinite;
}

@keyframes cta-glow-pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

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

.cta-title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.cta-title em {
    font-style: normal;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   FOOTER
   ============================================ */

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

.footer-reveal { position: relative; }

.footer-cta-section {
    position: relative;
    padding: var(--space-3xl) 0;
    text-align: center;
    overflow: hidden;
    background: var(--bg-secondary);
}

/* ============================================
   PAGE HERO BACKGROUND (reusable)
   Premium backdrop for inner-page heroes that have no image:
   subtle grid + radial accent glow over the secondary bg.
   ============================================ */
.page-hero {
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
}
.page-hero::before {
    /* grid pattern */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(155, 109, 214, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(155, 109, 214, 0.05) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}
.page-hero::after {
    /* radial accent glow */
    content: '';
    position: absolute;
    width: 900px;
    height: 900px;
    max-width: 140%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155, 109, 214, 0.15) 0%, transparent 60%);
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}
.page-hero > .container { position: relative; z-index: 1; }

/* Compact page hero built on .hero-section (contact/portfolio/demos):
   neutralize the full-viewport sizing so the inline min-height applies,
   and let the .hero-wrap content sit centered over the grid+glow. */
.hero-section.page-hero {
    min-height: 0;
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-2xl);
}
.hero-section.page-hero .hero-wrap {
    height: auto;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.footer-cta-bg { position: absolute; inset: 0; }

.cta-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(155, 109, 214, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(155, 109, 214, 0.05) 1px, transparent 1px);
    background-size: 80px 80px;
}

.cta-glow {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155, 109, 214, 0.15) 0%, transparent 60%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Large soft-gradient blobs are expensive to repaint while scrolling past
   them on mobile GPUs — this was causing the footer CTA section to feel
   like scrolling "stuck." Shrink it and drop it onto its own compositor
   layer on touch devices instead of rendering it at full size. */
@media (pointer: coarse), (max-width: 768px) {
    .cta-glow {
        width: 400px;
        height: 400px;
        transform: translate(-50%, -50%) translateZ(0);
    }
}

.footer-cta-title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.footer-cta-title .line { display: block; }

.footer-cta-title em {
    font-style: normal;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-cta-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

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

.footer-main {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.footer-logo .logo-text {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
}

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

.social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
}

.footer-nav-title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.footer-nav-list,
.footer-contact-list { list-style: none; }

.footer-nav-list li,
.footer-contact-list li { margin-bottom: var(--space-sm); }

.footer-nav-list a {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
    display: inline-block;
}

.footer-nav-list a:hover {
    color: var(--accent-primary);
    transform: translateX(4px);
}

.contact-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.footer-contact-list a {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.footer-contact-list a:hover { color: var(--accent-primary); }

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: #22c55e;
}

.availability-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
    .footer-bottom {
        padding-bottom: 64px;
    }
}

.footer-copyright {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: 6px;
    padding: 0;
    list-style: none;
}

.footer-legal-links a {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-legal-links a:hover {
    color: var(--accent-primary);
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.footer-tech {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'SF Mono', monospace;
}

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

.back-to-top:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-3px);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    transition: transform var(--transition-smooth);
    pointer-events: all;
    min-width: 300px;
}

.toast.show { transform: translateX(0); }

.toast-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.toast-success .toast-icon { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.toast-error .toast-icon { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.toast-info .toast-icon { background: rgba(155, 109, 214, 0.15); color: var(--accent-primary); }

.toast-content { flex: 1; }

.toast-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.toast-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.toast-close:hover { color: var(--text-primary); }

/* ============================================
   LOADING SPINNER
   ============================================ */

.loading-spinner {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) + 50);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.loading-spinner.active {
    opacity: 1;
    visibility: visible;
}

.spinner-ring {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   IMAGES & VIDEO PLACEHOLDERS
   ============================================ */

.image-placeholder {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-elevated) 100%);
    border: 2px dashed var(--border-medium);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239b6dd6' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.image-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-sm);
    opacity: 0.5;
}

.image-placeholder span {
    font-size: var(--text-sm);
    font-weight: 500;
}

.video-placeholder {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-elevated) 100%);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder .play-icon {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.video-placeholder .play-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px var(--accent-glow);
}

.video-placeholder .play-icon svg {
    margin-left: 4px;
}

/* Portfolio image placeholders */
.portfolio-image-wrapper .image-placeholder {
    position: absolute;
    inset: 0;
    border: none;
    border-radius: 0;
}

.portfolio-image-wrapper .image-placeholder svg {
    width: 64px;
    height: 64px;
}

.portfolio-image-wrapper .image-placeholder span {
    font-size: var(--text-lg);
    font-weight: 600;
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */

.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    right: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    z-index: 5;
}

.scroll-indicator-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
    animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ============================================
   ADMIN BAR OFFSET FIX
   ============================================ */

body.admin-bar .site-header {
    top: 32px !important;
}

body.admin-bar .mobile-menu-content {
    padding-top: calc(var(--space-md) + 32px) !important;
}

body.admin-bar .page-transition {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px !important;
    }
    body.admin-bar .mobile-menu-content {
        padding-top: calc(var(--space-md) + 46px) !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass {
    background: rgba(26, 26, 36, 0.6);
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    border: 1px solid var(--border-subtle);
}

.glow { box-shadow: 0 0 40px var(--accent-glow); }

.reveal {
    opacity: 0;
    transform: translateY(30px);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .marquee-track { animation: none; }
}

@media print {
    .site-header,
    .site-footer,
    .custom-cursor,
    .scroll-progress,
    .page-transition,
    .hero-particles,
    .hero-term-col,
    .hero-chat-col,
    .ardev-chat-launcher {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
    a {
        text-decoration: underline !important;
        color: black !important;
    }
    .section {
        padding: 2rem 0 !important;
        page-break-inside: avoid;
    }
}

@media (prefers-contrast: high) {
    :root {
        --border-subtle: rgba(255, 255, 255, 0.3);
        --border-medium: rgba(255, 255, 255, 0.5);
        --text-secondary: #cccccc;
    }
    .btn { border-width: 2px; }
}

/* Light theme overrides */
[data-theme="light"] .tcard {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .hero-section {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg-primary: #f7f7fa;
        --bg-secondary: #eeedf3;
        --bg-tertiary: #e3e1ec;
        --bg-elevated: #ffffff;
        --text-primary: #16141c;
        --text-secondary: #524f5c;
        --text-muted: #85818f;
        --accent-primary: #7c4fd1;
        --accent-secondary: #5f3aa8;
        --accent-gradient: linear-gradient(135deg, #9166dd 0%, #7c4fd1 45%, #5f3aa8 100%);
        --border-subtle: rgba(30, 20, 50, 0.08);
        --border-medium: rgba(30, 20, 50, 0.13);
    }
    :root:not([data-theme="dark"]) .tcard {
        border-color: rgba(30, 20, 50, 0.12);
        box-shadow: 0 8px 30px rgba(30, 20, 50, 0.15);
    }
    :root:not([data-theme="dark"]) .hero-section {
        background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    }
}

/* ============================================
   PORTFOLIO CASE STUDY (single-portfolio.php)
   ============================================ */

.case-study {
    padding: var(--space-2xl) 0 var(--space-3xl);
}

.case-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: var(--space-xl);
    transition: color var(--transition-fast);
}

.case-back-link:hover {
    color: var(--accent-primary);
}

.case-category {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    display: block;
    margin-bottom: var(--space-sm);
}

.case-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-medium);
    border-bottom: 1px solid var(--border-medium);
    margin-bottom: var(--space-xl);
}

.case-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.case-meta-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.case-meta-value {
    font-weight: 600;
    color: var(--text-primary);
}

.case-hero-image {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: var(--space-2xl);
    aspect-ratio: 16/9;
}

.case-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.15) contrast(1.05) brightness(0.92);
}

.case-content {
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 720px;
}

.case-content h2 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: var(--space-xl) 0 var(--space-sm);
}

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

.case-cta {
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--border-medium);
    text-align: center;
}

.case-cta h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-2xl);
    list-style: none;
}
.pagination li {
    display: inline-flex;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--space-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
}
.page-link:hover, .page-link.current {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* ============================================
   NO-JS FALLBACK
   ============================================ */

.no-js .code-block { opacity: 0.9; }
.no-js [data-scroll-reveal] { opacity: 1; transform: none; }


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

/* --- Blog Page Header --- */
.blog-page-header {
    padding-top: calc(var(--header-height) + var(--space-2xl));
    padding-bottom: var(--space-2xl);
}

.blog-header-content {
    max-width: 720px;
}

.blog-header-label {
    display: inline-block;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
}

.blog-header-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.blog-header-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 55ch;
}

/* --- Blog Grid --- */
.blog-grid-section {
    padding-bottom: var(--space-3xl);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

/* --- Blog Card --- */
.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    border-color: var(--border-medium);
}

.blog-card-image-link {
    display: block;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.blog-card-image-placeholder {
    background: var(--bg-tertiary);
}

.blog-card-image-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--space-lg);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-muted);
    flex-wrap: wrap;
}

.blog-card-category {
    color: var(--accent-primary);
    font-weight: 600;
}

.blog-card-meta-sep {
    color: var(--text-muted);
    opacity: 0.5;
}

.blog-card-date {
    color: var(--text-muted);
}

.blog-card-title {
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.blog-card-title a {
    color: inherit;
    transition: color 0.2s ease;
}

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

.blog-card-excerpt {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    flex: 1;
}

.blog-card-excerpt p {
    margin: 0;
}

.blog-card-readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent-primary);
    transition: gap 0.2s ease;
    margin-top: auto;
}

.blog-card-readmore svg {
    transition: transform 0.2s ease;
}

.blog-card-readmore:hover {
    gap: 10px;
    color: var(--accent-secondary);
}

.blog-card-readmore:hover svg {
    transform: translateX(3px);
}

/* --- Blog Empty State --- */
.blog-empty {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.blog-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.blog-empty-title {
    font-size: var(--text-2xl);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.blog-empty-text {
    font-size: var(--text-base);
    color: var(--text-secondary);
    max-width: 40ch;
    margin: 0 auto;
}

/* ============================================
   SINGLE POST
   ============================================ */

/* --- Single Post: Breadcrumbs --- */
.breadcrumbs {
    margin-bottom: var(--space-xl);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--accent-primary);
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

.breadcrumb-sep {
    color: var(--text-muted);
    opacity: 0.4;
}

/* --- Single Post: Header --- */
.single-post-header-section {
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-xl);
}

.single-post-header {
    margin-bottom: var(--space-xl);
}

.single-post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.single-post-category a {
    color: var(--accent-primary);
    font-weight: 600;
    transition: color 0.2s ease;
}

.single-post-category a:hover {
    color: var(--accent-secondary);
}

.single-post-meta-sep {
    opacity: 0.4;
}

.single-post-readtime {
    color: var(--text-muted);
}

.single-post-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.single-post-excerpt {
    font-size: var(--text-lg);
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 60ch;
}

/* --- Single Post: Featured Image --- */
.single-post-featured-image {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.single-post-image {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Single Post: Content --- */
.single-post-content-section {
    padding-bottom: var(--space-2xl);
}

.single-post-content {
    max-width: 720px;
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--text-secondary);
}

.single-post-content > * {
    max-width: 720px;
}

.single-post-content > * + * {
    margin-top: var(--space-md);
}

/* Headings inside post content */
.single-post-content h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.single-post-content h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-xs);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.single-post-content h4 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

/* Paragraphs */
.single-post-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 720px;
}

/* Links */
.single-post-content a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s ease;
}

.single-post-content a:hover {
    color: var(--accent-secondary);
}

/* Strong / Bold */
.single-post-content strong,
.single-post-content b {
    color: var(--text-primary);
    font-weight: 600;
}

/* Code: inline */
.single-post-content code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    padding: 2px 8px;
    border-radius: 6px;
    word-break: break-word;
}

/* Code: preformatted blocks */
.single-post-content pre {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: var(--text-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: var(--space-md);
    overflow-x: auto;
    line-height: 1.7;
    margin: var(--space-md) 0;
    max-width: 100%;
}

.single-post-content pre code {
    background: none;
    color: var(--text-secondary);
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* Lists */
.single-post-content ul,
.single-post-content ol {
    padding-left: var(--space-lg);
    margin: var(--space-sm) 0;
}

.single-post-content ul {
    list-style: disc;
}

.single-post-content ol {
    list-style: decimal;
}

.single-post-content li {
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: var(--space-xs);
}

.single-post-content li::marker {
    color: var(--accent-primary);
}

/* Nested lists */
.single-post-content ul ul,
.single-post-content ol ol,
.single-post-content ul ol,
.single-post-content ol ul {
    margin-top: var(--space-xs);
}

/* Blockquote */
.single-post-content blockquote {
    position: relative;
    margin: var(--space-lg) 0;
    padding: var(--space-md) var(--space-md) var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

.single-post-content blockquote p {
    color: var(--text-primary);
    margin: 0;
    line-height: 1.7;
}

.single-post-content blockquote cite {
    display: block;
    margin-top: var(--space-sm);
    font-size: var(--text-sm);
    font-style: normal;
    color: var(--text-muted);
}

/* Images inside content */
.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: var(--space-md) 0;
}

/* Figure / Figcaption */
.single-post-content figure {
    margin: var(--space-md) 0;
    max-width: 100%;
}

.single-post-content figcaption {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-xs);
    text-align: center;
}

/* Tables */
.single-post-content table {
    width: 100%;
    max-width: 720px;
    border-collapse: collapse;
    margin: var(--space-md) 0;
    font-size: var(--text-sm);
}

.single-post-content th,
.single-post-content td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.single-post-content th {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

/* Horizontal rule */
.single-post-content hr {
    border: none;
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-xl) 0;
}

/* Page links (multipage posts) */
.page-links {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.page-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--space-sm);
    margin: 0 2px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-links a:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* --- Single Post: Tags --- */
.single-post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.single-post-tags-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    margin-right: var(--space-xs);
}

.post-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-tag:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ============================================
   AUTHOR BOX
   ============================================ */

.author-box-section {
    padding-bottom: var(--space-2xl);
}

.author-box {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}

.author-label {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: 2px;
}

.author-name {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.author-name a {
    color: inherit;
    transition: color 0.2s ease;
}

.author-name a:hover {
    color: var(--accent-primary);
}

.author-bio {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.author-posts-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent-primary);
    transition: gap 0.2s ease;
}

.author-posts-link:hover {
    gap: 8px;
}

/* ============================================
   RELATED POSTS
   ============================================ */

.related-posts-section {
    padding-bottom: var(--space-2xl);
}

.related-posts-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

/* --- Related Post Card --- */
.related-post-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--border-medium);
}

.related-post-image-link {
    display: block;
    overflow: hidden;
    flex-shrink: 0;
}

.related-post-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.related-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post-card:hover .related-post-image {
    transform: scale(1.05);
}

.related-post-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--space-md);
}

.related-post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-xs);
    font-size: var(--text-xs);
    color: var(--text-muted);
    flex-wrap: wrap;
}

.related-post-category {
    color: var(--accent-primary);
    font-weight: 600;
}

.related-post-meta-sep {
    opacity: 0.4;
}

.related-post-title {
    font-size: var(--text-lg);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.related-post-title a {
    color: inherit;
    transition: color 0.2s ease;
}

.related-post-title a:hover {
    color: var(--accent-primary);
}

.related-post-readmore {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent-primary);
    margin-top: auto;
    transition: gap 0.2s ease;
}

.related-post-readmore:hover {
    gap: 8px;
}

/* ============================================
   COMMENTS SECTION
   ============================================ */

.comments-section {
    padding-bottom: var(--space-3xl);
}

.comments-area {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-subtle);
}

.comments-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

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

.comment-list > li {
    margin-bottom: var(--space-lg);
}

.comment-body {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.comment-author {
    flex-shrink: 0;
}

.comment-author .avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-meta {
    flex: 1;
    min-width: 0;
}

.comment-meta .fn {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--text-primary);
    font-style: normal;
}

.comment-metadata {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.comment-metadata a {
    color: var(--text-muted);
}

.comment-content {
    font-size: var(--text-sm);
    line-height: 1.7;
    color: var(--text-secondary);
}

.comment-content p {
    margin-bottom: var(--space-xs);
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--accent-primary);
    margin-top: var(--space-xs);
}

/* Comment Form */
.comment-respond {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
}

.comment-reply-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.comment-form label {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(155, 109, 214, 0.15);
}

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

.comment-form .form-submit {
    margin-top: var(--space-md);
}

.comment-form input[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--accent-gradient);
    color: white;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-sm);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(155, 109, 214, 0.35);
}

.no-comments {
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-md);
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */

.widget-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.widget {
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
}

.widget-title {
    position: relative;
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
    border-bottom: 2px solid var(--accent-primary);
}

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

.widget ul li {
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.2s ease;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    display: block;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    padding: 4px 0;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.widget ul li a:hover {
    color: var(--accent-primary);
    padding-left: 4px;
}

/* Search widget */
.widget_search .search-form {
    display: flex;
    gap: 0;
}

.widget_search input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px 0 0 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
}

.widget_search input[type="search"]:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.widget_search button,
.widget_search input[type="submit"] {
    padding: 10px 16px;
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 0 10px 10px 0;
    color: white;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.widget_search button:hover,
.widget_search input[type="submit"]:hover {
    background: var(--accent-secondary);
}

/* Recent Posts widget: show date */
.widget_recent_entries .post-date {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

/* Categories widget count */
.widget_categories li {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget_categories li a {
    flex: 1;
}

.widget_categories .count {
    font-size: var(--text-xs);
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 100px;
}

/* ============================================
   RESPONSIVE: Blog
   ============================================ */

@media (max-width: 1024px) {
    .related-posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .blog-page-header {
        padding-top: calc(var(--header-height) + var(--space-lg));
        padding-bottom: var(--space-lg);
    }

    .blog-header-title {
        font-size: var(--text-2xl);
    }

    .single-post-header-section {
        padding-top: calc(var(--header-height) + var(--space-lg));
    }

    .single-post-title {
        font-size: var(--text-2xl);
    }

    .single-post-featured-image {
        border-radius: 12px;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-header {
        justify-content: center;
    }

    .single-post-content {
        font-size: var(--text-base);
    }

    .single-post-content h2 {
        font-size: var(--text-xl);
    }

    .single-post-content h3 {
        font-size: var(--text-lg);
    }

    .breadcrumb-list {
        gap: 4px;
    }

    .breadcrumb-item {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .blog-card-body {
        padding: var(--space-md);
    }

    .blog-card-title {
        font-size: var(--text-lg);
    }

    .single-post-tags {
        gap: var(--space-xs);
    }

    .post-tag {
        padding: 3px 10px;
        font-size: 12px;
    }

    .comment-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-author .avatar {
        width: 44px;
        height: 44px;
    }
}

/* ============================================
   CONTACT FORM STATUS MESSAGE
   ============================================ */
.form-status { line-height: 1.5; border: 1px solid transparent; }
.form-status-success {
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}
.form-status-error {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}
.form-status-info {
    color: var(--accent-primary);
    background: rgba(155, 109, 214, 0.10);
    border-color: rgba(155, 109, 214, 0.30);
}

/* ============================================
   VIDEO MODAL — floating watch-button (bottom-left)
   plus inline "watch video" triggers, sharing one
   clean modal with no YouTube chrome/branding visible
   around it.
   ============================================ */
.ardev-video-fab {
    position: fixed;
    left: clamp(16px, 4vw, 32px);
    bottom: clamp(16px, 4vw, 32px);
    z-index: 8998;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(155, 109, 214, 0.4);
    transition: transform var(--transition-base, 200ms);
}

.ardev-video-fab:hover {
    transform: scale(1.06);
}

.ardev-video-fab svg {
    margin-left: 3px;
}

.ardev-video-fab-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    opacity: 0;
    animation: ardev-video-fab-pulse 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes ardev-video-fab-pulse {
    0% { opacity: 0.6; transform: scale(0.9); }
    100% { opacity: 0; transform: scale(1.25); }
}

body.ardev-chat-modal-open .ardev-video-fab,
body.mobile-menu-open .ardev-video-fab,
body.ardev-footer-in-view .ardev-video-fab,
body.ardev-video-modal-open .ardev-video-fab,
body.ardev-cookie-banner-open .ardev-video-fab {
    display: none;
}

@media (max-width: 480px) {
    .ardev-video-fab { width: 52px; height: 52px; left: 16px; bottom: 16px; }
}

.ardev-video-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.ardev-video-modal-overlay.is-open {
    display: flex;
}

.ardev-video-modal-content {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}

.ardev-video-modal-content iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.ardev-video-modal-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast, 200ms);
}

.ardev-video-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

@media (max-width: 600px) {
    .ardev-video-modal-close { top: -44px; right: 0; width: 36px; height: 36px; font-size: 20px; }
}

/* Inline "watch video" trigger used on the homepage and AI Chatbots page */
.ardev-video-trigger {
    position: relative;
    display: block;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    border: none;
    padding: 0;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.ardev-video-trigger img {
    display: block;
    width: 100%;
    height: auto;
    filter: saturate(1.1) brightness(0.75);
    transition: filter var(--transition-base, 200ms);
}

.ardev-video-trigger:hover img {
    filter: saturate(1.15) brightness(0.65);
}

.ardev-video-trigger-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(155, 109, 214, 0.5);
    transition: transform var(--transition-base, 200ms);
}

.ardev-video-trigger:hover .ardev-video-trigger-play {
    transform: translate(-50%, -50%) scale(1.08);
}

.ardev-video-trigger-play svg {
    margin-left: 4px;
}

/* ============================================
   LEGAL PAGES (Privacy Policy, Terms, Cookie Policy)
   Clean, readable prose typography — these need to be
   read carefully, not styled like marketing sections.
   ============================================ */
.ardev-legal-content {
    color: var(--text-secondary);
    font-size: var(--text-base);
    line-height: 1.8;
}

.ardev-legal-content h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: var(--space-2xl) 0 var(--space-md);
}

.ardev-legal-content h2:first-of-type {
    margin-top: var(--space-lg);
}

.ardev-legal-content h3 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin: var(--space-lg) 0 var(--space-sm);
}

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

.ardev-legal-content a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.ardev-legal-content ul {
    margin: 0 0 var(--space-md);
    padding-left: 20px;
}

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

.ardev-legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-md) 0 var(--space-lg);
    font-size: var(--text-sm);
}

.ardev-legal-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 700;
    border-bottom: 2px solid var(--border-medium);
}

.ardev-legal-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
}

.ardev-legal-table tr:nth-child(even) td {
    background: var(--bg-secondary);
}

@media (max-width: 640px) {
    .ardev-legal-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */
.ardev-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9500;
    background: var(--bg-elevated, var(--bg-secondary));
    border-top: 1px solid var(--border-medium);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    transform: translateY(100%);
    transition: transform 0.35s ease;
}

.ardev-cookie-banner.is-visible {
    transform: translateY(0);
}

.ardev-cookie-banner-text {
    flex: 1;
    min-width: 240px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

.ardev-cookie-banner-text a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.ardev-cookie-banner-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.ardev-cookie-banner-actions .btn {
    padding: 10px 18px;
    font-size: var(--text-sm);
}

@media (max-width: 640px) {
    .ardev-cookie-banner {
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-md);
    }
    .ardev-cookie-banner-actions {
        justify-content: stretch;
    }
    .ardev-cookie-banner-actions .btn {
        flex: 1;
        text-align: center;
    }
}
