/* Cookie banner */
.cookie-banner {
    --cookie-fg: #ffffff;
    --cookie-fg-muted: rgba(255, 255, 255, 0.9);
    --cookie-border: color-mix(in srgb, var(--primary-color) 24%, transparent);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--secondary-color);
    color: var(--cookie-fg);
    padding: 18px;
    transform: translateY(105%);
    transition: transform .25s ease, background .2s ease, color .2s ease, border-color .2s ease;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--cookie-border);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner-content { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cookie-text { flex: 1; min-width: 290px; color: var(--cookie-fg); }
.cookie-text h3 { margin: 0 0 8px; font-size: 18px; color: inherit; }
.cookie-text p { margin: 0; color: var(--cookie-fg-muted); font-size: 14px; line-height: 1.4; }
.cookie-link { color: var(--primary-color); text-decoration: none; }
.cookie-link:hover { text-decoration: underline; }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { border: none; border-radius: 6px; font-size: 14px; font-weight: 600; padding: 11px 18px; cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.cookie-btn-accept { background: var(--primary-color); color: var(--secondary-color); }
.cookie-btn-accept:hover { background: var(--primary-dark); color: #ffffff; }
.cookie-banner .cookie-btn-decline {
    background: transparent;
    color: var(--cookie-fg);
    border: 2px solid color-mix(in srgb, var(--cookie-fg) 28%, transparent);
}
.cookie-banner .cookie-btn-decline:hover {
    border-color: color-mix(in srgb, var(--primary-color) 38%, var(--cookie-fg));
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}
.cookie-banner .cookie-btn-settings {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.cookie-banner .cookie-btn-settings:hover {
    background: color-mix(in srgb, var(--primary-color) 14%, transparent);
    color: var(--cookie-fg);
}
.cookie-settings-modal { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.7); display: none; align-items: center; justify-content: center; padding: 20px; }
.cookie-settings-modal.show { display: flex; }
.cookie-settings-content { width: 100%; max-width: 620px; max-height: 80vh; overflow: auto; background: var(--bg-white); color: var(--text-color); border: 1px solid var(--border-color); border-radius: 10px; padding: 24px; box-shadow: var(--shadow-lg); }
.cookie-settings-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; color: var(--text-color); }
.cookie-settings-header h2 { margin: 0; color: inherit; }
.cookie-close { background: none; border: none; color: var(--text-light); font-size: 24px; cursor: pointer; }
.cookie-category { margin-bottom: 14px; background: var(--bg-light); padding: 14px; border-radius: 6px; border: 1px solid var(--border-color); color: var(--text-color); }
.cookie-category-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cookie-category-header h3 { margin: 0; color: inherit; }
.cookie-category p { margin: 0; color: var(--text-light); font-size: 14px; }
.cookie-toggle { position: relative; width: 50px; height: 24px; display: inline-block; }
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-slider { position: absolute; inset: 0; border-radius: 24px; background: color-mix(in srgb, var(--text-light) 60%, var(--border-color)); transition: .25s; }
.cookie-slider:before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px; border-radius: 50%; background: #ffffff; transition: .25s; }
.cookie-toggle input:checked + .cookie-slider { background: var(--primary-color); }
.cookie-toggle input:checked + .cookie-slider:before { transform: translateX(26px); }
.cookie-settings-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.cookie-settings-buttons .cookie-btn-decline {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}
.cookie-settings-buttons .cookie-btn-decline:hover {
    border-color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}
.cookie-settings-buttons .cookie-btn-accept {
    background: var(--primary-color);
    color: var(--secondary-color);
}
.cookie-settings-buttons .cookie-btn-accept:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

/* Privacy request (DSAR) modal */
.footer-link-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}
.footer-link-btn:hover { text-decoration: underline; }
.privacy-request-cta {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}
.privacy-request-cta p { margin: 0 0 0.85rem; color: var(--text-light); }
.privacy-request-modal-content { max-width: 720px; }
.privacy-request-intro { margin: 0 0 1rem; color: var(--text-light); line-height: 1.6; }
.privacy-request-form .form-group { margin-bottom: 1rem; }
.privacy-request-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: var(--text-color);
}
.privacy-request-form .required { color: var(--primary-color); }
.privacy-request-form input,
.privacy-request-form select,
.privacy-request-form textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    color: var(--text-color);
    font: inherit;
}
.privacy-request-form input:focus,
.privacy-request-form select:focus,
.privacy-request-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 14%, transparent);
}
.privacy-request-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.privacy-request-cookies {
    margin: 1.25rem 0;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-light);
}
.privacy-request-cookies h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: var(--text-color);
}
.privacy-request-cookies-note {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}
.privacy-request-cookies-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}
.privacy-request-cookies-panel {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
}
.privacy-request-cookies-panel h4 {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light);
}
.privacy-request-cookie-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.privacy-request-cookie-list li {
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.88rem;
    line-height: 1.4;
}
.privacy-request-cookie-list li:last-child { border-bottom: none; }
.privacy-request-cookie-meta {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.08rem 0.35rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
    background: color-mix(in srgb, var(--primary-color) 10%, var(--bg-light));
}
.privacy-request-cookie-desc {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-light);
    font-size: 0.82rem;
}
.privacy-request-cookies-empty {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-light);
}
.privacy-request-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 1rem;
}
.privacy-request-feedback {
    margin-top: 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
    font-size: 0.92rem;
}
.privacy-request-feedback.is-success {
    background: color-mix(in srgb, #22c55e 16%, var(--bg-white));
    border: 1px solid color-mix(in srgb, #22c55e 35%, var(--border-color));
    color: var(--text-color);
}
.privacy-request-feedback.is-error {
    background: color-mix(in srgb, #ef4444 14%, var(--bg-white));
    border: 1px solid color-mix(in srgb, #ef4444 35%, var(--border-color));
    color: var(--text-color);
}
@media (max-width: 720px) {
    .privacy-request-cookies-grid { grid-template-columns: 1fr; }
    .privacy-request-actions { flex-direction: column-reverse; }
    .privacy-request-actions .btn { width: 100%; }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff5c5c;
    --primary-dark: #bb0000;
    --secondary-color: #0f172a;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f4f6ff;
    --bg-white: #ffffff;
    --border-color: #dbe2f1;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.16);
    --a11y-letter-spacing: 1;
    --a11y-line-spacing: 1;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    letter-spacing: calc((var(--a11y-letter-spacing) - 1) * 0.08em);
    line-height: calc(1.6 * var(--a11y-line-spacing));
}

body.accessibility-highlight-links a:not(.btn):not(.nav-user-menu-trigger):not(.nav-user-menu-link) {
    text-decoration: underline;
    text-decoration-thickness: 0.12em;
    text-decoration-color: color-mix(in srgb, var(--primary-color) 70%, #000 30%);
}

body.accessibility-hide-images img {
    visibility: hidden !important;
}

body.accessibility-stop-animations *,
body.accessibility-stop-animations *::before,
body.accessibility-stop-animations *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

body.accessibility-stop-animations .reveal {
    opacity: 1 !important;
    transform: none !important;
}

body.accessibility-reader-view {
    background: color-mix(in srgb, var(--bg-white) 92%, var(--primary-color) 8%);
}

body.accessibility-reader-view main,
body.accessibility-reader-view .container {
    max-width: 900px;
}

/* Reading guide: pointer/focus-following overlays (see script.js); above navbar (1000), below a11y panel (1200) */
#a11yReadingGuideBand {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 3rem;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1100;
    background: color-mix(in srgb, var(--primary-color) 18%, rgba(255, 255, 200, 0.35));
    border-top: 2px solid color-mix(in srgb, var(--primary-color) 55%, #1a1a1a 45%);
    border-bottom: 2px solid color-mix(in srgb, var(--primary-color) 55%, #1a1a1a 45%);
    box-shadow: 0 4px 24px color-mix(in srgb, var(--primary-color) 25%, rgba(0, 0, 0, 0.2));
}

body[data-theme="dark"] #a11yReadingGuideBand {
    background: color-mix(in srgb, var(--primary-color) 22%, rgba(0, 0, 0, 0.45));
    border-top-color: color-mix(in srgb, var(--primary-color) 70%, #fff 30%);
    border-bottom-color: color-mix(in srgb, var(--primary-color) 70%, #fff 30%);
}

#a11yReadingGuideSpotlight {
    position: fixed;
    left: 0;
    top: 0;
    width: min(72vw, 28rem);
    height: 8.5rem;
    margin: 0;
    padding: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1100;
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.52);
    border: 2px solid color-mix(in srgb, var(--primary-color) 75%, #fff 25%);
    background: transparent;
}

body[data-theme="dark"] #a11yReadingGuideSpotlight {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72);
    border-color: color-mix(in srgb, var(--primary-color) 85%, #fff 15%);
}

body.accessibility-cursor-black,
body.accessibility-cursor-black * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 2l13 9-6 1 2 8-3 1-2-8-4 4z'/%3E%3C/svg%3E") 2 2, auto !important;
}

body.accessibility-cursor-white,
body.accessibility-cursor-white * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' stroke='%23000' stroke-width='1' d='M3 2l13 9-6 1 2 8-3 1-2-8-4 4z'/%3E%3C/svg%3E") 2 2, auto !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Wraps nav + page + footer; visual filters apply here so fixed UI outside stays viewport-locked */
.site-filter-root {
    min-height: 100vh;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-image {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo a:hover .logo-image {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .logo-image {
        height: 40px;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .logo-subtitle {
        font-size: 0.75rem;
    }
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

@media (min-width: 969px) and (max-width: 1180px) {
    .nav-menu {
        gap: 1.25rem;
    }
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
}

/* Nav User Menu (combined profile, theme, language) */
.nav-user-menu-wrap {
    position: relative;
    margin-left: 0.5rem;
}

.nav-user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: var(--primary-color);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.nav-user-menu-trigger:hover {
    color: var(--primary-dark);
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.nav-user-menu-icon {
    flex-shrink: 0;
}

.nav-user-menu-username {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-menu-chevron {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.nav-user-menu-trigger[aria-expanded="true"] .nav-user-menu-chevron {
    transform: rotate(180deg);
}

.nav-user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: var(--bg-white);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
    border-radius: 10px;
    box-shadow: var(--shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.15));
    padding: 1rem;
    z-index: 1000;
    display: none;
}

.nav-user-menu-trigger[aria-expanded="true"] + .nav-user-menu-dropdown {
    display: block;
}

.nav-user-menu-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
}

.nav-user-menu-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.nav-user-menu-section:first-child {
    padding-top: 0;
}

.nav-user-menu-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light, #666);
    margin-bottom: 0.5rem;
}

.nav-user-menu-profile .nav-user-menu-link {
    display: block;
    padding: 0.5rem 0;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-user-menu-profile .nav-user-menu-link:hover {
    color: var(--primary-dark);
}

.nav-theme-a11y-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
}

.nav-user-menu-dropdown .nav-theme-a11y-row .nav-theme-wrap {
    margin-left: 0;
    flex: 1;
    min-width: 0;
}

.nav-accessibility-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    flex-shrink: 0;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    font-family: inherit;
}

.nav-accessibility-trigger:hover {
    color: var(--primary-dark);
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.nav-accessibility-trigger:focus {
    outline: none;
}

.nav-accessibility-trigger:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-site-inspector-trigger:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-accessibility-icon {
    display: block;
    flex-shrink: 0;
}

.nav-user-menu-dropdown .language-select {
    width: 100%;
}

body[data-theme="dark"] .nav-user-menu-dropdown {
    background: var(--bg-white);
    border-color: var(--border-color);
}

body[data-theme="dark"] .nav-user-menu-trigger {
    border-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .nav-accessibility-trigger {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Accessibility widget panel - matches site modals / nav menus / trays */
.accessibility-widget {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 92vw);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    background: var(--bg-white);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateX(102%);
    transition: transform 0.25s ease;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
}

.accessibility-widget.widget-size-large {
    width: min(520px, 96vw);
}

.accessibility-widget.widget-side-left {
    left: 0;
    right: auto;
    border-left: none;
    border-right: 1px solid var(--border-color);
    transform: translateX(-102%);
}

.accessibility-widget.is-open {
    transform: translateX(0);
}

.accessibility-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: var(--bg-light);
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.accessibility-widget-header-main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.55rem;
    min-width: 0;
}

.accessibility-widget-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
}

.accessibility-widget-shortcut-hint {
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-light);
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 28%, var(--border-color));
}

.accessibility-widget-close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--primary-color) 10%, var(--bg-white));
    color: var(--text-color);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.accessibility-widget-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
}

.accessibility-widget-close:focus {
    outline: none;
}

.accessibility-widget-close:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.accessibility-widget-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-white);
}

