/* ═══════════════════════════════════════════════════════════════════════════
   Public doctor profile
   ═══════════════════════════════════════════════════════════════════════════
   Everything is scoped under .hs-profile so the Elementor kit's global
   typography and :root cannot collide with it, and so nothing here leaks into
   the rest of the site. Colour comes only from --hs-* tokens.
   ═══════════════════════════════════════════════════════════════════════════ */

.hs-profile {
    background: var(--hs-paper);
    color: var(--hs-ink);
    font-family: var(--hs-font-ui);
    font-size: var(--hs-text-base);
    line-height: var(--hs-leading-normal);
    -webkit-font-smoothing: antialiased;
    padding-bottom: var(--hs-space-8);
    /* Safety net: clips a stray absolutely-positioned child (e.g. the verified
       tooltip near the right edge) without breaking the sticky sub-nav the way
       overflow:hidden would. */
    overflow-x: clip;
}

.hs-profile *,
.hs-profile *::before,
.hs-profile *::after {
    box-sizing: border-box;
}

.hs-shell {
    width: 100%;
    max-width: var(--hs-container);
    margin-inline: auto;
    padding-inline: var(--hs-space-3);
}

@media (min-width: 768px) {
    .hs-shell {
        padding-inline: var(--hs-space-4);
    }
}

.hs-profile :is(h1, h2, h3) {
    font-family: var(--hs-font-display);
    font-weight: 500;
    letter-spacing: var(--hs-tracking-tight);
    line-height: var(--hs-leading-tight);
    color: var(--hs-ink);
    margin: 0;
}

.hs-profile a:not(.hs-btn) {
    color: var(--hs-accent);
    text-underline-offset: 3px;
}

/* Focus is never removed — only restyled. */
.hs-profile :focus-visible {
    outline: 2px solid var(--hs-accent);
    outline-offset: 3px;
    border-radius: var(--hs-radius-sm);
}

.hs-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hs-hero {
    padding-top: var(--hs-space-6);
    padding-bottom: var(--hs-space-5);
}

.hs-hero__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--hs-space-4);
    align-items: start;
}

@media (min-width: 768px) {
    .hs-hero__inner {
        grid-template-columns: 168px 1fr;
        gap: var(--hs-space-5);
    }
}

/* Portrait — square, 1:1, rounded. */
.hs-portrait {
    position: relative;
    width: 128px;
    aspect-ratio: 1;
    border-radius: var(--hs-radius-lg);
    overflow: hidden;
    background: var(--hs-surface);
    box-shadow: var(--hs-shadow-card);
}

@media (min-width: 768px) {
    .hs-portrait {
        width: 168px;
    }
}

.hs-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* The empty-photo state. Every profile on the site currently lands here, so
   it is designed as a first-class state rather than a placeholder: a monogram
   in a brand tint, never a grey "no image" box. */
.hs-portrait--monogram {
    display: grid;
    place-items: center;
    background: var(--hs-accent-tint);
    box-shadow: inset 0 0 0 1px var(--hs-hairline);
}

.hs-portrait__monogram {
    font-family: var(--hs-font-display);
    font-size: 3rem;
    font-weight: 500;
    letter-spacing: var(--hs-tracking-tight);
    color: var(--hs-accent);
    user-select: none;
}

@media (min-width: 768px) {
    .hs-portrait__monogram {
        font-size: 4rem;
    }
}

.hs-hero__name {
    font-size: var(--hs-text-2xl);
    display: flex;
    align-items: center;
    gap: var(--hs-space-2);
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .hs-hero__name {
        font-size: var(--hs-text-3xl);
    }
}

.hs-hero__role {
    margin: var(--hs-space-2) 0 0;
    font-size: var(--hs-text-md);
    color: var(--hs-ink-muted);
    line-height: var(--hs-leading-snug);
}

/* ── Verified badge ────────────────────────────────────────────────────────
   Teal is reserved for this and for active membership, so "verified" reads
   instantly and never competes with the oxblood CTA. */
.hs-verified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    border-radius: var(--hs-radius-full);
    background: var(--hs-state-verified-tint);
    color: var(--hs-state-verified);
    font-family: var(--hs-font-ui);
    font-size: var(--hs-text-xs);
    font-weight: 600;
    letter-spacing: var(--hs-tracking-wide);
    text-transform: uppercase;
    position: relative;
    cursor: help;
    border: 0;
}

.hs-verified svg {
    width: 14px;
    height: 14px;
    flex: none;
}

