/* ═══════════════════════════════════════════════════════════════
   CV Doctor Solo — Premium Design System
   Palette: Ivory · Charcoal · Muted Bronze
   Typefaces: Playfair Display (serif) · Inter (sans-serif)
═══════════════════════════════════════════════════════════════ */

/* ─── Custom Properties ────────────────────────────────────────── */
:root {
  --ivory:        #F8F5F0;
  --ivory-alt:    #F2EDE6;
  --white:        #FFFFFF;
  --charcoal:     #1A1A1A;
  --text-2:       #3C3C3C;
  --text-3:       #5C5C5C;
  --text-muted:   #8A8A8A;
  --accent:       #8B6F47;
  --accent-light: #C4A882;
  --accent-hover: #7A5F3A;
  --border:       #DDD8D0;
  --border-light: #EDE9E3;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,.08);
  --radius:       3px;
  --transition:   all .2s ease;
  --container-max: 1100px;
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--ivory);
  color: var(--charcoal);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; transition: var(--transition); }

/* ─── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  color: var(--charcoal);
  margin: 0;
}

p { margin: 0; }

/* ─── Spacing Utilities ────────────────────────────────────────── */
.section-gap    { padding: 5rem 0; }
.section-gap-sm { padding: 3rem 0; }
.mb-6           { margin-bottom: 4rem !important; }

.container {
  max-width: var(--container-max);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  margin-inline: auto;
}

/* ─── Section Headers ──────────────────────────────────────────── */
.section-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.section-body {
  color: var(--text-3);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 480px;
}

.section-sub {
  color: var(--text-3);
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 540px;
  margin-top: 0.5rem;
}

.subsection-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Navbar ───────────────────────────────────────────────────── */
.site-navbar {
  background: rgba(248, 245, 240, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  transition: box-shadow .3s ease;
}

.site-navbar.scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.navbar-brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--charcoal) !important;
  letter-spacing: 0.01em;
}

.nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3) !important;
  padding: 0.5rem 1rem !important;
  transition: color .2s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--charcoal) !important;
}

.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
}

/* Custom hamburger */
.navbar-toggler {
  border: none;
  padding: 0.25rem;
  background: transparent;
}

.navbar-toggler:focus { box-shadow: none; }

.navbar-toggler-icon-custom {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
}

.navbar-toggler-icon-custom span {
  display: block;
  height: 1px;
  background: var(--charcoal);
  transition: var(--transition);
}

/* ─── Flash Messages ───────────────────────────────────────────── */
.flash-container {
  padding: 0.75rem 0;
  background: var(--ivory-alt);
  border-bottom: 1px solid var(--border);
}

.flash-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}

