/* =========================================================
   Tiếng Hàn cùng Queenie
   Bảng màu và kiểu chữ đặt ở :root — muốn đổi tông màu
   toàn trang thì chỉ cần sửa ở đây.
   ========================================================= */

:root {
  --white: #ffffff;
  --paper: #fffcfd;
  --soft: #fff7f9;
  --blush: #fceef3;
  --pink-200: #f6c5d4;
  --pink-400: #e889a7;
  --pink-600: #c95f82;
  --gold: #d9b86c;
  --ink: #3b3034;
  --muted: #786b70;

  --shell: 1120px;
  --shell-narrow: 720px;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 4px 16px rgba(232, 137, 167, 0.1);
  --shadow: 0 14px 38px rgba(232, 137, 167, 0.15);
  --shadow-lg: 0 24px 60px rgba(232, 137, 167, 0.2);

  --font-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Dùng một font duy nhất cho cả trang. Be Vietnam Pro được thiết kế riêng
     cho tiếng Việt nên đủ dấu, không bị rơi sang font dự phòng giữa từ. */
  --font-display: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step: clamp(56px, 8vw, 108px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  /* Không tách đôi từ tiếng Hàn giữa chừng, ví dụ 국제언어대학원대학교 */
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--pink-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.22;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.022em;
}

h1 {
  font-size: clamp(1.72rem, 4.2vw, 2.5rem);
}

h2 {
  font-size: clamp(1.4rem, 2.9vw, 1.95rem);
}

h3 {
  font-size: clamp(1.08rem, 1.9vw, 1.32rem);
}

p {
  margin: 0 0 1.1em;
}

:focus-visible {
  outline: 3px solid var(--pink-400);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: min(100% - 40px, var(--shell));
  margin-inline: auto;
}

.shell-narrow {
  width: min(100% - 40px, var(--shell-narrow));
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pink-600);
  color: #fff;
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pink-600);
  margin: 0 0 0.9em;
}

.section-head {
  max-width: 640px;
  margin: 0 auto var(--step);
  text-align: center;
}

.section-head h2 {
  margin-bottom: 0.4em;
}

.section-lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

/* ---------- Nút ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--pink-400);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--pink-600);
  box-shadow: var(--shadow);
}

.btn-quiet {
  background: var(--white);
  color: var(--pink-600);
  border-color: var(--pink-200);
}

.btn-quiet:hover {
  background: var(--blush);
}

/* ---------- Đầu trang ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 252, 253, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--blush);
  box-shadow: 0 6px 24px rgba(232, 137, 167, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blush);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.3rem;
  color: var(--pink-600);
}

.brand-tagline {
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.main-nav a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}

.main-nav a:hover {
  color: var(--pink-600);
  text-decoration: none;
}

.main-nav a.is-active {
  color: var(--pink-600);
  font-weight: 600;
}

.main-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--pink-200);
  border-radius: 2px;
}

.nav-cta {
  background: var(--pink-400);
  color: #fff !important;
  padding: 11px 22px !important;
  border-radius: 999px;
  font-weight: 600 !important;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--pink-600);
}

.nav-cta.is-active::after {
  display: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  border: 1px solid var(--pink-200);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--pink-600);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Thư ngỏ (hero) ---------- */

.letter {
  padding: clamp(48px, 7vw, 88px) 0 var(--step);
  background:
    radial-gradient(900px 420px at 50% -80px, var(--blush), transparent 70%),
    var(--paper);
}

.letter-card {
  max-width: 840px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--pink-200);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 60px);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.letter-logo {
  width: clamp(96px, 14vw, 128px);
  height: clamp(96px, 14vw, 128px);
  margin: 0 auto 22px;
  border-radius: 50%;
  object-fit: cover;
}

.letter-quote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  font-weight: 600;
  line-height: 1.36;
  letter-spacing: -0.022em;
  text-wrap: balance;
  color: var(--ink);
  margin: 0 0 1.1em;
  border: 0;
  padding: 0;
}

