/* ==========================================================================
   Portfolio – Ngô Tiến Đạt
   ✏️ Đổi màu chủ đạo: sửa --accent, --accent-hover, --accent-soft, --accent-ink
      trong :root (giao diện sáng) và trong khối @media (prefers-color-scheme: dark).
   ========================================================================== */

/* Bảng màu dùng chung với CV: nền sáng, một màu chủ đạo xanh dương, vàng cho giải thưởng.
   Web chỉ có giao diện sáng (không tự chuyển tối theo máy người xem).
   ✏️ Đổi màu chủ đạo: sửa 4 biến --accent… dưới đây. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --band: #f3f6fb;
  --border: #dde4ee;
  --border-strong: #c8d3e2;
  --text: #111c2d;
  --text-2: #3c4a5e;
  --muted: #627189;

  --accent: #1a5fd0;
  --accent-hover: #154ca8;
  --accent-soft: #e8f0fd;
  --accent-ink: #144395;
  --on-accent: #ffffff;

  --ok: #157a4a;
  --ok-soft: #e5f4ec;
  --warn: #8a5300;
  --warn-soft: #fdf1d6;
  --stamp: #c8372d;

  --shadow: 0 1px 2px rgba(18, 32, 44, .04), 0 12px 28px -16px rgba(18, 32, 44, .18);
  --radius: 14px;
  --read: 660px;
  --wide: 1120px;
  --gutter: 20px;
  --header-h: 64px;

  /* Một họ font: Google Sans cho chữ, Google Sans Code cho nhãn nhỏ và ngày tháng */
  --font: "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

/* ---------- Nền tảng ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; color: var(--on-accent); }

.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

mark {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 0 .14em;
  border-radius: .18em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Bố cục ---------- */
.wrap { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--read); }
.section { padding-block: clamp(64px, 9vw, 112px); }
.band { background: var(--band); border-block: 1px solid var(--border); }

/* Nhãn mục kiểu CV: chữ hoa, đậm, màu chủ đạo */
.eyebrow {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 14px;
  font: 700 13px/1.4 var(--font);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.sec-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -.03em; }
.sec-lede { margin: 14px 0 0; color: var(--text-2); font-size: 1.05rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }

.stamp {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px;
  background: var(--accent); color: var(--on-accent);
  font: 700 13px/1 var(--font); letter-spacing: .02em;
  text-decoration: none; border-radius: 3px;
}
a.stamp:hover { color: var(--on-accent); background: var(--accent-hover); }
.stamp-lg { width: 48px; height: 48px; font-size: 16px; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 26px); font-size: 15px; }
.nav a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.nav a:hover { text-decoration-color: currentColor; }
.nav .lang {
  font: 500 12px/1 var(--mono); text-decoration: none;
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 10px;
}
.nav .lang:hover { border-color: var(--accent); }
@media (max-width: 600px) { .nav .hide-sm { display: none; } }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(36px, 5vw, 56px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }
.hello { font-size: 1.2rem; line-height: 1.55; color: var(--text-2); margin-bottom: 20px; max-width: var(--read); }
.hello strong { color: var(--text); font-weight: 600; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); line-height: 1.08; letter-spacing: -.035em; max-width: 700px; }
.lede { margin: 24px 0 0; font-size: 1.125rem; color: var(--text-2); max-width: var(--read); }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font: 500 15.5px/1 var(--font); text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(28, 25, 23, .05);
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); border-color: var(--muted); color: var(--text); }
.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff) 0%, var(--accent) 100%);
  border-color: var(--accent); color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px -8px var(--accent);
}
.btn-primary:hover { color: var(--on-accent); border-color: var(--accent-hover); }
kbd {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 5px; margin-right: -9px;
  border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--muted);
  font: 500 11px/1 var(--mono);
}
.btn-primary kbd { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .4); color: var(--on-accent); }
@media (hover: none), (max-width: 600px) { kbd { display: none; } }

.text-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.text-link:hover { text-decoration-color: currentColor; }
.text-link kbd { margin-right: 0; margin-left: 2px; }

.proof { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 26px 0 0; font-size: 14px; color: var(--muted); list-style: none; }
.proof li { display: inline-flex; align-items: center; gap: 6px; }
.proof li:has(.star) { padding: 6px 12px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-weight: 500; }
.proof .star { width: 15px; height: 15px; }

/* Thẻ hồ sơ (bên phải hero) */
.profile-card { padding: 20px; }
.pc-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.pc-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.pc-name { margin: 0; font-weight: 600; }
.pc-open { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-size: 13.5px; color: var(--ok); }
.pc-fields { display: grid; gap: 10px; margin: 16px 0 0; }
.pc-fields div { display: grid; grid-template-columns: 100px 1fr; gap: 10px; font-size: 14px; line-height: 1.5; }
.pc-fields dt { font: 400 11.5px/1.75 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pc-fields dd { margin: 0; }

.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dot.pulse { animation: pulse 2.2s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px transparent; }
}
@media (prefers-reduced-motion: reduce) { .dot.pulse { animation: none; } }

