*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --ad-saffron: #e8640c;
    --ad-saffron-lt: rgba(232, 100, 12, 0.1);
    --ad-night: #1c2331;
    --ad-ink: #18181b;
    --ad-ink-2: #3f3f46;
    --ad-ink-3: #71717a;
    --ad-ink-4: #a1a1aa;
    --ad-ground: #f7f6f3;
    --ad-surface: #ffffff;
    --ad-border: #e4e4e7;
    --ad-border-lt: #f0f0f0;

    --ad-ff-display: "Playfair Display", Georgia, serif;
    --ad-ff-body: "Inter", system-ui, sans-serif;

    --ad-r-card: 16px;
    --ad-r-sm: 6px;
    --ad-r-pill: 999px;

    --ad-shadow-card:
        0 2px 8px rgba(0, 0, 0, 0.07), 0 8px 28px rgba(0, 0, 0, 0.07);
    --ad-shadow-hover:
        0 12px 32px rgba(0, 0, 0, 0.16), 0 32px 64px rgba(0, 0, 0, 0.14);

    --ad-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ad-ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* ── Root ────────────────────────────────────────────────────────────── */
.ad-root {
    background: var(--ad-ground);
    min-height: 100vh;
    font-family: var(--ad-ff-body);
    color: var(--ad-ink);
}

/* ══════════════════════════════════════════════════════════════════════
   MASTHEAD
══════════════════════════════════════════════════════════════════════ */
.ad-masthead {
    position: relative;
    background: var(--ad-night);
    padding: 80px 24px 68px;
    text-align: center;
    overflow: hidden;
}
.ad-masthead__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.ad-masthead__bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            ellipse 90% 70% at 50% 130%,
            rgba(232, 100, 12, 0.22) 0%,
            transparent 65%
        ),
        radial-gradient(
            ellipse 50% 40% at 0% 0%,
            rgba(255, 255, 255, 0.03) 0%,
            transparent 55%
        ),
        radial-gradient(
            ellipse 40% 30% at 100% 0%,
            rgba(255, 255, 255, 0.02) 0%,
            transparent 50%
        );
}
.ad-masthead__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        rgba(255, 255, 255, 0.055) 1px,
        transparent 1px
    );
    background-size: 28px 28px;
}
.ad-masthead__inner {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
}
.ad-masthead__eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
}
.ad-masthead__rule {
    flex: 1;
    max-width: 80px;
    height: 1px;
    background: rgba(255, 255, 255, 0.18);
}
.ad-masthead__org {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ad-saffron);
}
.ad-masthead__title {
    font-family: var(--ad-ff-display);
    font-size: clamp(52px, 8vw, 92px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.025em;
    color: #fff;
    margin-bottom: 16px;
}
.ad-masthead__sub {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.58);
    max-width: 520px;
    margin: 0 auto 40px;
}

/* Stats strip */
.ad-masthead__stats {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 18px 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.ad-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 36px;
}
.ad-stat__num {
    font-family: var(--ad-ff-display);
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}
.ad-stat__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}
.ad-stat__divider {
    width: 1px;
    height: 44px;
    background: rgba(255, 255, 255, 0.11);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   FILTER BAR
══════════════════════════════════════════════════════════════════════ */
.ad-filterbar {
    background: var(--ad-surface);
    border-bottom: 1px solid var(--ad-border);
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06);
}
.ad-filterbar__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 13px 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Search field */
.ad-search {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 200px;
    max-width: 440px;
    background: var(--ad-ground);
    border: 1.5px solid var(--ad-border);
    border-radius: var(--ad-r-sm);
    overflow: hidden;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}