.accessibility-widget-section {
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
}

.accessibility-widget-section h3 {
    margin: 0;
    padding: 0.85rem 0.95rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.accessibility-widget-section .accessibility-chip-row,
.accessibility-widget-section .accessibility-tile-grid,
.accessibility-widget-section .accessibility-language-select {
    margin: 0 0.95rem 0.9rem;
}

.accessibility-tile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.accessibility-tile,
.accessibility-chip {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.accessibility-tile:hover,
.accessibility-chip:hover {
    border-color: color-mix(in srgb, var(--primary-color) 45%, var(--border-color));
    background: color-mix(in srgb, var(--primary-color) 10%, var(--bg-white));
}

.accessibility-tile {
    min-height: 74px;
    padding: 0.7rem 0.4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.accessibility-tile-label {
    line-height: 1.15;
}

.accessibility-option-dots {
    display: inline-flex;
    gap: 0.25rem;
}

.accessibility-option-dots span {
    width: 0.33rem;
    height: 0.33rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-light) 55%, transparent);
}

.accessibility-tile.is-active,
.accessibility-chip.is-active,
.accessibility-suboption.is-active {
    border-color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 14%, var(--bg-white));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-color) 55%, transparent);
}

.accessibility-tile.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.accessibility-tile.is-active .accessibility-option-dots span {
    background: var(--primary-color);
}

.accessibility-chip-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.accessibility-chip {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
}

.accessibility-language-select {
    width: 100%;
}

/* Collapsed: no layout box (avoids stray space; wins over any other display rules). */
.accessibility-suboptions:not(.is-visible) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Expanded: JS adds .is-visible and removes the hidden attribute. */
.accessibility-suboptions.is-visible {
    display: grid !important;
    visibility: visible !important;
    pointer-events: auto !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0 0.95rem 0.9rem;
    background: color-mix(in srgb, var(--primary-color) 8%, var(--bg-light));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.6rem;
}

.accessibility-suboptions-hint {
    grid-column: 1 / -1;
    margin: 0 0 0.15rem;
    padding: 0 0.1rem;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--text-light);
    font-weight: 400;
}

.accessibility-suboption {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    color: var(--text-color);
    min-height: 56px;
    padding: 0.55rem 0.4rem;
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.accessibility-suboption:hover {
    border-color: color-mix(in srgb, var(--primary-color) 45%, var(--border-color));
    background: color-mix(in srgb, var(--primary-color) 10%, var(--bg-white));
}

.accessibility-widget-footer {
    flex-shrink: 0;
    padding: 0.75rem 0.95rem 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

.accessibility-widget-reset {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--secondary-color);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s ease;
}

.accessibility-widget-reset:hover {
    background: var(--primary-dark);
}

.accessibility-widget-reset:active {
    transform: scale(0.99);
}

.accessibility-widget-reset:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

body[data-theme="dark"] .accessibility-widget {
    background: var(--bg-white);
    border-color: var(--border-color);
    box-shadow: var(--shadow-lg);
}

body[data-theme="dark"] .accessibility-widget-header,
body[data-theme="dark"] .accessibility-widget-footer {
    background: var(--bg-light);
    border-color: var(--border-color);
}

body[data-theme="dark"] .accessibility-widget-header h2,
body[data-theme="dark"] .accessibility-widget-close {
    color: var(--text-color);
}

body[data-theme="dark"] .accessibility-widget-close {
    background: color-mix(in srgb, var(--primary-color) 14%, var(--bg-white));
    border-color: var(--border-color);
}

body[data-theme="dark"] .accessibility-widget-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
}

body[data-theme="dark"] .accessibility-widget-shortcut-hint {
    color: var(--text-light);
    background: color-mix(in srgb, var(--primary-color) 16%, transparent);
    border-color: color-mix(in srgb, var(--primary-color) 35%, var(--border-color));
}

body[data-theme="dark"] .accessibility-widget-section {
    border-bottom-color: var(--border-color);
}

body[data-theme="dark"] .accessibility-widget-section h3,
body[data-theme="dark"] .accessibility-suboptions-hint {
    color: var(--text-light);
}

body[data-theme="dark"] .accessibility-tile,
body[data-theme="dark"] .accessibility-chip,
body[data-theme="dark"] .accessibility-suboption {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-color);
}

body[data-theme="dark"] .accessibility-tile:hover,
body[data-theme="dark"] .accessibility-chip:hover,
body[data-theme="dark"] .accessibility-suboption:hover {
    background: color-mix(in srgb, var(--primary-color) 14%, var(--bg-light));
    border-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
}

body[data-theme="dark"] .accessibility-tile.is-active,
body[data-theme="dark"] .accessibility-chip.is-active,
body[data-theme="dark"] .accessibility-suboption.is-active {
    background: color-mix(in srgb, var(--primary-color) 18%, var(--bg-light));
    border-color: var(--primary-color);
}

body[data-theme="dark"] .accessibility-suboptions.is-visible {
    background: color-mix(in srgb, var(--primary-color) 10%, var(--bg-light));
    border-color: var(--border-color);
}

body[data-theme="dark"] .accessibility-widget-reset {
    background: var(--primary-color);
    color: var(--secondary-color);
}

body[data-theme="dark"] .accessibility-widget-reset:hover {
    background: var(--primary-dark);
}

/* Language Selector (standalone – now mainly in user menu) */
.language-selector {
    margin-left: 2rem;
    position: relative;
}

.language-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--bg-white);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
}

