/* ════════════════════════════════════
   About Page — layout only.
   Global components in global.css.
   ════════════════════════════════════ */

/* ── PROFILE HEADER ── */
.about-header {
  background: var(--bg);
  color: var(--text);
  margin-top: var(--nav-height);
  padding: 0;
  overflow: hidden;
}

.about-header__inner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
}

.about-header__text {
  display: flex;
  flex-direction: column;
  flex: 1 1 50%;
  min-width: 0;
  max-width: 50%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.about-header__text.visible,
.about-header__text > *,
.about-header__role,
.about-header__bio,
.about-header .page-header__title {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.about-header__role {
  font-size: var(--textH3);
  font-weight: 900;
  color: var(--brandPrimary) !important;
  margin: var(--paddingSM) 0;
  font-family: Inter;
  line-height: normal;
  letter-spacing: -0.01875rem;
}

.about-header__bio {
  font-size: var(--textCallout);
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.7;
}

.about-header__portrait {
  aspect-ratio: 575 / 600;
  justify-self: end;
  max-width: 575px;
  overflow: visible;
  position: relative;
  width: 100%;
  right: 110px;
}

.about-header__portrait-svg {
  display: block;
  height: 100%;
  overflow: visible;
  width: 100%;
}

.about-header__portrait-panel {
  animation: about-portrait-panel-in 0.82s cubic-bezier(0.16, 1, 0.3, 1)
    forwards;
  filter: drop-shadow(var(--rmds-elevation-2)) brightness(1);
  opacity: 0;
  transform: translate(26%, -18%);
  transform-box: view-box;
  transform-origin: center;
  transition:
    filter 0.4s ease,
    transform 0.12s ease-out;
  will-change: transform, opacity;
}

.about-header__portrait:hover .about-header__portrait-panel {
  filter: drop-shadow(var(--rmds-elevation-2)) brightness(1.18);
}

.about-header__portrait-panel--back {
  animation-delay: 0.16s;
}

.about-header__portrait-panel--top {
  animation-delay: 0.04s;
}

.about-header__portrait-panel--middle {
  animation-delay: 0.2s;
}

.about-header__portrait-middle-base {
  fill: var(--basicText);
}

@keyframes about-portrait-panel-in {
  0% {
    opacity: 0;
    transform: translate(26%, -18%);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-header__portrait-panel {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.about-header__portrait img {
  display: block;
}

.about-header__portrait-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--textH1);
  font-weight: 800;
  color: var(--surface-emphasis);
}

/* ── SKILLS SECTION ── */
.about-skills .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--paddingLG);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: var(--paddingSM);
  flex-wrap: nowrap;
  min-width: 0;
  white-space: nowrap;
}

.about-skills__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--paddingLG);
  margin: 0 var(--paddingXL);
}

.about-skill-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--paddingSM);
  min-width: 0;
}

.about-skill-item__num {
  font-size: var(--textBody);
  font-weight: 800;
  color: var(--brandPrimaryDark);
  letter-spacing: var(--ls-label);
}