.hs-verified__tip {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    width: max-content;
    max-width: min(260px, calc(100vw - var(--hs-space-5)));
    padding: var(--hs-space-2) var(--hs-space-3);
    border-radius: var(--hs-radius-md);
    background: var(--hs-ink);
    color: var(--hs-surface);
    font-size: var(--hs-text-xs);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    line-height: var(--hs-leading-snug);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity var(--hs-dur-fast) var(--hs-ease-out),
        transform var(--hs-dur-fast) var(--hs-ease-out);
}

.hs-verified:hover .hs-verified__tip,
.hs-verified:focus-visible .hs-verified__tip {
    opacity: 1;
    transform: translateY(0);
}

/* ── Credentials rail ──────────────────────────────────────────────────── */

.hs-rail {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hs-space-3) var(--hs-space-5);
    margin-top: var(--hs-space-4);
    padding-top: var(--hs-space-4);
    border-top: 1px solid var(--hs-hairline);
    list-style: none;
    padding-inline: 0;
}

.hs-rail__item {
    display: flex;
    align-items: flex-start;
    gap: var(--hs-space-2);
    min-width: 0;
}

.hs-rail__icon {
    width: 20px;
    height: 20px;
    flex: none;
    color: var(--hs-ink-subtle);
    margin-top: 1px;
}

.hs-rail__label {
    display: block;
    font-size: var(--hs-text-xs);
    letter-spacing: var(--hs-tracking-caps);
    text-transform: uppercase;
    color: var(--hs-ink-subtle);
    margin-bottom: 2px;
}

.hs-rail__value {
    display: block;
    font-size: var(--hs-text-base);
    color: var(--hs-ink);
    font-weight: 500;
    word-break: break-word;
}

/* ── Sticky sub-nav ────────────────────────────────────────────────────────
   Real anchors, so this works with JS off and links are shareable. The pill
   and the indicator are driven by IntersectionObserver in hs-motion.js. */
.hs-subnav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: color-mix(in srgb, var(--hs-paper) 92%, transparent);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--hs-hairline);
    margin-top: var(--hs-space-4);
}

@supports not (backdrop-filter: blur(1px)) {
    .hs-subnav {
        background: var(--hs-paper);
    }
}

.hs-subnav__list {
    position: relative;
    display: flex;
    gap: var(--hs-space-1);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.hs-subnav__list::-webkit-scrollbar {
    display: none;
}

.hs-subnav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: var(--hs-tap);
    padding: 0 var(--hs-space-3);
    white-space: nowrap;
    font-size: var(--hs-text-sm);
    font-weight: 500;
    color: var(--hs-ink-muted);
    text-decoration: none;
    transition: color var(--hs-dur-fast) var(--hs-ease-out);
}

.hs-subnav__link:hover {
    color: var(--hs-ink);
}

.hs-subnav__link.is-active {
    color: var(--hs-accent);
}

.hs-subnav__indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 1px;
    background: var(--hs-accent);
    transform-origin: left center;
    transform: translateX(0) scaleX(0);
    pointer-events: none;
}

/* ── Sections ──────────────────────────────────────────────────────────── */

.hs-section {
    padding-top: var(--hs-space-6);
    /* Clears the sticky nav when jumped to via an anchor. */
    scroll-margin-top: 72px;
}

.hs-section__title {
    font-size: var(--hs-text-lg);
    margin-bottom: var(--hs-space-3);
}

.hs-prose {
    max-width: var(--hs-measure);
    color: var(--hs-ink-muted);
    line-height: var(--hs-leading-relaxed);
}

.hs-prose > * + * {
    margin-top: var(--hs-space-3);
}

.hs-prose :is(h2, h3, h4) {
    color: var(--hs-ink);
    margin-top: var(--hs-space-4);
}

/* ── Timeline list (workplace, education) ──────────────────────────────────
   Hairlines and whitespace rather than nested boxes. */
.hs-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: var(--hs-measure);
}

.hs-timeline__item {
    position: relative;
    padding: var(--hs-space-3) 0 var(--hs-space-3) var(--hs-space-4);
    border-bottom: 1px solid var(--hs-hairline);
}

.hs-timeline__item:last-child {
    border-bottom: 0;
}

.hs-timeline__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: calc(var(--hs-space-3) + 7px);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hs-accent);
    opacity: 0.5;
}

.hs-timeline__title {
    font-family: var(--hs-font-ui);
    font-size: var(--hs-text-md);
    font-weight: 600;
    letter-spacing: 0;
    color: var(--hs-ink);
}

.hs-timeline__subtitle {
    margin: 2px 0 0;
    color: var(--hs-ink-muted);
}

.hs-timeline__meta {
    margin: var(--hs-space-1) 0 0;
    font-size: var(--hs-text-sm);
    color: var(--hs-ink-subtle);
}