.language-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.language-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.language-select option {
    padding: 0.5rem;
    font-weight: 500;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #312e81 100%);
    color: var(--bg-white);
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, color-mix(in srgb, var(--primary-color) 24%, transparent) 0%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s both;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.btn-secondary {
    background: transparent;
    color: var(--bg-white);
    border-color: var(--bg-white);
}

.btn-secondary:hover {
    background: var(--bg-white);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--bg-white);
    opacity: 0.7;
    animation: bounce 2s infinite;
    z-index: 1;
}

.hero-scroll-indicator span {
    font-size: 0.875rem;
}

/* Section Styles */
section {
    padding: 5rem 0;
    scroll-margin-top: 120px; /* Offset for fixed navbar when scrolling to anchor links */
}

/* Ensure all elements with IDs have scroll margin for anchor navigation */
[id] {
    scroll-margin-top: 120px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 300;
}

.portfolio-section-actions {
    margin-top: 2.75rem;
    text-align: center;
}

.portfolio-grid-heading {
    margin: 3.5rem 0 1.6rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--secondary-color);
    letter-spacing: 0.01em;
}

.portfolio-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
    gap: 2rem 2.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.portfolio-spotlight__media {
    min-width: 0;
}

.portfolio-spotlight__slider {
    position: relative;
}

.portfolio-spotlight__track {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--primary-color) 18%, transparent), transparent 55%),
        linear-gradient(160deg, color-mix(in srgb, var(--bg-light) 70%, var(--border-color)), var(--bg-light));
    border: 1px solid var(--border-color);
    aspect-ratio: 16 / 10;
}

.portfolio-spotlight__slide {
    margin: 0;
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.portfolio-spotlight__slide.is-active {
    position: relative;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.portfolio-spotlight__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.portfolio-spotlight__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.portfolio-spotlight__nav {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-color);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.portfolio-spotlight__nav:hover {
    border-color: color-mix(in srgb, var(--primary-color) 55%, var(--border-color));
    color: var(--primary-color);
    transform: translateY(-1px);
}

.portfolio-spotlight__dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
}

.portfolio-spotlight__dot {
    width: 0.55rem;
    height: 0.55rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-color) 28%, transparent);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.portfolio-spotlight__dot.is-active {
    width: 1.35rem;
    background: var(--primary-color);
}

.portfolio-spotlight__copy {
    min-width: 0;
}

.portfolio-spotlight__badge {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.portfolio-spotlight__title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.75rem, 2.4vw, 2.35rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--secondary-color);
}

.portfolio-spotlight__text {
    margin: 0 0 1.35rem;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text-color);
    max-width: 36rem;
}

.portfolio-spotlight__actions {
    margin-bottom: 1.25rem;
}

.portfolio-spotlight .service-tech-stack {
    justify-content: flex-start;
    margin-bottom: 0;
}

.page-home .services-grid--home .service-card,
.page-home .portfolio-spotlight {
    overflow: visible;
}

.page-home .services-grid--home .service-image {
    height: 260px;
}

.page-home .services-grid--home .service-description {
    font-size: 0.95rem;
    line-height: 1.55;
}

body[data-theme="dark"] .portfolio-spotlight__title,
body[data-theme="dark"] .portfolio-grid-heading {
    color: #fff;
}

body[data-theme="dark"] .portfolio-spotlight__track {
    background:
        radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--primary-color) 22%, transparent), transparent 55%),
        linear-gradient(160deg, #121212, #0a0a0a);
}

body[data-theme="dark"] .portfolio-spotlight__nav {
    background: #151515;
}

@media (max-width: 980px) {
    .portfolio-spotlight {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .page-home .services-grid--home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.page-home .portfolio-section-actions .btn-portfolio-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1.85rem;
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--secondary-color);
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 18px color-mix(in srgb, var(--primary-color) 32%, transparent);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.page-home .portfolio-section-actions .btn-portfolio-all:hover {
    color: var(--secondary-color);
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--primary-color) 38%, transparent);
}

/* About Section */
.about {
    background: var(--bg-white);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text .lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Services Section */
.services {
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 0;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--bg-light);
    display: block;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-card > .service-icon {
    margin-top: 1.5rem;
}

.service-card > *:not(.service-image) {
    padding: 0 2.5rem;
}

.service-card .service-description {
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 0.65rem;
    transition: color 0.3s ease;
}

.service-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.service-card > .service-link:last-child {
    margin-bottom: 2rem;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.service-tech-stack {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.45rem 0.55rem;
}

.service-tech-stack__item {
    margin: 0;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-tech-stack__btn {
    margin: 0;
    padding: 0.2rem;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border-radius: 6px;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.service-tech-stack__btn:hover,
.service-tech-stack__btn:focus-visible {
    background: color-mix(in srgb, var(--primary-color) 14%, transparent);
    outline: none;
}

.service-tech-stack__btn[aria-expanded="true"] {
    background: color-mix(in srgb, var(--primary-color) 22%, transparent);
}

.service-tech-stack__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.service-tech-stack__item img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    opacity: 0.9;
    transition: transform 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
}

.service-tech-stack__tip {
    position: absolute;
    left: 50%;
    top: calc(100% + 0.55rem);
    bottom: auto;
    transform: translateX(-50%);
    z-index: 20;
    min-width: 11rem;
    max-width: min(18rem, 70vw);
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
    box-shadow: var(--shadow);
    pointer-events: none;
}

.service-tech-stack__tip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--border-color);
}

body[data-theme="dark"] .service-tech-stack__tip {
    background: #151515;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.service-card:hover .service-tech-stack__item img {
    opacity: 1;
}

.page-home .service-card:hover .service-tech-stack__item img {
    transform: translateY(-1px);
}

.service-description {
    color: var(--text-light);
    line-height: 1.7;
}

/* History Section */
.history {
    background: var(--bg-white);
}

.history-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 3rem;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.9rem;
    top: 0;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--bg-white);
    box-shadow: 0 0 0 3px var(--primary-color);
    z-index: 2;
}

.timeline-year {
    position: absolute;
    left: -8.5rem;
    top: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    text-align: right;
    width: 4rem;
    transform: translateY(-2px);
}

.timeline-content {
    width: 100%;
}

.timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-light);
    line-height: 1.7;
}

/* History Gallery */
.history-gallery {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.history-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.history-image-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4/3;
}

.history-image-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.history-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-images-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.history-images-section h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.history-images-section > p {
    margin-bottom: 2rem;
    color: var(--text-light);
}

/* FAQ Section */
.faq {
    background: var(--bg-white);
    padding: 5rem 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: var(--bg-white);
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.faq-question[aria-expanded="true"] {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: var(--bg-light);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 1.5rem;
}

.faq-answer p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

/* Contact Section */
.contact {
    background: var(--bg-light);
}

.icon-sprite-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    width: 2rem;
    height: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--text-light);
    line-height: 1.7;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-form-wrapper {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: var(--bg-white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 0.75fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section-wide {
    grid-column: span 1;
}

.footer-section-thin {
    grid-column: span 1;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    margin: -0.35rem 0 0.75rem;
    letter-spacing: 0.02em;
}

.footer-lead {
    margin-bottom: 0;
}

.footer-stack {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.72rem;
    line-height: 1.65;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 1.25rem;
    word-break: break-word;
}

.footer-subheading {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.footer-focus-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-focus-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.45;
}

.footer-focus-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 1px;
    background: var(--primary-color);
}

.social-none {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

/* Social Media */
.social-media {
    margin-top: 1.5rem;
}

.social-media h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.trust-badge {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.trust-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.trust-badge-icon {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.trust-badge-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.trust-badge-text strong {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
}

.trust-badge-text span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    line-height: 1.4;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.5rem;
    max-width: 100%;
}

.footer-links a,
.footer-links .footer-link-btn {
    white-space: nowrap;
}

.footer-links span {
    color: rgba(255, 255, 255, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--bg-white);
    margin: auto;
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-light);
}

.modal-header h2 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 1.75rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--secondary-color);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body h3 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.modal-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: var(--text-light);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2d2d2d 100%);
    color: var(--bg-white);
    /* Padding (not margin) so the gradient fills the band under the fixed navbar  -  avoids a white strip from body background */
    padding: calc(70px + 8rem) 0 4rem;
    text-align: center;
    margin-top: 0;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Service Details Page */
.service-details {
    padding: 5rem 0;
    background: var(--bg-white);
}

.service-detail-section {
    margin-bottom: 5rem;
    scroll-margin-top: 120px; /* Offset for fixed navbar when scrolling to anchor links */
}

.service-detail-section:last-child {
    margin-bottom: 0;
}

.service-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.service-detail-content.reverse {
    direction: rtl;
}

.service-detail-content.reverse > * {
    direction: ltr;
}

.service-detail-content-wide {
    max-width: 100%;
    margin: 0;
}

.service-detail-text-wide {
    width: 100%;
    max-width: 100%;
}

