/* ==========================================================================
   letuananh.me · bản gọn
   Nền sáng, chữ Inter, một màu nhấn đỏ. Hero và phần liên hệ nền tối để mở
   và đóng trang. Mọi màu đi qua biến ở :root; vùng tối chỉ ghi đè biến.
   Dùng chung cho trang chủ, case study (work/) và blog (blog/).
   Bản cũ (art) nằm nguyên ở legacy/ với styles.css riêng của nó.
   ========================================================================== */

:root {
  --page: #ffffff;
  --band: #f7f7f5;
  --subtle: #f3f3f1;
  --hover: #eeeeeb;
  --line: #ecece9;
  --line-2: #dcdcd8;
  --ink: #1a1a19;
  --sub: #5e5e5a;
  --soft: #8c8c87;

  --brand: #e8380c;        /* đỏ của trang chính */
  --brand-hi: #ff5b33;     /* đỏ sáng hơn, dùng trên nền tối */
  --brand-btn: #d63410;    /* đậm hơn một nấc để chữ trắng trên nút đủ tương phản */
  --brand-btn-hover: #c12e0c;
  --brand-text: #c22d08;   /* chữ đỏ cỡ nhỏ trên nền trắng */
  --brand-soft: #fdeee8;
  --ok: #22a35a;

  --card-line: #1414130f;
  --shadow-float: 0 1px 2px #1414130a, 0 14px 40px -14px #14141333;
  --ease: cubic-bezier(.16, 1, .3, 1);

  --nav-h: 64px;
  --gutter: 24px;
  --sec-y: 112px;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --page: #0f0b0a;
  --band: #16100e;
  --subtle: #1c1513;
  --hover: #ffffff12;
  --line: #ffffff14;
  --line-2: #ffffff26;
  --ink: #f1eeeb;
  --sub: #aaa39e;
  --soft: #7f7772;
  --brand-text: #ff6b47;
  --brand-soft: #ff5b331f;
  --card-line: #ffffff17;
}