.flash-success { background: #EFF7EF; color: #2A6B2A; border: 1px solid #C5E2C5; }
.flash-warning { background: #FFF8EC; color: #8A6400; border: 1px solid #F0DFA0; }
.flash-danger  { background: #FDF0F0; color: #8A2020; border: 1px solid #F0C0C0; }

.flash-close {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: .6;
  padding: 0 0.25rem;
  font-size: 1rem;
  line-height: 1;
}

/* ─── Buttons ──────────────────────────────────────────────────── */
.btn-prestige {
  display: inline-block;
  background: var(--accent);
  color: var(--white) !important;
  border: 1px solid var(--accent);
  padding: 0.7rem 1.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.btn-prestige:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-outline-prestige {
  display: inline-block;
  background: transparent;
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 0.7rem 1.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline-prestige:hover {
  background: var(--accent);
  color: var(--white) !important;
}

.btn-text-prestige {
  display: inline-flex;
  align-items: center;
  color: var(--charcoal) !important;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: border-color .2s ease, color .2s ease;
}

.btn-text-prestige:hover {
  color: var(--accent) !important;
  border-color: var(--accent);
}

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero-section {
  padding-top: 5rem;
  padding-bottom: 5rem;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: var(--ivory);
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.hero-subheadline {
  font-size: 1rem;
  color: var(--text-3);
  margin-bottom: 1.25rem;
  font-weight: 300;
}

.hero-statement {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero-photo-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-photo {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: 2px;
  display: block;
  filter: grayscale(100%);
  transform: scale(1);
  transition: filter 0.65s ease,
              transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-photo-wrapper:hover .hero-photo {
  filter: grayscale(0%);
  transform: scale(1.04);
}

.hero-photo-placeholder {
  width: 260px;
  aspect-ratio: 3 / 4;
  background: var(--ivory-alt);
  border: 1px solid var(--border);
  border-radius: 2px;
}

@media (min-width: 992px) {
  .hero-photo { max-width: 400px; }
}

/* ── Mobile: full-bleed editorial portrait ── */
@media (max-width: 991px) {
  .hero-section { overflow-x: hidden; min-height: auto; padding-top: 0; }

  /* Stack hero buttons vertically, full-width for easy tapping */
  .hero-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }
  .hero-actions .btn-prestige,
  .hero-actions .btn-outline-prestige {
    text-align: center;
    width: 100%;
  }
  .hero-actions .btn-text-prestige {
    align-self: center;
    margin-top: 0.25rem;
  }

  /* Pull the photo column flush to the top — escape container + row padding */
  .hero-section .col-12.order-1 {
    margin-top: -1.5rem; /* cancel Bootstrap container padding-top */
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .hero-photo-wrapper {
    /* Escape container padding (1.5rem) + g-4 gutter (0.75rem) = 2.25rem per side */
    width: calc(100% + 4.5rem);
    margin-left: -2.25rem;
    border-radius: 0;
    box-shadow: none;
  }

  .hero-photo {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 0;
  }

  /* Gradient that dissolves the photo's bottom edge into the ivory background */
  .hero-photo-wrapper::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 42%;
    background: linear-gradient(to top, var(--ivory) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
  }
}

/* ─── Credibility Cards ────────────────────────────────────────── */
.credibility-section { background: var(--ivory-alt); }

.cred-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s ease;
}

.cred-card:hover { border-color: var(--accent-light); }

.cred-icon {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.cred-value {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1;
}

.cred-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ─── Awards — dark prestige strip ────────────────────────────── */
.awards-section {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #272727 0%, var(--charcoal) 100%);
  position: relative;
}

/* Bronze gradient rule at the top edge — mirrors the footer treatment */
.awards-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent) 25%,
    var(--accent-light) 50%,
    var(--accent) 75%,
    transparent 100%);
}

.awards-section .section-label { color: var(--accent-light); }
.awards-section .section-title { color: var(--ivory); }

.awards-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  color: var(--accent);
  font-size: 0.9rem;
}

.awards-ornament span {
  display: block;
  width: 3.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.awards-ornament span:last-child {
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* .award-card kept for CV page and other uses */
.award-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .2s ease;
}

.award-card:hover { border-color: var(--accent-light); }

.award-year {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.award-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--charcoal);
  margin-bottom: 0.25rem;
}

.award-issuer {
  font-size: 0.85rem;
  color: var(--text-3);
}

.award-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Ranked list — home page awards layout */
.awards-ranked-list {
  max-width: 760px;
  margin: 0 auto;
}

.award-row {
  display: grid;
  grid-template-columns: 3rem 1fr 4.5rem;
  align-items: start;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.award-row:first-child { border-top: 1px solid rgba(255,255,255,0.07); }

.award-rank {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.1);
  line-height: 1;
  padding-top: 0.1rem;
  user-select: none;
}

.awards-section .award-year {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  text-align: right;
  padding-top: 0.2rem;
  white-space: nowrap;
  text-transform: uppercase;
}

.awards-section .award-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ivory);
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

.awards-section .award-issuer {
  font-size: 0.85rem;
  color: var(--accent-light);
}

.awards-section .award-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  margin-top: 0.4rem;
  line-height: 1.6;
}

@media (max-width: 575px) {
  .award-row {
    grid-template-columns: 2.25rem 1fr 3.5rem;
    gap: 0.75rem;
    padding: 1.25rem 0;
  }
  .award-rank { font-size: 1.4rem; }
}

/* ─── Timeline ─────────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 0.4rem;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -1.68rem;
  top: 0.42rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--ivory);
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline-body { padding-top: 0; }

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: 0.2rem;
}

.timeline-institution {
  font-size: 0.9rem;
  color: var(--text-3);
  margin-bottom: 0.4rem;
}

.timeline-dates {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-distinction {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(139, 111, 71, .08);
  border-radius: 2px;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.65;
  margin-top: 0.5rem;
}

.badge-current {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.badge-current-sm {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── Section backgrounds ──────────────────────────────────────── */
.education-section  { background: var(--white); }
.research-section   { background: var(--ivory-alt); }
.experience-section { border-top: 1px solid var(--border-light); }

.research-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  height: 100%;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.research-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-sm);
}

