/**
 * About Page — CV / Resume Style
 */

/* ===== CV Header ===== */
.cv-header {
  text-align: center;
  background: var(--entry);
  border-radius: var(--radius);
  padding: 48px 30px;
  margin-bottom: var(--gap);
  border: 1px solid var(--border);
  transition: border-color 0.3s ease, box-shadow 0.4s ease;
}

.cv-header:hover {
  border-color: var(--tertiary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 100 100 100), 0.06);
}

.cv-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--border);
  margin-bottom: 16px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.cv-avatar:hover {
  transform: scale(1.08) rotate(-2deg);
  border-color: var(--tertiary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.cv-name {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
  transition: color 0.3s ease;
}

.cv-header:hover .cv-name {
  color: var(--primary);
}

.cv-tagline {
  font-size: 15px;
  color: var(--secondary);
  margin: 0;
  transition: color 0.3s ease;
}

/* ===== CV Sections ===== */
.cv-section {
  margin-bottom: var(--gap);
  background: var(--entry);
  border-radius: var(--radius);
  padding: 28px 30px;
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease,
              border-color 0.3s ease;
}

.cv-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--tertiary);
}

/* Section title underline animation */
.cv-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: letter-spacing 0.3s ease, color 0.3s ease;
}

.cv-section-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.cv-section:hover .cv-section-title {
  letter-spacing: 2.5px;
}

.cv-section:hover .cv-section-title::after {
  width: 48px;
}

/* ===== Education Entry ===== */
.cv-entry {
  position: relative;
  padding: 10px 14px;
  margin: 0 -14px;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.cv-entry:hover {
  background: var(--theme);
}

.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.cv-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 3px;
  transition: color 0.25s ease, background 0.25s ease;
}

.cv-date:hover {
  color: var(--primary);
  background: var(--entry);
}

.cv-major {
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
  padding: 2px 6px;
  margin: -2px -6px;
  margin-left: -50px;
  border-radius: 3px;
  transition: color 0.25s ease, background 0.25s ease;
}

.cv-major:hover {
  color: var(--primary);
  background: var(--entry);
}

.cv-org {
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
  text-align: right;
  flex-shrink: 0;
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 3px;
  transition: color 0.25s ease, background 0.25s ease;
}

.cv-org:hover {
  color: var(--primary);
  background: var(--entry);
}

/* ===== Skills ===== */
.cv-skills {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cv-skill-group {
  font-size: 14px;
  line-height: 1.7;
  color: var(--secondary);
  padding: 4px 8px;
  margin: 0 -8px;
  border-radius: 4px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.cv-skill-group:hover {
  background: var(--theme);
  transform: translateX(4px);
}

.cv-skill-label {
  font-weight: 600;
  color: var(--primary);
  margin-right: 6px;
  transition: color 0.3s ease;
}

.cv-skill-group:hover .cv-skill-label {
  color: var(--primary);
}

.cv-skill-list {
  color: var(--secondary);
}

/* ===== Reference-style Project Cards（GB/T 7714-2015） ===== */
.ref-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ref-card {
  display: flex;
  gap: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  border-radius: 4px;
  position: relative;
  transition: background 0.25s ease,
              padding-left 0.3s ease,
              padding-right 0.3s ease;
}

.ref-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -30px;
  width: 3px;
  height: 100%;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ref-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ref-card:last-child::before {
  height: calc(100%);
}

.ref-card:first-child {
  padding-top: 0;
}

.ref-card:hover {
  background: var(--theme);
}

.cv-section:hover .ref-card:hover::before {
  transform: scaleY(1);
}

.ref-number {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 32px;
  padding-top: 1px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", "Consolas", monospace;
  transition: color 0.25s ease, transform 0.25s ease;
}

.ref-card:hover .ref-number {
  color: var(--tertiary);
  transform: scale(1.1);
}

.ref-body {
  flex: 1;
  min-width: 0;
}

/* Citation line — inline flow, wrapping naturally */
.ref-citation {
  font-size: 14px;
  line-height: 1.8;
  color: var(--secondary);
  margin: 0 0 6px 0;
}

/* Citation field styles — GB/T 7714-2015 format */
.ref-author {
  color: var(--primary);
  font-weight: 500;
  transition: color 0.25s ease;
}

.ref-card:hover .ref-author {
  color: var(--primary);
}

.ref-citation .ref-title {
  font-weight: 600;
  color: var(--primary);
  font-style: normal;
  transition: color 0.25s ease;
  position: relative;
}

.ref-card:hover .ref-citation .ref-title {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--tertiary);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.ref-type {
  font-size: 13px;
  color: var(--tertiary);
  margin-left: 1px;
}

.ref-journal {
  font-style: italic;
  color: var(--secondary);
  transition: color 0.25s ease;
}

.ref-card:hover .ref-journal {
  color: var(--primary);
}

.ref-date {
  font-weight: 500;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}

.ref-punc {
  color: var(--secondary);
}

.ref-url {
  color: var(--tertiary);
  text-decoration: none;
  word-break: break-all;
  font-size: 13px;
  transition: color 0.25s ease;
  border-bottom: 1px dashed var(--border);
}

.ref-url:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
  border-bottom-style: solid;
}

/* Project abstract — like a paper abstract */
.ref-abstract {
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.65;
  margin: 0;
  padding-left: 0;
  opacity: 0.75;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.ref-card:hover .ref-abstract {
  opacity: 1;
  color: var(--primary);
}

/* Project button */
.ref-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  transform: translateY(-4px);
}

.ref-card:hover .ref-btn {
  opacity: 1;
  transform: translateY(0);
}

.ref-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--theme);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px) scale(1.04);
}

.ref-btn:active {
  transform: translateY(0) scale(0.97);
}

/* ===== Contact（横排按钮） ===== */
.contact-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 14px;
}

.contact-item:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--theme);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.contact-item:active {
  transform: translateY(0) scale(0.98);
}

.contact-item svg {
  fill: currentColor;
  transition: transform 0.3s ease;
}

.contact-item:hover svg {
  transform: rotate(-8deg) scale(1.15);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .cv-header {
    padding: 32px 20px;
  }

  .cv-name {
    font-size: 26px;
  }

  .cv-avatar {
    width: 96px;
    height: 96px;
  }

  .cv-section {
    padding: 20px 18px;
  }

  .cv-section-title {
    font-size: 10px;
    letter-spacing: 1.5px;
  }

  /* .cv-entry-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
  }

  .cv-major {
    margin-left: 0;
  }

  .cv-org {
    text-align: center;
  } */

  .ref-card::before {
    left: -18px;
    width: 2px;
  }

  .ref-citation {
    font-size: 13px;
    line-height: 1.7;
  }

  .ref-abstract {
    font-size: 12px;
  }

  .contact-container {
    flex-direction: column;
    align-items: center;
  }

  .contact-item {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }
}
