@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Fira+Sans:wght@300;400;500;600&display=swap');

:root {
  --crimson:    #8b1a2a;
  --crimson-lt: #c23050;
  --rose:       #e8607a;
  --bg:         #0e0608;
  --bg-mid:     #180a0d;
  --bg-card:    rgba(255,255,255,.032);
  --bone:       #e2d8cc;
  --bone-lt:    #f0ebe2;
  --text:       #ccc0b8;
  --muted:      #887870;
  --border:     rgba(255,255,255,.07);
  --steel:      #7090a8;
  --steel-lt:   #90b0c8;
  --gold:       #b89050;
  --gold-lt:    #d8b070;
  --green:      #507868;
  --green-lt:   #70a890;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Fira Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.78;
}

/* ── HEARTBEAT LINE OVERLAY ── */
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(139,26,42,.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(139,26,42,.05) 0%, transparent 70%);
}

/* ── HEADER ── */
.site-header {
  background: linear-gradient(170deg, #050203 0%, #120409 35%, #1e0810 70%, #2a0d18 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.header-inner {
  max-width: 1020px; margin: auto;
  padding: 70px 44px 64px;
  position: relative; z-index: 1;
  display: flex; gap: 48px; align-items: flex-end;
}

.header-text { flex: 1; }

.header-eyebrow {
  font-size: 10px; font-weight: 600;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.header-eyebrow::before {
  content: ''; width: 28px; height: 1px;
  background: var(--crimson-lt);
}

.header-title {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(58px, 9vw, 104px);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -3px;
  color: var(--bone-lt);
  margin-bottom: 24px;
}

.header-subtitle {
  font-size: 15px; font-weight: 300;
  color: var(--muted); max-width: 480px; line-height: 1.72;
}

/* Sternum bone SVG illustration */
.header-bone {
  width: 130px; flex-shrink: 0;
  opacity: .15;
  align-self: center;
}

/* ECG decorative line */
.ecg-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px; opacity: .12;
}

/* ── STICKY NAV ── */
.topic-nav {
  background: rgba(12,4,7,.92);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px);
}
.topic-nav-inner {
  max-width: 1020px; margin: auto;
  padding: 0 44px;
  display: flex; gap: 2px;
  overflow-x: auto; scrollbar-width: none;
}
.topic-nav-inner::-webkit-scrollbar { display: none; }
.nav-pill {
  flex-shrink: 0;
  padding: 14px 18px;
  font-size: 12px; font-weight: 500; letter-spacing: .4px;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s; white-space: nowrap;
  background: none; border-top: none; border-left: none; border-right: none;
}
.nav-pill:hover, .nav-pill.active {
  color: var(--rose);
  border-bottom-color: var(--crimson-lt);
}

/* ── LAYOUT ── */
.main { max-width: 1020px; margin: auto; padding: 56px 44px 90px; position: relative; z-index: 1; }

/* ── SECTION ── */
.section { margin-bottom: 66px; opacity: 0; transform: translateY(26px); transition: opacity .65s, transform .65s; }
.section.visible { opacity: 1; transform: none; }

.section-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--crimson-lt); margin-bottom: 12px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

.section-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 28px; font-weight: 700;
  color: var(--bone-lt); margin-bottom: 18px;
  line-height: 1.2;
}

p { color: var(--text); margin-bottom: 14px; }
p strong { color: var(--bone); }
p em { color: var(--bone); font-style: italic; }

/* ── ANATOMY SPLIT ── */
.anatomy-split {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px; margin-top: 28px;
  align-items: start;
}

.sternum-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
}

.diagram-part {
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  transition: all .2s;
}
.diagram-part:hover .dp-block { border-color: var(--rose); }
.diagram-part:hover .dp-label { color: var(--rose); }

.dp-block {
  border: 1px solid rgba(255,255,255,.15);
  background: var(--bg-card);
  border-radius: 6px;
  transition: border-color .2s;
  display: flex; align-items: center; justify-content: center;
}
.dp-manubrium .dp-block { width: 68%; height: 52px; border-radius: 10px 10px 4px 4px; }
.dp-corps .dp-block    { width: 52%; height: 96px; border-radius: 3px; margin-top: -1px; }
.dp-xiphoide .dp-block { width: 28%; height: 32px; border-radius: 3px 3px 8px 8px; margin-top: -1px; }

.dp-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-top: 7px; margin-bottom: 4px;
  transition: color .2s;
}
.dp-sub { font-size: 11px; color: var(--muted); text-align: center; margin-bottom: 8px; }

.diagram-caption {
  font-size: 10.5px; color: var(--muted); margin-top: 14px;
  text-align: center; font-style: italic;
}

/* Cards on right */
.anatomy-cards { display: flex; flex-direction: column; gap: 14px; }