/* ---------- Nền tảng ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, p, dl, dd, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 3px; border-radius: 6px; }
::selection { background: #e8380c33; }

.mono { font-family: var(--mono); font-feature-settings: "zero" 0; letter-spacing: 0; }
.muted { color: var(--soft); }
.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; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); position: relative; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--page);
  padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 500;
  transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }

.ic {
  width: 16px; height: 16px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border-radius: 12px;
  font-size: 14.5px; font-weight: 500; line-height: 1; letter-spacing: -.005em;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn .ic { transition: transform .2s var(--ease); }
.btn:hover .ic { transform: translateX(2px); }
.btn[href$="#work"]:hover .ic { transform: translateY(2px); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn--lg { height: 50px; padding: 0 22px; font-size: 15.5px; border-radius: 14px; }

.btn--primary {
  background: var(--brand-btn); color: #fff;
  box-shadow: 0 1px 2px #14141324, inset 0 1px #ffffff26;
}
.btn--primary:hover { background: var(--brand-btn-hover); }
.btn--ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { background: var(--hover); }
.btn--line { color: var(--ink); background: var(--page); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--line:hover { background: var(--subtle); }

/* ---------- Thanh điều hướng ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: #ffffffc7;
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color .25s, border-color .25s;
  color: var(--ink);
}
/* Trang có hero tối: thanh nằm đè lên hero, không đẩy hero xuống */
.has-dark-top .nav { margin-bottom: calc(var(--nav-h) * -1); }
.nav[data-theme="dark"] { background: #0f0b0a73; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav.is-scrolled[data-theme="dark"] { background: #0f0b0ad1; }
.nav.is-scrolled:not([data-theme="dark"]) { background: #ffffffe6; }

.nav__in { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15.5px; letter-spacing: -.015em; justify-self: start; white-space: nowrap; }
.brand__mark {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  background: radial-gradient(circle at 50% 50%, var(--brand) 0 5.5px, transparent 6px), #0e0e0c;
  box-shadow: inset 0 0 0 1px #ffffff1f;
}

.nav__links { display: flex; gap: 2px; }
.nav__link {
  height: 36px; display: inline-flex; align-items: center; padding: 0 13px;
  border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--sub);
  transition: color .15s, background-color .15s;
}
.nav__link:hover { color: var(--ink); background: var(--hover); }
.nav__link.is-active, .nav__link[aria-current="page"] { color: var(--ink); }

.nav__right { justify-self: end; display: flex; align-items: center; gap: 8px; }

/* Nút sang bản cũ: nhỏ, viền mảnh, không tranh với nút Liên hệ */
.navalt {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px; border-radius: 10px;
  font-size: 13px; font-weight: 500; color: var(--sub); white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: color .15s, background-color .15s, box-shadow .15s;
}
.navalt .ic { width: 14px; height: 14px; }
.navalt:hover { color: var(--ink); background: var(--hover); }

.langsw {
  display: inline-flex; padding: 3px; gap: 2px;
  border-radius: 10px; background: var(--subtle);
  box-shadow: inset 0 0 0 1px var(--line);
}
.nav[data-theme="dark"] .langsw { background: #ffffff0d; }
.langsw button {
  height: 28px; min-width: 34px; padding: 0 8px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--soft);
  transition: background-color .15s, color .15s;
}
.langsw button:hover { color: var(--ink); }
.langsw button[aria-pressed="true"] { background: var(--page); color: var(--ink); box-shadow: 0 1px 2px #14141314, inset 0 0 0 1px var(--line); }
.nav[data-theme="dark"] .langsw button[aria-pressed="true"] { background: #ffffff1f; box-shadow: none; }

/* ==========================================================================
   Hero: mặt canvas kiểu Figma
   Tiêu đề nằm trong khung chọn có số đo thật (site.js đo rồi điền vào),
   ba dự án là ba frame có nhãn, ba con trỏ có tên lượn nhẹ.
   ========================================================================== */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 100%, #2a110b 0%, #130d0b 48%, #0b0908 100%);
  color: var(--ink);
  padding: calc(var(--nav-h) + 60px) 0 0;
}
.canvas-dots {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(#ffffff26 1px, transparent 1.3px);
  background-size: 24px 24px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(85% 75% at 50% 32%, #000 25%, transparent 82%);
          mask-image: radial-gradient(85% 75% at 50% 32%, #000 25%, transparent 82%);
}
.hero__glow {
  position: absolute; z-index: -1; pointer-events: none;
  left: 50%; bottom: -260px; width: 1100px; height: 620px; transform: translateX(-50%);
  background: radial-gradient(closest-side, #e8380c5c, #e8380c1a 55%, transparent);
  filter: blur(20px);
}
.hero__in { display: flex; flex-direction: column; align-items: center; text-align: center; }

.status {
  display: inline-flex; align-items: center; gap: 9px;
  height: 32px; padding: 0 14px 0 12px; border-radius: 999px;
  background: #ffffff0d; box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 13.5px; font-weight: 500; color: var(--sub);
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px #22a35a33; position: relative; flex-shrink: 0; }
.status__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(2.6); opacity: 0; } }

/* Khung chọn quanh tiêu đề */
.sel { position: relative; display: inline-block; margin-top: 48px; padding: 6px 18px 10px; }
.sel::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--brand); pointer-events: none; }
.sel__name {
  position: absolute; left: -1px; bottom: 100%; margin-bottom: 7px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0; line-height: 1; color: var(--brand-hi); white-space: nowrap;
}
.sel__name svg { width: 11px; height: 11px; fill: currentColor; }
.sel__h { position: absolute; width: 9px; height: 9px; background: #fff; border: 1px solid var(--brand); }
.sel__h--tl { left: -4px; top: -4px; }
.sel__h--tr { right: -4px; top: -4px; }
.sel__h--bl { left: -4px; bottom: -4px; }
.sel__h--br { right: -4px; bottom: -4px; }
.sel__size {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 9px);
  padding: 3px 7px; border-radius: 4px; background: var(--brand); color: #fff;
  font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 1.2; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hero__title {
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 1.02; font-weight: 600; letter-spacing: -.045em;
  text-wrap: balance;
}
.hero__title em { font-style: normal; color: var(--brand); }
.hero__sub {
  margin-top: 44px; max-width: 620px;
  font-size: clamp(16.5px, 1.5vw, 19px); line-height: 1.55; color: var(--sub);
  text-wrap: pretty;
}
.hero__sub strong { color: var(--ink); font-weight: 600; }
.hero__cta { margin-top: 32px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; position: relative; }

/* Hai thẻ nổi hai bên: thẻ màu (token) và thẻ code (Dev Mode). Chỉ hiện trên màn rộng. */
.hero__stage { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }
.chipcard {
  position: absolute; z-index: 1; display: none;
  width: 214px; padding: 12px 14px; border-radius: 12px; text-align: left;
  background: #17110fd9; box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 40px -20px #000c;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.7; color: var(--sub);
}
.chipcard__head {
  display: flex; align-items: center; gap: 7px; margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans); font-size: 11.5px; font-weight: 600; color: var(--ink); letter-spacing: 0;
}
.chipcard__head svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--soft); }
.chipcard__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chipcard__row span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.sw { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px #ffffff26; }
.chipcard code { font-family: inherit; display: block; white-space: pre; color: var(--sub); }
.chipcard code b { font-weight: 400; color: #ffb59f; }
.chipcard code i { font-style: normal; color: #9ad1ff; }
.hero__below { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }
.chipcard--tokens { left: 0; top: 52px; }
.chipcard--code { right: 0; top: 44px; }

/* Con trỏ cộng tác có tên, kiểu Figma */
.cur {
  position: absolute; z-index: 3; pointer-events: none;
  display: inline-flex; align-items: flex-start; gap: 0;
  animation: drift var(--dur, 7s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.cur svg { width: 18px; height: 20px; flex-shrink: 0; filter: drop-shadow(0 2px 3px #0006); }
.cur svg path { fill: var(--c); stroke: #fff; stroke-width: 1.3; stroke-linejoin: round; }
.cur b {
  margin: 14px 0 0 -3px; padding: 3px 8px 4px; border-radius: 3px 10px 10px 10px;
  background: var(--c); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 4px 10px -4px #0008;
}
.cur--design { --c: #e8380c; --dur: 6.5s; left: calc(100% - 3px); top: calc(100% - 3px); }
.cur--code { --c: #7c5cff; --dur: 8s; --delay: -2s; left: calc(100% - 128px); top: 210px; display: none; }
.cur--sell { --c: #1f9d55; --dur: 7.2s; --delay: -4s; left: calc(50% - 64px); top: 26px; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(7px, 5px); }
  60% { transform: translate(-4px, 9px); }
}
@media (prefers-reduced-motion: reduce) {
  .cur, .status__dot::after { animation: none; }
}

.stats {
  margin-top: 52px; width: 100%; max-width: 920px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: 20px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__n { font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat dd { font-size: 13.5px; color: var(--sub); line-height: 1.4; }

/* Ba frame dự án, nhãn tên nằm phía trên như trong Figma */
.frames {
  margin-top: 60px; width: 100%;
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 16px; row-gap: 14px;
  height: clamp(380px, 36vw, 470px);
  text-align: left;
}
.frame { position: relative; display: flex; flex-direction: column; min-height: 0; }
.frame--main { grid-row: span 2; }
.frame__label {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 24px; font-size: 12px; font-weight: 500; color: var(--soft); white-space: nowrap;
  transition: color .2s;
}
.frame__name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.frame__name > span { overflow: hidden; text-overflow: ellipsis; }
.frame__name svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; flex-shrink: 0; }
.frame__meta { font-family: var(--mono); font-size: 11px; color: var(--soft); opacity: 0; transition: opacity .2s; }
.frame__box {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  border-radius: 10px 10px 0 0; background: #ffffff08;
  box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 80px -30px #000000b3;
  transition: box-shadow .25s, transform .5s var(--ease);
}
.frame__box > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s var(--ease); }
.frame--phone .frame__box { background: linear-gradient(140deg, #ffe9d2 0%, #ffc794 100%); }
.frame--phone .frame__box > img {
  inset: auto; left: 50%; top: 22px; width: 42%; min-width: 120px; height: auto; transform: translateX(-50%);
  border-radius: 18px 18px 0 0; box-shadow: 0 18px 40px -16px #8a3b0059;
}
.frame:hover .frame__label { color: var(--brand-hi); }
.frame:hover .frame__meta { opacity: 1; color: var(--brand-hi); }
.frame:hover .frame__box { box-shadow: inset 0 0 0 1px var(--brand), 0 30px 80px -30px #000000b3; }
.frame:hover .frame__box > img { transform: translateY(-4px); }
.frame--phone:hover .frame__box > img { transform: translate(-50%, -4px); }
.frame:focus-visible { outline: none; }
.frame:focus-visible .frame__box { box-shadow: inset 0 0 0 2px var(--brand-hi); }

/* ---------- Dải tên đối tác ---------- */
.strip { border-bottom: 1px solid var(--line); }
.strip__in { padding-top: 36px; padding-bottom: 36px; display: flex; align-items: center; gap: 40px; }
.strip__label { flex: 0 0 auto; max-width: 112px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--soft); }
.strip__list { flex: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 28px; }
.strip__list li { display: flex; flex-direction: column; gap: 2px; }
.strip__list b { font-size: 16.5px; font-weight: 600; letter-spacing: -.02em; color: #3a3a37; }
.strip__list span { font-family: var(--mono); font-size: 11.5px; color: var(--soft); }

/* ---------- Khung section chung ---------- */
.sec { padding: var(--sec-y) 0; position: relative; }
.sec--band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec + .sec--band, .sec--band + .sec { border-top: 0; }
.sec--tight { padding-top: 72px; padding-bottom: 72px; }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 48px; }
.head > div { max-width: 720px; }
.head__aside { font-size: 12.5px; color: var(--soft); white-space: nowrap; padding-bottom: 6px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; line-height: 16px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text);
}
.eyebrow::before { content: ""; width: 6px; height: 8px; border-radius: 3px 3px 1px 1px; background: var(--brand); flex-shrink: 0; }

.h2 {
  margin-top: 16px;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.1; font-weight: 600; letter-spacing: -.032em;
  text-wrap: balance;
}
.h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.lede { margin-top: 16px; font-size: 17.5px; line-height: 1.6; color: var(--sub); max-width: 640px; text-wrap: pretty; }

.card { background: var(--page); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }

.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border-radius: 999px; background: var(--subtle);
  font-size: 12px; font-weight: 500; color: var(--sub); white-space: nowrap;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li, .chips span {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: 999px; background: var(--page); box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 13.5px; font-weight: 500; color: var(--sub);
}

/* ---------- Dự án (trang chủ) ---------- */
.pj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pj {
  display: flex; flex-direction: column;
  background: var(--page); border-radius: 20px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .3s var(--ease), transform .4s var(--ease);
}
.pj:hover { box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-float); transform: translateY(-3px); }

.pj__media {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 10; background: var(--bg, var(--subtle));
}
.pj__media img {
  position: absolute; left: 8%; top: 10%; width: 84%; height: 100%; max-width: none;
  object-fit: cover; object-position: top center;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 0 0 1px #0000000d, 0 24px 50px -20px #00000066;
  transition: transform .6s var(--ease);
}
.pj__media--phone img {
  left: 50%; top: 9%; width: 40%; height: auto; transform: translateX(-50%);
  border-radius: 22px 22px 0 0;
}
.pj:hover .pj__media img { transform: translateY(-6px); }
.pj:hover .pj__media--phone img { transform: translate(-50%, -6px); }

.pj__body { flex: 1; display: flex; flex-direction: column; padding: 24px 26px; }
.pj__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pj__name { font-size: 21px; font-weight: 600; letter-spacing: -.022em; line-height: 1.25; }
.pj__year { font-size: 12px; color: var(--soft); white-space: nowrap; }
.pj__role { margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--brand-text); }
.pj__hook { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--sub); text-wrap: pretty; }

.pj__metrics {
  margin-top: auto; padding-top: 20px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.pj__metrics::before { content: ""; grid-column: 1 / -1; height: 1px; background: var(--line); margin-bottom: 2px; }
.m { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.m b { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--ink); }
.m i { font-style: normal; font-size: 12.5px; line-height: 1.4; color: var(--soft); }

.pj__cta {
  margin-top: 20px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.pj__cta .ic { transition: transform .2s var(--ease); }
.pj:hover .pj__cta { color: var(--brand-text); }
.pj:hover .pj__cta .ic { transform: translateX(3px); }

/* ---------- Kinh nghiệm ---------- */
.xp { background: var(--page); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.xp__row {
  display: grid; grid-template-columns: 190px 250px minmax(0, 1fr); gap: 24px;
  padding: 24px 28px; align-items: start;
  transition: background-color .15s;
}
.xp__row + .xp__row { border-top: 1px solid var(--line); }
.xp__row:hover { background: #fcfcfb; }
.xp__time { font-size: 12.5px; color: var(--soft); padding-top: 3px; }
.xp__row:first-child .xp__time { color: var(--brand-text); }
.xp__org { font-size: 16.5px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.xp__role { margin-top: 2px; font-size: 14px; color: var(--sub); }
.xp__tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.xp__desc { font-size: 15px; line-height: 1.6; color: var(--sub); text-wrap: pretty; }

.recog { margin-top: 64px; }
.recog__grid { margin-top: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.recog__grid li { display: flex; }
.recog__card {
  flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 22px;
  transition: box-shadow .3s var(--ease), transform .4s var(--ease);
}
.recog__card:hover { box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-float); transform: translateY(-2px); }
.recog__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.recog__top b { font-size: 15.5px; font-weight: 600; letter-spacing: -.012em; line-height: 1.35; }
.recog__top .ic { color: var(--soft); margin-top: 2px; transition: color .15s, transform .2s var(--ease); }
.recog__card:hover .recog__top .ic { color: var(--brand-text); transform: translate(2px, -2px); }
.recog__meta { font-size: 11.5px; color: var(--soft); }
.recog__text { margin-top: 6px; font-size: 14px; line-height: 1.55; color: var(--sub); }

/* ---------- Về mình ---------- */
.about { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 72px; align-items: start; }
.about__side { position: sticky; top: calc(var(--nav-h) + 24px); }
.profile { padding: 12px; }
.profile__img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.profile__id { padding: 18px 10px 16px; }
.profile__name { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.profile__role { margin-top: 2px; font-size: 14px; color: var(--sub); }
.profile__facts { border-top: 1px solid var(--line); margin: 0 10px; }
.profile__facts > div { padding: 14px 0; display: grid; gap: 4px; }
.profile__facts > div + div { border-top: 1px solid var(--line); }
.profile__facts dt { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); }
.profile__facts dd { display: flex; flex-direction: column; gap: 1px; }
.profile__facts dd b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.profile__facts dd span { font-size: 13.5px; color: var(--sub); }

.beats { margin-top: 40px; border-top: 1px solid var(--line); }
.beat { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.beat__no { font-size: 12.5px; color: var(--brand-text); padding-top: 3px; }
.beat h3 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.beat p { margin-top: 6px; font-size: 15.5px; line-height: 1.65; color: var(--sub); max-width: 640px; }
.beat strong { color: var(--ink); font-weight: 600; }

.tools { margin-top: 36px; }
.tools__h { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); margin-bottom: 14px; }

/* ---------- Thẻ bài viết (trang chủ, trang blog, cuối bài) ---------- */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pc {
  display: flex; flex-direction: column; padding: 22px 22px 24px;
  transition: box-shadow .3s var(--ease), transform .4s var(--ease);
}
.pc:hover { box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-float); transform: translateY(-3px); }
.pc__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.pc__meta { font-size: 11.5px; color: var(--soft); padding-top: 2px; }
.pc__meta b { font-weight: 500; color: var(--brand-text); margin-right: 4px; }
.pc__thumb { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--card-line), 0 6px 14px -8px #0000004d; transform: rotate(2deg); transition: transform .4s var(--ease); flex-shrink: 0; }
.pc:hover .pc__thumb { transform: rotate(0); }
.pc__title { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; text-wrap: balance; }
.pc__dek { margin-top: 8px; font-size: 14.5px; line-height: 1.6; color: var(--sub); }

/* ---------- Liên hệ ---------- */
.contact {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #2a110b 0%, #130d0b 50%, #0b0908 100%);
  color: var(--ink);
  padding-top: var(--sec-y);
}
.contact .canvas-dots { -webkit-mask-image: radial-gradient(80% 60% at 50% 20%, #000 20%, transparent 80%); mask-image: radial-gradient(80% 60% at 50% 20%, #000 20%, transparent 80%); }
.contact__glow {
  position: absolute; z-index: -1; left: 50%; top: -300px; width: 900px; height: 560px; transform: translateX(-50%);
  background: radial-gradient(closest-side, #e8380c40, transparent); filter: blur(20px); pointer-events: none;
}
.contact__in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact__title {
  margin-top: 18px;
  font-size: clamp(38px, 6vw, 72px); line-height: 1.04; font-weight: 600; letter-spacing: -.04em;
  text-wrap: balance;
}
.contact__title--sm { font-size: clamp(30px, 4.4vw, 52px); }
.contact .lede { margin-left: auto; margin-right: auto; }
.contact__cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.contact__cta .btn--ghost.is-done { color: #7be0a6; box-shadow: inset 0 0 0 1px #7be0a666; }

.contact__meta {
  margin-top: 64px; width: 100%;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line); text-align: left;
}
.contact__meta > div { padding: 22px 20px 0 0; display: grid; gap: 6px; align-content: start; }
.contact__meta dt { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); }
.contact__meta dd { font-size: 15px; font-weight: 500; color: var(--ink); }
.contact__meta a { transition: color .15s; }
.contact__meta a:hover { color: var(--brand-text); }

.foot {
  margin-top: 80px; padding-top: 24px; padding-bottom: 32px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--soft);
}
.foot::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--line); }
.foot a { transition: color .15s; }
.foot a:hover { color: var(--ink); }
.foot__links { display: flex; gap: 20px; }

/* ==========================================================================
   Trang case study (work/*.html)
   ========================================================================== */
.crumb { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; font-size: 13.5px; color: var(--soft); }
.crumb a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--sub); transition: color .15s; }
.crumb a:hover { color: var(--ink); }
.crumb a .ic { transform: rotate(180deg); }

.cs-head { padding: 40px 0 0; }
.cs-head__title { margin-top: 16px; font-size: clamp(40px, 6vw, 68px); line-height: 1.03; font-weight: 600; letter-spacing: -.04em; text-wrap: balance; }
.cs-head__hook { margin-top: 20px; max-width: 760px; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--sub); text-wrap: pretty; }
.cs-head__tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.cs-head__tags span {
  display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px;
  background: var(--subtle); font-size: 13px; font-weight: 500; color: var(--sub);
}

.cs-metrics { margin-top: 40px; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cs-metrics > div { display: flex; flex-direction: column; gap: 4px; padding: 22px 20px 22px 0; }
.cs-metrics > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.cs-metrics b { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cs-metrics span { font-size: 13.5px; line-height: 1.45; color: var(--sub); }

.cs-hero { margin-top: 40px; border-radius: 20px; overflow: hidden; background: var(--bg, var(--subtle)); box-shadow: inset 0 0 0 1px var(--card-line); }
.cs-hero > img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.cs-hero--phones { padding: clamp(28px, 4vw, 48px) clamp(20px, 4vw, 48px) 0; }
.cs-hero--phones .phones { margin: 0; padding: 0; background: none; box-shadow: none; }
.cs-hero__cap { padding: 16px clamp(20px, 4vw, 48px) 20px; font-size: 13px; color: #6d4a33; }

/* Phần chữ: tiêu đề section đứng bên trái, nội dung bên phải */
.cs-sec { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; padding: 64px 0; border-top: 1px solid var(--line); }
.cs-sec:first-child { border-top: 0; }
.cs-sec__head { align-self: start; position: sticky; top: calc(var(--nav-h) + 24px); }
.cs-sec__head .h3 { margin-top: 12px; font-size: 22px; text-wrap: balance; }
.cs-sec__body { max-width: 760px; }

.cs-rows > * + * { margin-top: 28px; }
.cs-row { font-size: 16.5px; line-height: 1.7; color: var(--sub); text-wrap: pretty; }
.cs-row .lb { display: block; margin-bottom: 6px; font-size: 17px; font-weight: 600; letter-spacing: -.012em; color: var(--ink); }
.cs-row strong:not(.lb) { color: var(--ink); font-weight: 600; }
.cs-row .hl, .cs-row b { color: var(--ink); font-weight: 600; }
.cs-note { margin-top: 24px; padding: 14px 16px; border-radius: 12px; background: var(--subtle); font-size: 14px; line-height: 1.55; color: var(--sub); }

.cs-decisions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; counter-reset: dec; }
.cs-decisions li {
  counter-increment: dec; position: relative;
  padding: 22px 22px 24px; border-radius: 16px; background: var(--page); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px; line-height: 1.6; color: var(--sub);
}
.cs-decisions li::before {
  content: counter(dec, decimal-leading-zero); display: block; margin-bottom: 14px;
  font-family: var(--mono); font-size: 12px; color: var(--brand-text);
}
.cs-decisions li strong { display: block; margin-bottom: 6px; font-size: 16px; font-weight: 600; letter-spacing: -.012em; line-height: 1.4; color: var(--ink); }
.cs-decisions li:only-child, .cs-decisions li:last-child:nth-child(odd) { grid-column: 1 / -1; }

.cs-story { border-radius: 20px; background: var(--page); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cs-story__title { padding: 22px 24px; font-size: 19px; font-weight: 600; letter-spacing: -.018em; line-height: 1.35; border-bottom: 1px solid var(--line); text-wrap: balance; }
.cs-story__row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 18px 24px; }
.cs-story__row + .cs-story__row { border-top: 1px solid var(--line); }
.cs-story__row dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); padding-top: 3px; }
.cs-story__row:last-child dt { color: var(--brand-text); }
.cs-story__row dd { font-size: 15.5px; line-height: 1.65; color: var(--sub); }
.cs-story__row dd p + p { margin-top: 10px; }
.cs-story__row dd strong, .cs-story__row dd b { color: var(--ink); font-weight: 600; }

/* Phần hình: tràn hết bề rộng khung */
.cs-work { padding-top: 32px; padding-bottom: var(--sec-y); }
.cs-work__intro { padding: 64px 0 8px; border-top: 1px solid var(--line); }
.cs-block { margin-top: 56px; }
.cs-block__head { max-width: 720px; margin-bottom: 24px; }
.cs-block__head .h3 { margin-top: 12px; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.025em; text-wrap: balance; }
.cs-block__head p:not(.eyebrow) { margin-top: 10px; font-size: 16px; line-height: 1.65; color: var(--sub); text-wrap: pretty; }

.gal {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  padding: clamp(16px, 2.4vw, 28px); border-radius: 20px;
  background: var(--panel, var(--band)); box-shadow: inset 0 0 0 1px var(--card-line);
}
.gal--stack { grid-template-columns: minmax(0, 1fr); }
.gal > .fig:only-child, .gal > .fig--wide { grid-column: 1 / -1; }
.gal--stack > .fig { grid-column: auto; }
.fig { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fig > img, .fig > video, .fig__view { width: 100%; border-radius: 10px; box-shadow: 0 0 0 1px #0000000f, 0 16px 40px -24px #00000059; background: #ffffff10; }
.fig[data-full] { cursor: zoom-in; }
.fig[data-full] > img { transition: transform .4s var(--ease), box-shadow .3s; }
.fig[data-full]:hover > img { transform: translateY(-2px); box-shadow: 0 0 0 1px #0000001a, 0 22px 50px -24px #00000080; }
.fig figcaption { font-size: 13.5px; line-height: 1.55; color: var(--panel-cap, var(--sub)); text-wrap: pretty; }
.fig__view { position: relative; max-height: 560px; overflow: hidden; }
.fig__view img { width: 100%; }
.fig__more {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px;
  background: #0f0b0ae6; color: #fff; font-size: 12.5px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 8px 20px -8px #0009;
}
.fig__view::after { content: ""; position: absolute; inset: auto 0 0; height: 120px; background: linear-gradient(transparent, #0000002e); pointer-events: none; }

.phones { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(12px, 2vw, 24px); }
.phones .fig { width: clamp(150px, 20%, 230px); flex: 0 0 auto; }
.phones .fig > img, .phones .fig > video { border-radius: 22px; }
.phones-panel { padding: clamp(20px, 3vw, 36px); border-radius: 20px; background: var(--panel, var(--band)); box-shadow: inset 0 0 0 1px var(--card-line); }
.phones__cap { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--sub); }

.gal__phones { grid-column: 1 / -1; padding: 8px 0 4px; }
.gal__phones .phones__cap { color: var(--panel-cap, var(--sub)); }
.flow__step:nth-child(even) .flow__text { order: 2; }
.flow__step:nth-child(even) .phones { justify-content: flex-start; }
.tablets-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: clamp(16px, 2.4vw, 28px); border-radius: 20px; background: var(--band); box-shadow: inset 0 0 0 1px var(--card-line); }
.tablets-grid .fig--wide { grid-column: 1 / -1; }

.flow { display: grid; gap: 16px; }
.flow__step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: center; padding: clamp(20px, 3vw, 36px); border-radius: 20px; background: var(--band); box-shadow: inset 0 0 0 1px var(--card-line); }
.flow__no { font-family: var(--mono); font-size: 12px; color: var(--brand-text); }
.flow__text h4 { margin-top: 10px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.flow__text p { margin-top: 10px; font-size: 15.5px; line-height: 1.65; color: var(--sub); }
.flow__step .phones { justify-content: flex-end; }
.flow__step .phones .fig { width: clamp(130px, 38%, 196px); }

.legend { margin-top: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.legend li { padding: 18px; border-radius: 14px; background: var(--page); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 4px; }
.legend b { font-size: 15px; font-weight: 600; }
.legend span { font-size: 13.5px; line-height: 1.55; color: var(--sub); }

/* Prototype Figma chạy thật (case Công thức Toán) */
.cs-proto { margin-top: 16px; }
.proto { display: grid; grid-template-columns: minmax(0, 1fr) 360px minmax(0, 1fr); gap: 40px; align-items: center; padding: clamp(24px, 4vw, 48px); border-radius: 20px; background: var(--band); box-shadow: inset 0 0 0 1px var(--card-line); }
.proto__phone { width: 100%; aspect-ratio: 390 / 820; border-radius: 40px; padding: 10px; background: #111; box-shadow: 0 30px 60px -30px #0008; }
.proto__phone iframe { width: 100%; height: 100%; border: 0; border-radius: 31px; background: #f1efe9; }
.proto__bar { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--sub); }
.proto__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.proto__try { display: grid; gap: 12px; margin-top: 16px; }
.proto__try li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 4px; font-size: 15px; line-height: 1.55; color: var(--sub); }
.proto__try b { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--brand-text); padding-top: 3px; }
.proto__intro p { margin-top: 10px; font-size: 16px; line-height: 1.65; color: var(--sub); }
.proto__actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }

/* Dự án trước / sau */
.cs-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cs-next a {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: center;
  padding: 14px; border-radius: 18px; background: var(--page); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .3s var(--ease), transform .4s var(--ease);
}
.cs-next a:hover { box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-float); transform: translateY(-2px); }
.cs-next__thumb { position: relative; height: 72px; border-radius: 10px; overflow: hidden; background: var(--bg, var(--subtle)); }
.cs-next__thumb img { position: absolute; left: 12%; top: 16%; width: 76%; height: 100%; object-fit: cover; object-position: top; border-radius: 4px 4px 0 0; }
.cs-next__thumb--phone img { left: 50%; width: 38%; height: auto; transform: translateX(-50%); border-radius: 6px 6px 0 0; }
.cs-next__k { display: block; font-size: 12.5px; color: var(--soft); }
.cs-next__name { display: block; margin-top: 2px; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.cs-next__role { display: block; margin-top: 2px; font-size: 13.5px; color: var(--sub); }
.cs-next a:last-child { text-align: right; grid-template-columns: minmax(0, 1fr) 96px; }
.cs-next a:last-child .cs-next__thumb { order: 2; }

/* ==========================================================================
   Blog: trang danh sách và trang bài
   ========================================================================== */
.blog-head { padding: 40px 0 8px; }
.blog-head .h2 { font-size: clamp(36px, 5vw, 56px); }
.blog-list { display: grid; gap: 16px; }
.blog-item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 96px; gap: 24px; align-items: center;
  padding: 22px 24px; border-radius: 18px; background: var(--page); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .3s var(--ease), transform .4s var(--ease);
}
.blog-item:hover { box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-float); transform: translateY(-2px); }
.blog-item__no { font-family: var(--mono); font-size: 13px; color: var(--brand-text); }
.blog-item__meta { font-family: var(--mono); font-size: 11.5px; color: var(--soft); }
.blog-item__title { display: block; margin-top: 6px; font-size: clamp(19px, 2vw, 23px); font-weight: 600; letter-spacing: -.02em; line-height: 1.3; text-wrap: balance; }
.blog-item__dek { display: block; margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--sub); }
.blog-item__flag { display: inline-flex; margin-left: 8px; vertical-align: 2px; height: 20px; align-items: center; padding: 0 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-family: var(--sans); font-size: 11px; font-weight: 600; }
.blog-item img { width: 96px; height: 120px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--card-line), 0 8px 18px -10px #0006; transform: rotate(2deg); transition: transform .4s var(--ease); }
.blog-item:hover img { transform: rotate(0); }

/* ---------- Bài viết ---------- */
.ppage .crumb { max-width: 1200px; }
.post__head { padding: 40px 0 44px; max-width: 860px; }
.post__kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--soft); }
.post__kicker i { display: none; }
.post__kicker::before { content: ""; width: 6px; height: 8px; border-radius: 3px 3px 1px 1px; background: var(--brand); }
.post__title { margin-top: 16px; font-size: clamp(36px, 5.4vw, 62px); line-height: 1.06; font-weight: 600; letter-spacing: -.038em; text-wrap: balance; }
.post__dek { margin-top: 20px; max-width: 680px; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.55; color: var(--sub); text-wrap: pretty; }

.post__wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; padding: 48px 0 24px; border-top: 1px solid var(--line); }
.post__rail { position: sticky; top: calc(var(--nav-h) + 28px); align-self: start; }
.post__raillabel { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); margin-bottom: 10px; }
.post__toc { border-top: 1px solid var(--line); }
.post__toc a {
  display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; line-height: 1.4; color: var(--sub); transition: color .2s, padding-left .3s var(--ease);
}
.post__toc a span { font-family: var(--mono); font-size: 11.5px; color: var(--brand-text); }
.post__toc a:hover, .post__toc a.is-on { color: var(--ink); }
.post__toc a.is-on { padding-left: 6px; font-weight: 500; }
.post__railnote { margin-top: 14px; font-size: 13.5px; color: var(--sub); }

.post__body { max-width: 700px; font-size: 18px; line-height: 1.78; color: #2e2e2c; }
.post__body > p { margin-bottom: 1.1em; }
.post__body strong { font-weight: 600; color: var(--ink); }
.post__body em { font-style: italic; }
.post__body a:not(.btn):not(.fn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: text-decoration-color .15s; }
.post__body a:not(.btn):not(.fn):hover { text-decoration-color: var(--brand); }
.post__open { margin: 2em 0 1.4em; font-size: clamp(22px, 2.3vw, 27px); line-height: 1.4; font-weight: 600; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.post__q { margin: 2.6em 0 .9em; font-size: clamp(22px, 2.2vw, 26px); line-height: 1.3; font-weight: 600; letter-spacing: -.02em; color: var(--ink); scroll-margin-top: calc(var(--nav-h) + 24px); }
.post__q::before { content: ""; display: block; width: 24px; height: 3px; margin-bottom: 16px; border-radius: 2px; background: var(--brand); }
.post__h {
  margin: 1.8em 0 2.2em; padding: 20px 22px; border-radius: 14px; background: var(--brand-soft);
  font-size: 18px; line-height: 1.5; font-weight: 600; letter-spacing: -.012em; color: var(--ink);
}
.post__no { margin-right: 6px; font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--brand-text); }
.post__art { margin: 2.2em 0 2.4em; }
.post__art img { width: 100%; border-radius: 14px; background: var(--subtle); box-shadow: 0 0 0 1px var(--card-line); }
.post__art figcaption { margin-top: 10px; font-size: 13.5px; color: var(--soft); }
.post__body sup { font-size: .68em; line-height: 0; vertical-align: super; }
.fn { margin-left: 1px; padding: 0 3px; border-radius: 4px; font-family: var(--mono); font-weight: 500; color: var(--brand-text); }
.fn:hover { background: var(--brand-soft); }
.u-line { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.u-line:hover { text-decoration-color: var(--brand); }
.post__steps { counter-reset: step; margin: 1.4em 0 1.8em; border-top: 1px solid var(--line); }
.post__steps li { counter-increment: step; position: relative; padding: 14px 0 14px 44px; border-bottom: 1px solid var(--line); }
.post__steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 16px; font-family: var(--mono); font-size: 13px; color: var(--brand-text); }
.post__pull { margin: 1.8em 0; padding-left: 20px; border-left: 3px solid var(--brand); font-size: 22px; line-height: 1.45; font-weight: 600; letter-spacing: -.015em; color: var(--ink); }
.post__end { margin-top: 3em; padding: 28px 30px; border-radius: 18px; background: var(--band); box-shadow: inset 0 0 0 1px var(--line); }
.post__end p { margin-bottom: 1em; }
.post__end p:last-child { margin-bottom: 0; }
.post__end .post__sign { display: flex; align-items: center; gap: 12px; margin-top: 1.6em; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.post__sign::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.post__refs { margin-top: 3em; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 24px); }
.post__refs h2 { margin-bottom: 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); }
.post__refs ol { counter-reset: ref; }
.post__refs li { counter-increment: ref; position: relative; padding: 10px 0 10px 32px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.55; color: var(--sub); scroll-margin-top: calc(var(--nav-h) + 24px); transition: background-color .6s; }
.post__refs li::before { content: counter(ref); position: absolute; left: 0; top: 10px; font-family: var(--mono); font-size: 13px; color: var(--brand-text); }
.post__refs li:target { background: var(--brand-soft); }

/* Nút đọc lướt: cả bài chỉ còn chữ in đậm */
.skim {
  position: fixed; z-index: 50; right: 24px; bottom: 24px;
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 16px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 14px 30px -14px #0e0e0c8c;
  transition: transform .3s var(--ease);
}
.skim:hover { transform: translateY(-2px); }
.skim__track { position: relative; width: 36px; height: 22px; border-radius: 999px; background: #ffffff3d; transition: background-color .3s var(--ease); }
.skim__dot { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.skim[aria-pressed="true"] .skim__track { background: var(--brand); }
.skim[aria-pressed="true"] .skim__dot { transform: translateX(14px); }
.post__body p, .post__body li, .post__body figcaption, .post__body .fn { transition: color .5s var(--ease), opacity .5s var(--ease); }
.post__body strong {
  background: linear-gradient(#e8380c38, #e8380c38) 0 88% / 0 .42em no-repeat;
  transition: background-size .6s var(--ease), color .5s var(--ease);
}
.is-skim .post__body p, .is-skim .post__body li, .is-skim .post__refs, .is-skim .post__body .fn { color: #1a1a1924; }
.is-skim .post__body strong { color: var(--ink); background-size: 100% .42em; }
.is-skim .post__body .post__q, .is-skim .post__body .post__h { color: var(--ink); }
.is-skim .post__art, .is-skim .uimock, .is-skim .undo, .is-skim .roadsign, .is-skim .alertcard,
.is-skim .board, .is-skim .tetmock, .is-skim .bars, .is-skim .crowd, .is-skim .stamps, .is-skim .sym { opacity: .22; }

.pnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pnav a {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 16px; border-radius: 18px; background: var(--page); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .3s var(--ease), transform .4s var(--ease);
}
.pnav a:hover { box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-float); transform: translateY(-2px); }
.pnav img, .pnav__all { width: 56px; height: 70px; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px var(--card-line); }
.pnav__all { display: grid; place-items: center; background: var(--subtle); color: var(--soft); }
.pnav__k { display: block; font-size: 12.5px; color: var(--soft); }
.pnav__name { display: block; margin-top: 3px; font-size: 16px; font-weight: 600; letter-spacing: -.015em; line-height: 1.35; }
.pnav a:last-child { text-align: right; grid-template-columns: minmax(0, 1fr) 56px; }
.pnav a:last-child > :first-child { order: 2; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 56px 24px 24px;
  background: #0b0908f2; opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; overflow: auto;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity .25s; }
.lightbox img { max-width: min(1600px, 100%); max-height: calc(100vh - 80px); width: auto; height: auto; border-radius: 10px; box-shadow: 0 30px 80px -20px #000; }
.lightbox.is-tall { place-items: start center; }
.lightbox.is-tall img { max-height: none; max-width: min(1100px, 100%); }
.lightbox__close {
  position: fixed; top: 14px; right: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px;
  background: #ffffff1a; color: #fff; font-size: 14px; font-weight: 500;
}
.lightbox__close:hover { background: #ffffff2e; }

/* ---------- Hiện dần khi cuộn ----------
   Chỉ ẩn khi JS đã chạy và người xem không tắt chuyển động. JS hỏng thì
   nội dung vẫn hiện đủ. */
.motion .rv { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.motion .rv.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Màn hình nhỏ hơn
   ========================================================================== */
@media (min-width: 1180px) {
  .chipcard { display: block; }
  .cur--code { display: inline-flex; }
}

@media (max-width: 1080px) {
  .nav__in { grid-template-columns: auto 1fr; }
  .nav__links { display: none; }
  .xp__row { grid-template-columns: 160px minmax(0, 1fr); }
  .xp__desc { grid-column: 2; }
  .recog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 280px minmax(0, 1fr); gap: 48px; }
  .strip__in { flex-direction: column; align-items: flex-start; gap: 18px; }
  .strip__label { max-width: none; }
  .strip__list { width: 100%; justify-content: flex-start; gap: 18px 36px; }
  .cs-sec { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
  .post__wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .post__rail { display: none; }
  .post__body { margin: 0 auto; }
  .proto { grid-template-columns: minmax(0, 1fr) 320px; }
  .proto__guide { grid-column: 1 / -1; }
  .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --gutter: 20px; --sec-y: 80px; --nav-h: 60px; }
  .hero { padding-top: calc(var(--nav-h) + 44px); }
  .sel { margin-top: 40px; padding: 4px 10px 8px; }
  .cur--sell { display: none; }
  .cur--design { left: calc(100% - 78px); top: calc(100% + 2px); }
  .hero__sub { margin-top: 40px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 44px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .frames { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr); height: 540px; margin-top: 48px; }
  .frame--main { grid-row: auto; grid-column: span 2; }
  .frame--main .frame__box { border-radius: 10px; }
  .frame__meta { display: none; }
  .head { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 36px; }
  .head__aside { display: none; }
  .pj-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .posts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .about__side { position: static; max-width: 420px; }
  .contact__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }
  .strip__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }

  .cs-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-metrics > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .cs-metrics > div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .cs-metrics > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cs-hero > img { aspect-ratio: 16 / 10; }
  .cs-sec { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 48px 0; }
  .cs-sec__head { position: static; }
  .cs-decisions { grid-template-columns: minmax(0, 1fr); }
  .cs-story__row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .gal { grid-template-columns: minmax(0, 1fr); }
  .gal > .fig { grid-column: auto; }
  .flow__step { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .flow__step .phones { justify-content: center; }
  .tablets-grid { grid-template-columns: minmax(0, 1fr); }
  .proto { grid-template-columns: minmax(0, 1fr); }
  .proto__device { max-width: 320px; width: 100%; margin: 0 auto; }
  .cs-next { grid-template-columns: minmax(0, 1fr); }
  .blog-item { grid-template-columns: minmax(0, 1fr) 72px; gap: 16px; padding: 18px; }
  .blog-item__no { display: none; }
  .blog-item img { width: 72px; height: 90px; }
  .pnav { grid-template-columns: minmax(0, 1fr); }
  .post__body { font-size: 17px; }
}

@media (max-width: 560px) {
  .nav__right .btn--primary { display: none; } /* trên điện thoại: tên, bản cũ, ngôn ngữ */
  .navalt { padding: 0 10px; }
  .navalt__long { display: none; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1; }
  .stat { padding: 16px 12px; }
  .stat__n { font-size: 24px; }
  .frames { height: 460px; column-gap: 10px; }
  .xp__row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 20px; }
  .xp__desc { grid-column: auto; margin-top: 4px; }
  .recog__grid { grid-template-columns: minmax(0, 1fr); }
  .pj__body { padding: 20px; }
  .pj__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .beat { grid-template-columns: 36px minmax(0, 1fr); }
  .contact__cta { width: 100%; flex-direction: column; }
  .contact__cta .btn { width: 100%; }
  .contact__cta .btn--primary { font-size: 14.5px; }
  .contact__meta { grid-template-columns: minmax(0, 1fr); }
  .legend { grid-template-columns: minmax(0, 1fr); }
  .phones .fig { width: calc(50% - 8px); }
  .flow__step .phones .fig { width: calc(50% - 8px); }
  .cs-next a, .cs-next a:last-child { grid-template-columns: 80px minmax(0, 1fr); text-align: left; }
  .cs-next a:last-child .cs-next__thumb { order: 0; }
  .pnav a, .pnav a:last-child { grid-template-columns: 56px minmax(0, 1fr); text-align: left; }
  .pnav a:last-child > :first-child { order: 0; }
  .skim { right: 14px; bottom: 14px; }
  .post__end { padding: 22px 20px; }
}