.research-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge-status {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

.badge-ongoing   { background: #EFF7EF; color: #2A6B2A; }
.badge-completed { background: #E8F0F8; color: #1A4A8A; }
.badge-submitted { background: #FFF8EC; color: #8A6400; }

.badge-featured {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.badge-featured-sm {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 0.25rem;
}

.research-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.research-role {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 0.5rem;
}

.research-dates {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.research-summary {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-top: 0.5rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.research-methods {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-top: 0.5rem;
}

/* ─── Publications ─────────────────────────────────────────────── */
.publication-list { display: flex; flex-direction: column; gap: 1px; }

.publication-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

@media (max-width: 767px) {
  .publication-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.pub-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.15rem;
}

.pub-year {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--charcoal);
}

.pub-journal {
  font-size: 0.78rem;
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

.pub-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.4;
  margin-bottom: 0.3rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.pub-authors {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 0.25rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.pub-citation {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.pub-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.pub-link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}

.pub-link:hover { border-color: var(--accent); }

/* ─── Presentations ────────────────────────────────────────────── */
.presentation-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  height: 100%;
  transition: border-color .2s ease;
}

.presentation-card:hover { border-color: var(--accent-light); }

.pres-type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  margin-bottom: 0.6rem;
}

.pres-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 0.6rem;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}

.pres-event, .pres-location, .pres-date {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
}

.pres-summary {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ─── Experience Cards ─────────────────────────────────────────── */
.exp-category-block {}

.exp-category-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.exp-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  height: 100%;
  transition: border-color .2s ease;
}

.exp-card:hover { border-color: var(--accent-light); }

.exp-card-head { margin-bottom: 0.4rem; }

.exp-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 0.15rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.exp-org {
  font-size: 0.82rem;
  color: var(--text-3);
  display: block;
}

.exp-dates {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.exp-impact {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 0.3rem;
}

.exp-desc {
  font-size: 0.8rem;
  color: var(--text-3);
  line-height: 1.6;
}

/* ─── Contact Strip / Brief Document ───────────────────────────── */
.contact-strip { background: var(--ivory-alt); }

.brief-document {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

/* Bronze gradient rule at the very top — mirrors awards & footer */
.brief-document::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, var(--accent) 25%,
    var(--accent-light) 50%, var(--accent) 75%, transparent 100%);
}

/* ── Letterhead ── */
.brief-letterhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 2.75rem 1.75rem;
}

.brief-doc-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.brief-author {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--charcoal);
  margin: 0;
}

.brief-letterhead-meta { text-align: right; }

.brief-meta-line {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin: 0;
  line-height: 1.9;
}

/* ── Horizontal rule ── */
.brief-rule {
  height: 1px;
  background: var(--border-light);
  margin: 0 2.75rem;
}

/* ── Field rows ── */
.brief-fields {
  padding: 1.6rem 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.brief-field-row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
}

.brief-field-key {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.1rem;
}

.brief-field-val {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.55;
}

.brief-re {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--charcoal);
  font-style: italic;
}

.brief-link {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.brief-link:hover { border-color: var(--accent); }

/* ── Body ── */
.brief-body {
  padding: 2rem 2.75rem 1.75rem;
}

.brief-body-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.brief-body-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 1rem;
  line-height: 1.25;
}

.brief-body-text {
  font-size: 0.95rem;
  color: var(--text-3);
  line-height: 1.9;
  max-width: 640px;
  margin-bottom: 0;
}

.brief-closing {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 0.85rem;
}

/* ── Footer / Signature + CTA ── */
.brief-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.6rem 2.75rem 2.25rem;
}

.brief-sig-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--charcoal);
  margin: 0 0 0.2rem;
}

.brief-sig-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin: 0;
}

