/* assets/css/about.css — 7 SECTION TRANG /about.html (phong cach game/HUD)
 *
 * PHAM VI (quy tac bat buoc): moi rule deu scope duoi #profilePage.
 * Class moi deu co tien to `pfx-`. KHONG dung class generic hay selector
 * rong — nen khong bao gio dam vao man hinh cua trang chu hay admin.
 *
 * MUU: chi dung bien da ton tai trong style.css / profile.css —
 *   --accent --accent-2 --hud --line --card --card-2 --text
 *   --text-muted --mono --bg-rail --chip-bg --shadow
 * nen tu doi theo theme sang/toi. Bien cuc bo pfx-* dinh nghia trong
 * #profilePage va doi gia tri o khoi "theme sang" cuoi file.
 *
 * PHAN HUD (.profile-hud .hud-*) KHONG duoc dinh nghia o day: no dung
 * chung voi index.html, phai lay tu profile.css.
 * Author: bluemanhst
 */

/* ---------- Bien cuc bo cho ca trang ---------- */
#profilePage {
  --pfx-cyan: var(--accent-2);
  --pfx-blue: var(--accent);
  --pfx-panel: var(--card-2);
  --pfx-edge: var(--line);
  --pfx-dim: var(--text-muted);
  --pfx-ink: var(--text);
}

/* ---------- Bo vien neon quanh HUD (Section 1) ---------- */
.about-hud-wrap {
  position: relative;
  margin-bottom: 26px;
  padding: 3px;
  border-radius: 20px;
  background: linear-gradient(140deg,
    rgba(47,123,255,.45), rgba(34,211,238,.18) 55%, transparent);
}
/* Lop trong khong dat vien rieng -> tranh "vien trong vien". */
#profilePage .about-hud-wrap > .profile-hud { border-color: transparent; }

/* ---------- Badge PLAYER ID / LOCATION ---------- */
#profilePage .pfx-hero-badges {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 4px 0 16px;
}
#profilePage .pfx-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px;
  border: 1px solid rgba(34,211,238,.4);
  border-radius: 999px;
  background: rgba(34,211,238,.09);
  font-family: var(--mono);
  font-size: .7rem; letter-spacing: .1em;
  color: var(--pfx-dim);
}
#profilePage .pfx-badge b { color: var(--pfx-cyan); font-weight: 800; }
#profilePage .pfx-badge i { font-style: normal; font-size: .78rem; }

/* ---------- Quote ---------- */
#profilePage .pfx-quote {
  position: relative;
  margin: 0 0 18px;
  padding: 14px 18px;
  border-left: 4px solid var(--pfx-cyan);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, rgba(34,211,238,.09), transparent 70%);
  font-size: .98rem; line-height: 1.7; font-style: italic;
  color: var(--pfx-ink);
  /* Cat 3 dong neu focus_text dai — cat bang CSS de giu dau cau. */
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden;
}

/* ---------- Nut ---------- */
#profilePage .pfx-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
#profilePage .pfx-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--pfx-edge);
  border-radius: 10px;
  background: var(--pfx-panel);
  font-size: .84rem; font-weight: 700;
  color: var(--pfx-ink);
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
#profilePage .pfx-btn:hover {
  transform: translateY(-2px);
  border-color: var(--pfx-cyan);
  box-shadow: 0 6px 20px rgba(34,211,238,.2);
}
#profilePage .pfx-btn--solid {
  border-color: transparent;
  background: linear-gradient(135deg, var(--pfx-blue), var(--pfx-cyan));
  color: #061021;
  box-shadow: 0 6px 20px rgba(34,211,238,.3);
}
/* Focus bam phim: vien ro, khac hover — nguoi dung ban phim can thay bang mat. */
#profilePage .pfx-btn:focus-visible,
#profilePage .pfx-mail:focus-visible,
#profilePage .pfx-card:focus-visible {
  outline: 2px solid var(--pfx-cyan);
  outline-offset: 3px;
}
#profilePage [hidden] { display: none !important; }

