/* ─── Academics Section ──────────────────────────────────────────────────── */

.academics-section { border-top: 1px solid var(--border); }

/* Supporting tagline */
.ac-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: -18px;
  margin-bottom: 40px;
  font-family: var(--font-sans);
}

/* ── Top row: CGPA + story ─────────────────────────────────────────────── */
.ac-top {
  display: flex;
  align-items: flex-end;
  gap: clamp(24px, 5vw, 56px);
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.ac-cgpa {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.ac-cgpa__num {
  font-family: var(--font-serif);
  font-size: clamp(52px, 10vw, 80px);
  font-weight: 400;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
}

.ac-cgpa__label {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.ac-story {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.8;
  max-width: 280px;
  font-style: italic;
  border-left: 1px solid var(--border);
  padding-left: 20px;
}

/* ── Chart container ───────────────────────────────────────────────────── */
.ac-chart-wrap {
  width: 100%;
  margin-bottom: 32px;
  overflow: hidden;
}

.ac-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* ── Grid lines ────────────────────────────────────────────────────────── */
.ac-grid {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

/* ── Axis labels ───────────────────────────────────────────────────────── */
.ac-axis-label {
  font-family: var(--font-mono);
  font-size: 8px;
  fill: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.08em;
}

.ac-x-label {
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Main polyline ─────────────────────────────────────────────────────── */
.ac-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* ── Point group — hover interaction ──────────────────────────────────── */
.ac-point-group {
  cursor: default;
  outline: none;
}

/* Invisible hit area ring */
.ac-dot-ring {
  fill: transparent;
  stroke: none;
}

.ac-dot {
  fill: var(--black);
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 1.5;
  transition: stroke 200ms ease, fill 200ms ease, r 200ms ease;
}

/* Tooltip — hidden by default */
.ac-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.ac-tooltip__bg {
  fill: rgba(18, 18, 18, 0.96);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
}

.ac-tooltip__text {
  font-family: var(--font-mono);
  font-size: 7.5px;
  fill: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.08em;
}

.ac-tooltip__gpa {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--white);
  letter-spacing: 0.06em;
}

/* Hover / focus states */
.ac-point-group:hover .ac-dot,
.ac-point-group:focus .ac-dot {
  stroke: var(--white);
  fill: rgba(255, 255, 255, 0.08);
  r: 5.5;
}

.ac-point-group:hover .ac-x-label,
.ac-point-group:focus .ac-x-label {
  fill: rgba(255, 255, 255, 0.7);
}

.ac-point-group:hover .ac-tooltip,
.ac-point-group:focus .ac-tooltip {
  opacity: 1;
}

.ac-point-group:hover .ac-line,
.ac-point-group:focus .ac-line {
  stroke: rgba(255, 255, 255, 0.8);
}

/* ── Semester summary grid ─────────────────────────────────────────────── */
.ac-sems {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.ac-sem {
  padding: 20px 0 16px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 16px;
  padding-left: 4px;
}

.ac-sem:last-child { border-right: none; }
.ac-sem:first-child { padding-left: 0; }

.ac-sem__label {
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.ac-sem__gpa {
  font-family: var(--font-serif);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 400;
  color: var(--white);
  line-height: 1;
}

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ac-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .ac-story {
    max-width: 100%;
  }

  .ac-sems {
    grid-template-columns: repeat(2, 1fr);
  }

  .ac-sem:nth-child(2) { border-right: none; }
  .ac-sem:nth-child(3) {
    border-right: 1px solid var(--border);
    border-top: 1px solid var(--border);
    padding-left: 4px;
  }
  .ac-sem:nth-child(4) {
    border-top: 1px solid var(--border);
    border-right: none;
  }
}
