/* ═══════════════════════════════════════════════════════
   MBBS Portfolio — Main Stylesheet
   Palette: White | Medical Blue (#1a6fc4) | Teal accent
   ═══════════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── FIX: prevent horizontal overflow on ALL screens ── */
html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}
body {
    /* NOTE: do NOT use transform/scale here — it breaks position:fixed children */
    overflow-x: hidden;
    max-width: 100vw;
}

:root {
    --blue:         #1a6fc4;
    --blue-dark:    #14559a;
    --blue-light:   #e8f1fb;
    --teal:         #0d9488;
    --teal-light:   #ccfbf1;
    --white:        #ffffff;
    --off-white:    #f8fafd;
    --gray-100:     #f3f4f6;
    --gray-200:     #e5e7eb;
    --gray-400:     #9ca3af;
    --gray-600:     #4b5563;
    --gray-800:     #1f2937;
    --red:          #dc2626;
    --green:        #16a34a;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
    --shadow-md:    0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:    0 8px 32px rgba(0,0,0,.14);
    --radius:       12px;
    --radius-sm:    8px;
    --transition:   .25s ease;
    --font-body:    'Inter', sans-serif;
    --font-heading: 'Merriweather', serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.7;
    font-size: 16px;
}

img { max-width: 100%; display: block; }
a  { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-dark); }
ul { list-style: none; }

h1,h2,h3,h4,h5 {
    font-family: var(--font-heading);
    line-height: 1.3;
    color: var(--gray-800);
}

/* ── Utility ── */
.container      { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.section        { padding: 5rem 0; }
.section-alt    { background: var(--off-white); }
.text-center    { text-align: center; }
.text-blue      { color: var(--blue); }
.fw-600         { font-weight: 600; }
.mt-1           { margin-top: .5rem; }
.mt-2           { margin-top: 1rem; }
.mt-3           { margin-top: 1.5rem; }
.mb-2           { margin-bottom: 1rem; }
.tag            { display: inline-block; background: var(--blue-light); color: var(--blue-dark); border-radius: 20px; padding: .2rem .75rem; font-size: .78rem; font-weight: 600; }
.tag-teal       { background: var(--teal-light); color: var(--teal); }
.tag-green      { background: #dcfce7; color: var(--green); }
.tag-red        { background: #fee2e2; color: var(--red); }

/* ── Section Heading ── */
.section-heading {
    text-align: center;
    margin-bottom: 3.5rem;
}
.section-heading h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    position: relative;
    display: inline-block;
    padding-bottom: .75rem;
}
.section-heading h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60px; height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--teal));
    border-radius: 2px;
}
.section-heading p {
    margin-top: 1rem;
    color: var(--gray-600);
    max-width: 600px;
    margin-left: auto; margin-right: auto;
}

/* ══════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════ */
.top-bar {
    background: var(--blue-dark);
    color: rgba(255,255,255,.85);
    font-size: .8rem;
    padding: .4rem 0;
}
.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.top-bar span {
    display: flex;
    align-items: center;
    gap: .35rem;
}
/* Status badge in top bar */
.tb-status {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .74rem;
    color: rgba(255,255,255,.8);
    white-space: nowrap;
}
.tb-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 6px #4ade80;
    flex-shrink: 0;
}
/* Social icon links in top bar */
.tb-social {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,.6);
    transition: color .2s;
}
.tb-social:hover { color: #fff; }
.tb-divider {
    width: 1px; height: 14px;
    background: rgba(255,255,255,.2);
}

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--gray-800);
}
.nav-brand:hover { color: var(--blue); }
.brand-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    display: flex; align-items: center; justify-content: center;
    color: white;
    flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: .95rem; }
.brand-tagline { font-size: .72rem; color: var(--gray-400); }