.service-detail-text-wide h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.service-detail-text-wide p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-detail-text-wide ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-detail-text-wide li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.service-detail-image {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.service-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-detail-text h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.service-detail-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-detail-text ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-detail-text li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.service-detail-text .lead {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-detail-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.service-detail-text h3:first-of-type {
    margin-top: 0;
}

/* CTA Section */
.cta-section {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 5rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    aspect-ratio: 4/3;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: var(--bg-white);
    font-weight: 600;
    z-index: 1;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-title {
    transform: translateY(0);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-title {
    color: var(--bg-white);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    text-align: center;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-top: 0.5rem;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3001;
    padding: 0;
}

.lightbox-close svg {
    flex-shrink: 0;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3001;
    padding: 0;
}

.lightbox-prev svg,
.lightbox-next svg {
    flex-shrink: 0;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}


@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Emergency Contact Button */
.emergency-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 40%, transparent);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.emergency-button:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-color) 60%, transparent);
}

.emergency-button svg {
    width: 24px;
    height: 24px;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 40%, transparent);
    }
    50% {
        box-shadow: 0 4px 25px color-mix(in srgb, var(--primary-color) 60%, transparent);
    }
}

button.emergency-button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

@media (max-width: 768px) {
    .emergency-button {
        bottom: 20px;
        right: 20px;
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .emergency-button span {
        display: none;
    }
    
    .emergency-button {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        justify-content: center;
        padding: 0;
    }
}

/* Emergency Call Overlay (popup before calling) */
.emergency-overlay {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.emergency-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.emergency-overlay-content {
    position: relative;
    background: var(--bg-color, #fff);
    color: var(--text-color, #1a1a1a);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 320px;
    width: 100%;
    text-align: center;
}

.emergency-overlay-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.emergency-overlay-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: 0.05em;
}

.emergency-overlay-call {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--primary-color);
    color: var(--secondary-color);
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: background 0.2s, transform 0.2s;
}

.emergency-overlay-call:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.emergency-overlay-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color-muted, #666);
    line-height: 1;
    padding: 0;
}

.emergency-overlay-close:hover {
    color: var(--text-color, #1a1a1a);
}

body[data-theme="dark"] .emergency-overlay-content {
    background: var(--admin-bg-card, #2a2a2a);
    color: var(--admin-text, #f0f0f0);
}

body[data-theme="dark"] .emergency-overlay-close {
    color: var(--admin-text-muted, #999);
}

body[data-theme="dark"] .emergency-overlay-close:hover {
    color: var(--admin-text, #f0f0f0);
}

/* Lazy Loading Images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* About Page Styles */
.about-page-content {
    padding: 5rem 0;
}

.about-page-section {
    margin-bottom: 4rem;
}

.about-page-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.about-page-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.about-page-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.about-page-section li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.about-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.about-image-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        padding: 1rem 0;
    }

    .nav-user-menu-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-left: 0;
        margin-top: 0.5rem;
        padding-left: 1rem;
        padding-right: 1rem;
        box-sizing: border-box;
    }

    .nav-user-menu-trigger {
        padding: 0.5rem 1rem;
        margin: 0 auto;
    }

    .nav-user-menu-username {
        max-width: 100px;
    }

    .nav-user-menu-dropdown {
        min-width: 200px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .social-media {
        margin-top: 1.5rem;
    }

    .trust-badges {
        margin-top: 1rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-links {
        justify-content: center;
        width: 100%;
    }

    .footer-links span {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .page-home .services-grid--home {
        grid-template-columns: 1fr;
    }

    .page-home .services-grid--home .service-image {
        height: 230px;
    }

    .portfolio-spotlight__title {
        font-size: 1.7rem;
    }

    .history-timeline {
        padding-left: 2rem;
    }

    .history-timeline::before {
        left: 0;
    }

    .timeline-item {
        padding-left: 2rem;
    }

    .timeline-year {
        position: static;
        width: 100%;
        text-align: left;
        padding-right: 0;
        margin-bottom: 0.5rem;
        padding-left: 0;
        left: auto;
        transform: none;
    }

    .timeline-item::before {
        left: 0;
        transform: translateX(-160%);
    }

    .timeline-content {
        width: 100%;
        padding-top: 0.5rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1.1rem;
    }

    .service-detail-content {
        grid-template-columns: 1fr;
    }

    .service-detail-content.reverse {
        direction: ltr;
    }

    .service-detail-image {
        height: 300px;
    }

    .service-detail-text h2 {
        font-size: 1.75rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .about-image-grid {
        grid-template-columns: 1fr;
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    .cta-section p {
        font-size: 1.1rem;
    }

    .history-images-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .faq-question {
        font-size: 1rem;
        padding: 1.25rem;
    }

    .faq-item.active .faq-answer {
        padding: 1.25rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .lightbox-content img {
        max-height: 75vh;
    }

    .lightbox-title {
        font-size: 1rem;
        margin-top: 1rem;
    }

    .lightbox-counter {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }
}

/* Demo/Maintenance Overlay */
.demo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.demo-overlay.active {
    opacity: 1;
    visibility: visible;
}

.demo-overlay-content {
    background: var(--bg-white);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.demo-overlay.active .demo-overlay-content {
    transform: scale(1);
}

.demo-overlay-header h2 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.demo-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.demo-overlay-body {
    color: var(--text-color);
}

.demo-overlay-body > p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.demo-link {
    display: inline-block;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 2.5rem;
    transition: color 0.3s ease;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.25rem;
}

.demo-link:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-color);
}

.demo-password-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.demo-password-section label {
    display: block;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.demo-password-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.demo-password-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.demo-submit-btn {
    width: 100%;
    padding: 0.875rem 2rem;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    font-family: inherit;
}

.demo-submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.demo-submit-btn:active {
    transform: translateY(0);
}

.demo-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    font-weight: 500;
}

/* Maintenance mode styling (can be activated later) */
.demo-overlay.maintenance-mode .demo-overlay-header h2 {
    color: var(--primary-color);
}

.demo-overlay.maintenance-mode .demo-subtitle {
    color: var(--text-color);
}

@media (max-width: 768px) {
    .demo-overlay-content {
        padding: 2rem 1.5rem;
    }

    .demo-overlay-header h2 {
        font-size: 1.5rem;
    }

    .demo-link {
        font-size: 1.1rem;
    }
}

/* ========== Theme toggle (navbar) ========== */
.nav-theme-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.nav-theme-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.nav-theme-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--border-color);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.nav-theme-toggle:hover {
    background: var(--text-light);
}

.nav-theme-toggle:focus {
    outline: none;
}

.nav-theme-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-theme-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

body[data-theme="dark"] .nav-theme-toggle {
    background: #555;
}

body[data-theme="dark"] .nav-theme-toggle:hover {
    background: #666;
}

body[data-theme="dark"] .nav-theme-toggle .nav-theme-slider {
    transform: translateX(20px);
}

body[data-theme="dark"] .nav-theme-label {
    color: var(--text-light);
}

/* ========== Dark mode (front-end) ========== */
/* --secondary-color unchanged (same as light mode) */
body[data-theme="dark"] {
    color-scheme: dark;
    background: #050505;
    /* --primary-color / --primary-dark: inherit from :root (e.g. admin theme in header.php) */
    --text-color: #e4e4e7;
    --text-light: #a1a1aa;
    --bg-light: #121212;
    --bg-white: #050505;
    --border-color: #272727;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.65);
}

body[data-theme="light"] {
    color-scheme: light;
}

/* Cookie banner: keep light text on dark bar (do not use --bg-white; it flips in dark mode) */
body[data-theme="dark"] .cookie-banner {
    --cookie-fg: #f4f4f5;
    --cookie-fg-muted: rgba(228, 228, 231, 0.88);
    --cookie-border: var(--border-color);
    background: #0a0a0a;
    color: var(--cookie-fg);
}
body[data-theme="dark"] .cookie-banner .cookie-link {
    color: var(--primary-color);
}
body[data-theme="dark"] .cookie-banner .cookie-btn-accept {
    color: #0a0a0a;
}
body[data-theme="dark"] .cookie-banner .cookie-btn-accept:hover {
    color: #ffffff;
}

/* Hero: keep light text and buttons in dark mode */
body[data-theme="dark"] .hero,
body[data-theme="dark"] .hero .hero-title,
body[data-theme="dark"] .hero .hero-subtitle,
body[data-theme="dark"] .hero .hero-scroll-indicator {
    color: #ffffff;
}

body[data-theme="dark"] .hero .hero-buttons .btn-secondary {
    color: #ffffff;
    border-color: #ffffff;
}

body[data-theme="dark"] .hero .hero-buttons .btn-secondary:hover {
    background: #ffffff;
    color: #1a1a1a;
}

/* Forside: section-title og section-subtitle hvid i dark mode */
body[data-theme="dark"] .section-title,
body[data-theme="dark"] h2.section-title {
    color: #ffffff;
}

body[data-theme="dark"] .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* Nav logo titel, history-images-section h3, service-detail-text h2 – hvid i dark mode */
body[data-theme="dark"] .nav-wrapper h1 {
    color: #ffffff;
}

body[data-theme="dark"] .history-images-section h3 {
    color: #ffffff;
}

/* Services page: service-detail-text hvid i dark mode */
body[data-theme="dark"] .service-card .service-title {
    color: var(--text-color);
}

body[data-theme="dark"] .service-card .service-description {
    color: var(--text-light);
}

body[data-theme="dark"] .service-card {
    background: #0c0c0c;
    border-color: var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body[data-theme="dark"] .about {
    background: var(--bg-light);
}

body[data-theme="dark"] .history {
    background: var(--bg-white);
}

body[data-theme="dark"] .service-detail-text h2,
    body[data-theme="dark"] .service-detail-text h3,
    body[data-theme="dark"] .service-detail-text .lead {
    color: #ffffff;
}

body[data-theme="dark"] .service-detail-text p,
body[data-theme="dark"] .service-detail-text li {
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .service-detail-text-wide h2,
body[data-theme="dark"] .service-detail-text-wide h3,
body[data-theme="dark"] .service-detail-text-wide .lead {
    color: #ffffff;
}

body[data-theme="dark"] .service-detail-text-wide p,
body[data-theme="dark"] .service-detail-text-wide li {
    color: rgba(255, 255, 255, 0.9);
}

/* Language select dark mode */
body[data-theme="dark"] .language-select {
    background: var(--bg-white);
    border-color: var(--border-color);
    color: var(--text-color);
}

body[data-theme="dark"] .language-select option {
    background: var(--bg-white);
    color: var(--text-color);
}

/* Emergency button stays visible in dark mode */
body[data-theme="dark"] .emergency-button {
    background: var(--primary-color);
    color: #1a1a1a;
}

body[data-theme="dark"] .emergency-button:hover {
    background: var(--primary-dark);
}

/* Modal overlay dark mode */
body[data-theme="dark"] .modal-content {
    background: var(--bg-white);
    border-color: var(--border-color);
}

body[data-theme="dark"] .modal-header,
body[data-theme="dark"] .modal-body {
    border-color: var(--border-color);
}

body[data-theme="dark"] .modal-header h2,
body[data-theme="dark"] .modal-body h3,
body[data-theme="dark"] .modal-body p,
body[data-theme="dark"] .modal-body li {
    color: var(--text-color);
}

body[data-theme="dark"] .modal-close {
    color: var(--text-color);
}

body[data-theme="dark"] .modal-close:hover {
    color: var(--primary-color);
}

/* Demo overlay dark mode */
body[data-theme="dark"] .demo-overlay-content {
    background: var(--bg-white);
    border-color: var(--border-color);
}

body[data-theme="dark"] .demo-overlay-header h2,
body[data-theme="dark"] .demo-overlay-body p,
body[data-theme="dark"] .demo-password-section label {
    color: var(--text-color);
}

body[data-theme="dark"] .demo-subtitle {
    color: var(--text-light);
}

body[data-theme="dark"] .demo-password-input {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-color);
}

/* Footer in dark mode: near-black bar */
body[data-theme="dark"] .footer {
    background: #020202;
    color: #d4d4d8;
    border-top: 1px solid var(--border-color);
}

body[data-theme="dark"] .footer-section p,
body[data-theme="dark"] .footer-tagline,
body[data-theme="dark"] .footer-focus-list li {
    color: rgba(228, 228, 231, 0.78);
}

body[data-theme="dark"] .footer-stack {
    color: rgba(161, 161, 170, 0.95);
}

body[data-theme="dark"] .footer-section a,
body[data-theme="dark"] .footer-bottom a {
    color: rgba(228, 228, 231, 0.75);
}

body[data-theme="dark"] .footer-section a:hover,
body[data-theme="dark"] .footer-bottom a:hover {
    color: var(--primary-color);
}

body[data-theme="dark"] .social-links a {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(228, 228, 231, 0.85);
}

body[data-theme="dark"] .social-links a:hover {
    background: var(--primary-color);
    color: #0a0a0a;
}

body[data-theme="dark"] .footer-bottom {
    border-top-color: var(--border-color);
}

body[data-theme="dark"] .footer-bottom p {
    color: rgba(161, 161, 170, 0.9);
}

/* Kontakt og FAQ – hvid tekst i dark mode (kun disse sektioner) */
body[data-theme="dark"] .contact .section-title,
body[data-theme="dark"] .contact .section-subtitle,
body[data-theme="dark"] .contact .contact-details h3,
body[data-theme="dark"] .contact .contact-details p {
    color: #ffffff;
}

body[data-theme="dark"] .contact .form-group label {
    color: rgba(255, 255, 255, 0.9);
}

/* Privacy request form labels (DSAR) – ensure white text in dark mode */
body[data-theme="dark"] .privacy-request-form label {
    color: #ffffff !important;
}

body[data-theme="dark"] .faq .section-title,
body[data-theme="dark"] .faq .section-subtitle,
body[data-theme="dark"] .faq .faq-question {
    color: #ffffff;
}

body[data-theme="dark"] .faq .faq-answer p {
    color: rgba(255, 255, 255, 0.85);
}

/* FAQ expanded: keep accent readable on near-black UI */
body[data-theme="dark"] .faq .faq-question[aria-expanded="true"] {
    color: #0a0a0a;
}

/* Contact form inputs in dark mode */
body[data-theme="dark"] .form-group input,
body[data-theme="dark"] .form-group textarea {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-color);
}

/* ========== Gallery dark mode ========== */
body[data-theme="dark"] section.gallery {
    background: var(--bg-light);
}

body[data-theme="dark"] .gallery-item {
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

body[data-theme="dark"] .gallery-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .gallery-item::after {
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent 50%);
}

body[data-theme="dark"] .gallery-item-title {
    color: #ffffff;
}

/* ========== About (Om os) dark mode ========== */
/* .page-header: keep text white in dark mode */
body[data-theme="dark"] .page-header,
body[data-theme="dark"] .page-header h1,
body[data-theme="dark"] .page-header p {
    color: #ffffff;
}

body[data-theme="dark"] .about-page-content {
    background: var(--bg-light);
    color: #ffffff;
}

body[data-theme="dark"] .about-page-section h2 {
    color: #ffffff;
}

body[data-theme="dark"] .about-page-section p,
body[data-theme="dark"] .about-page-section li {
    color: rgba(255, 255, 255, 0.85);
}

body[data-theme="dark"] .about-page-section li strong {
    color: #ffffff;
}

body[data-theme="dark"] .about-image-item {
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Timeline (historie) – dot border so it stands out on dark bg */
body[data-theme="dark"] .timeline-item::before {
    border-color: var(--bg-light);
    box-shadow: 0 0 0 2px var(--primary-color);
}

body[data-theme="dark"] .history-image-item {
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

body[data-theme="dark"] .history-image-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Lightbox: keep controls visible in dark mode */
body[data-theme="dark"] .lightbox-title,
body[data-theme="dark"] .lightbox-close,
body[data-theme="dark"] .lightbox-prev,
body[data-theme="dark"] .lightbox-next {
    color: #ffffff;
}

@media (max-width: 768px) {
    .nav-theme-wrap .nav-theme-label {
        display: none;
    }
}

/* ========== Dark navbar (site-wide when theme is dark) ========== */
body[data-theme="dark"] .navbar {
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.5);
}

body[data-theme="dark"] .mobile-menu-toggle span {
    background: #e5e7eb;
}

body[data-theme="dark"] .nav-link {
    color: #e5e7eb;
}

body[data-theme="dark"] .logo-subtitle {
    color: var(--text-light);
}

/* ========== Homepage: developer aesthetic & motion ========== */
:root {
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@keyframes hero-aurora {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    33% { transform: translate(4%, -3%) scale(1.05); opacity: 0.65; }
    66% { transform: translate(-3%, 4%) scale(0.98); opacity: 0.45; }
}

@keyframes hero-grid-drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(80px); }
}

@keyframes hero-cursor-blink {
    0%, 45% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes hero-badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-color) 45%, transparent); }
    50% { box-shadow: 0 0 0 6px transparent; }
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.page-home .services-grid .service-card.reveal:nth-child(1) { transition-delay: 0ms; }
.page-home .services-grid .service-card.reveal:nth-child(2) { transition-delay: 55ms; }
.page-home .services-grid .service-card.reveal:nth-child(3) { transition-delay: 110ms; }
.page-home .services-grid .service-card.reveal:nth-child(4) { transition-delay: 165ms; }
.page-home .services-grid .service-card.reveal:nth-child(5) { transition-delay: 220ms; }
.page-home .services-grid .service-card.reveal:nth-child(6) { transition-delay: 275ms; }
.page-home .services-grid .service-card.reveal:nth-child(7) { transition-delay: 330ms; }
.page-home .services-grid .service-card.reveal:nth-child(8) { transition-delay: 385ms; }
.page-home .services-grid .service-card.reveal:nth-child(9) { transition-delay: 440ms; }

.page-home .history-timeline .timeline-item.reveal:nth-child(1) { transition-delay: 0ms; }
.page-home .history-timeline .timeline-item.reveal:nth-child(2) { transition-delay: 70ms; }
.page-home .history-timeline .timeline-item.reveal:nth-child(3) { transition-delay: 140ms; }
.page-home .history-timeline .timeline-item.reveal:nth-child(4) { transition-delay: 210ms; }
.page-home .history-timeline .timeline-item.reveal:nth-child(5) { transition-delay: 280ms; }

.page-home .faq-container .faq-item.reveal:nth-child(1) { transition-delay: 0ms; }
.page-home .faq-container .faq-item.reveal:nth-child(2) { transition-delay: 50ms; }
.page-home .faq-container .faq-item.reveal:nth-child(3) { transition-delay: 100ms; }
.page-home .faq-container .faq-item.reveal:nth-child(4) { transition-delay: 150ms; }
.page-home .faq-container .faq-item.reveal:nth-child(5) { transition-delay: 200ms; }
.page-home .faq-container .faq-item.reveal:nth-child(6) { transition-delay: 250ms; }

/* Dev hero */
.page-home .hero--dev {
    background: linear-gradient(155deg, #020202 0%, #0a0a0a 38%, #12121a 100%);
    position: relative;
}

body[data-theme="dark"] .page-home .hero--dev {
    background: linear-gradient(155deg, #000000 0%, #060606 40%, #0f0f14 100%);
}

.page-home .hero-background--faint {
    opacity: 0.12;
    filter: saturate(0.65) contrast(1.05);
}

.page-home .hero-overlay--dev {
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, color-mix(in srgb, var(--primary-color) 22%, transparent), transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 75%, rgba(99, 102, 241, 0.18), transparent 50%);
}

.page-home .hero-aurora {
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 30% 40%, color-mix(in srgb, var(--primary-color) 35%, transparent), transparent 42%),
        radial-gradient(circle at 70% 60%, rgba(56, 189, 248, 0.12), transparent 40%);
    animation: hero-aurora 18s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.page-home .hero-grid-motion {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 45%, black 10%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 45%, black 10%, transparent 70%);
    animation: hero-grid-drift 22s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
}

.page-home .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.8s ease both;
}

.page-home .hero-content--dev {
    max-width: 44rem;
}

.page-home .hero-name {
    margin: 0 0 0.85rem;
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    background: linear-gradient(120deg, #fff 0%, rgba(255, 255, 255, 0.88) 45%, color-mix(in srgb, var(--primary-color) 90%, #fff) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: fadeInUp 0.85s ease 0.04s both;
}

.page-home .hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: hero-badge-pulse 2.4s ease-out infinite;
}

.page-home .hero--dev .hero-title {
    font-size: clamp(1.35rem, 3.2vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin-bottom: 1rem;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: rgba(248, 250, 252, 0.96);
    animation: fadeInUp 0.85s ease 0.08s both;
}

.page-home .hero--dev .hero-subtitle {
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    font-weight: 400;
    max-width: 38rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
    color: rgba(226, 232, 240, 0.92);
    animation: fadeInUp 0.85s ease 0.12s both;
}

.page-home .hero-console {
    max-width: 520px;
    margin: 1.75rem auto 0;
    text-align: left;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.2),
        0 20px 50px rgba(0, 0, 0, 0.35);
    animation: fadeInUp 0.9s ease 0.18s both;
}

.page-home .hero-console-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: rgba(12, 12, 14, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-home .hero-console-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #475569;
}
.page-home .hero-console-dot:nth-child(1) { background: #f87171; }
.page-home .hero-console-dot:nth-child(2) { background: #fbbf24; }
.page-home .hero-console-dot:nth-child(3) { background: #4ade80; }

.page-home .hero-console-title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.95);
    letter-spacing: 0.04em;
}

.page-home .hero-console-open {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.page-home .hero-console-open:hover,
.page-home .hero-console-open:focus-visible {
    color: #cbd5e1;
    text-decoration: underline;
}

.page-home .hero-console-body {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.6;
    padding: 1rem 1rem 1.15rem;
    background: rgba(0, 0, 0, 0.88);
    color: #e4e4e7;
}

.page-home .hero-console-prompt {
    color: #4ade80;
    margin-right: 0.35rem;
}

.page-home .hero-console-cmd {
    color: #93c5fd;
}

.page-home .hero-console-cursor {
    display: inline-block;
    width: 0.55rem;
    height: 1.1em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: var(--primary-color);
    animation: hero-cursor-blink 1s step-end infinite;
}

.hero-terminal-modal {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: none;
    pointer-events: none;
}

.hero-terminal-modal.active {
    display: block;
}

.hero-terminal-dialog {
    position: fixed;
    top: 8vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(760px, calc(100vw - 2rem));
    height: min(68vh, 560px);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    overflow: hidden;
    background: #020617;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    isolation: isolate;
}

.hero-terminal-matrix {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    transition: opacity .35s ease;
    mix-blend-mode: screen;
}

.hero-terminal-matrix.is-active {
    opacity: .5;
}

.hero-terminal-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem .9rem;
    background: #0b1220;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    position: relative;
    z-index: 3;
}

.hero-terminal-dots { display: flex; gap: .4rem; }
.hero-terminal-dots .hero-console-dot {
    border: 0;
    cursor: pointer;
}
.hero-console-dot--red { background: #f87171; }
.hero-console-dot--yellow { background: #fbbf24; }
.hero-console-dot--green { background: #4ade80; }
.hero-terminal-header { cursor: move; user-select: none; }
.hero-terminal-header h3 { pointer-events: none; }
.hero-terminal-header h3 {
    margin: 0;
    font-size: .78rem;
    letter-spacing: .04em;
    color: #94a3b8;
    font-family: var(--font-mono);
}
.hero-terminal-output {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: .86rem;
    line-height: 1.6;
    color: #e2e8f0;
    position: relative;
    z-index: 1;
}
.hero-terminal-line { margin: 0 0 .3rem; white-space: pre-wrap; word-break: break-word; }
.hero-terminal-line--dim { color: #94a3b8; }
.hero-terminal-line--ok { color: #4ade80; }
.hero-terminal-line--err { color: #fca5a5; }
.hero-terminal-line code { color: #93c5fd; }
.hero-terminal-pre { margin: .15rem 0 .55rem; color: #cbd5e1; }
.hero-terminal-input-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem .9rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    background: #050b16;
    position: relative;
    z-index: 1;
}
.hero-terminal-prompt {
    color: #4ade80;
    font-family: var(--font-mono);
    font-size: .86rem;
}
.hero-terminal-input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: .86rem;
}

.hero-terminal-dialog.is-fullscreen {
    top: 72px !important;
    left: 0 !important;
    transform: none !important;
    width: 100vw !important;
    height: calc(100vh - 72px) !important;
    border-radius: 0;
}

/* Mobile: sheet below fixed navbar so chrome/close stay usable */
.hero-terminal-dialog.is-mobile-sheet {
    top: 72px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    height: calc(100vh - 72px) !important;
    height: calc(100dvh - 72px) !important;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
}

.hero-terminal-dialog.is-mobile-sheet .hero-terminal-header {
    cursor: default;
    padding: 0.75rem 0.9rem;
    gap: 0.65rem;
}

.hero-terminal-dialog.is-mobile-sheet #heroTerminalDotRestore,
.hero-terminal-dialog.is-mobile-sheet #heroTerminalDotFullscreen {
    display: none;
}

.hero-terminal-dialog.is-mobile-sheet .hero-terminal-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.9);
    color: #e2e8f0;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.hero-terminal-dialog.is-mobile-sheet .hero-terminal-header h3 {
    font-size: 0.72rem;
    margin-right: 0.5rem;
}

.hero-terminal-dialog.is-mobile-sheet .hero-terminal-input,
.hero-terminal-dialog.is-mobile-sheet .hero-terminal-prompt {
    font-size: 1rem;
}

.hero-terminal-dialog.is-mobile-sheet .hero-terminal-input-row {
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
}

.hero-terminal-dialog.is-mobile-sheet.is-matrix {
    animation: none;
}

.hero-terminal-close-btn {
    display: none;
}

.hero-terminal-dialog.is-matrix .hero-terminal-matrix {
    opacity: .5;
}

.hero-terminal-dialog.is-matrix {
    animation: hero-terminal-glitch .18s steps(2, end) infinite;
}

.hero-terminal-dialog.is-matrix .hero-terminal-output,
.hero-terminal-dialog.is-matrix .hero-terminal-input-row,
.hero-terminal-dialog.is-matrix .hero-terminal-header {
    background: rgba(2, 6, 23, 0.82);
}

@keyframes hero-terminal-glitch {
    0% { transform: translate(0, 0); filter: hue-rotate(0deg); }
    20% { transform: translate(1px, -1px); filter: hue-rotate(12deg); }
    40% { transform: translate(-1px, 1px); filter: hue-rotate(-10deg); }
    60% { transform: translate(1px, 1px); filter: hue-rotate(8deg); }
    80% { transform: translate(-1px, -1px); filter: hue-rotate(-8deg); }
    100% { transform: translate(0, 0); filter: hue-rotate(0deg); }
}

.page-home .hero-stack {
    margin-top: 1.25rem;
    animation: fadeInUp 0.9s ease 0.22s both;
    position: relative;
    z-index: 5;
}

.page-home .hero-stack .service-tech-stack {
    margin: 0;
    justify-content: center;
    gap: 0.55rem 0.7rem;
}

.page-home .hero-stack .service-tech-stack__item {
    z-index: 1;
}

.page-home .hero-stack .service-tech-stack__item:has(.service-tech-stack__btn[aria-expanded="true"]) {
    z-index: 6;
}

.page-home .hero-stack .service-tech-stack__tip {
    top: auto;
    bottom: calc(100% + 0.55rem);
    z-index: 30;
}

.page-home .hero-stack .service-tech-stack__tip::after {
    top: 100%;
    bottom: auto;
    border-bottom-color: transparent;
    border-top-color: var(--border-color);
}

.page-home .hero-stack .service-tech-stack__item img {
    width: 30px;
    height: 30px;
    opacity: 0.88;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.page-home .hero-stack .service-tech-stack__btn:hover img,
.page-home .hero-stack .service-tech-stack__btn:focus-visible img,
.page-home .hero-stack .service-tech-stack__btn[aria-expanded="true"] img {
    opacity: 1;
    transform: translateY(-1px);
}

body[data-theme="light"] .page-home .hero-stack .service-tech-stack__item img {
    filter: none;
    opacity: 0.92;
}

.page-home .hero--dev .hero-buttons {
    margin-top: 2rem;
    animation: fadeInUp 0.9s ease 0.28s both;
    position: relative;
    z-index: 1;
}

.page-home .hero--dev .btn-primary {
    box-shadow: 0 0 24px color-mix(in srgb, var(--primary-color) 35%, transparent);
}

.page-home .hero--dev .btn-primary:hover {
    box-shadow: 0 0 32px color-mix(in srgb, var(--primary-color) 50%, transparent);
}

/* Light theme: hero still readable */
body[data-theme="light"] .page-home .hero--dev {
    background: linear-gradient(155deg, #f1f5f9 0%, #e0e7ff 45%, #f8fafc 100%);
    color: #0f172a;
}

body[data-theme="light"] .page-home .hero-background--faint {
    opacity: 0.08;
}

body[data-theme="light"] .page-home .hero-overlay--dev {
    background:
        radial-gradient(ellipse 80% 60% at 25% 15%, color-mix(in srgb, var(--primary-color) 18%, transparent), transparent 55%),
        radial-gradient(ellipse 70% 50% at 80% 80%, rgba(99, 102, 241, 0.12), transparent 50%);
}

body[data-theme="light"] .page-home .hero-aurora {
    opacity: 0.35;
}

body[data-theme="light"] .page-home .hero-grid-motion {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.4) 1px, transparent 1px);
}

body[data-theme="light"] .page-home .hero-badge {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] .page-home .hero-name {
    background: linear-gradient(120deg, #0f172a 0%, #334155 50%, color-mix(in srgb, var(--primary-color) 75%, #0f172a) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body[data-theme="light"] .page-home .hero--dev .hero-title {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: #0f172a;
}

body[data-theme="light"] .page-home .hero--dev .hero-subtitle {
    color: #475569;
}

body[data-theme="light"] .page-home .hero--dev .hero-scroll-indicator {
    color: #475569;
}

body[data-theme="light"] .page-home .hero--dev .btn-secondary {
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.35);
}

body[data-theme="light"] .page-home .hero--dev .btn-secondary:hover {
    background: #0f172a;
    color: #f8fafc;
}

/* Section surfaces (homepage) */
.page-home .about--dev {
    position: relative;
}

.page-home .about-content--portrait {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 2.75rem 3.25rem;
    align-items: center;
    max-width: 1040px;
}

.page-home .about-portrait {
    margin: 0;
    justify-self: center;
}

.page-home .about-portrait img {
    display: block;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 18px;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--border-color) 80%, transparent),
        0 18px 40px rgba(15, 23, 42, 0.14);
}

body[data-theme="dark"] .page-home .about-portrait img {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 22px 48px rgba(0, 0, 0, 0.45);
}

.page-home .about-content--portrait .about-text {
    min-width: 0;
}

.page-home .about-content--portrait .about-stats {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top-width: 1px;
    gap: 1.25rem 1.5rem;
    align-items: start;
}

.page-home .about-content--portrait .stat-item {
    text-align: left;
}

.page-home .about-content--portrait .stat-number {
    font-size: clamp(1.85rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
    white-space: nowrap;
}

.page-home .about-content--portrait .stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text-light);
}

.page-home .experience--dev {
    position: relative;
    background: color-mix(in srgb, var(--bg-light) 88%, var(--primary-color) 4%);
}

body[data-theme="dark"] .page-home .experience--dev {
    background: color-mix(in srgb, #0a0a0c 92%, var(--primary-color) 3%);
}

.page-home .experience-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 860px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.page-home .experience-item {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
    gap: 1rem 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
}

.page-home .experience-item:last-child {
    border-bottom: 1px solid var(--border-color);
}

.page-home .experience-item__role {
    margin: 0 0 0.3rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--primary-color) 70%, var(--text-light));
    letter-spacing: -0.02em;
}

body[data-theme="dark"] .page-home .experience-item__role,
body[data-theme="dark"] .page-home h3.experience-item__role {
    color: color-mix(in srgb, var(--primary-color) 70%, var(--text-light));
}

.page-home .experience-item__company {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
}

.page-home .experience-item__meta {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--text-light);
}

.page-home .experience-item__text {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text-light);
    align-self: center;
}

.page-home .experience-linkedin {
    margin: 1rem 0 0;
}

.page-home .experience-linkedin__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--primary-color) 70%, var(--text-light));
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.page-home .experience-linkedin__link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-home .experience-linkedin__icon {
    flex-shrink: 0;
}