.ad-search:focus-within {
    border-color: var(--ad-saffron);
    box-shadow: 0 0 0 3px var(--ad-saffron-lt);
}
.ad-search__icon {
    flex-shrink: 0;
    margin: 0 10px;
    color: var(--ad-ink-4);
    pointer-events: none;
}
.ad-search__input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--ad-ff-body);
    font-size: 13.5px;
    color: var(--ad-ink);
    padding: 9px 8px 9px 0;
    outline: none;
}
.ad-search__input::placeholder {
    color: var(--ad-ink-4);
}
.ad-search__clear {
    flex-shrink: 0;
    margin-right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: var(--ad-border);
    color: var(--ad-ink-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.ad-search__clear:hover {
    background: var(--ad-saffron);
    color: #fff;
}

/* Select wrapper */
.ad-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.ad-select-icon {
    position: absolute;
    left: 11px;
    color: var(--ad-ink-4);
    pointer-events: none;
    z-index: 1;
}
.ad-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid var(--ad-border);
    border-radius: var(--ad-r-sm);
    background: var(--ad-surface);
    font-family: var(--ad-ff-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--ad-ink-2);
    padding: 9px 32px 9px 32px;
    cursor: pointer;
    outline: none;
    min-width: 160px;
    transition:
        border-color 0.18s,
        box-shadow 0.18s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.ad-select:focus {
    border-color: var(--ad-saffron);
    box-shadow: 0 0 0 3px var(--ad-saffron-lt);
}
.ad-select:hover:not(:focus) {
    border-color: var(--ad-ink-3);
}

/* Buttons */
.ad-search-btn {
    border: none;
    background: var(--ad-saffron);
    color: #fff;
    font-family: var(--ad-ff-body);
    font-size: 13px;
    font-weight: 600;
    padding: 9px 22px;
    border-radius: var(--ad-r-sm);
    cursor: pointer;
    transition:
        background 0.18s,
        transform 0.15s;
    white-space: nowrap;
}
.ad-search-btn:hover {
    background: #d05a0b;
}
.ad-search-btn:active {
    transform: scale(0.97);
}

.ad-reset-btn {
    font-size: 13px;
    font-weight: 500;
    color: var(--ad-ink-3);
    text-decoration: none;
    padding: 9px 14px;
    border-radius: var(--ad-r-sm);
    border: 1.5px solid var(--ad-border);
    background: transparent;
    transition:
        border-color 0.18s,
        color 0.18s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}
.ad-reset-btn:hover {
    border-color: var(--ad-saffron);
    color: var(--ad-saffron);
}

/* ══════════════════════════════════════════════════════════════════════
   BODY
══════════════════════════════════════════════════════════════════════ */
.ad-body {
    max-width: 1240px;
    margin: 0 auto;
    padding: 44px 32px 80px;
}

/* Section head — matches portal's editorial style */
.ad-section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 36px;
}
.ad-section-head__rule {
    flex: 1;
    height: 1px;
    background: var(--ad-border);
}
.ad-section-head__label {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ad-ink-3);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 9px;
}
.ad-section-head__count {
    background: var(--ad-saffron-lt);
    color: var(--ad-saffron);
    border-radius: var(--ad-r-pill);
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(232, 100, 12, 0.18);
}

/* ══════════════════════════════════════════════════════════════════════
   GRID — fixed columns, centred with gap, no orphan ghost columns
══════════════════════════════════════════════════════════════════════ */
.ad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-bottom: 52px;
}

/* ══════════════════════════════════════════════════════════════════════
   ALUMNI CARD
   Structure:
     .ad-card
       .ad-card__link
         .ad-card__portrait          ← full-bleed image / initials
           .ad-card__photo or .ad-card__initials
           .ad-online-dot
           .ad-card__veil            ← always-on gradient bottom
           .ad-card__info            ← always visible bottom panel
             .ad-card__accent        ← saffron top-border line
             .ad-card__name
             .ad-card__role
             .ad-card__meta
             .ad-card__view          ← hidden at rest, slides in on hover
══════════════════════════════════════════════════════════════════════ */
.ad-card {
    border-radius: var(--ad-r-card);
    overflow: hidden;
    box-shadow: var(--ad-shadow-card);
    background: var(--ad-night);
    transition:
        transform 0.28s var(--ad-ease),
        box-shadow 0.28s var(--ad-ease);
    position: relative;
}
.ad-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ad-shadow-hover);
}

.ad-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Portrait */
.ad-card__portrait {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--ad-night);
}

.ad-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.55s var(--ad-ease);
}
.ad-card:hover .ad-card__photo {
    transform: scale(1.07);
}

/* Initials placeholder */
.ad-card__initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
/* Subtle noise texture on initials cards */
.ad-card__initials::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
    background-size: 200px;
    pointer-events: none;
    opacity: 0.6;
}
.ad-card__initials span {
    font-family: var(--ad-ff-display);
    font-size: 56px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    transition:
        transform 0.4s var(--ad-ease),
        color 0.3s;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.ad-card:hover .ad-card__initials span {
    transform: scale(1.1);
    color: rgba(255, 255, 255, 0.95);
}

/* Online pulse dot */
.ad-online-dot {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2.5px solid #fff;
    z-index: 10;
    animation: ad-online-pulse 2.5s ease-in-out infinite;
}
@keyframes ad-online-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

/* Veil — gradient from transparent to near-black, always visible */
.ad-card__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 25%,
        rgba(18, 24, 35, 0.35) 55%,
        rgba(18, 24, 35, 0.96) 100%
    );
    pointer-events: none;
    z-index: 2;
    transition: background 0.35s var(--ad-ease);
}
.ad-card:hover .ad-card__veil {
    background: linear-gradient(
        to bottom,
        transparent 20%,
        rgba(18, 24, 35, 0.55) 52%,
        rgba(18, 24, 35, 0.98) 100%
    );
}

/* Info panel — always visible at the bottom */
.ad-card__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 0 20px 20px;
}

