:root {
    --az-bg: #f3f5f8;
    --az-paper: #ffffff;
    --az-ink: #0c1220;
    --az-muted: #5a6474;
    --az-line: #e4e8ef;
    --az-accent: #0f9d8a;
    --az-accent-2: #ff6b1a;
    --az-nav: #07111f;
    --az-nav-h: 76px;
    --az-shadow: 0 18px 40px rgba(7, 17, 31, 0.08);
    --az-radius: 20px;
    --az-font: "Plus Jakarta Sans", "Noto Sans Arabic", sans-serif;
}

html[dir="rtl"] {
    --az-font: "Noto Sans Arabic", "Plus Jakarta Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.site-body {
    margin: 0;
    font-family: var(--az-font);
    color: var(--az-ink);
    background: var(--az-bg);
    line-height: 1.65;
    padding-top: var(--az-nav-h);
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4 {
    font-family: var(--az-font);
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: var(--az-ink);
}

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

img { max-width: 100%; }

.container { max-width: 1180px; }

.az-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(7, 17, 31, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.az-nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    min-height: var(--az-nav-h);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.az-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    margin-inline-end: auto;
    min-width: 0;
}

.az-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--az-accent), #147a8c);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: 0 0 auto;
}

.az-brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    font-size: 14px;
}

.az-links {
    display: flex !important;
    align-items: center;
    gap: 6px;
}

.az-links a {
    color: rgba(255, 255, 255, 0.72) !important;
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 11px;
    border-radius: 999px;
}

.az-links a.is-active,
.az-links a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08);
}

.az-nav-cta {
    background: var(--az-accent) !important;
    color: #07111f !important;
    font-weight: 800 !important;
}

.az-nav-cta:hover {
    background: #13c4ad !important;
    color: #07111f !important;
}

.az-langs {
    display: flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    margin-inline-start: 8px;
}

.az-langs a {
    padding: 5px 9px !important;
    border-radius: 999px;
    font-size: 11px !important;
    letter-spacing: 0.04em;
}

.az-langs a.is-active {
    background: #fff !important;
    color: var(--az-nav) !important;
}

.az-toggle {
    display: none;
    background: none;
    border: 0;
    width: 44px;
    height: 44px;
    padding: 10px;
    margin-inline-start: 8px;
}

.az-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    margin: 6px 0;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.az-nav.is-open .az-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.az-nav.is-open .az-toggle span:nth-child(2) { opacity: 0; }
.az-nav.is-open .az-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.az-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0 72px;
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(15, 157, 138, 0.28), transparent 55%),
        radial-gradient(800px 400px at 10% 120%, rgba(255, 107, 26, 0.16), transparent 50%),
        var(--az-nav);
    color: #eef3f8;
}

.az-hero h1,
.az-hero .az-kicker,
.az-hero .az-lead,
.az-hero .az-lead p {
    color: #eef3f8;
}

.az-hero .az-lead,
.az-hero .az-lead p { color: rgba(238, 243, 248, 0.78); }

.az-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.az-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--az-accent-2);
    font-weight: 700;
    margin-bottom: 12px;
}

.az-hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 14ch; margin: 0 0 18px; }
.az-lead { max-width: 62ch; font-size: 1.05rem; color: var(--az-muted); }
.az-muted { color: var(--az-muted); }

.az-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.az-role {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.az-role i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--az-accent);
}

.az-role.is-research i { background: var(--az-accent-2); }

.az-hero-actions, .az-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.az-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 14px;
    border: 0;
    cursor: pointer;
}