.letter-quote span {
  display: block;
}

.letter-lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--pink-600);
  margin-bottom: 1.1em;
}

.letter-body {
  color: var(--muted);
  font-size: 1.03rem;
  max-width: 56ch;
  margin-inline: auto;
}

.letter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 28px 0 0;
}

.letter-credentials {
  margin: 26px auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ---------- Hành trình ---------- */

.journey {
  padding: var(--step) 0;
  background: var(--white);
}

.chapters {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 84px);
  position: relative;
}

.chapters::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--blush) 8%, var(--blush) 92%, transparent);
}

.chapter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  position: relative;
}

.chapter.no-photo {
  grid-template-columns: minmax(0, 620px);
  justify-content: center;
  text-align: center;
}

.chapter.no-photo .chapter-text {
  padding: 28px 32px;
  background: var(--soft);
  border-radius: var(--radius);
  border: 1px solid var(--blush);
}

.chapter.is-right .chapter-text {
  order: 2;
}

.chapter.is-right .chapter-photo {
  order: 1;
}

.chapter-year {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--pink-200);
  margin: 0 0 0.2em;
  line-height: 1;
}

.chapter-title {
  font-size: clamp(1.12rem, 2vw, 1.42rem);
  margin-bottom: 0.6em;
}

.chapter-body p {
  color: var(--muted);
  margin-bottom: 0.9em;
}

.chapter-body p:last-child {
  margin-bottom: 0;
}

.chapter-aside {
  margin: 20px 0 0;
  list-style: none;
  padding: 14px 18px;
  background: var(--soft);
  border-left: 3px solid var(--pink-200);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  color: var(--muted);
}

ul.chapter-aside li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
}

ul.chapter-aside li:last-child {
  margin-bottom: 0;
}

ul.chapter-aside li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink-200);
}

.chapter.no-photo .chapter-aside {
  border-left: 0;
  border-top: 3px solid var(--pink-200);
  background: var(--white);
  border-radius: var(--radius-sm);
}

.chapter-media {
  display: grid;
  gap: 18px;
}

/* Hàng đôi: ảnh nào có "half" thì hai tấm đứng cạnh nhau thành một hàng,
   các ảnh còn lại vẫn rộng hết cột. Khung của ảnh đôi dựng đứng 3:4 nên hai
   tấm giấy tờ cao bằng nhau. */
.chapter-media.has-pair {
  grid-template-columns: 1fr 1fr;
}

.chapter-media.has-pair > .photo {
  grid-column: 1 / -1;
}

.chapter-media.has-pair > .photo.is-half {
  grid-column: auto;
}

.chapter-media.has-pair > .photo.is-half .photo-frame {
  aspect-ratio: 3 / 4;
}

/* ---------- Ảnh ---------- */

.photo {
  margin: 0;
}

/* Khung ảnh chuẩn: mọi ảnh trong một cột đều cao bằng nhau, bất kể ảnh
   ngang hay dọc, ảnh chụp hay giấy tờ. Ảnh dọc hẹp lại chứ không cao lên. */
.photo-frame {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
}

.photo img,
.img-missing {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Ảnh chụp dọc: cao bằng khung, bề ngang thu theo 3:4 và canh giữa */
.photo.is-portrait img {
  display: block;
  width: auto;
  aspect-ratio: 3 / 4;
  margin-inline: auto;
}

/* Giấy tờ, bằng cấp: hiện trọn tờ giấy, không cắt mất chữ */
.photo.is-contain img {
  object-fit: contain;
  background: var(--white);
}

.photo figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
}

/* Khung giữ chỗ khi file ảnh chưa được thêm vào */
.img-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #c98fa6;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: repeating-linear-gradient(45deg, #fdeff4 0 14px, #fbe4ec 14px 28px);
  box-shadow: none;
  border: 1px dashed var(--pink-200);
}