.about-skill-item__title {
  font-size: var(--textSubhead);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.about-skill-item__desc {
  font-size: var(--textBody);
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── TIMELINE / CAREER ── */
.about-timeline {
  background: var(--bg);
  color: var(--text);
}

.exp-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Restyle JS-generated exp-item as table row */
.exp-item {
  display: grid;
  grid-template-columns: var(--paddingLG) 1fr;
  gap: var(--paddingSM);
}
.exp-item:hover .exp-item__bullet-dot:after {
  animation: exp-dot-pulse 0.75s ease-in-out infinite;
}
.exp-item__bullet {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
}

.exp-item__bullet-top {
  width: calc(var(--borderThickness) / 2);
  height: var(--paddingSM);

  background: var(--divider);
  flex-shrink: 0;
}

.exp-item__bullet-dot {
  width: var(--iconXS);
  height: var(--iconXS);
  border-radius: var(--radiusFull);
  border: var(--borderThickness) solid var(--brandPrimaryLight);
  background: var(--brandPrimary);
  flex-shrink: 0;
  position: relative;
}
.exp-item__bullet-dot:after {
  width: var(--iconLG);
  height: var(--iconLG);
  border-radius: var(--radiusFull);
  background: var(--brandPrimaryLight);
  flex-shrink: 0;
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transform-origin: center;
}

.exp-item__bullet-line {
  flex: 1;
  width: calc(var(--borderThickness) / 2);
  min-height: 0;
  background: var(--divider);
}

.exp-item:last-child .exp-item__bullet-line {
  background: transparent;
}

@keyframes exp-dot-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  25% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(0.5);
  }
  56% {
    opacity: 0.58;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .exp-item:hover .exp-item__bullet-dot:after {
    animation: none;
  }
}

.exp-item .card {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  display: grid;
  grid-template-columns: 100px 300px 1fr;
  gap: var(--paddingXL);
  align-items: start;
  padding: 0;
}

.exp-item .card:hover {
  transform: none;
  border-color: transparent;
}

.card__subtitle.about-experience__meta {
  display: flex;
  flex-direction: column;
  gap: var(--paddingXS);
  color: var(--secondary);
  font-size: var(--textBody);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  width: min-content;
}

.card__subtitle.about-experience__meta > span:first-child {
  color: var(--secondary);
}

.about-experience__meta-line {
  display: flex;
  flex-direction: column;
  gap: var(--borderThickness);
  color: var(--text-muted);
  font-size: var(--textCaption);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.about-experience__meta-line span {
  display: flex;
  align-items: center;
  gap: var(--paddingXS);
  color: var(--brandPrimaryDark);
}

.about-experience__meta-line svg {
  width: var(--textCaption);
  height: var(--textCaption);
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  opacity: 0.5;
  flex-shrink: 0;
}

.exp-item .card__title {
  font-size: var(--textHeadline);
  font-weight: 800;
  color: var(--text);
  letter-spacing: var(--ls-heading);
  text-decoration: none;
  display: block;
  line-height: 1.2;
}

.exp-item .card__title:hover {
  color: var(--secondary);
}

.exp-item .card__desc {
  font-size: var(--textBody);
  color: var(--text-muted);
  line-height: 1.6;
}
.card__info {
  padding-bottom: var(--paddingXL);
}
.exp-item ul {
  padding-left: var(--paddingSM);
}

/* ── EDUCATION ── */
.about-education {
  background: var(--bg);
  color: var(--text);
  padding: var(--paddingXL) 0;
}

.about-education__header {
  margin-bottom: var(--paddingXL);
}

.about-edu-cards {
  margin: 0;
}

.edu-card-new {
  padding: var(--paddingLG);
  background: var(--bg-card);
  border: var(--borderThickness) solid var(--border-card);
  border-radius: var(--radiusLG);
  display: flex;
  flex-direction: column;
  gap: var(--paddingMD);
}

.edu-card-new__top {
  display: flex;
  align-items: center;
  gap: var(--paddingSM);
  flex-wrap: wrap;
}

.edu-card-new__logo {
  width: var(--inputField);
  height: var(--inputField);
  border-radius: var(--radiusSM);
  background: var(--surface-strong);
  border: var(--borderThickness) solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--paddingXS);
  font-size: var(--textCaption);
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  overflow: hidden;
}

.edu-card-new__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.edu-card-new__logo-fallback {
  display: none;
}

.edu-card-new__logo img.is-hidden + .edu-card-new__logo-fallback,
.edu-card-new__logo-fallback:only-child {
  display: inline;
}

.edu-card-new__meta {
  display: flex;
  align-items: center;
  gap: var(--paddingSM);
  font-size: var(--textCaption);
  color: var(--text-muted);
  flex-wrap: wrap;
}

.edu-card-new__meta span {
  display: flex;
  align-items: center;
  gap: var(--paddingXS);
}

.edu-card-new__meta svg {
  width: var(--textCaption);
  height: var(--textCaption);
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  opacity: 0.5;
  flex-shrink: 0;
}

.edu-card-new__degree {
  font-size: var(--textCallout);
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.edu-card-new__school {
  font-size: var(--textBody);
  color: var(--text-muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 1199px) {
  .about-header__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-header__portrait {
    align-self: flex-end;
    max-width: min(100%, 575px);
  }

  .about-skills__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exp-item .card {
    grid-template-columns: 1fr;
    gap: var(--paddingMD);
  }
}

@media (max-width: 767px) {
  .about-header {
    margin-top: 0;
  }
  .about-header__portrait {
    display: none;
  }
  .about-header__text {
    min-width: 0;
    width: auto;
    max-width: 100%;
  }

  .about-header__text.visible,
  .about-header__text [class*="__"],
  .about-header__role,
  .about-header__bio,
  .about-header .page-header__title {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .about-header__role {
    line-height: 1.25;
  }

  .about-header .stat-band,
  .about-page .stat-band,
  .stat-band {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--paddingSM);
  }

  .stat-band .stat-item {
    box-sizing: border-box;
    padding: var(--paddingMD) var(--paddingSM);
    width: auto;
  }

  .about-skills__grid {
    grid-template-columns: 1fr;
    gap: var(--paddingLG);
    margin: 0;
  }
}
