/* ==========================================================================
   Public website styles — no build step required.
   Brand colours / fonts come from CSS variables printed by partials/theme.
   ========================================================================== */

:root {
    --header-height: 72px;
    --surface: #ffffff;
    --surface-alt: var(--brand-light);
    --text-muted: #5b6b82;
    --gradient-brand: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
    --shadow-soft: 0 10px 30px -12px rgba(var(--brand-dark-rgb), .18);
}

[data-bs-theme="dark"] {
    --surface: #111b2b;
    --surface-alt: #0c1522;
    --text-muted: #9fb0c8;
    --bs-body-bg: #0a121e;
    --bs-body-color: #dbe4f0;
    --bs-secondary-color: #9fb0c8;
    --bs-border-color: #22324a;
    --bs-tertiary-bg: #131f31;
    --bs-secondary-bg: #16233a;
    --shadow-soft: 0 10px 30px -12px rgba(0, 0, 0, .6);
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1rem); }
body { font-family: var(--font-body); background: var(--bs-body-bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .navbar-brand { font-family: var(--font-heading); }
a { color: var(--brand-primary); }
[data-bs-theme="dark"] a:not(.btn):not(.dropdown-item):not(.nav-link):not(.social-link):not(.tech-badge) { color: color-mix(in srgb, var(--brand-accent) 85%, white); }
img { max-width: 100%; }
.min-w-0 { min-width: 0; }
.skip-link { position: absolute; z-index: 2000; left: 1rem; top: 1rem; padding: .5rem 1rem; background: var(--brand-primary); color: #fff; border-radius: .5rem; }

/* ---------- Buttons ---------- */
.btn-primary {
    --bs-btn-bg: var(--brand-primary); --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: color-mix(in srgb, var(--brand-primary) 85%, black); --bs-btn-hover-border-color: color-mix(in srgb, var(--brand-primary) 85%, black);
    --bs-btn-active-bg: color-mix(in srgb, var(--brand-primary) 75%, black); --bs-btn-active-border-color: color-mix(in srgb, var(--brand-primary) 75%, black);
    --bs-btn-disabled-bg: var(--brand-primary); --bs-btn-disabled-border-color: var(--brand-primary);
    box-shadow: 0 8px 20px -10px rgba(var(--brand-primary-rgb), .8);
}
.btn-outline-primary {
    --bs-btn-color: var(--brand-primary); --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: var(--brand-primary); --bs-btn-hover-border-color: var(--brand-primary);
    --bs-btn-active-bg: var(--brand-primary); --bs-btn-active-border-color: var(--brand-primary);
}
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: #e6eefb; --bs-btn-border-color: rgba(255,255,255,.35); }
[data-bs-theme="dark"] .btn-primary { --bs-btn-bg: var(--brand-accent); --bs-btn-border-color: var(--brand-accent); --bs-btn-color: #04121a; --bs-btn-hover-color: #04121a; --bs-btn-hover-bg: color-mix(in srgb, var(--brand-accent) 85%, white); --bs-btn-hover-border-color: color-mix(in srgb, var(--brand-accent) 85%, white); }
.btn-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--bs-body-color); border: 0; }
.btn-icon:hover, .btn-icon:focus-visible { background: rgba(var(--brand-primary-rgb), .08); }
.btn-icon.dropdown-toggle { width: auto; border-radius: 2rem; padding-inline: .75rem; }
.btn-icon.dropdown-toggle::after { display: none; }
.link-primary { color: var(--brand-primary) !important; text-decoration: none; font-weight: 500; }
.text-primary { color: var(--brand-primary) !important; }
[data-bs-theme="dark"] .text-primary, [data-bs-theme="dark"] .link-primary { color: var(--brand-accent) !important; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; transition: background-color .25s, box-shadow .25s, backdrop-filter .25s; background: color-mix(in srgb, var(--bs-body-bg) 80%, transparent); backdrop-filter: saturate(160%) blur(12px); }
.site-header.is-home:not(.is-scrolled) { background: transparent; backdrop-filter: none; }
.site-header.is-scrolled { box-shadow: 0 6px 24px -16px rgba(0,0,0,.35); }
.site-header .navbar { min-height: var(--header-height); }
.navbar-brand { font-weight: 700; color: var(--bs-body-color); }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--gradient-brand); color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: .5px; box-shadow: 0 8px 18px -8px rgba(var(--brand-primary-rgb), .9); }
.brand-text { font-size: 1.15rem; }
.brand-logo { max-height: 40px; width: auto; }
.navbar .nav-link { font-weight: 500; padding-inline: .9rem !important; color: var(--bs-body-color); position: relative; }
.navbar .nav-link::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .25rem; height: 2px; border-radius: 2px; background: var(--brand-accent); transform: scaleX(0); transition: transform .25s; }
.navbar .nav-link:hover::after, .navbar .nav-link.active::after { transform: scaleX(1); }
@media (max-width: 991.98px) {
    .navbar-collapse { background: var(--surface); margin: .5rem -.75rem 0; padding: 1rem; border-radius: 1rem; box-shadow: var(--shadow-soft); }
    .navbar .nav-link::after { display: none; }
}
[data-bs-theme="dark"] .navbar-toggler-icon { filter: invert(1); }
.theme-icon-light { display: none; }
[data-bs-theme="dark"] .theme-icon-light { display: inline; }
[data-bs-theme="dark"] .theme-icon-dark { display: none; }