.page-home .experience-background-cta-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.page-home .experience-background-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.35rem;
    border: 1.5px solid color-mix(in srgb, var(--primary-color) 45%, var(--border-color));
    border-radius: 8px;
    background: transparent;
    color: color-mix(in srgb, var(--primary-color) 72%, var(--text-color));
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.page-home .experience-background-cta:hover,
.page-home .experience-background-cta:focus-visible {
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.background-modal-content {
    max-width: 720px;
}

.background-modal-intro {
    margin: 0 0 1.5rem;
    color: var(--text-light);
    line-height: 1.65;
}

.background-modal-section-title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.background-modal-section-title + .background-modal-list {
    margin-bottom: 1.75rem;
}

.background-modal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.background-modal-item {
    padding-bottom: 1.15rem;
    border-bottom: 1px solid var(--border-color);
}

.background-modal-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.background-modal-item h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 650;
    color: var(--text-color);
}

.background-modal-meta {
    margin: 0 0 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--text-light);
}

.background-modal-item p:not(.background-modal-meta) {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-light);
}

.page-home .experience-list .experience-item.reveal:nth-child(1) { transition-delay: 0ms; }
.page-home .experience-list .experience-item.reveal:nth-child(2) { transition-delay: 70ms; }
.page-home .experience-list .experience-item.reveal:nth-child(3) { transition-delay: 140ms; }
.page-home .experience-list .experience-item.reveal:nth-child(4) { transition-delay: 210ms; }
.page-home .experience-list .experience-item.reveal:nth-child(5) { transition-delay: 280ms; }