/* ---------- Khung chung cho moi section ---------- */
#profilePage .pfx-sec { position: relative; margin: 0 0 42px; }
#profilePage .pfx-head { margin-bottom: 16px; }
#profilePage .pfx-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: .66rem; font-weight: 700; letter-spacing: .16em;
  color: var(--pfx-cyan);
}
#profilePage .pfx-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pfx-cyan);
  box-shadow: 0 0 8px var(--pfx-cyan);
  animation: pfxBlink 1.6s ease-in-out infinite;
}
@keyframes pfxBlink { 50% { opacity: .25; } }

#profilePage .pfx-title {
  margin: 0;
  font-size: 1.42rem; font-weight: 800; color: var(--pfx-ink);
  text-shadow: 0 0 20px rgba(47,123,255,.3);
}
#profilePage .pfx-title::after {
  content: ""; display: block;
  width: 50px; height: 3px; margin-top: 8px; border-radius: 2px;
  background: linear-gradient(90deg, var(--pfx-blue), var(--pfx-cyan));
  box-shadow: 0 0 10px rgba(34,211,238,.6);
}

/* ---------- SECTION 2 — STATS ---------- */
#profilePage .pfx-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
#profilePage .pfx-stat {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  padding: 15px 16px;
  border: 1px solid var(--pfx-edge);
  border-radius: 12px;
  background: var(--pfx-panel);
  overflow: hidden;
}
#profilePage .pfx-stat::after {
  content: "";
  position: absolute; right: -20px; top: -20px;
  width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.25), transparent 70%);
}
#profilePage .pfx-stat-key {
  font-family: var(--mono);
  font-size: .64rem; font-weight: 700; letter-spacing: .12em;
  color: var(--pfx-cyan);
}
#profilePage .pfx-stat-num {
  font-family: var(--mono);
  font-size: 1.75rem; font-weight: 800; line-height: 1.1;
  color: var(--pfx-ink);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(34,211,238,.35);
}
#profilePage .pfx-stat-sub { font-size: .74rem; color: var(--pfx-dim); }
#profilePage .pfx-stat-bar {
  display: block; height: 6px; margin-top: 4px;
  border-radius: 999px; background: var(--bg-rail); overflow: hidden;
}
#profilePage .pfx-stat-bar i {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pfx-blue), var(--pfx-cyan));
  box-shadow: 0 0 10px rgba(34,211,238,.5);
  transition: width .7s cubic-bezier(.2,.8,.2,1);
}

/* ---------- SECTION 3 — SKILLS ---------- */
#profilePage .pfx-skills-body {
  display: grid; gap: 16px;
  padding: 18px;
  border: 1px solid var(--pfx-edge);
  border-radius: 14px;
  background: var(--pfx-panel);
}
#profilePage .pfx-cat {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 9px;
  font-family: var(--mono);
  font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  color: var(--pfx-cyan);
}
#profilePage .pfx-cat-ico { font-size: .9rem; }
#profilePage .pfx-skill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#profilePage .pfx-skill {
  display: grid; grid-template-columns: 150px 1fr 40px;
  align-items: center; gap: 12px;
}
#profilePage .pfx-skill-name {
  font-size: .84rem; font-weight: 600; color: var(--pfx-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#profilePage .pfx-skill-bar {
  height: 9px; border-radius: 999px;
  background: var(--bg-rail); overflow: hidden;
}
#profilePage .pfx-skill-bar i {
  display: block; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pfx-blue), var(--pfx-cyan));
  box-shadow: 0 0 12px rgba(34,211,238,.55);
}
#profilePage .pfx-skill-pct {
  font-family: var(--mono); font-size: .8rem; font-weight: 800;
  text-align: right; color: var(--pfx-cyan);
  font-variant-numeric: tabular-nums;
}