.brief-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Mobile ── */
@media (max-width: 575px) {
  .brief-letterhead,
  .brief-fields,
  .brief-body,
  .brief-footer { padding-left: 1.5rem; padding-right: 1.5rem; }

  .brief-rule { margin-left: 1.5rem; margin-right: 1.5rem; }

  .brief-letterhead { flex-direction: column; gap: 0.5rem; }
  .brief-letterhead-meta { text-align: left; }

  .brief-field-row { grid-template-columns: 4.5rem 1fr; gap: 0.75rem; }

  .brief-footer { flex-direction: column; align-items: flex-start; }
}

/* ─── Page Hero ────────────────────────────────────────────────── */
.page-hero {
  padding: 5rem 0 3.5rem;
  background: var(--ivory);
  border-bottom: 1px solid var(--border-light);
}

.page-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--charcoal);
  margin-top: 0.5rem;
}

.page-hero-body {
  font-size: 1rem;
  color: var(--text-3);
  max-width: 560px;
  margin-top: 0.75rem;
  line-height: 1.8;
}

/* ─── Subsection Headers ───────────────────────────────────────── */
.subsection-header { margin-bottom: 2rem; }

.subsection-heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--charcoal);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Contact Page ─────────────────────────────────────────────── */
.contact-info-block { padding-right: 1rem; }

.contact-info-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
}

.contact-info-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--ivory-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-info-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.contact-info-value {
  font-size: 0.9rem;
  color: var(--charcoal);
  font-weight: 500;
  transition: color .2s;
}

.contact-info-value:hover { color: var(--accent); }

.contact-social-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.35rem 0.8rem;
  transition: var(--transition);
}

.social-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Per-platform hover accents */
.social-chip--instagram:hover { border-color: #C13584; color: #C13584; }
.social-chip--facebook:hover  { border-color: #1877F2; color: #1877F2; }
.social-chip--whatsapp:hover  { border-color: #25D366; color: #25D366; }
.social-chip--linkedin:hover  { border-color: #0A66C2; color: #0A66C2; }
.social-chip--twitter:hover   { border-color: #000; color: #000; }

.contact-form-wrapper {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.contact-form-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.contact-form-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* ─── Form Controls (Public) ───────────────────────────────────── */
.form-label-prestige {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.4rem;
}

.form-control-prestige {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--charcoal);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s ease;
}

.form-control-prestige:focus {
  border-color: var(--accent);
  background: var(--white);
}

textarea.form-control-prestige { resize: vertical; min-height: 120px; }

/* ─── CV Page ──────────────────────────────────────────────────── */
.cv-section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.cv-section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--charcoal);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.cv-sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.cv-sidebar-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.cv-sidebar-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.cv-sidebar-headline {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.cv-sidebar-role { font-size: 0.85rem; color: var(--text-3); margin-top: 0.25rem; }
.cv-sidebar-location { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.25rem; }
.cv-sidebar-email { font-size: 0.85rem; color: var(--accent); display: block; margin-top: 0.5rem; }

.cv-sidebar-section-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-award-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-award-row:last-child { border-bottom: none; }

.sidebar-award-year {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 36px;
  padding-top: 2px;
}

.sidebar-award-title { font-size: 0.85rem; color: var(--charcoal); font-weight: 500; }
.sidebar-award-issuer { font-size: 0.78rem; color: var(--text-muted); }

/* ── Language rows ────────────────────────────────────────────── */
.lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
}
.lang-row:last-child { border-bottom: none; }

.lang-info { flex: 1; min-width: 0; }

.lang-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--charcoal);
  font-family: var(--font-serif);
}

.lang-level-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.15rem;
}

.lang-cert {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  padding-top: 2px;
}

.lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s ease;
}
.lang-dot.filled { background: var(--accent); }

/* ── Skill rows ───────────────────────────────────────────────── */
.skill-row {
  padding: 0.5rem 0 0.5rem 0.85rem;
  border-left: 2px solid var(--border-light);
  margin-bottom: 0.55rem;
}
.skill-row:last-child { margin-bottom: 0; }
.skill-row.has-cat  { border-left-color: var(--accent-light); }