/* ── Chambers ──────────────────────────────────────────────────────────────
   The highest-intent content on the page, promoted out of the sidebar into a
   full section. */
.hs-chambers {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--hs-space-3);
}

@media (min-width: 768px) {
    .hs-chambers {
        grid-template-columns: repeat(2, 1fr);
    }
}

.hs-chamber {
    position: relative;
    background: var(--hs-surface);
    border-radius: var(--hs-radius-lg);
    padding: var(--hs-space-4);
    box-shadow: var(--hs-shadow-card);
    isolation: isolate;
}

/* Hover elevation animates a pseudo-element's opacity, never box-shadow. */
.hs-chamber::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: var(--hs-shadow-lift);
    opacity: 0;
    transition: opacity var(--hs-dur-base) var(--hs-ease-out);
    pointer-events: none;
    z-index: -1;
}

.hs-chamber:hover::after,
.hs-chamber:focus-within::after {
    opacity: 1;
}

.hs-chamber__name {
    font-family: var(--hs-font-ui);
    font-size: var(--hs-text-md);
    font-weight: 600;
    letter-spacing: 0;
    margin: 0;
}

.hs-chamber__area {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: var(--hs-space-1) 0 0;
    font-size: var(--hs-text-sm);
    color: var(--hs-ink-muted);
}

.hs-chamber__area svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--hs-ink-subtle);
}

.hs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: var(--hs-space-3) 0 0;
    list-style: none;
    padding: 0;
}

.hs-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--hs-radius-full);
    background: var(--hs-surface-sunken);
    color: var(--hs-ink-muted);
    font-size: var(--hs-text-xs);
    font-weight: 500;
    white-space: nowrap;
}

.hs-chamber__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hs-space-2);
    margin-top: var(--hs-space-3);
    padding-top: var(--hs-space-3);
    border-top: 1px solid var(--hs-hairline);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.hs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--hs-tap);
    padding: 0 var(--hs-space-3);
    border-radius: var(--hs-radius-md);
    border: 1px solid transparent;
    font-family: var(--hs-font-ui);
    font-size: var(--hs-text-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--hs-dur-fast) var(--hs-ease-out),
        border-color var(--hs-dur-fast) var(--hs-ease-out),
        color var(--hs-dur-fast) var(--hs-ease-out),
        transform var(--hs-dur-fast) var(--hs-ease-out);
}

.hs-btn:active {
    transform: scale(0.98);
}

.hs-btn svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.hs-btn--primary {
    background: var(--hs-accent);
    color: var(--hs-ink-on-accent);
}

.hs-btn--primary:hover {
    background: var(--hs-accent-hover);
    color: var(--hs-ink-on-accent);
}

.hs-btn--quiet {
    background: transparent;
    border-color: var(--hs-hairline-strong);
    color: var(--hs-ink);
}

.hs-btn--quiet:hover {
    background: var(--hs-surface-sunken);
    color: var(--hs-ink);
}

/* ── Empty state ───────────────────────────────────────────────────────── */

.hs-empty {
    padding: var(--hs-space-4);
    border: 1px dashed var(--hs-hairline-strong);
    border-radius: var(--hs-radius-lg);
    color: var(--hs-ink-subtle);
    font-size: var(--hs-text-sm);
}

/* ── Society strip ─────────────────────────────────────────────────────────
   Recognition, not account admin. */
.hs-society {
    margin-top: var(--hs-space-7);
    padding: var(--hs-space-4);
    border-radius: var(--hs-radius-lg);
    background: var(--hs-surface);
    box-shadow: var(--hs-shadow-card);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--hs-space-3);
}

.hs-society__label {
    display: block;
    font-size: var(--hs-text-xs);
    letter-spacing: var(--hs-tracking-caps);
    text-transform: uppercase;
    color: var(--hs-ink-subtle);
}

.hs-society__value {
    display: flex;
    align-items: center;
    gap: var(--hs-space-2);
    margin-top: var(--hs-space-1);
    font-family: var(--hs-font-display);
    font-size: var(--hs-text-md);
    color: var(--hs-ink);
}

.hs-society__number {
    font-family: var(--hs-font-mono);
    font-size: var(--hs-text-sm);
    letter-spacing: var(--hs-tracking-wide);
    color: var(--hs-ink-muted);
}

/* ── Entrance ──────────────────────────────────────────────────────────────
   Elements are visible by default: if hs-motion.js never runs, the page is
   fully readable. The module only adds the rise-and-fade. */
[data-hs-enter] {
    opacity: 1;
}