/* ---------- Cửa vào ---------- */

.doors {
  padding: var(--step) 0;
  background: var(--white);
}

.door-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.door {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  background: var(--paper);
  border: 1px solid var(--blush);
  border-radius: var(--radius);
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.door:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--pink-200);
  text-decoration: none;
}

.door-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

.door h3 {
  margin-bottom: 0.4em;
}

.door-text {
  color: var(--muted);
  font-size: 0.96rem;
  flex: 1;
}

.door-cta {
  font-weight: 600;
  color: var(--pink-600);
  font-size: 0.94rem;
}

/* ---------- Bài viết ---------- */

.blog-list,
.post-related {
  padding: var(--step) 0;
  background: var(--soft);
}

.post-related {
  background: var(--white);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--blush);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

/* Khung đúng bằng tỉ lệ file banner (1600x900) — không cắt, không đội cao */
.post-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--blush);
  overflow: hidden;
}

.post-thumb img,
.post-thumb .img-missing {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: auto;
  min-height: 0;
  border: 0;
}

.post-thumb-blank {
  background: repeating-linear-gradient(45deg, #fdeff4 0 14px, #fbe4ec 14px 28px);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.post-category {
  color: var(--pink-600);
  font-weight: 700;
  text-transform: uppercase;
}

.post-date {
  color: var(--muted);
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.chip {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--pink-200);
  background: var(--white);
  color: var(--pink-600);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.chip:hover {
  background: var(--blush);
}

.chip.is-active {
  background: var(--pink-400);
  border-color: var(--pink-400);
  color: #fff;
}

.post-group-head {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--pink-600);
  letter-spacing: 0.01em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--blush);
}

.post-group-head.is-rest {
  color: var(--muted);
  margin-top: 12px;
}

.blog-empty-filter {
  text-align: center;
  color: var(--muted);
  margin-top: 32px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 0;
}

.post-tags .tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--pink-200);
  background: var(--soft);
  color: var(--pink-600);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.post-tags .tag:hover {
  background: var(--pink-400);
  border-color: var(--pink-400);
  color: #fff;
}

/* ---------- Trang bài viết ---------- */

.post {
  padding: var(--step) 0;
  background: var(--white);
}

.post-head {
  text-align: center;
  margin-bottom: 30px;
}

.page-post .post-head h1 {
  color: var(--pink-600);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-weight: 700;
}

.post-breadcrumb {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2em;
}