/* ---------- Sections ---------- */
.section { padding: 6rem 0; position: relative; }
.section-alt { background: var(--surface-alt); }
.section-heading { max-width: 720px; }
.section-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-accent); margin-bottom: .75rem; }
.section-eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; border-radius: 2px; }
.section-title { font-weight: 700; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); letter-spacing: -.02em; }
.section-subtitle { font-size: 1.05rem; margin-top: .75rem; }
@media (max-width: 767.98px) { .section { padding: 4rem 0; } }

/* ---------- Hero ---------- */
.hero-section { position: relative; overflow: hidden; padding: 2rem 0 4rem; margin-top: calc(var(--header-height) * -1); padding-top: calc(var(--header-height) + 2rem); }
.min-vh-hero { min-height: calc(88vh - var(--header-height)); }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; }
.hero-bg .blob-1 { width: 520px; height: 520px; background: rgba(var(--brand-accent-rgb), .55); top: -160px; right: -120px; animation: float 14s ease-in-out infinite; }
.hero-bg .blob-2 { width: 420px; height: 420px; background: rgba(var(--brand-primary-rgb), .45); bottom: -180px; left: -140px; animation: float 18s ease-in-out infinite reverse; }
.hero-bg .grid-pattern { position: absolute; inset: 0; background-image: linear-gradient(rgba(var(--brand-primary-rgb), .06) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--brand-primary-rgb), .06) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 40px) scale(1.08); } }
.hero-greeting { font-weight: 600; color: var(--brand-accent); font-size: 1.1rem; }
.wave { display: inline-block; animation: wave 2.4s infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.hero-name { font-size: clamp(2.6rem, 1.6rem + 4.5vw, 4.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-bottom: .75rem; background: linear-gradient(120deg, var(--bs-body-color) 30%, var(--brand-primary) 70%, var(--brand-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-bs-theme="dark"] .hero-name { background: linear-gradient(120deg, #fff 30%, var(--brand-accent)); -webkit-background-clip: text; background-clip: text; }
.hero-title { color: var(--brand-primary); }
[data-bs-theme="dark"] .hero-title { color: #cfe0f5; }
.typed-text { color: var(--brand-accent); font-weight: 700; }
.typed-cursor { color: var(--brand-accent); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-description { max-width: 40rem; }
.hero-photo-wrap { position: relative; width: min(360px, 78vw); aspect-ratio: 1; }
.hero-photo { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 42% 58% 55% 45% / 45% 45% 55% 55%; border: 6px solid var(--surface); box-shadow: var(--shadow-soft); animation: morph 10s ease-in-out infinite; }
.hero-photo-placeholder { display: flex; align-items: center; justify-content: center; background: var(--gradient-brand); color: #fff; font-size: 6rem; }
.hero-ring { position: absolute; inset: -18px; border-radius: 50%; background: conic-gradient(from 90deg, var(--brand-accent), var(--brand-primary), transparent 70%, var(--brand-accent)); animation: spin 12s linear infinite; opacity: .55; -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes morph { 0%, 100% { border-radius: 42% 58% 55% 45% / 45% 45% 55% 55%; } 50% { border-radius: 55% 45% 40% 60% / 55% 60% 40% 45%; } }
.hero-chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: .4rem; background: var(--surface); color: var(--bs-body-color); padding: .55rem .9rem; border-radius: 2rem; font-size: .85rem; font-weight: 500; white-space: nowrap; animation: bob 5s ease-in-out infinite; }
.hero-chip i { color: var(--brand-accent); }
.hero-chip-1 { top: 12%; left: -6%; }
.hero-chip-2 { bottom: 10%; right: -6%; animation-delay: -2.5s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
@media (max-width: 575.98px) { .hero-chip-1 { left: -2%; } .hero-chip-2 { right: -2%; } }
.hero-stats { margin-top: 1rem; position: relative; z-index: 1; }
.stat-card { background: var(--surface); border-radius: var(--brand-radius); padding: 1.25rem 1.5rem; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; border: 1px solid rgba(var(--brand-primary-rgb), .06); }
.stat-value { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.stat-label { color: var(--text-muted); font-size: .9rem; }
[data-bs-theme="dark"] .stat-value, [data-bs-theme="dark"] .error-code { background: linear-gradient(135deg, #ffffff, var(--brand-accent)); -webkit-background-clip: text; background-clip: text; }
@media (max-width: 575.98px) {
    .navbar-brand { margin-right: .25rem; }
    .site-header .btn-icon { width: 34px; height: 34px; }
    .navbar-toggler { padding: .25rem .4rem; }
    .brand-text { font-size: 1rem; }
}

/* ---------- Social links ---------- */
.social-link { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(var(--brand-primary-rgb), .08); color: var(--brand-primary); text-decoration: none; transition: transform .2s, background-color .2s, color .2s; }
.social-link:hover { background: var(--brand-primary); color: #fff; transform: translateY(-3px); }
.social-link-lg { width: 46px; height: 46px; font-size: 1.15rem; }
[data-bs-theme="dark"] .social-link { background: rgba(255,255,255,.07); color: #dbe4f0; }

/* ---------- About ---------- */
.about-media { position: relative; max-width: 440px; margin-inline: auto; }
.about-photo { border-radius: calc(var(--brand-radius) * 2); width: 100%; aspect-ratio: 4/5; object-fit: cover; box-shadow: var(--shadow-soft); }
.about-media::before { content: ""; position: absolute; inset: 1.5rem -1.5rem -1.5rem 1.5rem; border: 2px dashed rgba(var(--brand-accent-rgb), .5); border-radius: calc(var(--brand-radius) * 2); z-index: -1; }
.about-badge { position: absolute; right: -1rem; bottom: 2rem; background: var(--gradient-brand); color: #fff; padding: 1rem 1.25rem; border-radius: var(--brand-radius); text-align: center; }
.about-badge-value { display: block; font-size: 2rem; font-weight: 800; font-family: var(--font-heading); line-height: 1; }
.about-badge-label { font-size: .8rem; opacity: .9; }
.fact-icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--brand-accent-rgb), .12); color: var(--brand-accent); font-size: 1.1rem; }

/* ---------- Rich text ---------- */
.rich-text { line-height: 1.8; }
.rich-text h2, .rich-text h3, .rich-text h4 { margin-top: 1.75rem; margin-bottom: .75rem; font-weight: 700; }
.rich-text ul { padding-left: 0; list-style: none; }
.rich-text ul li { position: relative; padding-left: 1.75rem; margin-bottom: .5rem; }
.rich-text ul li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 0; color: var(--brand-accent); }
.rich-text img { border-radius: var(--brand-radius); height: auto; }
.rich-text blockquote { border-left: 4px solid var(--brand-accent); padding: .75rem 1.25rem; background: var(--surface-alt); border-radius: 0 var(--brand-radius) var(--brand-radius) 0; }
.rich-text pre { background: #0f1b2d; color: #e2e8f0; padding: 1rem; border-radius: var(--brand-radius); overflow-x: auto; }
.article-body { font-size: 1.075rem; }

/* ---------- Cards ---------- */
.card { --bs-card-bg: var(--surface); border-radius: calc(var(--brand-radius) * 1.25); }
.service-card, .skill-card, .project-card, .post-card, .timeline-card, .edu-card { transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.service-card:hover, .skill-card:hover, .project-card:hover, .post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft) !important; }
.service-icon, .skill-icon { display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--gradient-brand); color: #fff; }
.service-icon { width: 58px; height: 58px; font-size: 1.5rem; box-shadow: 0 10px 22px -10px rgba(var(--brand-primary-rgb), .9); }
.skill-icon { width: 34px; height: 34px; border-radius: 10px; font-size: 1rem; }
.skill-chip { display: inline-flex; align-items: center; padding: .4rem .8rem; border-radius: 2rem; font-size: .85rem; font-weight: 500; background: rgba(var(--brand-primary-rgb), .07); color: var(--bs-body-color); border: 1px solid rgba(var(--brand-primary-rgb), .1); transition: all .2s; }
.skill-chip:hover { background: var(--brand-primary); color: #fff; }
[data-bs-theme="dark"] .skill-chip { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); }
.skill-progress { height: 8px; background: rgba(var(--brand-primary-rgb), .1); }
.skill-progress .progress-bar { width: 0; background: var(--gradient-brand); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.skill-progress.is-visible .progress-bar { width: var(--level); }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 900px; margin-inline: auto; padding-left: 2.25rem; }
.timeline::before { content: ""; position: absolute; left: 10px; top: .5rem; bottom: .5rem; width: 2px; background: linear-gradient(var(--brand-accent), rgba(var(--brand-primary-rgb), .15)); }
.timeline-item { position: relative; margin-bottom: 1.75rem; }
.timeline-dot { position: absolute; left: -2.25rem; top: 1.75rem; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 4px solid var(--brand-primary); }
.timeline-dot.is-current { border-color: var(--brand-accent); box-shadow: 0 0 0 6px rgba(var(--brand-accent-rgb), .2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(var(--brand-accent-rgb), .05); } }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; color: var(--text-muted); }
.check-list li::before { content: "\F26B"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: var(--brand-accent); }

/* ---------- Projects ---------- */
.btn-filter { border-radius: 2rem; padding: .45rem 1.1rem; font-weight: 500; font-size: .9rem; background: var(--surface); border: 1px solid var(--bs-border-color); color: var(--bs-body-color); }
.btn-filter:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.btn-filter.active { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.project-media { overflow: hidden; border-radius: calc(var(--brand-radius) * 1.25) calc(var(--brand-radius) * 1.25) 0 0; display: block; position: relative; }
.project-media img { transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.project-card:hover .project-media img { transform: scale(1.06); }
.project-placeholder { background: var(--gradient-brand); color: rgba(255,255,255,.95); flex-direction: column; gap: .5rem; padding: 1rem; text-align: center; overflow: hidden; }
.project-placeholder::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.25), transparent 45%), radial-gradient(circle at 10% 90%, rgba(0,0,0,.25), transparent 50%); }
.project-placeholder i { font-size: 2.6rem; position: relative; z-index: 1; transition: transform .4s; }
.project-card:hover .project-placeholder i { transform: scale(1.15) rotate(-6deg); }
.project-placeholder-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; position: relative; z-index: 1; text-shadow: 0 2px 10px rgba(0,0,0,.2); }
.ratio > .project-badge { top: .75rem; right: .75rem; left: auto; width: auto; height: auto; background: rgba(255,255,255,.92); color: #8a5a00; font-weight: 600; z-index: 2; }
.project-category { color: var(--brand-accent); letter-spacing: .06em; font-size: .72rem; }
.tech-badge { display: inline-block; font-size: .75rem; padding: .25rem .6rem; border-radius: 2rem; background: rgba(var(--brand-accent-rgb), .1); color: color-mix(in srgb, var(--brand-accent) 70%, black); font-weight: 500; text-decoration: none; }
[data-bs-theme="dark"] .tech-badge { color: var(--brand-accent); }
.tech-badge-link:hover { background: var(--brand-accent); color: #fff; }
[data-filter-item].is-hidden { display: none; }
.project-meta dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; }
.project-meta dd { margin-bottom: 1rem; font-weight: 500; }

.skills-grid { columns: 3 320px; column-gap: 1.5rem; }
.skills-grid > * { break-inside: avoid; margin-bottom: 1.5rem; }

/* ---------- Education & achievements ---------- */
.edu-year { flex-shrink: 0; width: 68px; height: 68px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: var(--gradient-brand); color: #fff; font-weight: 700; font-family: var(--font-heading); }
.achievement-list { border-left: 2px solid rgba(var(--brand-accent-rgb), .35); padding-left: 1.25rem; }
.achievement-item { position: relative; padding-bottom: 1.1rem; }
.achievement-item::before { content: ""; position: absolute; left: calc(-1.25rem - 7px); top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-accent); box-shadow: 0 0 0 4px var(--surface-alt); }

/* ---------- Contact ---------- */
.section-contact { background: linear-gradient(180deg, var(--bs-body-bg), var(--surface-alt)); }
.contact-info { background: var(--gradient-brand); color: #fff; }
.contact-info a, .contact-info small { color: #fff; }
.contact-list li { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.contact-list small { display: block; opacity: .75; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.contact-list a { text-decoration: none; font-weight: 500; word-break: break-all; }
.contact-icon { width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.15); font-size: 1.15rem; }
.contact-social .social-link { background: rgba(255,255,255,.15); color: #fff; }
.contact-social .social-link:hover { background: #fff; color: var(--brand-primary); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-control, .form-select { border-radius: calc(var(--brand-radius) * .8); }
.form-control:focus, .form-select:focus { border-color: rgba(var(--brand-primary-rgb), .5); box-shadow: 0 0 0 .25rem rgba(var(--brand-primary-rgb), .12); }

/* ---------- Page hero ---------- */
.page-hero { position: relative; padding: calc(var(--header-height) + 3rem) 0 3.5rem; margin-top: calc(var(--header-height) * -1); background: var(--gradient-brand); color: #fff; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 85% 15%, rgba(255,255,255,.18), transparent 40%), linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: auto, 40px 40px, 40px 40px; pointer-events: none; }
.page-hero .container { z-index: 1; }
.page-hero-title { font-weight: 800; font-size: clamp(2rem, 1.4rem + 2.5vw, 3.2rem); letter-spacing: -.02em; }
.page-hero-subtitle, .page-hero-meta { color: rgba(255,255,255,.85); max-width: 46rem; }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.6); --bs-breadcrumb-item-active-color: rgba(255,255,255,.75); }
.page-hero .breadcrumb a { color: #fff; text-decoration: none; }
.hero-badge { background: rgba(255,255,255,.18); color: #fff; text-decoration: none; padding: .5rem .9rem; font-weight: 500; }
.site-header:has(+ main .page-hero):not(.is-scrolled) .nav-link,
.site-header:has(+ main .page-hero):not(.is-scrolled) .navbar-brand,
.site-header:has(+ main .page-hero):not(.is-scrolled) .btn-icon { color: #fff; }
.site-header:has(+ main .page-hero):not(.is-scrolled) { background: transparent; backdrop-filter: none; }
.site-header:has(+ main .page-hero):not(.is-scrolled) .navbar-toggler-icon { filter: invert(1); }
@media (max-width: 991.98px) { .site-header:has(+ main .page-hero):not(.is-scrolled) .navbar-collapse .nav-link { color: var(--bs-body-color); } }
.blog-search { max-width: 36rem; }
.blog-search .form-control, .blog-search .input-group-text { border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.72); }
.site-footer a:not(.social-link) { color: rgba(255,255,255,.8) !important; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-text { color: #fff; }
.footer-heading { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 1.1rem; }
.footer-links li, .footer-contact li { margin-bottom: .6rem; }
.footer-contact li { display: flex; gap: .75rem; }
.footer-contact i { color: var(--brand-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: .875rem; }
.site-footer .social-link { background: rgba(255,255,255,.08); color: #fff; }
.site-footer .social-link:hover { background: var(--brand-accent); }

/* ---------- Back to top ---------- */
.back-to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 46px; height: 46px; z-index: 1020; opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ---------- Reveal animations ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
html.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    html.js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Auth ---------- */
.auth-body { min-height: 100vh; }
.auth-wrapper { display: flex; min-height: 100vh; }
.auth-aside { flex: 0 0 42%; background: var(--gradient-brand); position: relative; overflow: hidden; align-items: center; padding: 4rem; }
.auth-aside::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 40%), linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: auto, 40px 40px, 40px 40px; }
.auth-aside-inner { position: relative; z-index: 1; max-width: 420px; }
.auth-aside .brand-text { color: #fff; }
.auth-aside .social-link { background: rgba(255,255,255,.15); color: #fff; }
.auth-main { flex: 1; display: flex; flex-direction: column; padding: 1.5rem; }
.auth-card { width: 100%; max-width: 440px; margin: auto; padding: 2rem 0; }

/* ---------- Error pages ---------- */
.error-code { font-family: var(--font-heading); font-size: clamp(5rem, 3rem + 10vw, 9rem); font-weight: 800; line-height: 1; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Pagination ---------- */
.pagination { --bs-pagination-active-bg: var(--brand-primary); --bs-pagination-active-border-color: var(--brand-primary); --bs-pagination-color: var(--brand-primary); --bs-pagination-border-radius: .75rem; gap: .25rem; }
.page-link { border-radius: .6rem !important; }

/* ---------- Account ---------- */
.account-nav .list-group-item.active { background: var(--brand-primary); border-color: var(--brand-primary); }
.account-nav form .list-group-item { border-bottom: 0; }

/* ---------- RTL tweaks ---------- */
[dir="rtl"] .timeline { padding-left: 0; padding-right: 2.25rem; }
[dir="rtl"] .timeline::before { left: auto; right: 10px; }
[dir="rtl"] .timeline-dot { left: auto; right: -2.25rem; }
[dir="rtl"] .check-list li, [dir="rtl"] .rich-text ul li { padding-left: 0; padding-right: 1.6rem; }
[dir="rtl"] .check-list li::before, [dir="rtl"] .rich-text ul li::before { left: auto; right: 0; }
