/* ==================================================================
   Bao Ngoc Nguyen, personal site
   Bảng màu và bố cục theo tinh thần cinematic dark của bản tham chiếu.
   Nhịp khoảng trống theo yutori: chừa lại nhiều hơn là lấp đầy.
   ================================================================== */

/* ------------------------------ tokens ------------------------------ */
:root {
  --black:        #000000;
  --panel:        #101010;   /* thẻ About */
  --card:         #212121;   /* thẻ nội dung */
  --cream:        #E1E0CC;   /* chữ chính */
  --cream-soft:   #DEDBC8;   /* nhấn */
  --muted:        rgba(225, 224, 204, .56);
  --dim:          rgba(225, 224, 204, .38);
  --hairline:     rgba(225, 224, 204, .13);
  --hairline-2:   rgba(225, 224, 204, .07);

  /* Muốn quay lại tông xanh đại dương cũ thì đổi 3 biến dưới đây. */
  --ink:          #000000;
  --ink-soft:     #0a0a0a;

  --font-body:    'Almarai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif:   'Instrument Serif', Georgia, serif;
  --font-mark:    'Noto Serif JP', 'Instrument Serif', serif;

  /* Nhịp yutori. Khoảng cách dọc rộng hơn mức "gọn gàng" thông thường. */
  --gap-section:  clamp(7rem, 15vw, 14rem);
  --gap-block:    clamp(3rem, 7vw, 6rem);
  --shell:        76rem;
  --pad-x:        clamp(1.25rem, 4vw, 3rem);

  --ease:         cubic-bezier(.16, 1, .3, 1);
  --slow:         1.15s;
}

/* Bản tiếng Việt dùng bộ font có đủ dấu. */
html[lang="vi"] {
  --font-body:  'Be Vietnam Pro', system-ui, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
}

/* ------------------------------ reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  min-width: 320px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }

::selection { background: var(--cream); color: var(--black); }

:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 4px;
  border-radius: 4px;
}

.noscript {
  padding: 6rem var(--pad-x); text-align: center; color: var(--muted); font-size: .9rem;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--cream); color: var(--black);
  padding: .7rem 1.2rem; border-radius: 0 0 1rem 0;
}
.skip-link:focus { left: 0; }

.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* -------------------------- cánh hoa rơi -------------------------- */
/* Lớp phủ rất nhẹ, không bắt chuột, tắt hẳn khi người dùng chọn giảm
   chuyển động. */
#petals {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: .62;
}
@media (prefers-reduced-motion: reduce) { #petals { display: none; } }

/* ------------------------------ noise ------------------------------ */
.noise-overlay {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
.bg-noise::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23m)' opacity='0.85'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: .13;
  pointer-events: none;
}

/* ------------------------------ layout ------------------------------ */
.shell {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: var(--gap-section) var(--pad-x);
}

.eyebrow {
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.6;
}

.section-heading {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-top: 1.6rem;
  max-width: 22ch;
}

.head { margin-bottom: var(--gap-block); }
.head-split { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.aside { font-size: .8rem; color: var(--dim); max-width: 22ch; }

.lede {
  font-size: clamp(.95rem, 1.4vw, 1.05rem);
  line-height: 1.95;
  color: var(--muted);
  max-width: 60ch;
}

/* ================================ HERO ================================ */
.hero { padding: clamp(.75rem, 1.5vw, 1.5rem); }

.hero-frame {
  position: relative;
  height: calc(100svh - clamp(1.5rem, 3vw, 3rem));
  min-height: 34rem;
  border-radius: clamp(1rem, 2.4vw, 2rem);
  overflow: hidden;
  background: #060606;
  isolation: isolate;
}

.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-video.is-off { display: none; }

.hero-noise {
  position: absolute; inset: 0; z-index: 1;
  opacity: .26;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.2) 0%, rgba(0,0,0,0) 34%, rgba(0,0,0,.5) 100%),
    radial-gradient(120% 80% at 20% 100%, rgba(0,0,0,.32), transparent 62%);
  pointer-events: none;
}