@media (max-width: 820px) {
    .page-home .about-content--portrait {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .page-home .about-portrait img {
        margin-inline: auto;
        max-width: 260px;
    }

    .page-home .about-content--portrait .about-stats {
        gap: 1.25rem;
    }

    .page-home .about-content--portrait .stat-item {
        text-align: center;
    }

    .page-home .experience-item {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
}

.page-home .services--dev {
    position: relative;
}

.page-home .service-card {
    position: relative;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.page-home .service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 55%, transparent), transparent 45%, rgba(99, 102, 241, 0.25));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.page-home .service-card:hover::before {
    opacity: 1;
}

.page-home .faq--dev .faq-item {
    border-radius: 12px;
    transition: background 0.25s ease, border-color 0.25s ease;
}

body[data-theme="dark"] .page-home .faq--dev .faq-item {
    border: 1px solid var(--border-color);
    background: rgba(18, 18, 18, 0.85);
}

body[data-theme="light"] .page-home .faq--dev .faq-item {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.75);
}

.page-home .contact--dev .contact-form-wrapper {
    border-radius: 16px;
    transition: box-shadow 0.35s ease;
}

body[data-theme="dark"] .page-home .contact--dev .contact-form-wrapper {
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

body[data-theme="light"] .page-home .contact--dev .contact-form-wrapper {
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.page-home .contact-reply-note {
    margin: 0.85rem 0 0;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    color: color-mix(in srgb, var(--primary-color) 70%, var(--text-light));
}

body[data-theme="dark"] .page-home .contact-reply-note {
    color: color-mix(in srgb, var(--primary-color) 65%, #cbd5e1);
}

/* Reusable project detail pages (.project-page) */
.page-project .project-page {
    padding-top: 0;
    padding-bottom: 4rem;
}

.project-page-hero {
    padding: calc(72px + 2.5rem) 0 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
    background: var(--bg-light);
}

.project-page-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.project-page-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-color);
}

.project-page-lead {
    margin: 0 0 1.25rem;
    max-width: 52rem;
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--text-light);
}

