/* =================================================================
   Paul M. Kiproff, MD — stylesheet
   Mobile-first. Custom CSS only. No frameworks.
   ================================================================= */

:root {
    --navy:      #12244f;
    --navy-2:    #1b3a6b;
    --slate:     #33404f;
    --muted:     #5b6572;
    --accent:    #1b5e9c;
    --accent-2:  #123f6b;
    --line:      #e3e7ee;
    --line-soft: #edf0f5;
    --bg:        #f7f8fa;
    --band:      #eef1f6;
    --partner:   #e9eef7;
    --white:     #ffffff;

    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --sans:  "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --wrap: 1120px;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(18, 36, 79, .04), 0 8px 24px rgba(18, 36, 79, .05);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--slate);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main {
    flex: 1 0 auto;
}

img { max-width: 100%; display: block; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    color: var(--navy);
    font-weight: 600;
    line-height: 1.18;
    margin: 0 0 .5em;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy);
    color: #fff;
    padding: 10px 16px;
    z-index: 100;
    border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Small caps eyebrow / section labels */
.eyebrow {
    font-family: var(--sans);
    font-weight: 600;
    font-size: .74rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 .9rem;
}

.rule {
    width: 54px;
    height: 3px;
    background: var(--accent);
    border: 0;
    margin: 1.25rem 0;
}

/* =================================================================
   Header / navigation
   ================================================================= */
.site-header {
    background: rgba(247, 248, 250, .92);
    backdrop-filter: saturate(1.1) blur(6px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    position: relative;
    flex-wrap: wrap;
}
.site-logo {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.site-logo:hover { text-decoration: none; color: var(--navy-2); }
.site-logo__md { color: var(--accent); }

.site-nav {
    display: flex;
    gap: 1.9rem;
    align-items: center;
}
.site-nav__link {
    font-weight: 500;
    color: var(--slate);
    font-size: 1rem;
    padding: 6px 0;
    position: relative;
}
.site-nav__link:hover { color: var(--navy); text-decoration: none; }
.site-nav__link.is-active { color: var(--navy); }
.site-nav__link.is-active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--accent);
}

/* Mobile nav toggle (CSS-only) */
.nav-toggle { display: none; }
.nav-toggle__btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 8px;
}
.nav-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 760px) {
    .nav-toggle__btn { display: flex; }
    .site-nav {
        flex-basis: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .28s ease;
    }
    .site-nav__link {
        width: 100%;
        padding: 14px 2px;
        border-top: 1px solid var(--line-soft);
    }
    .site-nav__link.is-active::after { display: none; }
    .site-nav__link.is-active { border-left: 3px solid var(--accent); padding-left: 12px; }
    .nav-toggle:checked ~ .site-nav { max-height: 320px; padding-bottom: 10px; }
    .nav-toggle:checked ~ .nav-toggle__btn .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked ~ .nav-toggle__btn .nav-toggle__bar:nth-child(2) { opacity: 0; }
    .nav-toggle:checked ~ .nav-toggle__btn .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* =================================================================
   Hero
   ================================================================= */
.hero {
    padding: 44px 0 40px;
}
.hero__inner {
    display: grid;
    gap: 32px;
    align-items: center;
}
.hero__name {
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1.04;
    margin: 0 0 .35rem;
    color: var(--navy);
}
.hero__subtitle {
    font-family: var(--serif);
    font-size: clamp(1.15rem, 3.5vw, 1.5rem);
    font-weight: 400;
    color: var(--muted);
    font-style: italic;
    margin: 0;
}

/* Credential rows */
.creds {
    list-style: none;
    margin: 1.6rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.15rem;
}
.cred {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 14px;
    align-items: start;
}
.cred__icon {
    color: var(--accent);
    width: 30px;
    height: 30px;
    margin-top: 2px;
}
.cred__icon svg { width: 100%; height: 100%; display: block; }
.cred__title {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--navy);
    font-size: 1.08rem;
    line-height: 1.3;
}
.cred__meta { color: var(--muted); font-size: .98rem; }
.cred__note { color: var(--slate); }

/* Portrait */
.hero__figure {
    margin: 0;
    justify-self: center;
    max-width: 420px;
    width: 100%;
}
.hero__figure img {
    width: 100%;
    background: transparent;
    border: 0;
    box-shadow: none;
    mix-blend-mode: multiply;
}

@media (min-width: 900px) {
    .hero { padding: 64px 0 56px; }
    .hero__inner {
        grid-template-columns: 1.15fr .85fr;
        gap: 56px;
    }
    .hero__figure { order: 2; max-width: 460px; }
    .hero__text { order: 1; }
}

/* =================================================================
   Section scaffolding
   ================================================================= */