.skill-cat {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.skill-detail {
  display: block;
  font-size: 0.8rem;
  color: var(--text-3);
  line-height: 1.55;
}

/* ── Interest pills ───────────────────────────────────────────── */
.interest-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.interest-pill {
  font-size: 0.75rem;
  color: var(--text-3);
  background: var(--ivory-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  line-height: 1.4;
}

/* ─── Page wrap (for footer reveal) ───────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 2;
  background: var(--ivory);
}

/* ─── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.4);
  padding: 0 0 1.75rem;
  z-index: 1;
}

/* Thin bronze gradient rule at very top */
.site-footer::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent) 25%,
    var(--accent-light) 50%,
    var(--accent) 75%,
    transparent 100%);
  margin-bottom: 2.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 2rem;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ivory);
  margin-bottom: 0.3rem;
}

.footer-tagline {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.footer-location {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.73rem;
  color: rgba(255,255,255,0.25);
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.footer-nav a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  transition: color .2s;
}

.footer-nav a:hover { color: var(--ivory); }

.footer-contact-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.footer-email {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  transition: color .2s;
}

.footer-email:hover { color: var(--ivory); }

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  transition: color .2s;
}

.footer-social-link:hover { color: var(--ivory); }

.footer-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 2rem 0 1.25rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.22);
  letter-spacing: 0.04em;
}

/* Desktop reveal: footer is fixed, page-wrap slides over it */
@media (min-width: 992px) {
  .site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }
}

/* Mobile: stacked layout, footer flows normally */
@media (max-width: 991px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    text-align: center;
  }

  .footer-contact-col {
    align-items: center;
  }

  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
  }

  .footer-location {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
  }
}

/* ─── Page loader ──────────────────────────────────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.page-loader-ring-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Spinning arc — rotates around its own centre */
.page-loader-arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 45px 45px;
  animation: loader-spin 1.6s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

/* Stethoscope icon — centred, static */
.page-loader-icon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-loader-icon svg {
  width: 100%;
  height: 100%;
}

/* ─── Scroll reveal ────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ─── Empty State ──────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ─── Mobile swipe carousels ───────────────────────────────────── */
@media (max-width: 767px) {

  .swipe-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;          /* horizontal swipe only — page scrolls vertically */
    /* Bleed right so next card peeks past the container edge */
    padding-right: 3rem !important;
    /* Collapse the Bootstrap row gutters into card padding instead */
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 0;
    cursor: grab;
    scroll-behavior: auto;
  }

  .swipe-row::-webkit-scrollbar { display: none; }

  .swipe-row > [class*="col-"] {
    flex: 0 0 92% !important;
    width: 92% !important;
    max-width: 92% !important;
    scroll-snap-align: start;
    padding-right: 0.9rem !important;
  }

  /* Dot track */
  .swipe-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1.25rem;
  }

  .swipe-dot {
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: var(--border);
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.25s ease;
  }

  .swipe-dot.is-active {
    background: var(--accent);
    width: 1.4rem;
    border-radius: 2px;
  }

  /* Section-aware right-edge fade (swipe sections only) */
  .experience-section .swipe-row { -webkit-mask-image: linear-gradient(to right, black 88%, transparent 100%); mask-image: linear-gradient(to right, black 88%, transparent 100%); }

  /* Research cards: too content-heavy for a narrow carousel —
     stack full-width so nothing is cramped                    */
  .research-projects-row {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    scroll-snap-type: none !important;
    touch-action: auto !important;
    padding-right: 0 !important;
    cursor: default !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  .research-projects-row > [class*="col-"] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 0 !important;
    scroll-snap-align: none !important;
  }
}

@media (min-width: 768px) {
  .swipe-dots { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN PANEL
═══════════════════════════════════════════════════════════════ */

.admin-body {
  font-family: var(--font-sans);
  background: #F0EDE8;
  color: var(--charcoal);
  min-height: 100vh;
}

/* Top bar */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--charcoal);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.admin-topbar-brand {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}

.admin-topbar-actions { display: flex; gap: 1rem; }

.admin-topbar-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: #AAA;
  transition: color .2s;
  display: flex;
  align-items: center;
}

.admin-topbar-link:hover { color: var(--white); }
.admin-topbar-logout:hover { color: #F08080; }

/* Layout */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 44px);
}

/* Sidebar */
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  position: sticky;
  top: 44px;
  height: calc(100vh - 44px);
}

@media (max-width: 767px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
}

.admin-nav { padding: 1rem 0; }