/* ---------- SECTION 4 — TIMELINE ---------- */
#profilePage .pfx-tl {
  list-style: none; margin: 0; padding: 4px 0 4px 24px;
  position: relative;
}
#profilePage .pfx-tl::before {
  content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--pfx-blue), var(--pfx-cyan), transparent);
}
#profilePage .pfx-tl-item {
  position: relative; display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px; padding: 0 0 20px;
}
/* Cham noi 3 cham se xoay bay canh duong ke doc. */
#profilePage .pfx-tl-dot {
  position: absolute; left: -23px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--pfx-panel);
  border: 2px solid var(--pfx-cyan);
  box-shadow: 0 0 0 4px rgba(34,211,238,.14), 0 0 12px rgba(34,211,238,.55);
}
#profilePage .pfx-tl-item:last-child { padding-bottom: 0; }
#profilePage .pfx-tl-year {
  font-family: var(--mono);
  font-size: .78rem; font-weight: 800;
  color: var(--pfx-cyan);
  font-variant-numeric: tabular-nums;
}
#profilePage .pfx-tl-txt b { display: block; font-size: 1rem; font-weight: 800; color: var(--pfx-ink); }
#profilePage .pfx-tl-txt em {
  display: block; margin-top: 3px;
  font-style: normal; font-size: .84rem; line-height: 1.6; color: var(--pfx-dim);
}
/* Moc hien tai: cham to + nhay lien tuc. */
#profilePage .pfx-tl-item--now .pfx-tl-dot {
  width: 15px; height: 15px; left: -25px; top: 3px;
  border-color: var(--pfx-blue);
  background: var(--pfx-cyan);
  box-shadow: 0 0 0 4px rgba(47,123,255,.2), 0 0 18px rgba(34,211,238,.9);
  animation: pfxNow 1.8s ease-out infinite;
}
@keyframes pfxNow {
  0%   { box-shadow: 0 0 0 0 rgba(34,211,238,.6), 0 0 18px rgba(34,211,238,.9); }
  70%  { box-shadow: 0 0 0 12px rgba(34,211,238,0), 0 0 18px rgba(34,211,238,.5); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,238,0), 0 0 18px rgba(34,211,238,.9); }
}

/* ---------- SECTION 5 — PROJECTS ---------- */
#profilePage .pfx-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
#profilePage .pfx-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--pfx-edge);
  border-radius: 14px; background: var(--pfx-panel);
  overflow: hidden; text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
#profilePage .pfx-card:hover {
  transform: translateY(-4px);
  border-color: var(--pfx-cyan);
  box-shadow: 0 12px 30px rgba(34,211,238,.18);
}
#profilePage .pfx-card-media {
  display: block; aspect-ratio: 4 / 3;
  background: rgba(2,132,199,.08);
  overflow: hidden;
}
#profilePage .pfx-card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease;
}
#profilePage .pfx-card:hover .pfx-card-media img { transform: scale(1.05); }
#profilePage .pfx-card-none {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-family: var(--mono); font-size: 1.6rem; color: var(--pfx-dim); opacity: .5;
}
#profilePage .pfx-card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
#profilePage .pfx-card-title { font-size: .95rem; font-weight: 800; color: var(--pfx-ink); }
#profilePage .pfx-card-meta { font-family: var(--mono); font-size: .7rem; color: var(--pfx-dim); }
#profilePage .pfx-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
#profilePage .pfx-card-tags em {
  font-style: normal; font-size: .68rem; font-family: var(--mono);
  color: var(--pfx-cyan);
}
#profilePage .pfx-more { margin: 14px 0 0; text-align: center; }
#profilePage .pfx-more a {
  font-size: .82rem; font-weight: 700; text-decoration: none;
  color: var(--pfx-cyan);
  border-bottom: 1px solid transparent;
}
#profilePage .pfx-more a:hover { border-bottom-color: currentColor; }

/* ---------- SECTION 6 — DEVLOG (terminal log) ---------- */
#profilePage .pfx-log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#profilePage .pfx-log-item a {
  display: grid;
  grid-template-columns: 14px 92px 1fr;
  gap: 10px; align-items: baseline;
  padding: 10px 13px;
  border: 1px solid var(--pfx-edge);
  border-left: 2px solid var(--pfx-cyan);
  border-radius: 0 10px 10px 0;
  background: var(--pfx-panel);
  text-decoration: none;
  transition: background .16s ease;
}
#profilePage .pfx-log-item a:hover { background: rgba(34,211,238,.08); }
#profilePage .pfx-log-prompt { font-family: var(--mono); color: var(--pfx-cyan); }
#profilePage .pfx-log-date {
  font-family: var(--mono); font-size: .74rem; color: var(--pfx-dim);
  font-variant-numeric: tabular-nums;
}
#profilePage .pfx-log-title { font-size: .9rem; font-weight: 700; color: var(--pfx-ink); }
#profilePage .pfx-log-ex {
  grid-column: 3; font-size: .8rem; line-height: 1.55; color: var(--pfx-dim);
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden;
}