.az-btn-primary { background: var(--az-accent); color: #ffffff !important; }
.az-btn-primary:hover { background: #0c8576; color: #ffffff !important; }
.az-btn-primary:visited { color: #ffffff !important; }
.az-btn-ghost { background: #fff; color: var(--az-ink) !important; border: 1px solid var(--az-line); }
.az-btn-ghost:hover { background: var(--az-ink); color: #fff !important; border-color: var(--az-ink); }
.az-btn-ghost:visited { color: var(--az-ink) !important; }
.az-hero .az-btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,0.18); }
.az-hero .az-btn-ghost:hover { background: rgba(255,255,255,0.08); }

.az-portrait-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.az-portrait {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

.az-id-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.az-id-tile {
    display: block;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    text-decoration: none !important;
}

.az-id-tile strong { display: block; font-size: 13px; margin-bottom: 4px; }
.az-id-tile span { display: block; font-size: 12px; color: rgba(255,255,255,0.65); }

.az-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

.az-socials a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.az-socials a:hover { color: #fff; border-color: currentColor; }

.az-section, .az-page { padding: 84px 0; }
.az-section-alt { background: #eef1f6; }
.az-page { padding-top: 56px; }

.az-section-head { margin-bottom: 36px; }
.az-section-head h1, .az-section-head h2 { margin: 0; }
.az-section-head-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.az-grid-3, .az-grid-2, .az-grid-4, .az-project-grid {
    display: grid;
    gap: 22px;
}
.az-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.az-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.az-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.az-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.az-card, .az-project, .az-entry, .blog-entry, .blog-post {
    background: var(--az-paper);
    border: 1px solid var(--az-line);
    border-radius: var(--az-radius);
    overflow: hidden;
}

.az-card { padding: 26px; box-shadow: var(--az-shadow); }
.az-card-icon { width: 48px; height: 48px; object-fit: contain; margin-bottom: 16px; }
.az-card h3 { margin-top: 0; }

.az-project {
    display: flex;
    flex-direction: column;
    box-shadow: var(--az-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.az-project:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(7, 17, 31, 0.14);
}

.az-project-media {
    display: block;
    height: 240px;
    background-size: cover;
    background-position: center;
    background-color: #d7dde6;
    position: relative;
}

.az-project-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(7, 17, 31, 0.35));
}

.az-project-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.az-project-body h3 { font-size: 1.22rem; margin: 10px 0 8px; }
.az-project-body h3 a { color: inherit; text-decoration: none; }
.az-project-body p { font-size: 14px; color: var(--az-muted); margin: 0; flex: 1; }

.az-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.az-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e8f7f4;
    color: #0b6b5e;
}
.az-authors {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--az-muted);
}
.az-pub h3 { font-size: 1.05rem; }

.az-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    position: sticky;
    top: var(--az-nav-h);
    z-index: 8;
    padding: 12px 0;
    background: linear-gradient(180deg, var(--az-bg) 70%, transparent);
}

.az-filter {
    border: 1px solid var(--az-line);
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    color: var(--az-ink);
    text-decoration: none !important;
}
.az-filter.is-active,
a.az-filter:hover { background: var(--az-ink); color: #fff !important; border-color: var(--az-ink); }

.az-store-links { display: flex; gap: 8px; margin-top: 14px; align-items: center; }

.az-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.az-stats div {
    background: #fff;
    border: 1px solid var(--az-line);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--az-shadow);
}
.az-stats strong { display: block; font-size: 30px; letter-spacing: -0.04em; }

.az-quote {
    background: #fff;
    border: 1px solid var(--az-line);
    border-radius: 22px;
    padding: 36px;
    max-width: 760px;
    margin: 0 auto;
    box-shadow: var(--az-shadow);
}
.az-stars .checked { color: #ff6b1a; }
.az-embed { width: 100%; height: 240px; border: 0; margin-top: 12px; border-radius: 12px; }
.az-presentation { grid-template-columns: 1fr; }
.az-presentation-list { display: grid; gap: 12px; }
.az-embed-slot {
    margin-top: 14px;
    border: 1px solid var(--az-line);
    border-radius: 14px;
    overflow: hidden;
    background: #0f1724;
}
.az-embed-slot iframe {
    display: block;
    width: 100%;
    height: 360px;
    border: 0;
}

.az-reviews { position: relative; padding: 0 56px; }
.az-reviews .carousel-control-prev,
.az-reviews .carousel-control-next {
    width: 42px;
    height: 42px;
    background: var(--az-nav);
    border-radius: 50%;
    opacity: 1;
    top: 50%;
    transform: translateY(-50%);
}
.az-reviews .carousel-control-prev { left: 0; }
.az-reviews .carousel-control-next { right: 0; }

.az-list { display: grid; gap: 0; }
.az-list-item, .az-entry {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--az-line);
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}
.az-entry {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 18px;
    background: #fff;
    border: 1px solid var(--az-line);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: var(--az-shadow);
    align-items: start;
}
.az-entry:not(:has(img)) {
    grid-template-columns: 1fr;
}
.az-entry-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #f3f5f8;
    border-radius: 14px;
    padding: 8px;
}
.az-date { font-size: 13px; color: var(--az-muted); font-weight: 650; }
.az-list-item h3, .az-entry h3 { font-size: 1.08rem; margin: 0 0 6px; }
.az-role-line { font-size: 13px; font-weight: 700; color: var(--az-accent); margin: 0 0 8px; }

.research-hero { margin-bottom: 28px; }
.research-layout { display: grid; grid-template-columns: 280px 1fr; gap: 36px; }
.research-profile {
    position: sticky;
    top: calc(var(--az-nav-h) + 18px);
    align-self: start;
    background: var(--az-nav);
    color: #fff;
    border-radius: 24px;
    padding: 22px;
}
.research-profile img {
    width: 100%;
    border-radius: 16px;
    aspect-ratio: 1;
    object-fit: cover;
    margin-bottom: 16px;
}
.research-profile h2 { color: #fff; font-size: 1.25rem; margin: 0 0 8px; }
.research-profile p { color: rgba(255,255,255,0.7); font-size: 13px; }
.research-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.research-nav a { color: rgba(255,255,255,0.72); text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 0; }
.research-nav a:hover { color: #fff; }
.research-block { margin-bottom: 52px; }
.research-block h2 { margin-bottom: 18px; }

.az-timeline { border-inline-start: 2px solid var(--az-line); padding-inline-start: 20px; }
.az-timeline .az-list-item {
    position: relative;
    grid-template-columns: 1fr;
    padding-inline-start: 8px;
}
.az-timeline .az-list-item::before {
    content: "";
    position: absolute;
    inset-inline-start: -26px;
    top: 26px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--az-accent);
}

.az-footer {
    background: #07111f;
    color: #c9d2de;
    padding: 48px 0 24px;
}
.az-footer a { color: #f4f7fb; text-decoration: none; }
.az-footer a:hover { color: var(--az-accent); }
.az-footer-simple {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.az-footer-simple strong {
    display: block;
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 8px;
}
.az-footer-simple p {
    margin: 0;
    max-width: 42ch;
    font-size: 14px;
    color: rgba(201, 210, 222, 0.85);
}
.az-footer-links,
.az-footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: center;
}
.az-footer-links { margin-top: 4px; }
.az-footer-socials {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
}
.az-footer-socials a:last-child {
    opacity: 0.85;
}
.az-copy { margin-top: 20px; font-size: 13px; opacity: 0.7; }
.az-systems-cta {
    margin-top: 28px;
    display: flex;
    justify-content: flex-start;
}

.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.blog-entry, .blog-post { padding: 24px; box-shadow: var(--az-shadow); }
.blog-entry h3 { margin-top: 0; }
.blog-entry h3 a { color: inherit; text-decoration: none; }
.blog-post { max-width: 780px; margin: 40px auto; }

.az-reveal-toggle {
    margin-top: 16px;
}
.az-reveal.is-collapsed .az-reveal-item.is-hidden {
    display: none !important;
}
.az-reveal-toggle[hidden] {
    display: none !important;
}

/* Error pages */
.az-error-body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, rgba(15, 157, 138, 0.16), transparent 55%),
        radial-gradient(ellipse 70% 45% at 90% 10%, rgba(255, 107, 26, 0.12), transparent 50%),
        linear-gradient(180deg, #eef2f7 0%, var(--az-bg) 45%, #e8edf4 100%);
}
.az-error-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: var(--az-nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    background: rgba(7, 17, 31, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.az-error-top .az-brand { color: #fff; }
.az-error-langs {
    display: flex;
    gap: 8px;
}
.az-error-langs a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 6px 8px;
}
.az-error-langs a.is-active,
.az-error-langs a:hover { color: #fff; }

.az-error {
    min-height: calc(100vh - var(--az-nav-h));
    display: grid;
    place-items: center;
    padding: 48px 20px 64px;
}
.az-error-panel {
    width: min(640px, 100%);
    text-align: center;
    animation: az-error-in 0.55s ease both;
}
.az-error-code {
    margin: 0 0 12px;
    font-size: clamp(4.5rem, 14vw, 7.5rem);
    font-weight: 800;
    letter-spacing: -0.08em;
    line-height: 0.9;
    background: linear-gradient(135deg, var(--az-accent), #147a8c 45%, var(--az-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: az-error-pulse 3.2s ease-in-out infinite;
}
.az-error-panel h1 {
    margin: 0 0 14px;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
}
.az-error-copy {
    margin: 0 auto 28px;
    max-width: 42ch;
    color: var(--az-muted);
    font-size: 1.05rem;
}
.az-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
@keyframes az-error-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}
@keyframes az-error-pulse {
    0%, 100% { filter: saturate(1); opacity: 1; }
    50% { filter: saturate(1.15); opacity: 0.92; }
}

@media (max-width: 1100px) {
    .az-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .az-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .az-toggle { display: block; }
    .az-links {
        display: none !important;
        position: absolute;
        top: var(--az-nav-h);
        left: 0;
        right: 0;
        background: #07111f;
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px 28px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        gap: 4px;
    }
    .az-nav.is-open .az-links { display: flex !important; }
    .az-langs { margin: 12px 0 0; align-self: flex-start; }
    .az-hero-grid, .az-grid-3, .az-grid-4, .az-grid-2, .az-project-grid, .az-stats, .research-layout, .az-list-item, .blog-grid {
        grid-template-columns: 1fr;
    }
    .az-entry { grid-template-columns: 72px 1fr; }
    .az-section-head-row { flex-direction: column; align-items: flex-start; }
    .az-portrait { max-height: 420px; }
    .az-reviews { padding: 0 8px 56px; }
    .az-reviews .carousel-control-prev,
    .az-reviews .carousel-control-next { top: auto; bottom: 0; transform: none; }
    .research-profile { position: static; }
    .az-brand-text { max-width: 160px; }
}
