/* ══════════════════════════════════════════
   Achievements Section
══════════════════════════════════════════ */
#achievements {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Two-column layout: timeline + sticky activities */
.ach-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: start;
}

/* ══════════════════════════════════════════
   Achievement Timeline Items
══════════════════════════════════════════ */
.ach-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Vertical guide line */
.ach-timeline::before {
  content: "";
  position: absolute;
  left: 44px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--border-accent) 10%,
    var(--border-accent) 90%,
    transparent
  );
  pointer-events: none;
}

.ach-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0 1.5rem;
  padding-bottom: 3rem;
  /* reveal */
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.8s var(--ease-out-expo);
}

.ach-item:last-child {
  padding-bottom: 0;
}

.ach-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Rank number */
.ach-rank {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
  opacity: 0.15;
  transition: all var(--transition-smooth);
  user-select: none;
}

.ach-item:hover .ach-rank {
  opacity: 0.6;
  transform: scale(1.1);
  text-shadow: 0 0 15px var(--accent-glow);
}

/* Achievement content card */
.ach-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.ach-content::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.4s var(--ease-out-expo);
}

.ach-item:hover .ach-content {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-premium);
  transform: translateX(8px);
}

.ach-item:hover .ach-content::before {
  transform: scaleY(1);
}

.ach-content-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.ach-badge-wrap {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-smooth);
}

.ach-badge-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: color var(--transition-smooth);
}

.ach-item:hover .ach-badge-icon {
  color: #fff;
}

.ach-item:hover .ach-badge-wrap {
  background: var(--accent);
  border-color: rgba(255,255,255,0.2);
  transform: scale(1.1) rotate(-5deg);
  color: #fff;
}

.ach-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ach-period {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.ach-org {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.ach-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  transition: color var(--transition-smooth);
}

.ach-item:hover .ach-title {
  color: var(--accent);
}

.ach-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.ach-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.ach-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  letter-spacing: 0.03em;
  transition: all var(--transition-smooth);
}

.ach-item:hover .ach-tag {
  border-color: var(--border-accent);
  background: var(--accent-light);
  color: var(--accent);
}

/* ──────────────────────────────────────────
   Sticky Activities Card (System Panel)
────────────────────────────────────────── */
.act-sticky-wrap {
  position: sticky;
  top: 110px;
  align-self: start;
  will-change: transform;
}

.act-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.act-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-premium);
  transform: translateY(-5px);
}

.act-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}

.act-card:hover .act-card-header {
  background: var(--accent-light);
  border-bottom-color: var(--border-accent);
}

.act-card-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-accent);
}

.act-card-icon svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.act-card-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  font-weight: 600;
}

.act-list {
  display: flex;
  flex-direction: column;
}

/* ── Activity Item ── */
.act-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-smooth);
  position: relative;
  /* reveal */
  opacity: 0;
  transform: translateY(15px);
}

.act-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.act-item:last-child {
  border-bottom: none;
}

.act-item:hover {
  background: rgba(var(--accent-rgb), 0.05);
  padding-left: 1.75rem;
}

.act-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.4s var(--ease-out-expo);
}

.act-item:hover::before {
  transform: scaleY(1);
}

.act-item-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-top: 0.2rem;
}

.act-item-icon svg {
  width: 18px;
  height: 18px;
}

.act-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.act-item-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  transition: color var(--transition-smooth);
}

.act-item:hover .act-item-title {
  color: var(--accent);
}

.act-item-org {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
}

.act-item-period {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}

.act-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.4rem;
}

/* ══════════════════════════════════════════
   Responsive
══════════════════════════════════════════ */
@media (max-width: 960px) {
  .ach-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .act-sticky-wrap {
    position: relative;
    top: auto;
  }

  .ach-timeline::before {
    left: 36px;
  }

  .ach-item {
    grid-template-columns: 70px 1fr;
  }

  .ach-rank {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .ach-item {
    grid-template-columns: 1fr;
  }

  .ach-rank {
    display: none;
  }

  .ach-timeline::before {
    display: none;
  }
}