.post-byline {
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.prose {
  font-size: 1.06rem;
}

.prose h2 {
  margin-top: 1.8em;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.prose h3 {
  margin-top: 1.6em;
}

.prose p {
  margin-bottom: 1.3em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose blockquote {
  margin: 1.8em 0;
  padding: 20px 26px;
  background: var(--soft);
  border-left: 3px solid var(--pink-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose mark {
  background: #fff2cc;
  color: inherit;
  padding: 0 0.2em;
  border-radius: 4px;
}

.prose mark.hl-xanh {
  background: #cfe2f3;
}

.prose mark.hl-tim {
  background: #d9d2e9;
}

.prose mark.hl-la {
  background: #d9ead3;
}

.prose code {
  background: var(--blush);
  color: var(--pink-600);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.9em;
}

.prose pre {
  background: var(--ink);
  color: #fbe4ec;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.prose pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.prose hr {
  border: 0;
  height: 1px;
  background: var(--blush);
  margin: 2.4em 0;
}

.prose-figure {
  margin: 2em 0;
}

.prose-figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.prose-figure figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.post-foot {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 56px;
  padding: 28px;
  background: var(--soft);
  border-radius: var(--radius);
  border: 1px solid var(--blush);
}

.post-foot-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex: none;
}

.post-foot-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.3em;
}

.post-foot-text {
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Tài liệu: khung giấy giống bản PDF ---------- */

.doc-sheet {
  position: relative;
  /* Hạn chế bôi đen sao chép. Đây chỉ là rào cản, không phải khoá:
     người dùng vẫn có thể xem mã nguồn, tắt JavaScript hoặc chụp màn hình. */
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  background: var(--white);
  border: 2px solid var(--pink-200);
  border-radius: 20px;
  padding: clamp(34px, 5vw, 60px) clamp(20px, 4vw, 52px);
  margin-top: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* viền mảnh bên trong, giống đường kẻ đôi của bản PDF */
.doc-sheet::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid var(--pink-200);
  border-radius: 13px;
  pointer-events: none;
}

/* chữ ký mờ ở nền */
.doc-sheet::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/logo.png') center 46% / clamp(220px, 34%, 340px) no-repeat;
  opacity: 0.045;
  pointer-events: none;
}

.doc-sheet > * {
  position: relative;
  z-index: 1;
}

.doc-corner {
  position: absolute;
  color: var(--pink-200);
  font-size: 1rem;
  line-height: 1;
  z-index: 2;
}

.doc-corner.tl { top: 18px; left: 20px; }
.doc-corner.tr { top: 18px; right: 20px; }
.doc-corner.bl { bottom: 18px; left: 20px; }
.doc-corner.br { bottom: 18px; right: 20px; }

.doc-logo {
  position: absolute;
  top: 26px;
  right: 30px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  z-index: 2;
}

.doc-sheet .prose > h2:first-child,
.doc-sheet .prose > p:first-child {
  margin-top: 0;
  padding-right: 96px;
}

/* tiêu đề mục lớn */
.doc-sheet .prose h2 {
  margin-top: 2.2em;
  font-size: clamp(1.1rem, 2vw, 1.32rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  color: var(--ink);
}

/* tiêu đề mục nhỏ, nền vàng như bản PDF */
.doc-sheet .prose h4 {
  margin: 1.6em 0 0.6em;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink-600);
}

.doc-sheet .prose h2 + p {
  color: var(--muted);
  margin-top: 0.5em;
}

.doc-sheet .prose h3 {
  display: inline-block;
  margin-top: 1.9em;
  padding: 2px 10px 3px;
  font-size: clamp(1rem, 1.9vw, 1.15rem);
  color: var(--ink);
  background: linear-gradient(transparent 50%, #fdeb9e 50%);
  border-radius: 3px;
  color: #9a5b1e;
  font-weight: 700;
}

/* ---------- Bảng ---------- */

.table-wrap {
  overflow-x: auto;
  /* Bảng ngoài màn hình chưa cần dựng, giúp trang dài mở nhanh hơn */
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
  margin: 1.2em 0 2em;
  border: 1px solid var(--blush);
  border-radius: var(--radius-sm);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.table-wrap th {
  text-align: left;
  background: var(--blush);
  color: var(--pink-600);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 18px;
  white-space: nowrap;
}

.table-wrap td {
  padding: 11px 18px;
  border-top: 1px solid var(--blush);
  vertical-align: top;
  /* Mọi cột cùng một kiểu chữ — chỗ nào đậm là do tác giả in đậm trong bài */
  color: var(--ink);
}

.table-wrap tbody tr:nth-child(even) {
  background: var(--soft);
}

.table-wrap td:first-child {
  width: 42%;
}

/* Bảng từ 3 cột trở lên — ví dụ hai cặp từ trái nghĩa xếp song song — thì
   chia đều bề ngang. */
.table-wrap table:has(th:nth-child(3)) td:first-child {
  width: auto;
}

.post-foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 620px) {
  .doc-logo {
    width: 54px;
    height: 54px;
    top: 20px;
    right: 22px;
  }

  .doc-sheet .prose > h2:first-child,
  .doc-sheet .prose > p:first-child {
    padding-right: 66px;
  }

  .table-wrap td:first-child {
    width: 46%;
  }
}

/* ---------- Nhận xét học viên ---------- */

.testimonials {
  padding: var(--step) 0;
  background: var(--white);
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.quote {
  margin: 0;
  padding: 30px 28px;
  background: var(--soft);
  border: 1px solid var(--blush);
  border-radius: var(--radius);
}

.quote blockquote {
  margin: 0 0 18px;
  font-size: 1.02rem;
  color: var(--ink);
}

.quote blockquote::before {
  content: '“';
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--pink-200);
  line-height: 0;
  vertical-align: -0.35em;
  margin-right: 4px;
}

.quote figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quote-name {
  font-weight: 600;
}

.quote-context {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Khối kết ---------- */

.closing {
  padding: var(--step) 0;
  background: linear-gradient(160deg, var(--blush), var(--soft));
}

.closing-inner {
  max-width: 660px;
  margin-inline: auto;
  text-align: center;
}

.closing-inner p {
  color: var(--muted);
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}

.closing-actions:first-child {
  margin-top: 0;
}

.empty-note {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
}

/* ---------- Đầu các trang phụ ---------- */

.page-head {
  padding: clamp(48px, 6vw, 88px) 0 clamp(32px, 4vw, 52px);
  background: radial-gradient(800px 340px at 50% -60px, var(--blush), transparent 70%), var(--paper);
  text-align: center;
}

.page-lead {
  max-width: 58ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.06rem;
}

.page-note {
  margin: 18px auto 0;
  font-size: 0.86rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- Hồ sơ ---------- */

.cv-block {
  padding: var(--step) 0;
}

.cv-block:nth-of-type(even) {
  background: var(--soft);
}

.cv-block:nth-of-type(odd) {
  background: var(--white);
}

.entries {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.entry {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--blush);
}

.entry:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.entry-period {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pink-600);
  letter-spacing: 0.02em;
  padding-top: 6px;
}

.entry-org {
  margin-bottom: 0.2em;
}

.entry-role {
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 1em;
}

.entry-bullets {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
}

.entry-bullets li {
  margin-bottom: 0.55em;
}

.entry-awards {
  margin-top: 20px;
  padding: 18px 22px;
  background: var(--blush);
  border-radius: var(--radius-sm);
}

.entry-awards-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink-600);
  margin: 0 0 0.6em;
}

.entry-awards ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.94rem;
}

.entry-awards li {
  margin-bottom: 0.35em;
}

.cert-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.cert-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 24px;
  background: var(--white);
  border: 1px solid var(--blush);
  border-radius: var(--radius);
}

.cert-card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}