/* ── CARDS ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px; margin-top: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px; padding: 22px 22px 20px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(194,48,80,.3);
  box-shadow: 0 14px 36px rgba(0,0,0,.5);
}

.card-tag {
  display: inline-block;
  padding: 3px 10px; border-radius: 4px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  background: rgba(139,26,42,.25);
  color: var(--rose); margin-bottom: 12px;
}
.card-tag-steel {
  background: rgba(112,144,168,.15); color: var(--steel-lt);
}
.card-tag-gold {
  background: rgba(184,144,80,.15); color: var(--gold-lt);
}
.card-tag-green {
  background: rgba(80,120,104,.15); color: var(--green-lt);
}

.card-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 17px; font-weight: 700;
  color: var(--bone); margin-bottom: 8px;
}
.card-body { font-size: 13.5px; color: var(--muted); line-height: 1.65; }

/* ── ARTICULATIONS STRIP ── */
.artic-strip {
  display: flex; gap: 12px; margin-top: 24px;
  flex-wrap: wrap;
}
.artic-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px;
  flex: 1; min-width: 160px;
  border-top: 3px solid var(--crimson);
  transition: transform .2s;
}
.artic-item:nth-child(2) { border-top-color: var(--steel); }
.artic-item:nth-child(3) { border-top-color: var(--gold); }
.artic-item:nth-child(4) { border-top-color: var(--green); }
.artic-item:hover { transform: translateY(-3px); }
.artic-num {
  font-family: 'Libre Baskerville', serif;
  font-size: 28px; font-weight: 700;
  color: var(--crimson-lt); line-height: 1;
}
.artic-item:nth-child(2) .artic-num { color: var(--steel-lt); }
.artic-item:nth-child(3) .artic-num { color: var(--gold-lt); }
.artic-item:nth-child(4) .artic-num { color: var(--green-lt); }
.artic-name { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.artic-desc { font-size: 12px; color: var(--muted); margin-top: 8px; opacity: .7; }

/* ── PATHO TABLE ── */
.patho-table { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 13.5px; }
.patho-table th {
  text-align: left; padding: 11px 16px;
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--crimson-lt); border-bottom: 1px solid var(--border); font-weight: 600;
}
.patho-table td {
  padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: top; color: var(--muted);
}
.patho-table tr:hover td { background: rgba(139,26,42,.06); }
.patho-table td:first-child { color: var(--bone); font-weight: 500; }

/* ── BADGE ── */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 4px; font-size: 11px; font-weight: 600;
}
.badge-red    { background: rgba(194,48,80,.18); color: #f09090; }
.badge-steel  { background: rgba(112,144,168,.15); color: var(--steel-lt); }
.badge-gold   { background: rgba(184,144,80,.15); color: var(--gold-lt); }
.badge-green  { background: rgba(80,120,104,.15); color: var(--green-lt); }

/* ── HIGHLIGHT BOXES ── */
.highlight-box {
  background: rgba(139,26,42,.1);
  border: 1px solid rgba(194,48,80,.2);
  border-radius: 10px; padding: 20px 24px; margin: 24px 0;
}
.highlight-box strong { color: var(--rose); }

.info-box {
  background: rgba(112,144,168,.08);
  border: 1px solid rgba(112,144,168,.2);
  border-radius: 10px; padding: 20px 24px; margin: 24px 0;
}
.info-box strong { color: var(--steel-lt); }

/* ── STATS ROW ── */
.stats-row {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-bottom: 52px;
}
.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 24px;
  display: flex; flex-direction: column; gap: 4px;
  flex: 1; min-width: 160px;
}
.stat-num {
  font-family: 'Libre Baskerville', serif;
  font-size: 28px; font-weight: 700;
  color: var(--rose); line-height: 1;
}
.stat-label { font-size: 11.5px; color: var(--muted); }

/* ── PROCEDURE STEPS ── */
.steps { margin-top: 20px; display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; border: 1px solid var(--crimson-lt);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Libre Baskerville', serif;
  font-size: 13px; font-weight: 700; color: var(--crimson-lt);
  margin-top: 2px;
}
.step-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 16px; font-weight: 700;
  color: var(--bone); margin-bottom: 5px;
}
.step-body { font-size: 13.5px; color: var(--muted); }

/* ── FOOTER ── */
footer {
  text-align: center; padding: 28px;
  font-size: 11.5px; color: var(--muted);
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .header-inner { flex-direction: column; padding: 40px 22px 50px; gap: 24px; }
  .header-bone { display: none; }
  .main { padding: 30px 22px 60px; }
  .topic-nav-inner { padding: 0 22px; }
  .anatomy-split { grid-template-columns: 1fr; }
  .sternum-diagram { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}