.nav-links {
    display: flex;
    gap: .25rem;
    align-items: center;
}
.nav-links a {
    padding: .45rem .85rem;
    border-radius: var(--radius-sm);
    color: var(--gray-600);
    font-size: .9rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
    background: var(--blue-light);
    color: var(--blue);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--gray-800);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* ══════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════ */
.hero {
    background: linear-gradient(135deg, #0f3d6e 0%, #1a6fc4 50%, #0d9488 100%);
    color: white;
    padding: 5rem 0 6rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    position: relative;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    color: white;
    font-family: var(--font-heading);
    margin-bottom: .75rem;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,.85);
    margin-bottom: 1.5rem;
}
.hero-bio {
    font-size: .95rem;
    color: rgba(255,255,255,.75);
    max-width: 540px;
    margin-bottom: 2rem;
    line-height: 1.8;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: white;
    color: var(--blue);
    box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); color: var(--blue-dark); }
.btn-outline {
    border-color: rgba(255,255,255,.7);
    color: white;
    background: transparent;
}
.btn-outline:hover { background: rgba(255,255,255,.15); }
.btn-blue {
    background: var(--blue);
    color: white;
    box-shadow: var(--shadow-sm);
}
.btn-blue:hover { background: var(--blue-dark); box-shadow: var(--shadow-md); }

.hero-photo {
    flex-shrink: 0;
}
.hero-photo img,
.hero-photo .photo-placeholder {
    width: 220px; height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255,255,255,.3);
    box-shadow: var(--shadow-lg);
}
.photo-placeholder {
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.5);
    font-size: 4rem;
}

/* ── Hero Stats ── */
.hero-stats {
    background: var(--white);
    border-top: 4px solid var(--blue);
    box-shadow: var(--shadow-md);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    divide-x: 1px solid var(--gray-200);
}
.stat-item {
    padding: 1.75rem 1.5rem;
    text-align: center;
    border-right: 1px solid var(--gray-200);
}
.stat-item:last-child { border-right: none; }
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--blue);
    font-family: var(--font-heading);
}
.stat-label {
    font-size: .8rem;
    color: var(--gray-600);
    margin-top: .25rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.cards-grid-2 { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }

.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    padding: 1.75rem;
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}
.card-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    background: var(--blue-light);
    color: var(--blue);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.card p  { color: var(--gray-600); font-size: .9rem; }
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* ══════════════════════════════════════════
   ABOUT PAGE
══════════════════════════════════════════ */
.about-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3rem;
    align-items: start;
}
.about-photo-wrap img,
.about-photo-wrap .photo-placeholder {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}
.about-photo-wrap .photo-placeholder {
    height: 380px;
    background: var(--blue-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 5rem; color: var(--blue);
}
.info-list { display: grid; gap: .65rem; }
.info-row  {
    display: flex; gap: .75rem;
    font-size: .9rem;
    align-items: flex-start;
}
.info-row .label { color: var(--gray-400); min-width: 90px; flex-shrink: 0; }
.info-row .value { color: var(--gray-800); font-weight: 500; }

/* ══════════════════════════════════════════
   TIMELINE (Academics / Clinical)
══════════════════════════════════════════ */
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before {
    content: '';
    position: absolute;
    left: 14px; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--blue), var(--teal));
    border-radius: 1px;
}
.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: .35rem;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--blue);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--blue);
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}
.timeline-card:hover { box-shadow: var(--shadow-md); }
.timeline-card h3 { font-size: 1rem; margin-bottom: .25rem; color: var(--blue); }
.timeline-card .inst { font-weight: 600; color: var(--gray-800); }
.timeline-card .period {
    font-size: .8rem;
    color: var(--gray-400);
    margin-bottom: .75rem;
}
.subjects-wrap { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.subject-tag {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: .15rem .55rem;
    border-radius: 12px;
    font-size: .75rem;
}

/* ══════════════════════════════════════════
   RESEARCH CARDS
══════════════════════════════════════════ */
.research-card {
    border-left: 4px solid var(--blue);
}
.research-card h3 { color: var(--blue-dark); font-size: 1rem; line-height: 1.5; }
.research-meta { font-size: .82rem; color: var(--gray-400); margin: .4rem 0 .75rem; }
.research-abstract {
    font-size: .88rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-top: .75rem;
}
.doi-link { font-size: .8rem; color: var(--teal); }

/* ══════════════════════════════════════════
   CASE STUDY CARDS
══════════════════════════════════════════ */
.case-card { border-top: 4px solid var(--teal); }
.case-card h3 { color: var(--gray-800); font-size: 1rem; }
.learning-list { margin-top: .75rem; padding-left: 1.1rem; }
.learning-list li {
    font-size: .85rem;
    color: var(--gray-600);
    margin-bottom: .3rem;
    list-style: disc;
}
.outcome-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--teal-light);
    color: var(--teal);
    padding: .3rem .8rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    margin-top: .75rem;
}