.cert-card-issuer {
  font-size: 0.88rem;
  color: var(--muted);
}

.cert-card-detail {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.lang-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 720px;
  margin-inline: auto;
}

.lang-list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--blush);
  flex-wrap: wrap;
}

.lang-name {
  font-weight: 600;
}

.lang-level {
  color: var(--muted);
  text-align: right;
}

.cv-status {
  text-align: center;
  margin-top: 32px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Khóa học ---------- */

.principles {
  padding: var(--step) 0;
  background: var(--white);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.principle {
  padding: 30px 28px;
  background: var(--soft);
  border-radius: var(--radius);
  border: 1px solid var(--blush);
}

.principle h3 {
  color: var(--pink-600);
}

.principle p {
  color: var(--muted);
  margin: 0;
  font-size: 0.97rem;
}

.courses {
  padding: var(--step) 0;
  background: var(--soft);
}

.course-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 24px;
}

.course {
  padding: 32px 30px;
  background: var(--white);
  border: 1px solid var(--blush);
  border-radius: var(--radius);
}

.course-name {
  color: var(--ink);
  margin-bottom: 0.7em;
}

.course-meta {
  margin: 0;
}

.course-meta > div {
  padding: 12px 0;
  border-top: 1px solid var(--blush);
}

.course-meta dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink-600);
  margin-bottom: 4px;
}