.section { padding: 52px 0; }
.section--band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.4rem;
}
.section-label__icon { color: var(--accent); width: 20px; height: 20px; flex: none; }
.section-label__icon svg { width: 100%; height: 100%; }
.section-label__text {
    font-family: var(--sans);
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--navy);
    margin: 0;
}

/* =================================================================
   Clinical expertise cards
   ================================================================= */
.cards {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
}
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: var(--shadow);
}
.card__icon {
    color: var(--accent);
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
}
.card__icon svg { width: 100%; height: 100%; }
.card__title {
    font-size: 1.2rem;
    margin: 0 0 .45rem;
}
.card__body {
    margin: 0;
    color: var(--muted);
    font-size: .98rem;
}

@media (min-width: 620px) {
    .cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
    .cards { grid-template-columns: repeat(4, 1fr); }
}

/* =================================================================
   Overview row: About | Publications | Recognition
   ================================================================= */
.overview {
    display: grid;
    gap: 44px;
    grid-template-columns: 1fr;
}
@media (min-width: 820px) {
    .overview { grid-template-columns: 1fr 1fr; gap: 48px; }
    .overview__recognition { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
    .overview { grid-template-columns: 1.1fr 1.2fr .9fr; }
    .overview__recognition { grid-column: auto; }
}

.overview__intro { margin-bottom: 1.1rem; color: var(--slate); }

.textlink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--accent);
    font-size: .98rem;
    white-space: nowrap;
}
.textlink .arrow { width: 17px; height: 17px; flex: none; transition: transform .18s ease; }
.textlink:hover { text-decoration: none; }
.textlink:hover .arrow { transform: translateX(3px); }

/* Selected publications mini-list */
.pub-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.15rem; }
.pub-mini__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid var(--line);
}
.pub-mini__item:last-child { border-bottom: 0; padding-bottom: 0; }
.pub-mini__year {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--accent);
    font-size: 1.05rem;
}
.pub-mini__title {
    font-family: var(--serif);
    color: var(--navy);
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.3;
    margin: 0 0 .2rem;
}
.pub-mini__venue { color: var(--muted); font-size: .9rem; font-style: italic; margin: 0; }

/* Recognition */
.recognition { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.recognition__item {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 14px;
    align-items: center;
}
.badge {
    width: 46px; height: 46px;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex: none;
}
.badge svg { width: 24px; height: 24px; }
.recognition__title { font-family: var(--serif); font-weight: 600; color: var(--navy); font-size: 1rem; line-height: 1.25; }
.recognition__meta { color: var(--muted); font-size: .9rem; }

/* =================================================================
   Partner band
   ================================================================= */
.partner {
    background: var(--partner);
    border-top: 1px solid #d9e2f0;
    padding: 34px 0;
}
.partner__inner {
    display: grid;
    gap: 26px;
    grid-template-columns: 1fr;
    align-items: center;
}
.partner__item { display: flex; align-items: center; gap: 14px; }
.partner__logo { height: 42px; width: auto; flex: none; }
.partner__name { line-height: 1.25; }
.partner__name strong { display: block; font-family: var(--serif); color: var(--navy); font-size: 1.02rem; }
.partner__name span { color: var(--muted); font-size: .9rem; }
.partner__tagline {
    font-family: var(--serif);
    color: var(--navy);
    font-style: italic;
    font-size: 1.02rem;
    margin: 0;
    line-height: 1.4;
}
.partner__tagline strong { font-style: normal; display: block; letter-spacing: .01em; }
@media (min-width: 780px) {
    .partner__inner { grid-template-columns: auto auto 1fr; gap: 40px; }
    .partner__divider { border-left: 1px solid #cdd8ea; align-self: stretch; }
}

/* =================================================================
   Interior page layout
   ================================================================= */
.page-hero {
    padding: 52px 0 8px;
}
.page-hero__eyebrow { color: var(--accent); }
.page-hero h1 {
    font-size: clamp(2.1rem, 6vw, 3rem);
    margin: 0 0 .4rem;
}
.page-hero__lede {
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--muted);
    font-style: italic;
    max-width: 60ch;
}

.prose { max-width: 68ch; }
.prose p { color: var(--slate); }
.prose h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6rem; }

.content-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr;
    padding: 8px 0 20px;
}
@media (min-width: 900px) {
    .content-grid { grid-template-columns: 1.4fr .9fr; gap: 56px; align-items: start; }
}

/* Definition-style panels (education, honors) */
.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 26px 10px;
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}
.panel h2, .panel h3 { margin-top: 0; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__item {
    position: relative;
    padding: 0 0 22px 26px;
    border-left: 2px solid var(--line);
}
.timeline__item:last-child { padding-bottom: 4px; }
.timeline__item::before {
    content: "";
    position: absolute;
    left: -7px; top: 4px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--white);
    box-shadow: 0 0 0 1px var(--line);
}
.timeline__year { font-weight: 600; color: var(--accent); font-size: .9rem; letter-spacing: .02em; }
.timeline__title { font-family: var(--serif); font-weight: 600; color: var(--navy); font-size: 1.05rem; margin: 2px 0 2px; }
.timeline__meta { color: var(--muted); font-size: .94rem; }