/* Saffron accent rule — the signature 2.5px line */
.ad-card__accent {
    display: block;
    width: 28px;
    height: 2.5px;
    background: var(--ad-saffron);
    border-radius: 2px;
    margin-bottom: 10px;
    transition: width 0.3s var(--ad-ease);
}
.ad-card:hover .ad-card__accent {
    width: 44px;
}

.ad-card__name {
    font-family: var(--ad-ff-display);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-card__role {
    font-size: 12.5px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}
.ad-card__org {
    color: rgba(255, 255, 255, 0.38);
}

/* Meta row (country + year) — always visible */
.ad-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ad-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}
.ad-meta-item svg {
    flex-shrink: 0;
    color: var(--ad-saffron);
    opacity: 0.8;
}
.ad-meta-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

/* "View profile" — hidden at rest, slides up + fades on hover */
.ad-card__view {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ad-saffron);
    opacity: 0;
    transform: translateY(6px);
    transition:
        opacity 0.25s var(--ad-ease),
        transform 0.25s var(--ad-ease);
}
.ad-card:hover .ad-card__view {
    opacity: 1;
    transform: translateY(0);
}
.ad-card__view svg {
    transition: transform 0.2s;
}
.ad-card:hover .ad-card__view svg {
    transform: translateX(3px);
}

/* ── Pagination ──────────────────────────────────────────────────────── */
.ad-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.ad-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--ad-r-sm);
    border: 1.5px solid var(--ad-border);
    background: var(--ad-surface);
    color: var(--ad-ink-2);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    font-family: var(--ad-ff-body);
    transition:
        border-color 0.18s,
        background 0.18s,
        color 0.18s;
}
.ad-page-btn:hover {
    border-color: var(--ad-saffron);
    color: var(--ad-saffron);
}
.ad-page-btn--active {
    background: var(--ad-night);
    border-color: var(--ad-night);
    color: #fff;
}
.ad-page-btn--active:hover {
    color: #fff;
}
.ad-page-btn--disabled {
    opacity: 0.38;
    pointer-events: none;
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.ad-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 100px 24px;
    gap: 12px;
}
.ad-empty__icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(232, 100, 12, 0.07);
    border: 1px solid rgba(232, 100, 12, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ad-saffron);
    margin-bottom: 8px;
}
.ad-empty__title {
    font-family: var(--ad-ff-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--ad-ink);
}
.ad-empty__sub {
    font-size: 15px;
    color: var(--ad-ink-3);
    max-width: 380px;
    line-height: 1.65;
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════════ */
/* 5 cols on very wide screens */
@media (min-width: 1440px) {
    .ad-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
/* 4 cols default (1240px max-width body) — already set above */

/* 3 cols on tablet landscape */
@media (max-width: 1100px) {
    .ad-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
}

/* 2 cols on tablet portrait */
@media (max-width: 720px) {
    .ad-masthead {
        padding: 56px 20px 48px;
    }
    .ad-masthead__stats {
        padding: 14px 0;
    }
    .ad-stat {
        padding: 0 20px;
    }
    .ad-stat__num {
        font-size: 26px;
    }
    .ad-filterbar__inner {
        padding: 12px 16px;
    }
    .ad-search {
        max-width: 100%;
        width: 100%;
        flex: none;
    }
    .ad-select {
        min-width: 130px;
    }
    .ad-body {
        padding: 32px 16px 60px;
    }
    .ad-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .ad-card__name {
        font-size: 16px;
    }
    .ad-card__role {
        font-size: 12px;
    }
}

/* 2 cols on mobile, tighter */
@media (max-width: 480px) {
    .ad-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .ad-masthead__stats {
        flex-direction: column;
        gap: 16px;
        border-radius: 12px;
        padding: 20px;
    }
    .ad-stat__divider {
        display: none;
    }
    .ad-card__initials span {
        font-size: 40px;
    }
    .ad-card__name {
        font-size: 14px;
    }
    .ad-card__role,
    .ad-meta-item {
        font-size: 11px;
    }
    .ad-card__info {
        padding: 0 14px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ad-card,
    .ad-card__photo,
    .ad-card__initials span,
    .ad-card__view,
    .ad-card__accent,
    .ad-card__veil {
        transition: none;
    }
    .ad-online-dot {
        animation: none;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   FILTER BAR HARDENED INLINE LAYOUT
   Force all filter controls onto one row regardless of inherited styles
══════════════════════════════════════════════════════════════════════ */
.ad-filterbar__inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.ad-filters {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    flex: 1 !important;
    min-width: 0 !important;
}

.ad-search {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex: 1 !important;
    min-width: 200px !important;
    max-width: 380px !important;
}

.ad-select-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.ad-select {
    display: block !important;
    width: auto !important;
}

.ad-search-btn,
.ad-reset-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.ad-result-meta {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 5px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}