/* thanh điều hướng treo từ mép trên */
.navpill {
  position: absolute; top: 0; left: 50%; z-index: 5;
  transform: translateX(-50%);
  display: flex; align-items: center;
  gap: clamp(.7rem, 2.4vw, 3rem);
  background: var(--black);
  border-radius: 0 0 1.35rem 1.35rem;
  padding: .55rem clamp(.9rem, 2.5vw, 2rem) .7rem;
  max-width: calc(100% - 1.5rem);
}
.navpill a {
  font-size: clamp(.62rem, 1.1vw, .8rem);
  color: rgba(225, 224, 204, .72);
  transition: color .4s var(--ease);
  white-space: nowrap;
}
.navpill a:hover { color: var(--cream); }
.navpill-sep { width: 1px; height: 1rem; background: var(--hairline); }

.langswitch {
  position: fixed;
  top: clamp(.85rem, 2vw, 1.7rem);
  right: clamp(.85rem, 2vw, 1.7rem);
  z-index: 60;
  display: inline-flex; align-items: center; gap: .18rem;
  padding: .28rem;
  border-radius: 999px;
  border: 1px solid rgba(225, 224, 204, .34);
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
}
.langswitch button {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  padding: .42rem .8rem; border-radius: 999px;
  color: rgba(225, 224, 204, .72);
  transition: color .35s var(--ease), background .35s var(--ease);
}
.langswitch button:hover { color: var(--cream); }
.langswitch button.on { background: var(--cream); color: var(--black); }

/* khối chữ lớn nằm sát đáy khung hero */
.hero-body {
  position: absolute; inset: auto 0 0 0; z-index: 4;
  padding: 0 clamp(1rem, 2.6vw, 2.2rem) clamp(1.6rem, 3vw, 2.6rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: end;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 8fr 4fr; gap: clamp(2rem, 4vw, 4rem); }
}

.hero-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17vw;
  line-height: .86;
  letter-spacing: -.055em;
  word-spacing: -.04em;
  color: var(--cream);
  text-shadow: 0 6px 44px rgba(0, 0, 0, .58);
}
@media (max-width: 400px)  { .hero-name { font-size: 16vw; } .hero-lede { font-size: .8rem; } }
@media (min-width: 640px)  { .hero-name { font-size: 13.5vw; } }
@media (min-width: 900px)  { .hero-name { font-size: 11.5vw; } }
@media (min-width: 1536px) { .hero-name { font-size: 10.5vw; } }

.hero-name .line { display: block; }
.hero-name .word { display: inline-block; }
.hero-name .word > span { display: inline-block; }
.hero-name .star-wrap { position: relative; display: inline-block; }
.hero-name .star-wrap sup {
  position: absolute; top: .58em; right: -.34em;
  font-size: .3em; line-height: 1; letter-spacing: 0;
  color: var(--cream-soft);
}

.hero-foot {
  margin-top: clamp(1rem, 2vw, 1.6rem);
  font-size: clamp(.68rem, 1.1vw, .78rem);
  color: rgba(225, 224, 204, .55);
  max-width: 46ch;
  line-height: 1.7;
}
.hero-foot em { font-family: var(--font-serif); font-style: italic; font-size: 1.12em; }
.hero-foot .star { color: var(--cream-soft); }

.hero-themes { margin-bottom: 1.1rem; color: rgba(225, 224, 204, .6); }
.hero-lede {
  font-size: clamp(.82rem, 1.15vw, .95rem);
  line-height: 1.75;
  color: rgba(225, 224, 204, .74);
  max-width: 42ch;
}

/* nút viên thuốc kèm chấm tròn đen */
.pill {
  display: inline-flex; align-items: center; gap: .7rem;
  margin-top: clamp(1.4rem, 2.5vw, 2rem);
  background: var(--cream-soft); color: var(--black);
  border-radius: 999px;
  padding: .38rem .5rem .38rem 1.4rem;
  font-size: clamp(.8rem, 1.1vw, .92rem);
  transition: gap .45s var(--ease), background .45s var(--ease);
}
.pill:hover { gap: 1.05rem; background: var(--cream); }
.pill-dot {
  display: grid; place-items: center;
  width: 2.3rem; height: 2.3rem;
  background: var(--black); color: var(--cream-soft);
  border-radius: 999px; font-size: 1.05rem;
  transition: transform .45s var(--ease);
}
.pill:hover .pill-dot { transform: scale(1.08); }

.scrollcue {
  position: absolute; z-index: 4;
  left: 50%; bottom: .9rem; transform: translateX(-50%);
  font-size: 1.1rem; color: rgba(225, 224, 204, .5);
  animation: breathe 4.5s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .4; } 50% { opacity: .9; } }