.admin-nav-section {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.admin-nav-section:last-child { border-bottom: none; }

.admin-nav-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 1.25rem 0.25rem;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-3);
  padding: 0.5rem 1.25rem;
  transition: background .15s, color .15s;
  border-left: 2px solid transparent;
}

.admin-nav-link:hover {
  background: var(--ivory-alt);
  color: var(--charcoal);
}

.admin-nav-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(139, 111, 71, .06);
}

/* Main content */
.admin-main {
  flex: 1;
  padding: 2rem;
  max-width: 960px;
}

@media (max-width: 767px) { .admin-main { padding: 1.25rem; } }

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.admin-page-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--charcoal);
  font-weight: 500;
}

/* Admin buttons */
.btn-admin-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent);
  color: var(--white) !important;
  border: 1px solid var(--accent);
  padding: 0.5rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s;
}

.btn-admin-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-admin-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--white);
  color: var(--text-2) !important;
  border: 1px solid var(--border);
  padding: 0.5rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s;
}

.btn-admin-secondary:hover { border-color: var(--text-3); }

/* Stat cards */
.admin-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s;
  color: var(--charcoal) !important;
}

.admin-stat-card:hover { border-color: var(--accent-light); }
.admin-stat-card--alert { border-color: #F0C040; }

.stat-number { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 600; }
.stat-label  { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-top: 0.2rem; }

/* Quick card */
.admin-quick-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
}

.admin-quick-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.admin-quick-links { display: flex; flex-direction: column; gap: 0.15rem; }

.admin-quick-link {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-3);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: color .2s;
}

.admin-quick-link:last-child { border-bottom: none; }
.admin-quick-link:hover { color: var(--accent); }

/* Admin forms */
.admin-form { }

.admin-form-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.admin-form-section-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--charcoal);
  font-weight: 500;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-light);
}

.admin-form-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.admin-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-3);
  margin-bottom: 0.35rem;
}

.admin-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.3rem 0 0;
}

.admin-input, .admin-select, .admin-textarea {
  display: block;
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: var(--charcoal);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s;
}

.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
  border-color: var(--accent);
  background: var(--white);
}

.admin-textarea { resize: vertical; min-height: 90px; line-height: 1.6; }

.admin-select { appearance: none; cursor: pointer; }

/* ── Admin LSI builder (Languages / Skills / Interests) ──────────────── */
.lsi-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1rem;
  margin-top: 1.25rem;
}

.lsi-block-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}
.lsi-block-header .bi { font-size: 0.95rem; }

.lsi-col-labels {
  display: flex;
  gap: 0.5rem;
  padding: 0 0.1rem;
  margin-bottom: 0.35rem;
}
.lsi-col-labels span {
  flex: 1;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.lsi-col-labels span:last-child { flex: 0 0 2rem; } /* spacer for remove btn */

.lsi-rows { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.75rem; }

.lsi-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.55rem;
}
.lsi-row .admin-input,
.lsi-row .admin-select {
  background: var(--white);
  padding: 0.4rem 0.65rem;
  font-size: 0.845rem;
  margin: 0;
  min-width: 0;
}

.lsi-sep {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--text-muted);
  padding: 0 0.1rem;
  line-height: 1;
}

.lsi-row-remove {
  flex-shrink: 0;
  width: 1.9rem;
  height: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  padding: 0;
  line-height: 1;
}
.lsi-row-remove:hover {
  background: #fdecea;
  border-color: #f5b8b3;
  color: #c0392b;
}

.lsi-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.lsi-add-btn:hover {
  background: var(--accent);
  color: var(--white);
}

/* Interests tag area */
.lsi-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 2rem;
  margin-bottom: 0.6rem;
}

.lsi-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: color-mix(in srgb, var(--accent) 10%, var(--white));
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.28rem 0.65rem 0.28rem 0.8rem;
  font-size: 0.8rem;
}

.lsi-tag-label {
  color: var(--charcoal);
  font-weight: 500;
  white-space: nowrap;
}

.lsi-tag-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity .15s;
}
.lsi-tag-remove:hover { opacity: 1; }

.lsi-tag-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.lsi-tag-input-row .admin-input {
  flex: 1 1 220px;
  max-width: 320px;
}

.admin-checkbox { width: 1rem; height: 1rem; accent-color: var(--accent); cursor: pointer; }

.admin-checkbox-group { display: flex; align-items: center; gap: 0.5rem; }