.course-meta dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.course-note {
  margin: 18px 0 0;
  padding: 14px 18px;
  background: var(--blush);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--muted);
}

.process {
  padding: var(--step) 0;
  background: var(--white);
}

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 30px 28px;
  background: var(--soft);
  border-radius: var(--radius);
  border: 1px solid var(--blush);
}

.step-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pink-400);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.step-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
}

.step-text {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Trang đăng ký khoá học ---------- */

.pains {
  padding: 0 0 var(--step);
  background: var(--paper);
}

.pains-inner {
  max-width: 760px;
  margin-inline: auto;
}

.pain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pain-list li {
  position: relative;
  padding: 14px 0 14px 30px;
  border-bottom: 1px solid var(--blush);
  color: var(--ink);
  font-size: 1.02rem;
}

.pain-list li::before {
  content: '?';
  position: absolute;
  left: 0;
  top: 14px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blush);
  color: var(--pink-600);
  font-size: 0.75rem;
  font-weight: 700;
}

.pain-note {
  margin: 24px 0 0;
  padding: 20px 24px;
  background: var(--soft);
  border-left: 3px solid var(--pink-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
}

.skills {
  padding: var(--step) 0;
  background: var(--soft);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.skill {
  padding: 28px 22px;
  background: var(--white);
  border: 1px solid var(--blush);
  border-radius: var(--radius);
}

.skill h3 {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pink-600);
  margin-bottom: 0.5em;
}

.skill p {
  color: var(--muted);
  font-size: 0.97rem;
  margin: 0 0 0.9em;
}

.skill p:last-child {
  margin-bottom: 0;
}

/* ---------- Liên hệ ---------- */

.contact {
  padding: var(--step) 0;
  background: var(--white);
}

.contact-card {
  max-width: 560px;
  margin-inline: auto;
  background: var(--white);
  border: 1px solid var(--pink-200);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow);
}

.contact-row {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--blush);
}

.contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink-600);
  margin-bottom: 0.6em;
}

.contact-email a {
  font-size: clamp(1.08rem, 2.4vw, 1.3rem);
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

.contact-email a:hover {
  color: var(--pink-600);
  text-decoration: none;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid var(--pink-200);
  background: var(--soft);
  color: var(--pink-600);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.contact-pill:hover {
  background: var(--pink-400);
  border-color: var(--pink-400);
  color: var(--white);
  text-decoration: none;
}

.icon {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
}

.contact-email a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.contact-icon {
  color: var(--pink-400);
}

.contact-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- Chân trang ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  padding: clamp(48px, 6vw, 72px) 0 28px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.82);
}

.site-footer a:hover {
  color: var(--pink-200);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 14px;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.2em;
}

.footer-tagline {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.94rem;
}

.footer-contact p {
  margin-bottom: 0.6em;
  font-size: 0.94rem;
}

.footer-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-line .icon {
  color: rgba(255, 255, 255, 0.45);
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* Nút mạng xã hội: khung tròn, chỉ còn icon */
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.75);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.social-btn:hover {
  background: var(--pink-400);
  border-color: var(--pink-400);
  color: var(--white);
  text-decoration: none;
}

/* Tên mạng xã hội chưa có icon thì vẫn hiện bằng chữ */
.social-btn.is-text {
  width: auto;
  height: auto;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
}

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  flex-wrap: wrap;
}

.footer-base p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Lên đầu trang ---------- */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pink-400);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 90;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--pink-600);
  text-decoration: none;
}

/* ---------- Hiệu ứng xuất hiện ---------- */

/* Chỉ ẩn khi JavaScript chạy được. Nếu người dùng tắt JavaScript,
   toàn bộ nội dung vẫn hiện bình thường thay vì trang trắng. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}


/* =========================================================
   Căn đều hai bên cho phần chữ chạy dài
   Không áp dụng cho tiêu đề, nút bấm, nhãn và các khối
   cố tình canh giữa — canh giữa mà căn đều thì dòng cuối
   sẽ lệch trông rất xấu.
   ========================================================= */