/* ══════════════════════════════════════════
   CERTIFICATIONS
══════════════════════════════════════════ */
.cert-card {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.cert-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cert-icon {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    color: white;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
    font-weight: 700;
}
.cert-info h4 { font-size: .95rem; margin-bottom: .2rem; }
.cert-info p  { font-size: .82rem; color: var(--gray-600); }
.cert-expiry {
    margin-top: .5rem;
    font-size: .78rem;
    color: var(--gray-400);
}

/* ══════════════════════════════════════════
   SKILLS
══════════════════════════════════════════ */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.skills-col h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--blue-light);
    color: var(--blue);
}
.skill-item { margin-bottom: 1.1rem; }
.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: .35rem;
    font-size: .88rem;
}
.skill-name { font-weight: 500; color: var(--gray-800); }
.skill-percent { color: var(--blue); font-weight: 600; }
.skill-bar {
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}
.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--teal));
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(.4,0,.2,1);
    width: 0;
}

/* ══════════════════════════════════════════
   ACHIEVEMENTS — Premium card grid
══════════════════════════════════════════ */

/* Grid: 3 cols → 2 cols → 1 col */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 900px) {
    .achievements-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .achievements-grid { grid-template-columns: 1fr; }
}

/* Individual card */
.ach-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
}
.ach-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 16px 40px rgba(26,111,196,.16);
}

/* Colored banner — rotates through 3 gradients */
.ach-card-head {
    position: relative;
    height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
    flex-shrink: 0;
}
.ach-card:nth-child(3n+2) .ach-card-head {
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
}
.ach-card:nth-child(3n) .ach-card-head {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
}

/* Large icon in banner */
.ach-card-icon {
    font-size: 2.4rem;
    filter: drop-shadow(0 3px 10px rgba(0,0,0,.25));
    animation: floatY 5s ease-in-out infinite;
}
.ach-card:nth-child(even) .ach-card-icon { animation-delay: 1.2s; }

/* Year badge — top-right of banner */
.ach-badge {
    position: absolute;
    top: .65rem;
    right: .75rem;
    background: rgba(255,255,255,.22);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    padding: .18rem .55rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: .03em;
}

/* Card body */
.ach-card-body {
    padding: 1.2rem 1.25rem 1.35rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ach-issuer {
    font-size: .72rem;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .35rem;
}
.ach-title {
    font-size: .98rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: .5rem;
    line-height: 1.4;
}
.ach-desc {
    font-size: .82rem;
    color: var(--gray-600);
    line-height: 1.6;
    flex: 1;
}

/* ── Legacy achievement-card (kept for other pages) ── */
.achievement-card {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.ach-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--blue-light), var(--teal-light));
    color: var(--blue);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.ach-body h3 { font-size: .98rem; margin-bottom: .2rem; }
.ach-body p  { font-size: .85rem; color: var(--gray-600); }
.ach-meta    { font-size: .8rem; color: var(--gray-400); margin-bottom: .3rem; }