.clients { margin-top: clamp(40px, 6vw, 64px); padding-top: 22px; border-top: 1px solid var(--border); }
.clients p { margin: 0 0 12px; font: 400 12.5px var(--mono); color: var(--muted); letter-spacing: .02em; }
.clients ul { display: flex; flex-wrap: wrap; gap: 8px 30px; list-style: none; }
.clients li { font-size: 1.08rem; font-weight: 600; letter-spacing: -.015em; color: color-mix(in srgb, var(--text) 55%, var(--bg)); }

/* ---------- Bảng tổng quan (kiểu dashboard) ---------- */
.overview { padding-bottom: clamp(56px, 8vw, 96px); }
.panel { border-radius: 18px; overflow: hidden; }
.panel-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.panel-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.panel-title .stamp { width: 24px; height: 24px; font-size: 9.5px; }
.panel-title small { font-size: 13px; font-weight: 400; color: var(--muted); }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-2);
  font: 500 12px/1 var(--mono); white-space: nowrap;
}
.panel-body { display: grid; gap: 12px; padding: 14px; background: var(--band); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.metric { padding: 16px 18px; border-left: 1px solid var(--border); }
.metric:first-child { border-left: 0; }
.metric-label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.metric-label .i { color: var(--muted); }
.metric-value { display: block; margin-top: 8px; font-size: clamp(1.7rem, 3vw, 2.1rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.metric-value small { font-size: .5em; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.metric-note { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
@media (max-width: 820px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

.tiles { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 920px) { .tiles { grid-template-columns: 1fr 1fr; } .tile-wide { grid-column: 1 / -1; } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.tile { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tile-foot { margin: 14px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.tile-foot a { color: var(--accent-ink); }

.bars { display: grid; gap: 12px; margin-top: 16px; }
.bar-row { display: grid; grid-template-columns: 128px 1fr 92px; align-items: center; gap: 12px; font-size: 13.5px; }
.bar { height: 10px; border-radius: 999px; background: var(--band); overflow: hidden; }
.bar span { display: block; height: 100%; min-width: 8px; border-radius: inherit; background: var(--muted); }
.bar-row.is-ai .bar span { background: var(--accent); }
.bar-val { font: 500 13px var(--mono); text-align: right; white-space: nowrap; }
.bar-row.is-ai .bar-val { color: var(--accent-ink); }
@media (max-width: 560px) {
  .bar-row { grid-template-columns: 1fr auto; }
  .bar { grid-column: 1 / -1; order: 3; }
}

/* ---------- Giới thiệu ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, var(--read)) minmax(0, 1fr); gap: clamp(32px, 7vw, 96px); }
@media (max-width: 920px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid .prose p { color: var(--text-2); }
.about-grid .prose .eyebrow + p { font-size: 1.25rem; line-height: 1.55; color: var(--text); }
.sources { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; padding: 18px; }
@media (max-width: 920px) { .sources { position: static; } }
.sources-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sources-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.src-list { display: grid; gap: 6px; list-style: none; }
.src-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 11px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 14px; font-weight: 500;
}
.src-list span { font: 400 11.5px var(--mono); color: var(--muted); }

/* ---------- Lưới bento (năng lực, AI) ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: span 2; }
@media (max-width: 920px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
.feature { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; }
.feature h3 { font-size: 1.15rem; letter-spacing: -.015em; }
.feature p { margin: 0; font-size: 15px; color: var(--text-2); }
.ficon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }
.ficon .i { width: 18px; height: 18px; }
.tag {
  position: absolute; top: 20px; right: 20px;
  padding: 6px 8px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  font: 500 11.5px/1 var(--mono); white-space: nowrap;
}
.tag.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.tag.accent { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin-top: 4px; }
.chip {
  padding: 6px 10px; border-radius: 7px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-2);
  font: 500 12.5px/1.2 var(--font);
}
.chip.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }

/* ---------- Case study ---------- */
.cases-head { padding-bottom: 0; }
.case {
  padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
  color: var(--text);
}
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 960px) { .case-grid { grid-template-columns: 1fr; } }
.case-meta { margin: 0 0 10px; font: 400 12.5px/1.5 var(--mono); color: var(--muted); letter-spacing: .02em; }
.case-client { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: clamp(1.9rem, 3.8vw, 2.7rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.case-title { margin: 8px 0 0; font-size: 1.08rem; font-weight: 500; color: var(--text); }
.case-role { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; list-style: none; }
.case-summary { margin: 18px 0 0; color: var(--text-2); }
.case-status {
  display: flex; align-items: baseline; gap: 10px;
  margin: 18px 0 0; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px;
}
.case-status .dot { transform: translateY(-1px); }
.case-status.ok .dot { color: var(--ok); }
.case-status.wip .dot { color: var(--warn); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); border: 1px solid #f0d9a4; font: 600 12.5px/1 var(--font); letter-spacing: 0; }
.badge .i { width: 14px; height: 14px; }

details.case-more { margin-top: 20px; }
details.case-more summary {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; list-style: none; font-weight: 500;
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}
details.case-more summary::-webkit-details-marker { display: none; }
details.case-more summary:hover { color: var(--accent); }
details.case-more summary .i { transition: transform .2s ease; }
details.case-more[open] summary .i { transform: rotate(90deg); }
.case-body { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border-strong); font-size: 15.5px; }
.case-body h4 { margin: 24px 0 8px; font: 500 12.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.case-body h4:first-child { margin-top: 0; }
.case-body p { color: var(--text-2); }
.case-body ul { display: grid; gap: 8px; padding-left: 1.15em; }
.case-body ul ul { margin-top: 8px; gap: 5px; }
.case-body li { color: var(--text-2); }
.case-body li::marker { color: var(--accent); }
.case-body strong { color: var(--text); font-weight: 600; }
.case-tech { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 14.5px; }
.case-tech dt { font: 400 12px/1.9 var(--mono); color: var(--muted); }
.case-tech dd { margin: 0; color: var(--text-2); }

.case-figure { position: sticky; top: calc(var(--header-h) + 24px); margin: 0; }
@media (max-width: 960px) { .case-figure { position: static; } }
.diagram {
  display: grid; align-items: center;
  min-height: 220px; padding: 22px 18px;
  background-color: var(--surface);
  background-image: radial-gradient(var(--border) 1px, transparent 1.3px);
  background-size: 16px 16px; background-position: 8px 8px;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.diagram svg { width: 100%; height: auto; overflow: visible; }
.case-figure figcaption { margin-top: 10px; font-size: 13px; line-height: 1.55; color: var(--muted); }

/* Phần tử bên trong sơ đồ (vẽ bằng main.js) */
.dg-ext rect { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1; }
.dg-hub > rect { fill: var(--accent-soft); stroke: var(--accent); stroke-opacity: .45; stroke-dasharray: 4 4; }
.dg-prod rect { fill: var(--surface); stroke: var(--accent); stroke-width: 1.25; }
.dg-hub-label { font: 500 9.5px var(--mono); letter-spacing: .14em; fill: var(--accent-ink); }
.n-label { font: 600 13px var(--font); fill: var(--text); }
.dg-prod .n-label { fill: var(--accent-ink); }
.n-sub { font: 400 10.5px var(--mono); fill: var(--muted); }
.dg-track { fill: none; stroke: var(--border-strong); stroke-width: 1.25; }
.dg-flow { fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linecap: round; stroke-dasharray: 1.5 10; animation: flow 1.3s linear infinite; }
.dg-link { stroke: var(--accent); stroke-width: 1.25; }
.dg-end { fill: var(--accent); }
.dg-divider { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 5; }
.dg-via { fill: var(--accent-ink); }
@keyframes flow { to { stroke-dashoffset: -11.5; } }
@media (prefers-reduced-motion: reduce) { .dg-flow { animation: none; } }

/* ---------- Sơ đồ "lắp ráp" theo vị trí cuộn ----------
   main.js đặt --p từ 0 (vừa vào màn hình) tới 1 (đã vào vị trí). Cuộn ngược lên thì --p giảm,
   sơ đồ tách ra lại. Không có JS thì --p = 1, sơ đồ đứng yên ở vị trí cuối. */
.diagram {
  --p: 1;
  transform:
    translate3d(0, calc((1 - var(--p)) * 56px), 0)
    rotate(calc((1 - var(--p)) * 3.5deg))
    scale(calc(.93 + var(--p) * .07));
  transform-origin: 50% 100%;
}
.dg-ext, .dg-hub { transform-box: fill-box; transform-origin: center; }
.dg-L { transform: translate(calc((1 - var(--p)) * -80px * var(--k, 1)), calc((1 - var(--p)) * 14px * var(--k, 1))) rotate(calc((1 - var(--p)) * -9deg * var(--k, 1))); }
.dg-R { transform: translate(calc((1 - var(--p)) * 80px * var(--k, 1)), calc((1 - var(--p)) * -14px * var(--k, 1))) rotate(calc((1 - var(--p)) * 9deg * var(--k, 1))); }
.dg-T { transform: translate(calc((1 - var(--p)) * -12px * var(--k, 1)), calc((1 - var(--p)) * -60px * var(--k, 1))) rotate(calc((1 - var(--p)) * -6deg * var(--k, 1))); }
.dg-B { transform: translate(calc((1 - var(--p)) * 12px * var(--k, 1)), calc((1 - var(--p)) * 60px * var(--k, 1))) rotate(calc((1 - var(--p)) * 6deg * var(--k, 1))); }
.dg-ext { opacity: calc(.2 + var(--p) * .8); }
.dg-hub { transform: scale(calc(.82 + var(--p) * .18)); }
.dg-track { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); }
.dg-flow { opacity: clamp(0, calc((var(--p) - .85) * 6.7), 1); }
.dg-end, .dg-via { opacity: clamp(0, calc((var(--p) - .6) * 2.5), 1); }

.others { margin-top: clamp(40px, 6vw, 64px); max-width: 860px; }
.others h3 { font-size: 1.25rem; margin-bottom: 16px; }
.others ul { display: grid; gap: 12px; list-style: none; }
.others li { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 15.5px; color: var(--text-2); }
.others strong { color: var(--text); font-weight: 600; }

/* ---------- AI & cải tiến ---------- */
.ai-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 14px; }
.ai-main { grid-row: span 2; }
@media (max-width: 920px) { .ai-grid { grid-template-columns: 1fr; } .ai-main { grid-row: auto; } }
.ai-main h3 { font-size: 1.5rem; }
.ai-main .sub { margin: -4px 0 0; color: var(--muted); font-size: 15px; }
.ai-block h4 { margin: 8px 0 6px; font: 500 12.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ai-block p, .ai-block li { font-size: 15px; color: var(--text-2); }
.ai-block ul { display: grid; gap: 6px; padding-left: 1.15em; }
.ai-block li::marker { color: var(--accent); }

.flow-mini {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px;
  margin: 4px 0; padding: 16px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--border);
}
.flow-col { display: grid; gap: 6px; list-style: none; }
.flow-col .chip { text-align: center; }
.flow-col-label { font: 400 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; text-align: center; }
.flow-core { display: flex; align-items: center; gap: 10px; color: var(--accent); font: 500 16px var(--mono); }
.flow-core b { padding: 11px 13px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font: 600 13.5px var(--font); white-space: nowrap; box-shadow: 0 6px 16px -8px var(--accent); }
@media (max-width: 640px) {
  .flow-mini { grid-template-columns: 1fr; }
  .flow-core { flex-direction: column; justify-content: center; }
  .flow-core .arrow { transform: rotate(90deg); }
}
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); font-size: 14px; color: var(--text-2); line-height: 1.45; }
.mode b { display: block; color: var(--text); font-weight: 600; }
.result-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 4px 0 0; }
.result-big strong { font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: -.03em; color: var(--accent-ink); font-weight: 600; }
.result-big span { font-size: 14px; color: var(--muted); }
.note { margin: 0; padding: 10px 12px; border-left: 2px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; font-size: 13.5px; color: var(--text-2); }
/* Quy trình 6 bước của TOBE-Writer */
.tobe-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; counter-reset: tobe; }
@media (max-width: 640px) { .tobe-steps { grid-template-columns: 1fr; } }
.tobe-steps li { counter-increment: tobe; position: relative; display: grid; gap: 4px; padding: 12px 14px 12px 50px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); font-size: 14px; color: var(--text-2); line-height: 1.5; }
.tobe-steps li::before { content: counter(tobe); position: absolute; left: 14px; top: 12px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 700 12.5px/1 var(--font); }
.tobe-steps b { color: var(--text); font-weight: 600; font-size: 14.5px; }

/* Skill AI cho team: mỗi skill một dòng "làm gì" và nhãn đầu ra */
.skill-list { display: grid; gap: 14px; list-style: none; }
.skill-list li { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14.5px; color: var(--text-2); }
.skill-list li:first-child { padding-top: 0; border-top: 0; }
.skill-list b { color: var(--text); font-weight: 600; }
.out-pill { justify-self: start; margin-top: 4px; padding: 4px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; font-style: normal; font-weight: 500; }

.tool-list { display: grid; gap: 12px; list-style: none; }
.tool-list li { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 14.5px; color: var(--text-2); }
.tool-list li:first-child { padding-top: 0; border-top: 0; }
.tool-list b { color: var(--text); font-weight: 600; }

/* ---------- Kinh nghiệm (timeline) ---------- */
.timeline { position: relative; display: grid; gap: 44px; max-width: 900px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; border-left: 1.5px dashed var(--border-strong); }
.tl-item { position: relative; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 6px 28px; padding-left: 38px; }
.tl-item::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl-item.current::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
@media (max-width: 720px) { .tl-item { grid-template-columns: 1fr; } }
.tl-date { font: 500 13px/1.9 var(--mono); color: var(--muted); }
.tl-body h3 { font-size: 1.25rem; }
.tl-at { color: var(--muted); font-weight: 500; }
.tl-place { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.tl-desc { margin: 10px 0 12px; font-size: 15.5px; color: var(--text-2); }
.tl-body ul { display: grid; gap: 7px; padding-left: 1.15em; font-size: 15.5px; color: var(--text-2); }
.tl-body li::marker { color: var(--accent); }

/* ---------- Cách tôi làm việc ---------- */
/* Đường tiến độ bên trái: main.js đặt --progress theo vị trí cuộn, bước nào đã đọc qua thì sáng lên */
.steps { position: relative; display: grid; max-width: 860px; list-style: none; counter-reset: step; padding-left: 34px; --progress: 1; }
.steps::before, .steps::after { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; }
.steps::before { background: var(--border); }
.steps::after { background: var(--accent); transform-origin: top; transform: scaleY(var(--progress)); }
.steps li { position: relative; counter-increment: step; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 12px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.steps li:first-child { border-top: 1px solid var(--border); }
.steps li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font: 500 14px/1.9 var(--mono); color: var(--accent); transition: color .3s ease; }
.steps li::after { content: ""; position: absolute; left: -33px; top: 27px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--accent); box-sizing: border-box; transition: background-color .3s ease, border-color .3s ease, transform .3s ease; }
.steps.is-live li:not(.is-active)::before { color: var(--muted); }
.steps.is-live li:not(.is-active)::after { background: var(--bg); border-color: var(--border-strong); transform: scale(.85); }
.steps b { font-size: 1.08rem; font-weight: 600; letter-spacing: -.01em; }
.steps p { margin: 0; color: var(--text-2); font-size: 15.5px; }

/* ---------- Kỹ năng ---------- */
.skills { margin: 0; border-top: 1px solid var(--border); }
.skill-row { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.skill-row dt { font-weight: 600; font-size: 15.5px; }
.skill-row dd { margin: 0; }
@media (max-width: 720px) { .skill-row { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- Học vấn & giải thưởng ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 920px) { .edu-grid { grid-template-columns: 1fr; } }
.edu { display: flex; flex-direction: column; gap: 8px; padding: 22px; }
.edu .eyebrow { margin: 0; }
.edu h3 { font-size: 1.15rem; }
.edu p { margin: 0; font-size: 15px; color: var(--text-2); }

/* ---------- Liên hệ ---------- */
.contact h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); letter-spacing: -.035em; max-width: 760px; }
.contact .sec-lede { max-width: 620px; }
.contact h2 mark { white-space: nowrap; }

/* ---------- Liên hệ: hai "chương" như bố cục destroytoday ----------
   main.js đặt --p (0 → 1) cho từng chương theo vị trí của hình minh họa: bắt đầu khi hình chạm đáy
   màn hình, xong khi cả hình đã hiện đủ. Không ghim chương nào, nên cuộn tới đâu chuyển động tới đó.
   Không có JS hoặc máy bật "giảm chuyển động": mọi thứ đứng yên ở trạng thái cuối, vẫn bấm được. */
.contact-intro { padding-block: clamp(64px, 9vw, 112px) clamp(36px, 5vw, 56px); }
.contact-intro .sec-lede { max-width: 620px; }
.scene { position: relative; border-top: 1px solid var(--border); overflow: hidden; }
.scene-pin { padding-block: clamp(56px, 8vw, 96px); }
.scene-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.scene-grid.reverse { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
@media (max-width: 960px) {
  .scene-grid, .scene-grid.reverse { grid-template-columns: 1fr; }
  .scene-grid.reverse .scene-art { order: 2; }
}
.scene-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 700 13px/1.4 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.scene-title { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: -.03em; overflow-wrap: anywhere; }
.scene-title a { color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.scene-title a:hover { color: var(--accent); }
.scene-text > p:not(.scene-kicker) { max-width: 460px; margin: 14px 0 0; color: var(--text-2); }
.scene-text .cta { margin-top: 24px; }
.scene-text .copy-btn { margin-left: 0; height: 46px; padding: 0 16px; border-radius: 999px; }
.scene-art { position: relative; min-height: 420px; }

/* Chương 1: email và điện thoại. Hai biểu tượng bay theo đường cong rồi đáp vào ô trên thẻ liên hệ.
   Biểu tượng 76px thu về 52px (tỷ lệ .684) cho khớp đúng ô, bo góc 22px thành 15px, nên lúc đáp không bị giật. */
.reach-art { display: flex; align-items: flex-end; min-height: 480px; }
.scene-reach .scene-grid { align-items: end; }
.scene-reach .scene-text { padding-bottom: 12px; }
.fly-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fly-trail path { fill: none; stroke: var(--accent); stroke-opacity: .3; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: opacity .4s ease; }
.fly-trail path.is-done { opacity: 0; }
.fly-tile {
  position: absolute; z-index: 3; top: 0; left: 0;
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 18px 36px -16px color-mix(in srgb, var(--accent) 85%, transparent);
  will-change: transform; pointer-events: none;
}
.fly-tile .i { width: 34px; height: 34px; stroke-width: 1.6; }
.fly-tile[data-tile="mail"] { left: 26%; top: 4px; }
.fly-tile[data-tile="phone"] { left: 64%; top: 70px; }
.fly-tile.is-docked { visibility: hidden; }
.scene:not(.is-live) .fly-tile, .scene:not(.is-live) .fly-trail { display: none; }

.reach-card {
  position: relative; z-index: 1; width: 100%; max-width: 480px; margin-left: auto; box-sizing: border-box;
  padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface);
  box-shadow: 0 30px 60px -36px rgba(17, 28, 45, .35);
}
.rc-head { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.rc-head b { display: block; font-size: 18px; font-weight: 600; }
.rc-head small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--text-2); }
.rc-ava { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.rc-ava .i { width: 26px; height: 26px; }
.rc-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding-top: 18px; }
.rc-slot {
  position: relative; display: grid; place-items: center; width: 52px; height: 52px; box-sizing: border-box;
  border: 1.5px dashed var(--border-strong); border-radius: 15px; color: var(--muted);
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
.rc-slot .i { width: 23px; height: 23px; stroke-width: 1.6; }
.rc-row.is-docked .rc-slot, .scene:not(.is-live) .rc-slot { border-style: solid; border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.rc-row.is-docked .rc-slot { transition: none; animation: dock .45s ease-out 1; }
@keyframes dock { 0% { transform: scale(1); } 40% { transform: scale(1.1); } 100% { transform: scale(1); } }
.rc-slot::before, .rc-slot::after { content: ""; position: absolute; inset: -1.5px; border-radius: 15px; border: 2px solid var(--accent); opacity: 0; pointer-events: none; }
/* Đáp vào ô: ô email tỏa một vòng sóng và hiện "Đang soạn thư…"; ô điện thoại tỏa sóng liên tục và hiện "Đang gọi…" */
.rc-row.is-docked .rc-slot::before { animation: ring .8s ease-out 1; }
.rc-row[data-dock="phone"].is-docked .rc-slot::before, .rc-row[data-dock="phone"].is-docked .rc-slot::after { animation: ring 1.6s ease-out infinite; }
.rc-row[data-dock="phone"].is-docked .rc-slot::after { animation-delay: .8s; }
@keyframes ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }
.rc-info { min-width: 0; }
.rc-info small { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rc-info a { display: block; margin-top: 2px; overflow: hidden; font-size: 16px; font-weight: 500; color: var(--text); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.rc-info a:hover { color: var(--accent); }
.rc-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; letter-spacing: 0; text-transform: none;
  opacity: 0; transform: translateY(4px) scale(.92); transition: opacity .25s ease, transform .25s ease;
}
.rc-chip .i { width: 13px; height: 13px; }
.rc-pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: beat 1.2s ease-in-out infinite; }
@keyframes beat { 50% { opacity: .25; } }
.rc-row.is-docked .rc-chip { opacity: 1; transform: none; }
/* Bên phải mỗi dòng: nút chép (viền mảnh) và nút gửi email / gọi (nền màu) */
.rc-act { display: flex; align-items: center; gap: 8px; }
.rc-copy, .rc-go { display: grid; place-items: center; flex: none; box-sizing: border-box; border-radius: 50%; cursor: pointer; text-decoration: none; }
.rc-copy { width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); background: var(--bg); color: var(--text-2); }
.rc-copy:hover { border-color: var(--accent); color: var(--accent-ink); }
.rc-copy .i { width: 16px; height: 16px; }
.rc-copy .ic-ok, .rc-copy.done .ic-copy { display: none; }
.rc-copy.done .ic-ok { display: block; }
.rc-copy.done { border-color: var(--ok); color: var(--ok); }
.rc-go { width: 44px; height: 44px; background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 18px -10px var(--accent); transition: background-color .2s ease, transform .15s ease; }
.rc-go:hover { background: var(--accent-hover); color: var(--on-accent); transform: translateY(-1px); }
.rc-go .i { width: 19px; height: 19px; }
@media (max-width: 960px) { .reach-art { min-height: 420px; } .reach-card { margin-inline: auto; } }
@media (max-width: 520px) {
  .reach-art { min-height: 450px; }
  .reach-card { padding: 16px; }
  .rc-row { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; }
  .rc-slot { width: 46px; height: 46px; }
  .rc-go { width: 40px; height: 40px; }
  .rc-copy { width: 32px; height: 32px; }
  .rc-info a { font-size: 15px; }
}

/* Chương 2: LinkedIn trên dải màu tràn viền, kéo xuống thì khung nhắn tin trượt lên */
.scene-li { border-top: 0; background: #2f7fd8; color: #ffffff; }
.scene-li .scene-kicker { color: #d7e7ff; }
.scene-li .scene-title a { color: #ffffff; text-decoration-color: rgba(255, 255, 255, .5); }
.scene-li .scene-title a:hover { color: #ffffff; text-decoration-color: #ffffff; }
.scene-li .scene-text > p:not(.scene-kicker) { color: rgba(255, 255, 255, .88); }
.scene-li .scene-pin { position: relative; z-index: 1; }
.btn-light { background: #ffffff; border-color: #ffffff; color: #0d3f86; }
.btn-light:hover { color: #0d3f86; border-color: #ffffff; }
.hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34%; pointer-events: none; }
.hills path:first-child { fill: #2a72c4; }
.hills path:last-child { fill: #2465b0; }
@container (max-width: 560px) { .li-art .profile-grid { grid-template-columns: 1fr; } }
.li-art .profile { padding: 14px; }
.li-art .profile-cover { height: 96px; }
.li-art .profile-avatar { width: 108px; height: 108px; margin-top: -58px; }
.li-art .profile-headline { font-size: 14.5px; }
@media (max-height: 900px) { .li-art .otw-card { display: none; } }
.li-art .device.browser {
  container-type: inline-size;
  position: relative; width: 100%; max-width: 660px; margin-left: auto;
  transform: translate3d(0, calc((1 - var(--rise, 1)) * 90px), 0);
}
.li-chat {
  position: absolute; right: 18px; bottom: 0; z-index: 2; width: min(300px, 72%);
  border: 1px solid #e0dfdc; border-bottom: 0; border-radius: 10px 10px 0 0; background: #ffffff;
  box-shadow: 0 -10px 30px -14px rgba(0, 0, 0, .35); color: rgba(0, 0, 0, .9);
  transform: translateY(calc((1 - var(--m, 1)) * 105%));
}
.li-chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #e8e8e8; font-size: 13px; }
.li-chat-head b { display: block; font-weight: 600; }
.li-chat-head small { display: block; font-size: 11.5px; color: rgba(0, 0, 0, .6); }
.li-chat-ava { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: #e9eef0; color: #6b7f86; }
.li-chat-ava .i { width: 18px; height: 18px; }
.li-chat-body { padding: 16px 12px 10px; font-size: 12.5px; color: rgba(0, 0, 0, .55); text-align: center; }
.li-chat-input { min-height: 18px; margin: 0 12px; padding: 10px 12px; border-radius: 8px; background: #f4f2ee; font-size: 13px; line-height: 1.45; color: rgba(0, 0, 0, .5); }
.li-typed { color: rgba(0, 0, 0, .9); }
.li-chat-input.has-text .li-ph { display: none; }
.caret { display: inline-block; width: 1.5px; height: 15px; margin-left: 2px; vertical-align: -3px; background: #0a66c2; animation: blink 1s steps(1) infinite; }
.li-chat-input.is-typing .caret { animation: none; }
.li-chat.is-ready .li-send { background: #0a66c2; color: #ffffff; transition: background-color .25s ease, color .25s ease; }
@keyframes blink { 50% { opacity: 0; } }
.li-chat-foot { display: flex; justify-content: flex-end; padding: 10px 12px; }
.li-send { padding: 5px 14px; border-radius: 999px; background: #e8e8e8; color: rgba(0, 0, 0, .45); font-size: 12.5px; font-weight: 600; }
@media (max-width: 520px) { .li-chat { right: 8px; } }
@media (prefers-reduced-motion: reduce) { .caret, .rc-pulse, .rc-slot::before, .rc-slot::after { animation: none !important; } }

/* ---------- Trình duyệt mô phỏng (dùng ở chương LinkedIn) ---------- */
.device { position: relative; }


/* Trình duyệt mô phỏng trang hồ sơ */
.device.browser { width: min(92vw, 720px); overflow: hidden; border-radius: 12px; background: var(--surface); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .55); }
.browser-bar { display: flex; align-items: center; gap: 10px; padding: 10px 52px 10px 14px; background: #eef2f5; border-bottom: 1px solid var(--border); }
.browser-dots { display: flex; gap: 6px; }
.browser-dots i { width: 10px; height: 10px; border-radius: 50%; background: #c9d4db; }
.browser-url { flex: 1; min-width: 0; overflow: hidden; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: #ffffff; color: var(--text-2); font: 400 13px var(--mono); white-space: nowrap; text-overflow: ellipsis; }
.browser-progress { height: 2px; background: #0a66c2; transform-origin: left; transform: scaleX(0); }
.device.browser.is-loading .browser-progress { animation: load .65s ease-out forwards; }
.device.browser.is-loaded .browser-progress { transform: scaleX(1); opacity: 0; transition: opacity .3s ease .1s; }
@keyframes load { to { transform: scaleX(.92); } }
.profile { padding: 18px; background: #f4f2ee; }
.profile-card { overflow: hidden; border: 1px solid #e0dfdc; border-radius: 10px; background: #ffffff; }
/* Ảnh bìa xám xanh có vòng cung, giống ảnh bìa trên hồ sơ thật */
.profile-cover {
  height: 132px;
  background:
    linear-gradient(90deg, transparent 0 70%, #c1d3d4 70%),
    radial-gradient(ellipse 66% 190% at 0% 50%, #a2b4b5 0 99.4%, transparent 100%),
    #d6e3e3;
}
.profile-body { position: relative; padding: 0 24px 22px; }
.profile-avatar { position: relative; display: grid; place-items: center; width: 128px; height: 128px; margin-top: -70px; border: 4px solid #ffffff; border-radius: 50%; background: #e9eef0; color: #6b7f86; }
.profile-avatar .i { width: 58px; height: 58px; stroke-width: 1.3; }
.otw-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.otw-ring text { font-family: var(--font); }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px 24px; margin-top: 10px; }
@media (max-width: 600px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-name { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 24px; font-weight: 600; color: rgba(0, 0, 0, .9); }
.profile-name .verified { width: 20px; height: 20px; color: rgba(0, 0, 0, .6); }
.profile-headline { margin: 4px 0 0; font-size: 15.5px; line-height: 1.45; color: rgba(0, 0, 0, .9); }
.profile-meta { margin: 6px 0 0; font-size: 14px; color: rgba(0, 0, 0, .6); }
.profile-meta a { color: #0a66c2; font-weight: 600; text-decoration: none; }
.profile-conn { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: #0a66c2; }
.profile-side { display: grid; align-content: start; gap: 12px; padding-top: 4px; list-style: none; font-size: 14px; font-weight: 600; color: rgba(0, 0, 0, .9); }
.profile-side li { display: flex; align-items: center; gap: 10px; }
.org-ico { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 4px; background: #eef2f5; color: #56687a; }
.org-ico .i { width: 17px; height: 17px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill-btn.ghost { border-color: rgba(0, 0, 0, .45); color: rgba(0, 0, 0, .65); }
.pill-btn.ghost:hover { background: #f3f3f3; color: rgba(0, 0, 0, .9); }
.otw-card { display: grid; gap: 2px; max-width: 360px; margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: #dde7f1; font-size: 14px; color: rgba(0, 0, 0, .9); }
.otw-card b { font-weight: 600; }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border: 1px solid #0a66c2; border-radius: 999px; background: #ffffff; color: #0a66c2; font: 600 14px var(--font); text-decoration: none; cursor: pointer; }
.pill-btn:hover { background: #eaf2fb; color: #004182; }
.pill-btn.primary { background: #0a66c2; color: #ffffff; }
.pill-btn.primary:hover { background: #004182; color: #ffffff; }
.profile-note { margin: 12px 2px 0; font-size: 12.5px; color: rgba(0, 0, 0, .55); }
.device.browser:not(.is-loaded) .reveal { color: transparent; background: #eceae6; border-radius: 6px; }
.device.browser:not(.is-loaded) .reveal * { visibility: hidden; }
.reveal { transition: color .35s ease, background-color .35s ease; }
@media (max-width: 520px) { .profile { padding: 10px; } .profile-cover { height: 84px; } .profile-avatar { width: 92px; height: 92px; margin-top: -48px; } }

/* ---------- Tên ở góc trên (thay cho logo) ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); transition: background-color .6s ease; }
.pc-avatar-ph { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.pc-avatar-ph .i { width: 26px; height: 26px; }

.copy-btn { margin-right: 10px; }
.copy-btn {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text-2);
  font: 500 12.5px/1 var(--font); cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.copy-btn.done { color: var(--ok); border-color: var(--ok); }
@media (max-width: 420px) {
  .copy-btn span { display: none; }
  .copy-btn { padding: 7px 8px; }
}

/* ---------- Footer ---------- */
.site-footer { padding: 28px 0 40px; font-size: 13.5px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.footer-inner p { margin: 0; }

/* ==========================================================================
   Tông màu từng dự án (giống destroytoday: cuộn tới dự án nào, màu nhấn
   của trang đổi theo màu của dự án đó). main.js gắn data-tone lên <html>.
   ✏️ Đổi màu một dự án: sửa 4 biến --accent… ở dòng của dự án đó (bản sáng và bản tối).
   ========================================================================== */
/* Màu theo nhận diện thương hiệu của từng khách hàng (chỉ dùng màu, không dùng logo):
   Mondelez tím · TTC AgriS xanh lá (ttcagris.com.vn) · Saint-Gobain xanh navy (logo) ·
   FRT cam (màu đặc trưng của FPT Retail) · Unis xanh dương đậm (logo trên unisceramics.com).
   Igarashi Việt Nam: chưa xác minh được màu nhận diện nên dùng màu chủ đạo của web. */
[data-tone="mondelez"]    { --accent: #4f2170; --accent-hover: #3e1959; --accent-soft: #f0eaf6; --accent-ink: #4f2170; }
[data-tone="saintgobain"] { --accent: #24398a; --accent-hover: #1b2c6b; --accent-soft: #e6eaf6; --accent-ink: #24398a; }
[data-tone="frt"]         { --accent: #f26a21; --accent-hover: #d65a12; --accent-soft: #fdeee3; --accent-ink: #a3410a; }
[data-tone="unis"]        { --accent: #0b4f9c; --accent-hover: #003577; --accent-soft: #e3edf8; --accent-ink: #003577; }

[data-tone="ttc"]         { --accent: #007634; --accent-hover: #005c28; --accent-soft: #e3f3e9; --accent-ink: #00612b; }

/* Đổi màu mượt khi chuyển tông */
body, .site-header, .case, .band, .card, .tile, .metrics, .metric, .panel-body, .stamp, .chip, .pill, .tag, .badge,
.diagram, .mode, .flow-mini, .src-list li, .others li, .case-status, .copy-btn, .skill-row, .steps li, mark {
  transition: background-color .6s ease, color .6s ease, border-color .6s ease;
}
.btn { transition: transform .15s ease, background-color .6s ease, border-color .6s ease, color .6s ease; }
@media (prefers-reduced-motion: reduce) {
  body, .site-header, .case, .band, .card, .stamp, .chip, mark { transition: none; }
}

/* ---------- In ấn (nhà tuyển dụng in trang ra giấy) ---------- */
@media print {
  .site-header, .cta, .copy-btn, .skip { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .band, .case { background: #fff; }
  .diagram { transform: none; }
  .card, .diagram { box-shadow: none; }
  .case-figure, .sources { position: static; }
  details.case-more > .case-body { display: block; }
  .dg-flow { animation: none; }
}