/* Simple keyed lists */
.deflist { margin: 0; }
.deflist div { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.deflist div:last-child { border-bottom: 0; }
.deflist dt { font-weight: 600; color: var(--navy); font-family: var(--serif); }
.deflist dd { margin: 2px 0 0; color: var(--muted); font-size: .96rem; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.tag {
    font-size: .86rem;
    color: var(--accent-2);
    background: #eaf1f9;
    border: 1px solid #d8e6f4;
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 500;
}

/* =================================================================
   Publications (full list)
   ================================================================= */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}
.pub:last-child { border-bottom: 0; }
.pub__year { font-family: var(--serif); font-weight: 600; color: var(--accent); font-size: 1.3rem; }
.pub__title { font-family: var(--serif); font-weight: 600; color: var(--navy); font-size: 1.15rem; line-height: 1.3; margin: 0 0 .3rem; }
.pub__venue { color: var(--muted); font-style: italic; margin: 0 0 .1rem; font-size: .96rem; }
.pub__topic { color: var(--slate); font-size: .94rem; margin: 0 0 .55rem; }
.pub__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.pub__links { display: flex; gap: 14px; }
.pub__links a { font-weight: 600; font-size: .9rem; }
.pub__cites { color: var(--muted); font-size: .84rem; }
@media (max-width: 520px) {
    .pub { grid-template-columns: 1fr; gap: 4px; }
    .pub__year { font-size: 1rem; }
}

.callout {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 22px 26px;
    box-shadow: var(--shadow);
    margin: 6px 0 30px;
}
.callout h2 { margin-top: 0; font-size: 1.3rem; }
.callout p:last-child { margin-bottom: 0; }
.note { color: var(--muted); font-size: .88rem; font-style: italic; }

/* =================================================================
   Presentations
   ================================================================= */
.pres-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .pres-list { grid-template-columns: 1fr 1fr; } }

.pres {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
}
.pres__icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: #eaf1f9;
    color: var(--accent-2);
    display: flex; align-items: center; justify-content: center;
    flex: none;
}
.pres__icon svg { width: 22px; height: 22px; }
.pres__title { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; line-height: 1.3; margin: 0 0 .35rem; }
.pres__title a { color: var(--navy); }
.pres__title a:hover { color: var(--accent); }
.pres__desc { color: var(--slate); font-size: .95rem; margin: 0 0 .5rem; }
.pres__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .85rem; }
.pres__type { font-weight: 600; color: var(--accent-2); }

/* Presentation viewer modal */
.viewer[hidden] { display: none; }
.viewer {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 22, 45, .64);
    backdrop-filter: blur(2px);
}
.viewer__dialog {
    position: relative;
    width: 100%;
    max-width: 1040px;
    height: min(88vh, 780px);
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.viewer__bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    background: var(--navy);
    color: #fff;
    flex: none;
}
.viewer__title {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.viewer__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.viewer__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--sans);
    font-size: .84rem;
    font-weight: 600;
    color: #e7ecf5;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 6px;
    padding: 7px 12px;
    line-height: 1;
    cursor: pointer;
}
.viewer__btn:hover { background: rgba(255, 255, 255, .22); color: #fff; text-decoration: none; }
.viewer__btn[hidden] { display: none; }
.viewer__btn svg { width: 15px; height: 15px; }
.viewer__close { background: transparent; }
.viewer__body { flex: 1 1 auto; background: #f1f2f5; min-height: 0; }
.viewer__body iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 620px) {
    .viewer { padding: 0; }
    .viewer__dialog { height: 100%; max-width: none; border-radius: 0; }
    .viewer__title { font-size: .95rem; }
    .viewer__btn { padding: 8px; }
    .viewer__btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.empty-state {
    background: var(--white);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 48px 28px;
    text-align: center;
    color: var(--muted);
}
.empty-state svg { width: 40px; height: 40px; color: #b6c1d1; margin-bottom: 12px; }
.empty-state p { margin: 0; }

/* =================================================================
   Footer
   ================================================================= */
.site-footer {
    background: var(--navy);
    color: #c7d0e0;
    padding: 26px 0;
    margin-top: 0;
}
.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
}
.site-footer__copy { margin: 0; font-family: var(--serif); font-size: 1rem; color: #e7ecf5; }
.site-footer__nav a { color: #aebdd6; font-size: .92rem; }
.site-footer__nav a:hover { color: #fff; }
.site-footer__sep { color: #47588a; margin: 0 8px; }
@media (min-width: 620px) {
    .site-footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* =================================================================
   Utilities
   ================================================================= */
.lead { font-size: 1.15rem; color: var(--slate); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