.admin-checkbox-label { font-size: 0.82rem; color: var(--text-3); cursor: pointer; margin: 0; }

.admin-file-input {
  display: block;
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-2);
  padding: 0.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--ivory);
  cursor: pointer;
}

.admin-form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

/* Flash in admin */
.admin-flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.admin-flash-success { background: #EFF7EF; color: #2A6B2A; border: 1px solid #C5E2C5; }
.admin-flash-warning { background: #FFF8EC; color: #8A6400; border: 1px solid #F0DFA0; }

.admin-flash-close {
  background: none; border: none; cursor: pointer;
  color: inherit; opacity: .6; font-size: 1rem; padding: 0;
}

/* Admin table */
.admin-table-wrapper {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.865rem;
}

.admin-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--ivory-alt);
  white-space: nowrap;
}

.admin-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-2);
  vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-table tbody tr:hover td { background: var(--ivory); }

.btn-admin-table-edit {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.btn-admin-table-edit:hover { border-color: var(--accent); }

.btn-admin-table-delete {
  font-size: 0.75rem;
  font-weight: 600;
  color: #C44;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  transition: border-color .2s;
  margin-left: 0.25rem;
}

.btn-admin-table-delete:hover { border-color: #C44; }

.admin-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-empty a { color: var(--accent); text-decoration: underline; }

.admin-category-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(139, 111, 71, .1);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
}

.admin-preview-photo {
  width: 160px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.admin-link-preview { color: var(--accent); font-size: 0.82rem; }

/* Admin messages */
.admin-messages-list { display: flex; flex-direction: column; gap: 1px; }

.admin-message-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
}

.admin-message-unread {
  border-left: 3px solid var(--accent);
  background: rgba(139, 111, 71, .03);
}

.admin-message-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.admin-message-name { font-size: 0.9rem; color: var(--charcoal); display: block; }
.admin-message-email { font-size: 0.8rem; color: var(--accent); display: block; }
.admin-message-date { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.admin-message-body { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; margin-bottom: 0.75rem; }

.admin-message-read-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  color: #2A6B2A;
  font-weight: 600;
}

/* Login page */
.admin-login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin: 2rem auto;
}

.admin-login-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.admin-login-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--charcoal);
}

.admin-back-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color .2s;
}

.admin-back-link:hover { color: var(--charcoal); }

.alert-prestige {
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
}

.alert-danger-prestige {
  background: #FDF0F0;
  color: #8A2020;
  border: 1px solid #F0C0C0;
}

/* ══════════════════════════════════════════════════════════════════
   GALLERY  — public section
   ══════════════════════════════════════════════════════════════════ */
.gallery-section {
  background: var(--ivory-alt);
  border-top: 1px solid var(--border-light);
  padding: 5rem 0 5.5rem;
  overflow: hidden;
}

/* ── Carousel wrapper ─────────────────────────────────────────── */
.gallery-carousel {
  max-width: 800px;
  margin: 0 auto;
}

/* ── Stage: main image + side arrows ─────────────────────────── */
.gallery-stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.gallery-main {
  flex: 1;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 2px;
  background: #111;
  box-shadow: var(--shadow-md);
}

/* Each slide — cross-dissolve */
.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.65s ease;
  pointer-events: none;
  overflow: hidden;
}
.gallery-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Subtle Ken Burns: slow zoom-out on every new active image */
@keyframes gallery-kenburns {
  from { transform: scale(1.04) translate(0.5%, 0.25%); }
  to   { transform: scale(1.0)  translate(0%, 0%);       }
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  will-change: transform;
}
.gallery-slide.is-active .gallery-main-img {
  animation: gallery-kenburns 8s ease-out forwards;
}
@media (prefers-reduced-motion: reduce) {
  .gallery-slide.is-active .gallery-main-img { animation: none; }
}

/* ── Arrow buttons ────────────────────────────────────────────── */
.gallery-arrow {
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--charcoal);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, opacity 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.gallery-arrow-prev { left: -1.5rem; }
.gallery-arrow-next { right: -1.5rem; }

.gallery-arrow:hover:not(.is-muted) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.gallery-arrow.is-muted {
  opacity: 0.28;
  cursor: default;
  pointer-events: none;
}

