/* About and Resume share the site's liquid-glass surfaces and typography. */
.sidebar .info-content .name,
.about .service-title,
.about .service-item-title,
.resume .title-wrapper .h3,
.resume .timeline-item-title,
.resume .skills-item-title {
  color: var(--glass-text);
  text-shadow: none;
}

.sidebar .avatar-box {
  border-color: var(--glass-border);
  background: var(--glass-surface);
  box-shadow: var(--glass-inset-shadow);
}

.sidebar .profile-badges { gap: 6px; }
.sidebar .info-content .title {
  border-color: var(--glass-border);
  border-radius: var(--glass-control-radius);
  color: var(--glass-muted);
  background: var(--glass-surface);
  box-shadow: var(--glass-inset-shadow);
  font-size: 11px;
  line-height: 1.45;
}

.sidebar .profile-about {
  border-color: var(--glass-border);
  color: var(--glass-muted);
  font-size: 14px;
}

.sidebar .contact-title { color: var(--glass-muted); }
.sidebar .contact-info :is(.contact-link, time, address) { color: var(--glass-text); }
.sidebar .contact-link:hover { color: var(--glass-accent); }

.sidebar .icon-box,
.resume .icon-box,
.sidebar .social-link {
  border-color: var(--glass-border);
  border-radius: var(--glass-control-radius);
  color: var(--glass-accent);
  background: var(--glass-accent-soft);
  box-shadow: var(--glass-inset-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.sidebar .social-link:hover {
  border-color: var(--glass-accent);
  color: var(--glass-accent);
  background: var(--glass-surface-raised);
  box-shadow: var(--glass-inset-shadow);
}

.sidebar .info_more-btn { color: var(--glass-accent); }

.sidebar .about-resume-download,
.sidebar .about-portfolio-button {
  border-color: var(--glass-border);
  border-radius: var(--glass-control-radius);
  color: var(--glass-accent);
  background: var(--glass-accent-soft);
  box-shadow: var(--glass-inset-shadow);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.sidebar .about-resume-download:hover,
.sidebar .about-portfolio-button:hover {
  border-color: var(--glass-accent);
  color: var(--glass-accent);
  background: var(--glass-surface-raised);
  box-shadow: var(--glass-inset-shadow);
}

/* Keep the original widths while matching the two About action heights. */
.sidebar .about-resume-download,
.sidebar .about-portfolio-button {
  min-height: 44px;
  align-items: center;
}

@media (min-width: 768px) {
  .sidebar .about-resume-download,
  .sidebar .about-portfolio-button {
    height: 44px;
  }
}

.about .service-title { font-weight: 700; letter-spacing: -.035em; }
.about .service-item {
  border-color: var(--glass-border);
  border-radius: var(--glass-radius);
  background: var(--glass-surface-raised);
  box-shadow: var(--glass-inset-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.about .service-item:hover {
  border-color: var(--glass-accent);
  box-shadow: var(--glass-inset-shadow);
}

.about .service-item-title { font-weight: 650; }
.about .service-item-text {
  margin: 0;
  color: var(--glass-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Keep the colored CPTC mark intact; only its separate wordmark changes theme. */
.about .service-cptc-icon img.cptc-mark { filter: none; }
.about .service-cptc-icon img.cptc-text { filter: grayscale(1) brightness(0); }
body[data-theme="dark"] .about .service-cptc-icon img.cptc-text {
  filter: grayscale(1) brightness(0) invert(1);
}

/* Keep the profile fixed while adapting the content below it to the CLI. */
@media (min-width: 1024px) {
  body.about-page .main-content .about.active { padding: 28px; }
  body.about-page .main-content .about.active::before { margin: -28px -28px 22px; }
  body.about-page .about .service-title { margin-bottom: 22px; }
  body.about-page .about .service-list { gap: 20px; }
  body.about-page .about .service-item { gap: 18px; padding: 22px; }
  body.about-page .about .service-item-title { margin-bottom: 8px; line-height: 1.35; }
  body.about-page .about .service-item-text { line-height: 1.65; }
  body.about-page .about .service-cptc-icon { flex-basis: 96px; width: 96px; }
  body.about-page.cli-open .about .service-list { grid-auto-rows: 1fr; }

  body.about-page.cli-open .terminal-body {
    display: block;
    min-height: 44px;
    padding: 8px 16px;
    text-align: left;
  }
  body.about-page.cli-open .terminal-form { margin-top: 6px; justify-content: flex-start; }
  body.about-page.cli-open .terminal-output { max-height: 44px; overflow-y: auto; }
  body.about-page.cli-open .terminal-line:last-child { margin-bottom: 0; }
}

@media (min-width: 1024px) and (max-height: 820px) {
  body.about-page.cli-open .terminal { margin-bottom: 8px; }
  body.about-page.cli-open .terminal-body { min-height: 60px; padding-block: 6px; }
  body.about-page.cli-open .terminal-output { height: 24px; max-height: 24px; }
  body.about-page.cli-open .terminal-form { margin-top: 4px; }
  body.about-page.cli-open .main-content .about.active { padding: 24px; }
  body.about-page.cli-open .main-content .about.active::before { margin: -24px -24px 18px; }
  body.about-page.cli-open .about .service-title { margin-bottom: 18px; }
  body.about-page.cli-open .about .service-list { gap: 16px; }
  body.about-page.cli-open .about .service-item { gap: 16px; padding: 18px; }
  body.about-page.cli-open .about .service-item-text { line-height: 1.6; }
}

@media (min-width: 1024px) and (max-width: 1151px) {
  body.about-page:not(.cli-open) .main-content .about.active { padding: 24px; }
  body.about-page:not(.cli-open) .main-content .about.active::before { margin: -24px -24px 20px; }
  body.about-page:not(.cli-open) .about .service-item { gap: 16px; padding: 20px; }
}

.resume .resume-scroll-hint {
  margin: 0 0 12px;
  color: var(--glass-muted);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
}

.resume .resume-track {
  scrollbar-color: var(--glass-border) transparent;
}

.resume .resume-track:focus-visible {
  outline: 2px solid var(--glass-accent);
  outline-offset: 4px;
}

.resume .resume-track > .timeline,
.resume .resume-track > .resume-page-download {
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  background: var(--glass-surface-raised);
  box-shadow: var(--glass-inset-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.resume .resume-track > .timeline .title-wrapper {
  flex: 0 0 auto;
  gap: 10px;
  margin: 0 0 16px;
}

.resume .resume-track > .timeline .title-wrapper .h3 {
  margin: 0;
  color: var(--glass-text);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -.02em;
}

/* The timeline rule sits inside the scrolling area so its dots stay visible. */
.resume .resume-track > .timeline .timeline-list {
  margin: 0;
  padding: 0 8px 0 26px;
  border: 0;
  background: linear-gradient(var(--glass-border), var(--glass-border)) 10px 3px / 1px calc(100% - 6px) no-repeat;
  scrollbar-color: var(--glass-border) transparent;
  scrollbar-width: thin;
}

.resume .resume-track > .timeline .timeline-item { margin-bottom: 18px; }
.resume .resume-track > .timeline .timeline-item:last-child { margin-bottom: 0; }
.resume .resume-track > .timeline .timeline-item::before {
  top: 5px;
  left: -19px;
  width: 7px;
  height: 7px;
  background: var(--glass-accent);
  box-shadow: 0 0 0 4px var(--glass-accent-soft);
}

.resume .resume-track > .timeline .timeline-item-title,
.resume .resume-track > .timeline .skills-item-title {
  margin: 0 0 6px;
  color: var(--glass-text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}

.resume .resume-track > .timeline .timeline-list span {
  color: var(--glass-accent);
  font-size: 12px;
  line-height: 1.5;
}

.resume .resume-track > .timeline .timeline-text,
.resume .resume-track > .timeline .skills-item-details {
  color: var(--glass-muted);
  font-size: 13px;
  line-height: 1.6;
}

.resume .resume-track > .timeline .timeline-text { margin: 8px 0 0; }
.resume .resume-track > .timeline .skills-item-details { margin: 0; }
.resume .skills-title { margin-top: 0; }

.resume .resume-bullets {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--glass-muted);
  font-size: 13px;
  line-height: 1.6;
  list-style: disc;
}

.resume .resume-bullets li { margin-bottom: 4px; }
.resume .resume-bullets li:last-child { margin-bottom: 0; }
.resume .resume-bullets li::marker { color: var(--glass-accent); }

.resume .organizations .timeline-item-title > span {
  display: block;
  margin-top: 4px;
}

/* Match the PDF action to the About-page resume button. */
.resume .resume-page-download {
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  margin: 0 0 14px auto;
  padding: 12px 18px;
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-control-radius);
  color: var(--glass-accent);
  background: var(--glass-accent-soft);
  box-shadow: var(--glass-inset-shadow);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.resume .resume-page-download:hover {
  border-color: var(--glass-accent);
  color: var(--glass-accent);
  background: var(--glass-surface-raised);
  box-shadow: var(--glass-inset-shadow);
}

.resume .resume-page-download ion-icon { flex: 0 0 auto; font-size: 15px; }

.resume .resume-pdf-viewer {
  margin: 58px 0 0;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  background: #fff;
  box-shadow: var(--glass-inset-shadow);
}

.resume .resume-pdf-viewer iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: min(900px, calc(100vh - 210px));
  height: min(900px, calc(100dvh - 210px));
  min-height: 560px;
  border: 0;
  background: #fff;
}

.resume .resume-pdf-fallback {
  margin: 0;
  padding: 10px 14px;
  color: var(--glass-muted);
  background: var(--glass-surface-raised);
  font-size: 12px;
  text-align: center;
}

.resume .resume-pdf-fallback a {
  color: var(--glass-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.resume .resume-track { display: none !important; }

@media (min-width: 768px) {
  .resume.active > header { margin-top: 12px; }
  .resume .resume-track { margin: 58px -6px 0; }
  .resume .resume-track {
    height: auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: visible;
  }

  .resume .resume-track > .timeline {
    height: auto;
  }

  .resume .resume-track > .timeline .timeline-list {
    max-height: none;
    overflow: visible;
  }

  .resume .resume-page-download {
    position: absolute;
    top: 145px;
    left: auto;
    right: 24px;
    bottom: auto;
    margin: 0;
  }

  .resume .resume-pdf-viewer { margin-top: 58px; }

}

@media (max-width: 767px) {
  .resume .resume-pdf-viewer { margin-top: 16px; }

  .resume .resume-pdf-viewer iframe {
    height: min(760px, calc(100vh - 220px));
    height: min(760px, calc(100dvh - 220px));
    min-height: 480px;
  }
}

.resume .resume-track > .resume-page-download {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--glass-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
}

.resume .resume-page-download ion-icon { color: var(--glass-accent); font-size: 28px; }
.resume .resume-track > .resume-page-download:hover {
  border-color: var(--glass-accent);
  color: var(--glass-text);
  background: var(--glass-accent-soft);
  box-shadow: var(--glass-inset-shadow);
}

@media (min-width: 768px) {
  .resume .resume-track {
    height: clamp(280px, calc(100svh - 390px), 480px);
    min-height: 0;
    padding: 6px;
    scroll-snap-type: x proximity;
  }

  .resume .resume-track > .timeline {
    display: flex;
    flex-direction: column;
    flex-basis: min(360px, 70vw);
    min-height: 0;
    margin: 0;
    padding: 18px;
  }

  .resume .resume-track > .timeline:nth-child(2) { flex-basis: min(580px, 82vw); }
  .resume .resume-track > .timeline .timeline-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  .resume .resume-track > .resume-page-download { flex-basis: 260px; min-width: 260px; }
}

@media (max-width: 767px) {
  .sidebar .about-resume-download,
  .sidebar .about-portfolio-button { min-height: 44px; }

  .about .service-title { font-size: 28px; line-height: 1.15; }
  .about .service-item-title { font-size: 16px; }
  .resume .resume-track { display: grid; gap: 16px; height: auto; min-height: 0; overflow: visible; }
  .resume .resume-track > .timeline,
  .resume .resume-track > .resume-page-download {
    float: none;
    width: auto;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 18px;
    overflow: visible;
  }

  .resume .resume-track > .timeline .timeline-list { max-height: none; overflow: visible; }
  .resume .resume-track > .timeline .timeline-text,
  .resume .resume-track > .timeline .skills-item-details { font-size: 14px; }
  .resume .resume-track > .resume-page-download { min-height: 170px; }
}

/* Keep desktop cards left-to-right while allowing Experience to show all content. */
@media (min-width: 768px) {
  .resume .resume-track {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 16px;
    height: auto;
    min-height: 0;
    margin: 58px -6px 0;
    padding: 6px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x proximity;
  }

  .resume .resume-track > .timeline {
    flex: 0 0 min(390px, 68vw);
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    overflow: visible;
    scroll-snap-align: start;
  }

  .resume .resume-track > .timeline:nth-child(2) {
    flex-basis: min(620px, 82vw);
  }

  .resume .resume-track > .timeline .timeline-list {
    max-height: none;
    overflow: visible;
  }
}