/* ══════════════════════════════════════════
   GALLERY
══════════════════════════════════════════ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4/3;
    background: var(--gray-100);
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    color: white;
    padding: 1.5rem .75rem .75rem;
    font-size: .82rem;
    transform: translateY(100%);
    transition: transform var(--transition);
}
.gallery-item:hover .gallery-caption { transform: translateY(0); }
.gallery-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--gray-400);
    gap: .5rem;
    font-size: .8rem;
}

/* ══════════════════════════════════════════
   CONTACT PAGE
══════════════════════════════════════════ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3rem;
    align-items: start;
}
.contact-info-card {
    background: linear-gradient(135deg, var(--blue), var(--teal));
    color: white;
    border-radius: var(--radius);
    padding: 2.5rem;
}
.contact-info-card h3 { color: white; font-size: 1.4rem; margin-bottom: 1rem; }
.contact-info-card p  { color: rgba(255,255,255,.85); margin-bottom: 2rem; }
.contact-detail {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}
.contact-detail svg { flex-shrink: 0; margin-top: 2px; color: rgba(255,255,255,.7); }
.contact-detail strong { display: block; font-size: .8rem; color: rgba(255,255,255,.6); margin-bottom: .1rem; }
.contact-detail span  { font-size: .9rem; }

.contact-form-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: .4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: .7rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .9rem;
    color: var(--gray-800);
    background: var(--off-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26,111,196,.12);
    background: white;
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: .9rem;
}
.alert-success { background: #dcfce7; color: var(--green); border: 1px solid #86efac; }
.alert-error   { background: #fee2e2; color: var(--red);   border: 1px solid #fca5a5; }

/* ══════════════════════════════════════════
   PAGE BANNER
══════════════════════════════════════════ */
.page-banner {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
    color: white;
    padding: 3.5rem 0;
    text-align: center;
}
.page-banner h1 {
    color: white;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: .5rem;
}
.page-banner p { color: rgba(255,255,255,.8); font-size: 1rem; }
.breadcrumb {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: .75rem;
    font-size: .85rem;
    color: rgba(255,255,255,.7);
}
.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb a:hover { color: white; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.site-footer {
    background: var(--gray-800);
    color: rgba(255,255,255,.75);
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}
.footer-brand .brand-name { color: white; font-size: 1.1rem; font-weight: 700; display: block; margin-bottom: .5rem; }
.footer-brand p { font-size: .85rem; line-height: 1.7; }
.footer-links h4, .footer-social h4 {
    color: white;
    font-size: .9rem;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
}
.footer-links ul li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .85rem; transition: color var(--transition); }
.footer-links a:hover { color: white; }
.social-icons { display: flex; gap: .75rem; flex-wrap: wrap; }
.social-icons a {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.75);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition), color var(--transition);
}
.social-icons a svg { width: 18px; height: 18px; }
.social-icons a:hover { background: var(--blue); color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 1.25rem 0;
    text-align: center;
    font-size: .8rem;
    color: rgba(255,255,255,.45);
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: white; }

/* ══════════════════════════════════════════
   SCROLL ANIMATION
══════════════════════════════════════════ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: none;
}

/* ══════════════════════════════════════════
   ADMIN PANEL
══════════════════════════════════════════ */
.admin-wrap {
    min-height: 100vh;
    background: var(--gray-100);
    font-family: var(--font-body);
}
.admin-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 240px;
    background: var(--blue-dark);
    color: white;
    padding: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}
.admin-logo {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    font-weight: 700;
    font-size: 1rem;
    color: white;
}
.admin-logo span { display: block; font-size: .72rem; color: rgba(255,255,255,.5); margin-top: .15rem; font-weight: 400; }
.admin-nav { padding: 1rem 0; flex: 1; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 1.25rem;
    color: rgba(255,255,255,.7);
    font-size: .88rem;
    transition: background var(--transition), color var(--transition);
}
.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,.1);
    color: white;
}
.admin-nav .nav-section {
    padding: .75rem 1.25rem .25rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.35);
}
.admin-footer-link {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.1);
}
.admin-footer-link a {
    color: rgba(255,255,255,.5);
    font-size: .82rem;
}
.admin-footer-link a:hover { color: white; }

