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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
               Ubuntu, Cantarell, sans-serif;
  background: #edf2f7;
  color: #2d3748;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

a { color: inherit; text-decoration: none; }

/* ── Layout ───────────────────────────────────────────────── */
.layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ── Left panel ───────────────────────────────────────────── */
.left-panel {
  width: 280px;
  flex-shrink: 0;
  background: #1a3a5c;
  color: #e2eaf3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 28px 40px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid #4a90c4;
  object-fit: cover;
  margin-bottom: 20px;
  background: #2c5282;
}

.profile-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  color: #e8f0fb;
  margin-bottom: 6px;
}

.profile-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: #90b8d8;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.divider {
  width: 48px;
  height: 2px;
  background: #4a90c4;
  border-radius: 2px;
  margin-bottom: 32px;
}

.profile-summary {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border-left: 3px solid #4a90c4;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 32px;
}

.profile-summary-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #c7d8ea;
}

.badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
}

.badge:hover {
  transform: translateX(3px);
}

.badge-github,
.badge-linkedin,
.badge-email {
  background: #2c4f72;
  border-color: #4a90c4;
  color: #e8f0fb;
}

.badge-github:hover,
.badge-linkedin:hover,
.badge-email:hover { background: #3a6491; }

.badge svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}

/* ── Right panel ──────────────────────────────────────────── */
.right-panel {
  flex: 1;
  padding: 52px 56px;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.right-panel .doc {
  flex: 1;
  min-width: 0;
  max-width: 900px;
}

/* Section heading ("Work Experience") rendered as a small uppercase label */
.right-panel h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #718096;
  margin-bottom: 28px;
}

/* ── Experience timeline ──────────────────────────────────── */
.right-panel .sectionbody {
  position: relative;
  padding-left: 24px;
}

.right-panel .sectionbody::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #bee3f8;
  border-radius: 2px;
}

.right-panel .sect2 {
  position: relative;
  background: #ffffff;
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  border-left: 3px solid #4a90c4;
  transition: box-shadow 0.2s;
}

.right-panel .sect2:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.right-panel .sect2::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 26px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a90c4;
  border: 2px solid #edf2f7;
}

/* Role */
.right-panel .sect2 > h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a3a5c;
  padding-right: 120px;
  margin-bottom: 2px;
}

/* Hide Antora's auto-generated section anchor links */
.right-panel h2 > a.anchor,
.right-panel h3 > a.anchor { display: none; }

/* Period pill, pinned to the top-right of the card */
.exp-period {
  position: absolute;
  top: 24px;
  right: 28px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #718096;
  background: #edf2f7;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Company */
.exp-company {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a90c4;
  margin-bottom: 12px;
}

/* Description */
.right-panel .sect2 .paragraph p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #4a5568;
}

/* Tags */
.exp-tags p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.exp-tags .tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2b6cb0;
  background: #ebf4ff;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* ── Info rail ────────────────────────────────────────────── */
.info-rail {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 52px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rail-block {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.info-rail .rail-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #718096;
  margin-bottom: 16px;
}

/* Quick stats */
.stat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a3a5c;
  line-height: 1;
  min-width: 46px;
}

.stat-plus {
  font-size: 1rem;
  color: #4a90c4;
}

.stat-label {
  font-size: 0.82rem;
  color: #4a5568;
  line-height: 1.35;
}

/* Core-skills bars */
.skill-bars {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.skill-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: #2d3748;
}

.skill-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: #718096;
}

.skill-track {
  display: block;
  height: 7px;
  background: #edf2f7;
  border-radius: 20px;
  overflow: hidden;
}

.skill-fill {
  display: block;
  height: 100%;
  background: #4a90c4;
  border-radius: 20px;
}

/* Tech toolbox tag cloud */
.toolbox-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tb-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2b6cb0;
  background: #ebf4ff;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* ── Responsive ───────────────────────────────────────────── */
/* Intermediate breakpoint: collapse the info rail below the timeline */
@media (max-width: 1100px) {
  .right-panel {
    flex-direction: column;
    gap: 40px;
  }

  .right-panel .doc { max-width: none; }

  .info-rail {
    width: 100%;
    position: static;
    top: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .rail-block {
    flex: 1;
    min-width: 240px;
  }
}

@media (max-width: 768px) {
  .layout { flex-direction: column; }

  .left-panel {
    width: 100%;
    height: auto;
    position: static;
    padding: 36px 24px;
  }

  .right-panel { padding: 36px 24px; }

  .info-rail { flex-direction: column; }

  .right-panel .sect2 > h3 { padding-right: 0; }

  .exp-period {
    position: static;
    display: inline-block;
    margin-bottom: 8px;
  }
}