/* ── Caption ──────────────────────────────────────────────────── */
.gallery-caption-wrap {
  position: relative;
  min-height: 2.6rem;
  margin-top: 1rem;
}
.gallery-caption-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.gallery-caption-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

.gallery-caption-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--charcoal);
  margin: 0 0 0.2rem;
  font-weight: 500;
}
.gallery-caption-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Thumbnail strip ──────────────────────────────────────────── */
.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-thumb {
  width: 4rem;
  height: 4rem;
  border-radius: 2px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: var(--border-light);
  cursor: pointer;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.55;
  flex-shrink: 0;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb:hover {
  opacity: 0.85;
}
.gallery-thumb.is-active {
  border-color: var(--accent);
  opacity: 1;
}

/* Let the browser handle vertical scroll natively;
   horizontal swipe is caught in JS                  */
.gallery-main { touch-action: pan-y; }

/* ── Mobile best practices ────────────────────────────────────── */
@media (max-width: 767px) {
  /* Overlay arrows inside image edges — no layout space wasted */
  .gallery-arrow-prev { left:  0.6rem; }
  .gallery-arrow-next { right: 0.6rem; }

  /* ≥ 44 × 44 px touch targets */
  .gallery-arrow {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 0.85rem;
    /* Frosted-glass look so arrows float over any image */
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  /* Keep 4:3 — better for portrait content on phones */
  .gallery-main { aspect-ratio: 4/3; }

  /* Slightly larger thumb tap area */
  .gallery-thumb {
    width: 3.4rem;
    height: 3.4rem;
  }

  /* Prevent accidental text selection during swipe */
  .gallery-carousel {
    -webkit-user-select: none;
    user-select: none;
  }

  /* Back-to-top: tighter to the corner on small screens */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
  }
}

/* ── Mobile card & layout fixes ───────────────────────────────── */
@media (max-width: 575px) {
  /* Reduce card padding so content breathes instead of being squished */
  .research-card      { padding: 1.1rem; }
  .presentation-card  { padding: 1rem 0.9rem; }
  .exp-card           { padding: 1rem 0.9rem; }
  .cred-card          { padding: 1.25rem 0.75rem; }

}

/* Fix horizontal scroll caused by negative-margin hero bleed */
body { overflow-x: hidden; }

/* ══════════════════════════════════════════════════════════════════
   BACK TO TOP
   ══════════════════════════════════════════════════════════════════ */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.75rem;    /* 44 px touch target */
  height: 2.75rem;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  cursor: pointer;
  z-index: 900;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.10);
  /* Hidden state */
  opacity: 0;
  transform: translateY(0.85rem) scale(0.80);
  pointer-events: none;
  /* Spring pop-in / pop-out */
  transition: opacity     0.42s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform   0.42s cubic-bezier(0.34, 1.56, 0.64, 1),
              background  0.2s ease,
              color       0.2s ease,
              border-color 0.2s ease,
              box-shadow  0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Hover: lift and fill bronze */
.back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 6px 24px rgba(139, 111, 71, 0.28);
}

/* Press feedback */
.back-to-top:active {
  transform: translateY(-1px) scale(0.96);
  transition-duration: 0.08s;
}

/* Expanding ring pulse — fires once each time button appears */
.back-to-top::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(139, 111, 71, 0.45);
  opacity: 0;
  transform: scale(1);
  pointer-events: none;
}
.back-to-top.is-visible::after {
  animation: btt-ring 0.8s ease-out 0.3s both;
}

@keyframes btt-ring {
  0%   { transform: scale(1);    opacity: 0.7; }
  100% { transform: scale(1.9);  opacity: 0;   }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.2s ease;
    transform: none !important;
  }
  .back-to-top.is-visible { opacity: 1; }
  .back-to-top::after { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   GALLERY  — admin UI
   ══════════════════════════════════════════════════════════════════ */
.admin-gallery-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s;
}

.admin-gallery-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }

.admin-gallery-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.admin-gallery-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ivory-alt);
  color: var(--text-muted);
  font-size: 2rem;
}

.admin-gallery-meta {
  padding: 0.65rem 0.75rem 0.4rem;
}

.admin-gallery-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--charcoal);
  margin: 0 0 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-gallery-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-gallery-actions {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem 0.65rem;
  border-top: 1px solid var(--border-light);
}