/* ============================== MA BAND ============================== */
/* Dải gần như trống. Đây là phần yutori rõ rệt nhất của trang. */
.ma {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 1.6rem;
  padding: clamp(8rem, 20vh, 15rem) var(--pad-x);
  text-align: center;
}
.ma-rule {
  width: 1px; height: clamp(3.5rem, 8vh, 6rem);
  background: linear-gradient(to bottom, transparent, var(--hairline));
}
.ma-mark {
  font-family: var(--font-mark);
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1;
  color: rgba(225, 224, 204, .42);
}
.ma-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.7rem);
  line-height: 1.5;
  color: rgba(225, 224, 204, .8);
  max-width: 28ch;
}
.ma-note { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }

/* =============================== ABOUT =============================== */
.about .shell { padding-block: 0 var(--gap-section); }
.panel {
  background: var(--panel);
  border-radius: clamp(1.2rem, 2.4vw, 2rem);
  padding: clamp(2.5rem, 7vw, 6.5rem) clamp(1.5rem, 5vw, 5rem);
  text-align: center;
}
.panel .eyebrow { margin-bottom: clamp(2rem, 4vw, 3rem); }

.statement {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.55rem, 5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -.025em;
  max-width: 20ch;
  margin-inline: auto;
}
.statement-left { margin-inline: 0; max-width: 26ch; text-align: left; }
.statement .seg-serif { font-family: var(--font-serif); font-style: italic; }
.statement .seg-muted { color: var(--dim); }
.statement .word { display: inline-block; }
.statement .word > span { display: inline-block; }

.dissolve {
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  max-width: 56ch;
  font-size: clamp(.88rem, 1.3vw, 1rem);
  line-height: 2.05;
  color: var(--cream-soft);
}
.dissolve span { opacity: .18; transition: opacity .25s linear; }

/* ============================ PHILOSOPHY ============================ */
.mark-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(.8rem, 1.2vw, 1.1rem);
}
@media (min-width: 760px) { .mark-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .mark-grid { grid-template-columns: repeat(4, 1fr); } }

.mark-card {
  background: var(--card);
  border-radius: clamp(1rem, 1.8vw, 1.6rem);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  display: flex; flex-direction: column;
  transition: transform .8s var(--ease), background .8s var(--ease);
}
.mark-card:hover { transform: translateY(-4px); background: #262626; }
.mark-card.is-wide { grid-column: 1 / -1; }
@media (min-width: 1100px) {
  .mark-card.is-wide {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
    padding: clamp(2.4rem, 4vw, 3.6rem);
  }
}
.mark-glyph {
  font-family: var(--font-mark);
  font-weight: 300;
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  line-height: 1.1;
  color: rgba(225, 224, 204, .55);
}
.mark-roman {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--dim);
  margin-top: .35rem;
}
.mark-card h3 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.3;
  letter-spacing: -.01em;
  margin-top: 1.9rem;
}
.mark-card p {
  margin-top: 1.05rem;
  font-size: .84rem;
  line-height: 1.95;
  color: var(--muted);
}
.mark-card.is-wide h3 { margin-top: 0; font-size: clamp(1.15rem, 2vw, 1.5rem); }

/* ============================== READING ============================== */
.reading .shell { text-align: center; }
.reading .statement { max-width: 24ch; }
.reading-body { margin: clamp(2.2rem, 4vw, 3.2rem) auto 0; max-width: 58ch; }

.read-marks {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: 1fr;
  gap: clamp(2.4rem, 4vw, 3rem);
}
@media (min-width: 780px) { .read-marks { grid-template-columns: repeat(3, 1fr); } }

.read-mark .glyph {
  display: block;
  font-family: var(--font-mark); font-weight: 300;
  font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1;
  color: rgba(225, 224, 204, .5);
}
.read-mark .roman {
  display: block;
  font-family: var(--font-serif); font-style: italic;
  font-size: .82rem; color: var(--dim); margin-top: .5rem;
}
.read-mark p {
  margin: 1.2rem auto 0; max-width: 30ch;
  font-size: .82rem; line-height: 1.95; color: var(--muted);
}
.reading-note {
  margin-top: clamp(3rem, 5vw, 4rem);
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim);
}

/* ============================== STUDIO ============================== */
.studio { position: relative; overflow: hidden; }
.studio .shell { position: relative; z-index: 1; }