.project-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
}

/* Hero back/secondary  -  light theme: dark outline; dark theme: white outline */
body[data-theme="light"] .project-page-hero .project-page-actions .btn.btn-secondary {
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.35);
    background: transparent;
}

body[data-theme="light"] .project-page-hero .project-page-actions .btn.btn-secondary:hover {
    background: #0f172a;
    color: #f8fafc;
    border-color: #0f172a;
}

body[data-theme="dark"] .project-page-hero .project-page-actions .btn.btn-secondary {
    color: #ffffff;
    border-color: #ffffff;
    background: transparent;
}

body[data-theme="dark"] .project-page-hero .project-page-actions .btn.btn-secondary:hover {
    background: #ffffff;
    color: #1a1a1a;
    border-color: #ffffff;
}

.project-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(280px, 32%);
    gap: 1.5rem 2.5rem;
    align-items: start;
}

.project-page-main {
    min-width: 0;
    max-width: 820px;
}

.project-page-section {
    margin-bottom: 1.35rem;
}

.project-page-section h2 {
    margin: 0 0 0.55rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
}

.project-page-section p {
    margin: 0 0 0.65rem;
    line-height: 1.72;
    color: var(--text-light);
}

.project-page-list {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
    color: var(--text-light);
    line-height: 1.68;
}