.letter-body,
.chapter-body p,
.chapter-aside,
ul.chapter-aside li,
.entry-bullets li,
.entry-awards li,
.door-text,
.skill p,
.pain-list li,
.pain-note,
.step-text,
.course-note,
.quote blockquote,
.post-foot-text,
.cert-card-issuer,
.prose p,
.prose li,
.prose blockquote p {
  text-align: justify;
  text-justify: inter-word;
}

/* Bảng vẫn căn trái để hai cột thẳng hàng */
.table-wrap td,
.table-wrap th {
  text-align: left;
}

/* =========================================================
   Màn hình nhỏ
   ========================================================= */

@media (max-width: 960px) {
  .skill-grid {
    grid-template-columns: 1fr 1fr;
  }

  .credentials-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .entry {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .entry-period {
    padding-top: 0;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    inset: 0 0 auto;
    top: 80px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--blush);
    box-shadow: var(--shadow);
    padding: 12px 20px 24px;
    /* Đẩy hẳn khỏi mép trên: -120% của chính nó chưa đủ khi menu thấp,
       mép dưới còn thò xuống che logo. */
    transform: translateY(calc(-100% - 80px));
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .main-nav.is-open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s;
  }

  .main-nav a {
    padding: 15px 4px;
    border-bottom: 1px solid var(--blush);
    font-size: 1.02rem;
  }

  .main-nav a.is-active::after {
    display: none;
  }

  .nav-cta {
    margin-top: 16px;
    text-align: center;
    border-bottom: 0 !important;
  }

  .chapters::before {
    left: 0;
  }

  .chapter,
  .chapter.no-photo {
    grid-template-columns: 1fr;
    text-align: left;
    padding-left: 26px;
  }

  .chapter.no-photo {
    justify-content: stretch;
  }

  .chapter.is-right .chapter-text {
    order: 0;
  }

  .chapter.is-right .chapter-media {
    order: 0;
  }

  /* Màn hẹp chỉ còn một cột: cho ảnh rộng hết bề ngang, chiều cao theo tỉ lệ
     thật của từng tấm. Ở đây thứ tự đọc là từng ảnh một nên bề ngang bằng
     nhau mới là cái nhìn thấy, không phải chiều cao. */
  .photo-frame {
    aspect-ratio: auto;
  }

  .photo img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .photo.is-portrait img {
    width: 100%;
    aspect-ratio: 3 / 4;
  }

  .photo.is-contain img,
  .photo.is-portrait.is-contain img {
    aspect-ratio: auto;
    height: auto;
  }

  .chapter-media.has-pair > .photo.is-half .photo-frame {
    aspect-ratio: auto;
  }

  .chapter::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 10px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--pink-200);
    border: 2px solid var(--white);
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  /* Màn điện thoại: hai ảnh nhỏ đứng cạnh nhau thì chữ trên giấy tờ bé quá,
     cho xếp dọc lại như các ảnh khác. */
  .chapter-media.has-pair {
    grid-template-columns: 1fr;
  }

  .chapter-media.has-pair > .photo.is-half {
    grid-column: 1 / -1;
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100% - 32px, var(--shell));
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-name {
    font-size: 1.12rem;
  }

  .brand-tagline {
    font-size: 0.6rem;
  }

  .letter-card {
    padding: 30px 22px;
  }

  .letter-actions .btn,
  .closing-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .post-foot {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* =========================================================
   Tôn trọng thiết lập giảm chuyển động của người dùng
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- In ấn (để in hồ sơ ra PDF) ---------- */

@media print {
  .site-header,
  .site-footer,
  .to-top,
  .closing,
  .nav-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .cv-block {
    background: #fff !important;
    padding: 16px 0;
    break-inside: avoid;
  }

  .entry {
    break-inside: avoid;
  }
}