.admin-main {
    margin-left: 240px;
    padding: 2rem;
    min-height: 100vh;
}
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
}
.admin-topbar h1 { font-size: 1.4rem; font-family: var(--font-body); font-weight: 700; }
.admin-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}
.admin-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-card-header h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; }
.admin-card-body { padding: 1.5rem; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    border-top: 4px solid var(--blue);
    text-align: center;
}
.stat-card .stat-number { font-size: 2rem; font-weight: 700; color: var(--blue); }
.stat-card .stat-label  { font-size: .8rem; color: var(--gray-600); margin-top: .25rem; }

.admin-form label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: .35rem;
}
.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition);
    margin-bottom: 1rem;
}
.admin-form input:focus,
.admin-form textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26,111,196,.1);
}
.admin-form textarea { resize: vertical; min-height: 100px; }
.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.btn-sm {
    padding: .4rem .9rem;
    font-size: .82rem;
    border-radius: var(--radius-sm);
}
.btn-danger { background: var(--red); color: white; border: none; cursor: pointer; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--green); color: white; border: none; cursor: pointer; }
.btn-success:hover { background: #15803d; }

.json-editor {
    width: 100%;
    font-family: 'Courier New', monospace;
    font-size: .82rem;
    line-height: 1.6;
    min-height: 500px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 1rem;
    outline: none;
    resize: vertical;
}
.json-editor:focus { border-color: var(--blue); }

/* Login Page */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue-dark), var(--teal));
}
.login-card {
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.login-card h2 {
    text-align: center;
    margin-bottom: .5rem;
    color: var(--blue);
}
.login-card .sub {
    text-align: center;
    color: var(--gray-400);
    font-size: .85rem;
    margin-bottom: 1.75rem;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 900px) {
    .hero-inner         { grid-template-columns: 1fr; text-align: center; }
    .hero-photo         { display: flex; justify-content: center; order: -1; }
    .hero-actions       { justify-content: center; }
    .stats-grid         { grid-template-columns: repeat(2, 1fr); }
    .about-grid         { grid-template-columns: 1fr; }
    .about-photo-wrap   { max-width: 320px; margin: 0 auto; }
    .skills-grid        { grid-template-columns: 1fr; }
    .contact-grid       { grid-template-columns: 1fr; }
    .footer-inner       { grid-template-columns: 1fr; gap: 2rem; }
    .cards-grid-2       { grid-template-columns: 1fr; }
    .admin-sidebar      { width: 200px; }
    .admin-main         { margin-left: 200px; }
}

@media (max-width: 640px) {
    .section { padding: 3rem 0; }
    /* Hide desktop nav on mobile — use drawer instead */
    .nav-links, #navLinksDesktop { display: none !important; }
    .nav-toggle { display: flex; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row   { grid-template-columns: 1fr; }
    .hero-photo img, .hero-photo .photo-placeholder { width: 160px; height: 160px; }
    .cards-grid { grid-template-columns: 1fr; }
    .admin-sidebar  { display: none; }
    .admin-main     { margin-left: 0; padding: 1rem; }
    .admin-form .form-row { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════
   PROFESSIONAL MEDICAL ANIMATIONS
══════════════════════════════════════════ */

/* ── Keyframes ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(.85); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes pulseRing {
    0%   { transform: scale(1);   opacity: .6; }
    100% { transform: scale(1.5); opacity: 0; }
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15%      { transform: scale(1.06); }
    30%      { transform: scale(1); }
    45%      { transform: scale(1.06); }
    65%      { transform: scale(1); }
}
@keyframes ecgDraw {
    0%   { stroke-dashoffset: 1200; opacity: 1; }
    75%  { stroke-dashoffset: 0;    opacity: 1; }
    100% { stroke-dashoffset: 0;    opacity: 0; }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}
@keyframes gradientShift {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}
@keyframes typewriterBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}
@keyframes slideUnderline {
    from { width: 0; }
    to   { width: 60px; }
}
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Animated hero gradient ── */
.hero {
    background-size: 200% 200% !important;
    animation: gradientShift 10s ease infinite;
}

/* ── ECG wave decoration in hero ── */
.ecg-wrap {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    overflow: hidden;
    pointer-events: none;
    opacity: .35;
}
.ecg-svg { width: 100%; height: 100%; }
.ecg-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: ecgDraw 4s linear infinite;
}

/* ── Photo pulse rings ── */
.photo-pulse-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pulse-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.45);
    animation: pulseRing 2.2s ease-out infinite;
    pointer-events: none;
}
.pulse-ring:nth-child(2) { animation-delay: .7s; }
.pulse-ring:nth-child(3) { animation-delay: 1.4s; }

/* ── Heartbeat on photo hover ── */
.hero-photo img:hover,
.hero-photo .photo-placeholder:hover {
    animation: heartbeat 1.2s ease;
}

/* ── Hero content entrance ── */
.hero-content { animation: fadeInLeft .9s ease both; }
.hero-photo   { animation: fadeInRight .9s ease both .2s; }

/* ── Stat number count-up style ── */
.stat-number { display: inline-block; }

/* ── Staggered card entrance ── */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity .65s ease, transform .65s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ── Section heading underline draw ── */
.section-heading h2::after {
    width: 0;
    transition: width .8s ease .3s;
}
.section-heading.in-view h2::after { width: 60px; }

/* ── Timeline dot pulse ── */
.timeline-item::before {
    animation: heartbeat 2.5s ease infinite;
}

/* ── Skill fill glow ── */
.skill-fill {
    box-shadow: 0 0 12px rgba(26,111,196,.4);
}

/* ── Card hover lift + glow ── */
.card {
    transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 36px rgba(26,111,196,.18);
}

/* ── Button ripple ── */
.btn { position: relative; overflow: hidden; }
.btn .ripple-el {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    transform: scale(0);
    animation: ripple .55s linear;
    pointer-events: none;
}

/* ── Nav link slide indicator ── */
.nav-links a {
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 50%;
    width: 0; height: 2px;
    background: var(--blue);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width .25s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 60%; }

/* ── Floating medical cross decoration ── */
.med-cross {
    position: absolute;
    opacity: .06;
    animation: floatY 5s ease-in-out infinite;
    pointer-events: none;
    color: white;
}

/* ── Typewriter cursor ── */
.typewriter-cursor {
    display: inline-block;
    width: 3px; height: 1em;
    background: rgba(255,255,255,.85);
    margin-left: 3px;
    vertical-align: middle;
    animation: typewriterBlink .8s step-end infinite;
}

/* ── Certificate card hover ── */
.cert-card { transition: transform .3s ease, box-shadow .3s ease; }
.cert-card:hover { transform: translateX(6px); box-shadow: -4px 0 20px rgba(26,111,196,.2); }

/* ── Gallery item zoom ── */
.gallery-item img { transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.08); }