.project-page-list li {
    margin-bottom: 0.35rem;
}

.project-page-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.15rem 0 1.35rem;
}

.project-page-stats__item {
    margin: 0;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-light) 70%, transparent);
}

.project-page-stats__item dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-light);
}

.project-page-stats__item dd {
    margin: 0.2rem 0 0;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.project-page-table-wrap {
    margin: 1rem 0 1.25rem;
    max-width: 100%;
    overflow-x: auto;
}

.project-page-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.55;
}

.project-page-table caption {
    caption-side: bottom;
    padding-top: 0.55rem;
    text-align: left;
    font-size: 0.82rem;
    color: var(--text-light);
}

.project-page-table th,
.project-page-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
    color: var(--text-light);
}

.project-page-table th {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-color);
    white-space: nowrap;
}

.project-page-table tbody tr:last-child th,
.project-page-table tbody tr:last-child td {
    border-bottom: 0;
}

@media (max-width: 768px) {
    .project-page-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.project-page-vitals-lead {
    margin-bottom: 1rem;
}

.project-page-vitals {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.project-page-vitals__item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-light) 70%, transparent);
    color: var(--text-color);
    line-height: 1.45;
}

.project-page-vitals__mark {
    flex: 0 0 auto;
    font-weight: 700;
    color: var(--primary-color);
}

.project-page-vitals__item.is-needs .project-page-vitals__mark {
    color: #c2410c;
}

.project-page-vitals__body {
    min-width: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

.project-page-vitals__body strong {
    color: var(--text-color);
    font-weight: 600;
}

.project-page-vitals-note {
    margin-top: 0.35rem;
}

.project-page-note {
    font-size: 0.95rem;
    color: var(--text-light);
    font-style: italic;
}

.project-page-code {
    margin: 0 0 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--bg-light) 92%, var(--secondary-color) 8%);
    overflow-x: auto;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-color);
}

.project-page-code code {
    font-family: inherit;
    white-space: pre;
    display: block;
}

.project-page-figure {
    margin: 0.35rem 0 0.85rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    box-shadow: var(--shadow);
}

.project-page-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.project-page-figure figcaption {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--bg-white) 88%, var(--bg-light) 12%);
}

.project-page-figure-zoom {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.project-page-figure-zoom img {
    width: 100%;
    max-height: min(48vh, 420px);
    object-fit: contain;
    background: var(--bg-light);
}

.project-page-aside-title {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-color);
}

.project-page-aside-inner {
    position: sticky;
    top: calc(72px + 1rem);
    padding: 1.25rem 1.35rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    box-shadow: var(--shadow);
}

.project-page-tech-group {
    margin-bottom: 1.15rem;
}

.project-page-tech-group:last-child {
    margin-bottom: 0;
}

.project-page-tech-label {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.project-page-tech-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-light);
}

.project-page-tech-list li {
    margin-bottom: 0.35rem;
}

.project-page-gallery {
    margin-top: 0.35rem;
}

.project-page-gallery h2 {
    margin-bottom: 1.25rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-color);
}

.project-page-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.project-page-gallery-item {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-page-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.project-page-gallery-zoom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 200px;
    padding: 0.65rem;
    border: 0;
    background: var(--bg-light);
    cursor: zoom-in;
}

.project-page-gallery-zoom img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(42vh, 280px);
    object-fit: contain;
}

body[data-theme="dark"] .page-project .project-page-hero,
body[data-theme="dark"] .page-sandbox .project-page-hero,
body[data-theme="dark"] .page-projects .project-page-hero {
    background: color-mix(in srgb, var(--bg-light) 88%, var(--primary-color) 12%);
    border-bottom-color: var(--border-color);
}

body[data-theme="dark"] .page-project .project-page-title,
body[data-theme="dark"] .page-project .project-page-section h2,
body[data-theme="dark"] .page-project .project-page-gallery h2,
body[data-theme="dark"] .page-project .project-page-aside-title {
    color: var(--text-color);
}

body[data-theme="dark"] .page-project .project-page-lead,
body[data-theme="dark"] .page-project .project-page-section p,
body[data-theme="dark"] .page-project .project-page-list,
body[data-theme="dark"] .page-project .project-page-note,
body[data-theme="dark"] .page-project .project-page-vitals__body,
body[data-theme="dark"] .page-project .project-page-table td,
body[data-theme="dark"] .page-project .project-page-stats__item dt {
    color: color-mix(in srgb, var(--text-color) 82%, var(--text-light) 18%);
}

body[data-theme="dark"] .page-project .project-page-vitals__item,
body[data-theme="dark"] .page-project .project-page-stats__item {
    background: color-mix(in srgb, #0a0a0c 88%, var(--primary-color) 4%);
    border-color: var(--border-color);
}

body[data-theme="dark"] .page-project .project-page-stats__item dd,
body[data-theme="dark"] .page-project .project-page-table th {
    color: #ffffff;
}

body[data-theme="dark"] .page-project .project-page-vitals__body strong {
    color: #ffffff;
}

body[data-theme="dark"] .project-page-code {
    background: #0d0d12;
    border-color: var(--border-color);
    color: #e4e4e7;
}

body[data-theme="dark"] .project-page-aside-inner,
body[data-theme="dark"] .project-page-gallery-item,
body[data-theme="dark"] .project-page-figure {
    background: color-mix(in srgb, var(--bg-light) 94%, #000 6%);
}

body[data-theme="dark"] .project-page-figure-zoom img,
body[data-theme="dark"] .project-page-gallery-zoom {
    background: #0a0a0c;
}

body[data-theme="dark"] .project-page-figure figcaption {
    background: color-mix(in srgb, var(--bg-light) 85%, transparent);
    color: color-mix(in srgb, var(--text-color) 78%, var(--text-light) 22%);
}

.project-page-archive-label {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
    background: color-mix(in srgb, var(--text-light) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--text-light) 28%, transparent);
    border-radius: 999px;
    vertical-align: middle;
}

.project-page-archive-notice {
    margin: 0 0 1.25rem;
    max-width: 52rem;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    background: color-mix(in srgb, var(--primary-color) 10%, var(--bg-light));
    border: 1px solid color-mix(in srgb, var(--primary-color) 28%, var(--border-color));
    border-radius: 8px;
}

.project-page--archived .project-page-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

/* Branded 404 */
.page-error .error-page-hero {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    padding-bottom: 4rem;
}

.page-error .error-page-actions {
    margin-top: 0.25rem;
}

body[data-theme="dark"] .page-error .error-page-hero .project-page-actions .btn.btn-secondary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.45);
}

body[data-theme="dark"] .page-error .error-page-hero .project-page-actions .btn.btn-secondary:hover {
    background: #ffffff;
    color: #1a1a1a;
    border-color: #ffffff;
}

/* Security vulnerability disclosure */
.page-security-policy .security-policy-hero {
    padding-bottom: 2.5rem;
}

.security-policy-contact {
    margin: 1.25rem 0 0;
    max-width: 42rem;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-light);
}

.security-policy-contact a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.security-policy-contact a:hover {
    color: var(--text-color);
}

.security-policy-sep {
    margin: 0 0.45rem;
    opacity: 0.55;
}

.security-policy-main {
    padding: 0 0 4.5rem;
}

.security-policy-doc {
    max-width: 42rem;
}

.security-policy-section {
    margin: 0 0 2.25rem;
}

.security-policy-section h2 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.security-policy-section p,
.security-policy-section li {
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text-color);
}

.security-policy-section p {
    margin: 0;
}

.security-policy-section ul {
    margin: 0;
    padding-left: 1.2rem;
}

.security-policy-section li {
    margin: 0.35rem 0;
}

body[data-theme="dark"] .page-security-policy .project-page-hero {
    background: color-mix(in srgb, var(--bg-color) 92%, var(--primary-color));
}

@media (max-width: 960px) {
    .project-page-layout {
        grid-template-columns: 1fr;
    }

    .project-page-aside-inner {
        position: static;
    }

    .project-page-main {
        max-width: none;
    }
}