.canvas-card {
  position: relative;
  margin-top: var(--gap-block);
  border-radius: clamp(1rem, 1.8vw, 1.6rem);
  overflow: hidden;
  background: var(--card);
  aspect-ratio: 21 / 9;
  min-height: 13rem;
}
.canvas-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.canvas-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-wrap: wrap; gap: .2rem 1rem; align-items: baseline;
  padding: clamp(1.1rem, 2.4vw, 1.9rem);
  font-size: clamp(.85rem, 1.4vw, 1.05rem);
  color: var(--cream);
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
}
.canvas-card .dim { font-size: .76rem; color: var(--dim); }

.card-grid {
  margin-top: clamp(.8rem, 1.2vw, 1.1rem);
  display: grid; grid-template-columns: 1fr;
  gap: clamp(.8rem, 1.2vw, 1.1rem);
}
@media (min-width: 700px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.pcard {
  background: var(--card);
  border-radius: clamp(1rem, 1.8vw, 1.6rem);
  padding: clamp(1.8rem, 2.6vw, 2.4rem);
  display: flex; flex-direction: column;
  opacity: 0; transform: scale(.965);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease), background .8s var(--ease);
}
.pcard.is-in { opacity: 1; transform: none; }
.pcard:hover { background: #262626; }
.pcard-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.pcard-tag { font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }
.pcard-num { font-family: var(--font-serif); font-style: italic; font-size: .95rem; color: var(--dim); }
.pcard h3 {
  font-family: var(--font-body); font-weight: 400;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.28; letter-spacing: -.012em;
  margin-top: 1.7rem;
}
.pcard > p { margin-top: .9rem; font-size: .82rem; line-height: 1.9; color: var(--muted); }
.pcard ul { margin-top: 1.9rem; display: flex; flex-direction: column; gap: .7rem; }
.pcard li { display: flex; align-items: flex-start; gap: .6rem; font-size: .78rem; line-height: 1.55; color: rgba(225,224,204,.66); }
.pcard li .ic { flex: 0 0 auto; width: .95rem; height: .95rem; margin-top: .18rem; color: var(--cream-soft); opacity: .8; }

/* ============================ ROW LISTS ============================ */
.rows { position: relative; overflow: hidden; }
.rows .shell { position: relative; z-index: 1; }

.rowlist { border-top: 1px solid var(--hairline-2); }
.rowlist li {
  display: grid; gap: .5rem;
  padding: clamp(1.8rem, 3.2vw, 2.6rem) 0;
  border-bottom: 1px solid var(--hairline-2);
  transition: padding-left .8s var(--ease), border-color .8s var(--ease);
}
@media (min-width: 700px) { .rowlist li { grid-template-columns: 7.5rem 1fr; gap: 2rem; } }
.rowlist li:hover { padding-left: .8rem; border-color: var(--hairline); }
.rowlist .yr { font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; color: var(--dim); }
.rowlist h3 {
  font-family: var(--font-body); font-weight: 400;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.4; letter-spacing: -.012em;
}
.rowlist p { margin-top: .65rem; font-size: .82rem; line-height: 1.9; color: var(--muted); max-width: 62ch; }
.rowlist-foot { margin-top: clamp(2rem, 4vw, 3rem); font-size: .82rem; color: var(--muted); }
.rowlist-foot a {
  color: var(--cream);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: .1rem;
  transition: border-color .5s var(--ease);
}
.rowlist-foot a:hover { border-color: var(--cream); }

/* ============================== CONTACT ============================== */
.contact { position: relative; overflow: hidden; }
.contact-shell { text-align: center; z-index: 2; }
.contact .lede { margin: clamp(1.8rem, 3vw, 2.6rem) auto 0; }

.tide { position: absolute; inset: auto 0 0 0; height: 18rem; pointer-events: none; z-index: 0; }
.tide .wave {
  position: absolute; left: -10%; width: 120%;
  border-radius: 100% 100% 0 0;
  background: linear-gradient(to bottom, rgba(225,224,204,.075), rgba(225,224,204,.012));
}
.tide .w1 { bottom: -5rem;   height: 11rem; animation: sway 17s ease-in-out infinite; }
.tide .w2 { bottom: -6.5rem; height: 13rem; opacity: .7; animation: sway-r 23s ease-in-out infinite; }
.tide .w3 { bottom: -8rem;   height: 15rem; opacity: .45; animation: sway 29s ease-in-out infinite; }
@keyframes sway   { 0%,100% { transform: translateX(-1.5%) } 50% { transform: translateX(1.5%) } }
@keyframes sway-r { 0%,100% { transform: translateX(1.8%) }  50% { transform: translateX(-1.8%) } }

/* nút email: chỉ hiện địa chỉ khi rê chuột hoặc chạm */
.pill-mail { margin-top: clamp(2.4rem, 4vw, 3.4rem); position: relative; overflow: hidden; }
.mail-stack {
  display: inline-grid;
  grid-template-areas: "stack";
  align-items: center; justify-items: center;
  line-height: 1.25;
}
.mail-stack > span {
  grid-area: stack;
  white-space: nowrap;
  transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease), letter-spacing .6s var(--ease);
}
.mail-prompt { opacity: .9; letter-spacing: .01em; }
.mail-address { opacity: 0; transform: translateY(.45em); filter: blur(6px); letter-spacing: .1em; }
.pill-mail:hover .mail-prompt,
.pill-mail:focus-visible .mail-prompt,
.pill-mail.is-open .mail-prompt { opacity: 0; transform: translateY(-.45em); filter: blur(6px); }
.pill-mail:hover .mail-address,
.pill-mail:focus-visible .mail-address,
.pill-mail.is-open .mail-address { opacity: 1; transform: none; filter: blur(0); letter-spacing: .01em; }
.pill-mail::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 36%, rgba(255,255,255,.35) 50%, transparent 64%);
  transform: translateX(-130%);
  transition: transform 1.1s var(--ease);
}
.pill-mail:hover::after, .pill-mail:focus-visible::after, .pill-mail.is-open::after { transform: translateX(130%); }