/* ── Achievement card ── */
.achievement-card { transition: transform .3s ease; }
.achievement-card:hover { transform: translateX(5px); }
.ach-icon { animation: floatY 4s ease-in-out infinite; }
.ach-icon:nth-child(odd) { animation-delay: 1s; }

/* ── Page load fade (opacity only — transform on body breaks position:fixed) ── */
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageFadeIn .35s ease both; }

/* ══════════════════════════════════════════
   MOBILE IMPROVEMENTS (Frontend)
══════════════════════════════════════════ */
@media (max-width: 900px) {
    .hero { padding: 3.5rem 0 5rem; }
    .hero-inner { gap: 2rem; }
    .hero-photo img,
    .hero-photo .photo-placeholder { width: 180px; height: 180px; }
    .about-photo-wrap .photo-placeholder { height: 280px; }
    .timeline { padding-left: 1.75rem; }
    .skills-grid { gap: 2rem; }
}

@media (max-width: 640px) {
    /* Hero */
    .hero { padding: 2.5rem 0 4rem; }
    .hero-title { font-size: 1.85rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-bio { font-size: .88rem; }
    .hero-actions .btn { flex: 1; justify-content: center; min-width: 0; }
    .hero-photo img,
    .hero-photo .photo-placeholder { width: 140px; height: 140px; }

    /* Stats */
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-item { padding: 1.25rem .75rem; }
    .stat-number { font-size: 1.65rem; }

    /* Sections */
    .section { padding: 2.5rem 0; }
    .section-heading { margin-bottom: 2rem; }
    .section-heading h2 { font-size: 1.5rem; }

    /* Cards */
    .cards-grid, .cards-grid-2 { grid-template-columns: 1fr; gap: 1rem; }
    .card { padding: 1.25rem; }

    /* Timeline */
    .timeline { padding-left: 1.5rem; }
    .timeline::before { left: 10px; }
    .timeline-item::before { left: -1.5rem; width: 12px; height: 12px; }
    .timeline-card { padding: 1rem; }

    /* Skills */
    .skills-grid { grid-template-columns: 1fr; gap: 1.5rem; }

    /* Gallery */
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }

    /* Contact */
    .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .contact-form-card { padding: 1.5rem; }
    .contact-info-card { padding: 1.5rem; }

    /* About */
    .about-grid { gap: 1.5rem; }

    /* Footer */
    .footer-inner { padding-top: 2rem; padding-bottom: 2rem; gap: 1.5rem; }

    /* Top bar */
    .top-bar { padding: .3rem 0; }
    .top-bar-inner { font-size: .72rem; gap: .5rem; }
    .top-bar-left { gap: .75rem; }
    .tb-status { display: none; }
    .tb-divider { display: none; }
}

