/* ── About page ─────────────────────────────────────────── */

.about-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 4px;
}

.about-bio {
  font-size: 0.97rem;
  color: var(--content);
  line-height: 1.78;
  margin: 0;
  text-align: left;
}

.about-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 10px 18px;
  background: var(--entry);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.about-resume-btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.about-resume-btn:hover {
  color: var(--primary);
  border-color: var(--secondary);
  background: var(--tertiary);
}

@media (max-width: 520px) {
  .about-intro {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-contact-card {
    width: 100%;
  }
}

/* Sentence-case with a left accent bar — no all-caps */
.about-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--secondary);
  margin: 44px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 9px;
}

/* First section sits closer to the intro */
.about-section-title:first-of-type {
  margin-top: 24px;
}

.about-section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 13px;
  background: #4a9eff;
  border-radius: 2px;
  flex-shrink: 0;
  opacity: 0.7;
}

/* ── Staggered entry animation ──────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.timeline-item,
.highlight-card {
  animation: fadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.timeline-item:nth-child(2) { animation-delay: 0.05s; }
.timeline-item:nth-child(3) { animation-delay: 0.10s; }
.timeline-item:nth-child(4) { animation-delay: 0.15s; }
.timeline-item:nth-child(5) { animation-delay: 0.20s; }

.about-highlights .highlight-card:nth-child(1) { animation-delay: 0.04s; }
.about-highlights .highlight-card:nth-child(2) { animation-delay: 0.10s; }
.about-highlights .highlight-card:nth-child(3) { animation-delay: 0.16s; }
.about-highlights .highlight-card:nth-child(4) { animation-delay: 0.22s; }

/* ── Two-column alternating timeline ────────────────────── */

.about-timeline {
  position: relative;
  padding-bottom: 8px;
}

.timeline-center {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--border) 10%, var(--border) 90%, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  width: 100%;
  margin-bottom: 20px;
  position: relative;
}

.timeline-item.item-left {
  justify-content: flex-start;
  padding-right: calc(50% + 8px);
}

.timeline-item.item-right {
  justify-content: flex-end;
  padding-left: calc(50% + 8px);
}

/* Center dot with ring */
.timeline-item::after {
  content: '';
  position: absolute;
  left: calc(50% - 5px);
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--theme);
  border: 2px solid var(--secondary);
  z-index: 1;
  box-shadow: 0 0 0 3px var(--theme);
}

.timeline-card {
  background: var(--entry);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.36, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.2s ease;
}

.timeline-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-color: var(--secondary);
}

/* ── Card header (always visible) ── */

.timeline-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--tertiary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.timeline-badge a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.timeline-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.timeline-card-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.timeline-role {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary);
  display: block;
  line-height: 1.3;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-company {
  font-size: 0.78rem;
  color: var(--secondary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-date {
  font-size: 0.72rem;
  color: var(--secondary);
  display: block;
  opacity: 0.7;
}

/* ── Expand toggle icon ── */

.timeline-toggle {
  flex-shrink: 0;
  margin-left: auto;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.36, 0.64, 1);
}

.timeline-card:hover .timeline-toggle {
  opacity: 0.85;
}

.timeline-toggle::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--secondary);
  border-bottom: 2px solid var(--secondary);
  transform: rotate(45deg) translateY(-2px);
}

.timeline-card.expanded .timeline-toggle {
  transform: rotate(180deg);
  opacity: 0.85;
}

.timeline-expand-hint { display: none; }

/* ── Expandable body ── */

.timeline-card-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.28s ease,
              padding-top 0.25s ease;
  padding-top: 0;
}

.timeline-card.expanded .timeline-card-body {
  max-height: 600px;
  opacity: 1;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

.timeline-desc {
  font-size: 0.83rem;
  color: var(--content);
  line-height: 1.68;
  margin: 0;
  padding-left: 16px;
}

.timeline-desc li {
  margin-bottom: 6px;
}

.timeline-desc li:last-child {
  margin-bottom: 0;
}

/* ── Education entries in timeline ─────────────────────── */

.timeline-item-edu::after {
  background: var(--theme);
  border-color: #4a9eff;
  box-shadow: 0 0 0 3px var(--theme);
}

.timeline-card-edu {
  cursor: default;
  border-style: dashed;
  opacity: 0.85;
}

.timeline-card-edu:hover {
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.timeline-edu-tag {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #4a9eff;
  border: 1px solid #4a9eff;
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
  opacity: 0.75;
}

/* ── Highlight cards ────────────────────────────────────── */

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0 0 4px;
}

.highlight-card {
  background: var(--entry);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 1px 0 var(--secondary), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.3s cubic-bezier(0.34, 1.36, 0.64, 1),
              box-shadow 0.3s ease;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
  outline: none;
}

.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-color: var(--secondary);
}

.highlight-card:active {
  transform: translateY(-1px) scale(0.98);
}

.highlight-card.gold   { border-top-color: #c9922a; }
.highlight-card.blue   { border-top-color: #4a9eff; }
.highlight-card.green  { border-top-color: #3fb950; }
.highlight-card.purple { border-top-color: #a371f7; }

.highlight-card.gold:hover   { box-shadow: 0 10px 28px rgba(201, 146, 42, 0.18); }
.highlight-card.blue:hover   { box-shadow: 0 10px 28px rgba(74, 158, 255, 0.18); }
.highlight-card.green:hover  { box-shadow: 0 10px 28px rgba(63, 185, 80, 0.18); }
.highlight-card.purple:hover { box-shadow: 0 10px 28px rgba(163, 113, 247, 0.18); }

.highlight-label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
}

.highlight-card.gold   .highlight-label { color: #c9922a; }
.highlight-card.blue   .highlight-label { color: #4a9eff; }
.highlight-card.green  .highlight-label { color: #3fb950; }
.highlight-card.purple .highlight-label { color: #a371f7; }

.highlight-title {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.highlight-desc {
  font-size: 0.8rem;
  color: var(--secondary);
  margin: 0;
  line-height: 1.48;
}

/* ── Skills ─────────────────────────────────────────────── */

.about-skills {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 4px;
}

.skill-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.skill-label {
  font-size: 0.74rem;
  color: var(--secondary);
  font-weight: 600;
  min-width: 130px;
  flex-shrink: 0;
  padding-top: 4px;
  opacity: 0.8;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-pill {
  font-size: 0.74rem;
  padding: 3px 11px;
  border-radius: 6px;
  background: var(--entry);
  border: 1px solid var(--border);
  color: var(--primary);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.skill-pill:hover {
  background: var(--tertiary);
  border-color: var(--secondary);
}

/* ── Education ──────────────────────────────────────────── */

.about-education {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0 0 4px;
}

.edu-card {
  background: var(--entry);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.3s cubic-bezier(0.34, 1.36, 0.64, 1),
              box-shadow 0.3s ease;
}

.edu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.edu-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  margin-bottom: 10px;
}

.edu-degree {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.edu-school {
  font-size: 0.82rem;
  color: var(--secondary);
}

.edu-meta {
  font-size: 0.77rem;
  color: var(--secondary);
  margin-top: 2px;
  opacity: 0.75;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 640px) {
  .about-timeline .timeline-center { display: none; }

  .timeline-item {
    display: block;
    padding: 0 !important;
    margin-bottom: 14px;
  }

  .timeline-item::after { display: none; }

  .about-highlights,
  .about-education {
    grid-template-columns: 1fr;
  }

  .skill-group {
    flex-direction: column;
    gap: 6px;
  }

  .skill-label { min-width: unset; }
}
