/* ==========================================================================
   Education & Experience (homepage)
   Each row: logo | title + organisation | dates.
   Logos live in images/logos/. If a logo file is missing, the image removes
   itself (onerror) and the coloured monogram underneath shows instead.
   ========================================================================== */

.cv-sections {
  margin-top: 34px;
  display: grid;
  gap: 26px;
}

.cv-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a3a8c;
}

.cv-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #d9d2f1, transparent);
}

.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  column-gap: 16px;
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: 12px;
  text-align: left;
  transition: background-color 0.25s ease;
}

.cv-item:hover {
  background-color: #f6f3fd;
}

/* ---- logo / monogram ---- */
.cv-logo {
  position: relative;
  width: 56px;
  height: 56px;
  overflow: hidden;
}

.cv-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cv-mono {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--mono-bg, #5b4a9e);
}

/* Once the logo image is there, hide the monogram behind it
   (the image removes itself if the file is missing, bringing the monogram back). */
.cv-logo:has(img) .cv-mono {
  display: none;
}

/* ---- text ---- */
.cv-body {
  min-width: 0;
  line-height: 1.35;
}

.cv-title {
  font-size: 15px;
  font-weight: 650;
  color: #111;
}

.cv-org {
  font-size: 14px;
  color: #444;
}

.text-content .cv-org a {
  font-size: inherit;
  font-weight: 400;
}

.cv-note {
  font-size: 13px;
  color: #6b6b76;
  margin-top: 1px;
}

.cv-label {
  font-weight: 600;
  color: #4f4f5a;
}

.cv-date {
  display: inline-block;
  margin-left: 10px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1edfb;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  color: #5b4a9e;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  vertical-align: 1px;
}

/* ---- small screens: dates move under the title ---- */
@media (max-width: 1000px) {
  .cv-sections { margin-top: 24px; gap: 20px; }
  .cv-heading { font-size: 11px; }
  .cv-item {
    grid-template-columns: 44px 1fr;
    column-gap: 12px;
    align-items: center;
    padding: 8px;
    margin: 0 -8px;
  }
  .cv-logo { width: 44px; height: 44px; }
  .cv-mono { font-size: 10px; }
  .cv-title { font-size: 13px; }
  .cv-org { font-size: 12px; }
  .cv-note { font-size: 11.5px; }
  .cv-date { font-size: 10.5px; margin-left: 6px; }
}

/* ---- Current affiliation (ISyE lockup) under the photo ----
   Official vector logos: full colour on a white card in light mode, the
   all-white version on a dark card in dark mode (as Georgia Tech's guide prefers). */
.affiliation {
  display: block;
  box-sizing: border-box;
  align-self: center;
  width: 90%;                               /* the icon row and CV button are drawn at 90%: match them */
  margin: 2px 0 10px;
  padding: 13px 16px;
  background: #fff;
  border: 1px solid #e4dff0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(40, 25, 100, 0.05), 0 6px 16px rgba(40, 25, 100, 0.07);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
/* width:0 + min-width:100% keeps the logo's own 640px width from widening the column */
.affiliation img { width: 0; min-width: 100%; height: auto; }
.affiliation .aff-light { display: block; }
.affiliation .aff-dark { display: none; }
.affiliation:hover {
  border-color: #b19de7;
  box-shadow: 0 1px 2px rgba(40, 25, 100, 0.06), 0 10px 22px rgba(70, 40, 160, 0.13);
}
.affiliation:focus-visible { outline: 2px solid #6a4fd6; outline-offset: 3px; }
html[data-theme="dark"] .affiliation {
  background: #1a1923;
  border-color: #34304a;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .affiliation .aff-light { display: none; }
html[data-theme="dark"] .affiliation .aff-dark { display: block; }
html[data-theme="dark"] .affiliation:hover { border-color: #b9a8ff; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), 0 0 0 1px #b9a8ff; }
/* dark mode, on hover: the GT mark turns Tech Gold (as in light mode) while the
   text stays white. A copy of the white logo with a gold GT fades in on top. */
.affiliation { position: relative; }
.affiliation .aff-gold { display: none; }
html[data-theme="dark"] .affiliation .aff-gold {
  display: block;
  position: absolute;
  top: 13px;                                /* exactly over the white logo: the card's padding */
  left: 16px;
  width: calc(100% - 32px);
  min-width: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
html[data-theme="dark"] .affiliation:is(:hover, :focus-visible) .aff-gold { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .affiliation, .affiliation .aff-gold { transition: none; } }
/* ---- Phones: ISyE card, social icons and CV button exactly as wide as the photo ----
   The photo is 80% of the column and drawn at 92%, so its visible width is
   73.6% of the column; the stack below uses the same share. Icons scale with
   the stack (container units), keeping their proportions (50px icons, 24px gaps
   across a 272px row on desktop). */
@media (max-width: 1000px) {
  .icon-stack { width: 73.6%; container-type: inline-size; }
  .icon-stack .social-icons {
    --icon-size: calc(100cqw * 50 / 272);
    --icon-gap: calc(100cqw * 24 / 272);
    transform: none;
  }
  .icon-stack .social-icons a { font-size: calc(100cqw * 16 / 272); }
  .affiliation { align-self: stretch; width: auto; margin-bottom: 13px; }
  .icon-stack .cv-btn { transform: none; margin-top: 6px; }
  .icon-stack .cv-btn a { width: 100%; }
}