.socials {
  margin-top: clamp(1.8rem, 3vw, 2.4rem);
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  width: 2.9rem; height: 2.9rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  color: var(--cream-soft); font-size: 1.15rem;
  transition: border-color .55s var(--ease), background .55s var(--ease), transform .55s var(--ease);
}
.icon-btn:hover { border-color: rgba(225,224,204,.4); background: rgba(225,224,204,.05); transform: translateY(-2px); }
.icon-btn-wide { width: auto; padding: 0 1.2rem; font-size: 1rem; }
.icon-btn-wide span { font-size: .78rem; letter-spacing: .02em; }

/* ============================== MARQUEE ============================== */
.marquee { overflow: hidden; border-top: 1px solid var(--hairline-2); padding: clamp(1.6rem, 3vw, 2.4rem) 0; }
.marquee-track { display: flex; width: max-content; animation: drift 46s linear infinite; }
.marquee-item {
  display: inline-flex; align-items: center; gap: .8rem;
  padding-inline: clamp(1.6rem, 4vw, 3.2rem);
  font-size: .7rem; letter-spacing: .28em; text-transform: uppercase; color: var(--dim);
  white-space: nowrap;
}
.marquee-item .ic { width: .95rem; height: .95rem; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =============================== FOOTER =============================== */
.foot {
  border-top: 1px solid var(--hairline-2);
  padding: clamp(2.6rem, 5vw, 4rem) var(--pad-x) clamp(3rem, 6vw, 5rem);
  text-align: center;
  display: flex; flex-direction: column; gap: .7rem;
}
.foot-line { font-size: .74rem; color: var(--dim); letter-spacing: .04em; }

/* ============================ ANIMATIONS ============================ */
/* Chữ trồi lên theo từng từ. Nhịp chậm hơn mặc định để hợp với yutori.
   Không cắt tràn, vì dấu tiếng Việt nằm cao hơn hộp chữ ở cỡ lớn. */
.wordfx .word > span {
  transform: translateY(.9em);
  opacity: 0;
  transition: transform var(--slow) var(--ease), opacity var(--slow) var(--ease);
}
.wordfx.is-in .word > span { transform: none; opacity: 1; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* Trên màn hình hẹp, đẩy thanh nav sang trái để không đè lên nút ngôn ngữ. */
@media (max-width: 700px) {
  .navpill { left: clamp(.6rem, 3vw, 1rem); transform: none; max-width: calc(100% - 7.5rem); }
}

/* Ẩn bớt liên kết phụ trên màn hình rất hẹp để thanh nav không vỡ. */
@media (max-width: 620px) { .nav-optional { display: none; } }

/* Thiết bị cảm ứng: hiện sẵn lời nhắc, địa chỉ chỉ lộ sau khi chạm. */
@media (hover: none) {
  .pill:hover { gap: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, .pcard { opacity: 1; transform: none; }
  .wordfx .word > span { transform: none; opacity: 1; }
  .dissolve span { opacity: 1; }
}