@media (max-width: 400px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
}

/* ══════════════════════════════════════════
   MOBILE DRAWER NAVIGATION
══════════════════════════════════════════ */

/* ── Backdrop overlay ── */
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.48);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.nav-backdrop.open {
    opacity: 1;
    visibility: visible;
}

/* ── Drawer panel (slides in from left) ── */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--white);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    box-shadow: 6px 0 40px rgba(0,0,0,.22);
    transform: translateX(-100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    overflow-x: hidden;
}
.mobile-drawer.open {
    transform: translateX(0);
}

/* ── Drawer header ── */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.15);
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    flex-shrink: 0;
}
.drawer-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.drawer-header .brand-name    { color: #fff; font-size: .88rem; }
.drawer-header .brand-tagline { color: rgba(255,255,255,.72); font-size: .72rem; }

/* ── Drawer close button ── */
.drawer-close {
    background: rgba(255,255,255,.18);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background .2s;
    flex-shrink: 0;
}
.drawer-close:hover { background: rgba(255,255,255,.32); }

/* ── Drawer nav area ── */
.drawer-nav {
    flex: 1;
    padding: .6rem 0;
    display: flex;
    flex-direction: column;
}

/* ── Individual link ── */
.drawer-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1.4rem;
    color: var(--gray-800);
    font-weight: 500;
    font-size: .95rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .18s, border-color .18s, color .18s;
}
.drawer-link:hover {
    background: var(--blue-light);
    border-left-color: var(--blue);
    color: var(--blue);
}
.drawer-link.active {
    background: var(--blue-light);
    border-left-color: var(--blue);
    color: var(--blue-dark);
    font-weight: 600;
}

/* ── Icon ── */
.dl-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

/* ── Drawer footer ── */
.drawer-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--gray-200);
    background: var(--off-white);
    flex-shrink: 0;
}
.drawer-contact-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    color: var(--gray-600);
    word-break: break-all;
}