/* ---------- SECTION 7 — CONTACT ---------- */
#profilePage .pfx-mail {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 18px 20px; margin-bottom: 12px;
  border: 1px solid var(--pfx-cyan);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(47,123,255,.12), rgba(34,211,238,.05));
  color: var(--pfx-ink);
  font-family: inherit;
  transition: transform .16s ease, box-shadow .16s ease;
}
#profilePage .pfx-mail:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(34,211,238,.2);
}
#profilePage .pfx-mail-key {
  display: block; font-family: var(--mono);
  font-size: .64rem; letter-spacing: .14em; color: var(--pfx-cyan);
}
#profilePage .pfx-mail-val {
  display: block; margin: 5px 0 3px;
  font-family: var(--mono); font-size: 1.15rem; font-weight: 800;
  overflow-wrap: anywhere;
}
#profilePage .pfx-mail-hint { font-size: .72rem; color: var(--pfx-dim); }
#profilePage .pfx-social { display: flex; flex-wrap: wrap; gap: 10px; }
#profilePage .pfx-toast {
  margin: 12px 0 0; padding: 9px 13px;
  border: 1px solid var(--pfx-cyan); border-radius: 10px;
  background: rgba(34,211,238,.12);
  font-size: .82rem; color: var(--pfx-ink);
  opacity: 0; transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
}
#profilePage .pfx-toast--on { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  #profilePage .pfx-stats-grid { grid-template-columns: repeat(2, 1fr); }
  #profilePage .pfx-cards { grid-template-columns: repeat(2, 1fr); }
  #profilePage .pfx-social { display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  #profilePage .pfx-stats-grid { grid-template-columns: 1fr; }
  #profilePage .pfx-cards { grid-template-columns: 1fr; }
  #profilePage .pfx-social { grid-template-columns: 1fr; }
  #profilePage .pfx-title { font-size: 1.24rem; }
  /* Ten + thanh + % -> 2 dong de khong bi bop chu tren man hinh nho. */
  #profilePage .pfx-skill { grid-template-columns: 1fr 40px; row-gap: 4px; }
  #profilePage .pfx-skill-bar { grid-column: 1 / -1; }
  #profilePage .pfx-tl-item { grid-template-columns: 52px 1fr; gap: 10px; }
  #profilePage .pfx-log-item a { grid-template-columns: 12px 1fr; }
  #profilePage .pfx-log-date { grid-column: 2; }
  #profilePage .pfx-log-title,
  #profilePage .pfx-log-ex { grid-column: 2; }
  #profilePage .pfx-quote { -webkit-line-clamp: 4; line-clamp: 4; }
  #profilePage .pfx-cta .pfx-btn { flex: 1 1 100%; }
}

/* ---------- Theme sang: bo quang chu chìm, doi accent ---------- */
html[data-theme="light"] #profilePage {
  --pfx-cyan: #0891B2;
  --pfx-blue: #2563EB;
}
html[data-theme="light"] #profilePage .pfx-title,
html[data-theme="light"] #profilePage .pfx-stat-num,
html[data-theme="light"] #profilePage .pfx-log-title,
html[data-theme="light"] #profilePage .pfx-tl-txt b { text-shadow: none; }
html[data-theme="light"] #profilePage .pfx-btn--solid { color: #fff; }
html[data-theme="light"] #profilePage .pfx-log-item a:hover { background: rgba(8,145,178,.08); }
html[data-theme="light"] #profilePage .pfx-mail {
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(8,145,178,.04));
}

/* ---------- Tang chong dong ---------- */
@media (prefers-reduced-motion: reduce) {
  #profilePage .pfx-dot,
  #profilePage .pfx-tl-item--now .pfx-tl-dot { animation: none; }
  #profilePage .pfx-stat-bar i,
  #profilePage .pfx-btn,
  #profilePage .pfx-card,
  #profilePage .pfx-mail,
  #profilePage .pfx-toast { transition: none; }
  #profilePage .pfx-card:hover,
  #profilePage .pfx-btn:hover,
  #profilePage .pfx-mail:hover { transform: none; }
}
