/* ==========================================================================
   Han Vu Photography: Editorial Gallery tối giản.
   Màu và font nằm ở khối :root ngay dưới đây.
   Bố cục: thanh trên mỏng; mở đầu bằng một câu serif; ảnh xếp lưới bất đối
   xứng; Lookbook và Commercial dạng danh sách mục lục; viền mảnh 1px.
   ========================================================================== */
:root {
  --paper: #FAF9F6;
  --ink: #141414;
  --graphite: #6E6E6E;
  --rule: #E6E4DF;
  --note: #595959;
  --plate-1: #F1EFEA;
  --plate-2: #EBE9E3;
  --plate-3: #F4F2EE;
  --error: #9B2C1F;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--paper);
  z-index: 30;
}
.wrap {
  max-width: 1400px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.small { font-size: 0.8125rem; line-height: 1.55; color: var(--graphite); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.display { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 6.4vw, 5.25rem); line-height: 1.08; letter-spacing: -0.01em; max-width: 21ch; text-wrap: balance; }
.sec-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.5rem, 5vw, 3.75rem); line-height: 1.05; letter-spacing: -0.01em; }
.sec { border-top: 1px solid var(--rule); padding-block: clamp(4rem, 9vw, 7.5rem); scroll-margin-top: 3.5rem; }
.sub { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.6rem; }
.prose { max-width: 62ch; color: var(--graphite); }

/* Thanh trên ---------------------------------------------------------- */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--paper); border-bottom: 1px solid var(--rule); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.85rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; font-family: var(--serif); font-size: 1.7rem; font-weight: 400; line-height: 1.1; letter-spacing: -0.005em; }
.brand .logo { display: block; max-height: 30px; width: auto; }
.menu { display: flex; gap: 2rem; font-size: 0.9rem; }
.menu a { text-decoration: none; padding-block: 0.2rem; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.menu a:hover { border-bottom-color: var(--ink); }
.menu-btn { display: none; background: none; border: 0; border-bottom: 1px solid var(--ink); padding: 0.2rem 0; font-size: 0.9rem; }

/* Mở đầu -------------------------------------------------------------- */
.intro { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem); }
.intro-sub { margin-top: 1.75rem; max-width: 52ch; color: var(--graphite); }

/* Work ---------------------------------------------------------------- */
.work-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; font-size: 0.9rem; }
.filters button { background: none; border: 0; border-bottom: 1px solid transparent; padding: 0.2rem 0; color: var(--graphite); transition: color 0.2s; }
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.filters .n { font-size: 0.75em; margin-left: 0.3em; }
.work-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 2rem; margin-block: 1.25rem 2.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.work-note p:first-child { max-width: 62ch; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(0.75rem, 2vw, 1.75rem); row-gap: clamp(2.5rem, 6vw, 5.5rem); align-items: start; }
.item { grid-column: var(--gc); margin-top: calc(var(--mt, 0) * 1rem); min-width: 0; }
.enter { animation: fade 0.5s ease both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.frame { display: block; position: relative; width: 100%; padding: 0; border: 0; aspect-ratio: var(--r); overflow: hidden; background: var(--plate-1); cursor: zoom-in; text-align: left; }
.item:nth-child(3n+2) .frame { background: var(--plate-2); }
.item:nth-child(3n+3) .frame { background: var(--plate-3); }
.cap { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.6rem; }

/* Khung ảnh dùng chung: ô giữ chỗ nằm dưới, ảnh thật phủ lên khi tải xong */
.media { position: absolute; inset: 0; display: block; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease, transform 0.8s ease; }
.media img.on { opacity: 1; }
.frame:hover .media img { transform: scale(1.015); }
.ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 0.35rem; padding: 0.75rem; text-align: center; color: var(--note); transition: opacity 0.3s; }
.ph b { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1; letter-spacing: -0.01em; }
.ph small { font-size: 0.7rem; line-height: 1.4; max-width: 24ch; overflow-wrap: anywhere; }
.has-img .ph { opacity: 0; }

/* Danh sách Lookbook / Commercial */
.list { border-top: 1px solid var(--rule); }
.list li { border-bottom: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: 7rem minmax(0, 1.1fr) minmax(0, 1.6fr) 4.5rem; gap: 0.5rem 2rem; align-items: center; width: 100%; padding: 1.4rem 0; background: none; border: 0; text-align: left; }
.thumb { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--plate-1); }
.thumb .ph b, .thumb .ph small, .vt .ph b, .vt .ph small { display: none; }
.r-main { display: grid; gap: 0.2rem; }
.r-title { font-family: var(--serif); font-size: clamp(1.7rem, 2.8vw, 2.25rem); font-weight: 400; line-height: 1.1; }
.r-desc { color: var(--graphite); max-width: 52ch; }
.r-meta { text-align: right; }
.row:hover .r-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.row:hover .media img { transform: scale(1.03); }

/* Video --------------------------------------------------------------- */
.paste { margin-top: 2rem; max-width: 46rem; display: grid; gap: 0.4rem; }
.paste label { font-size: 0.85rem; font-weight: 500; }
.paste-row { display: flex; gap: 0.5rem; }
.paste-row input { flex: 1; min-width: 0; }
.v-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem clamp(1.5rem, 4vw, 4rem); align-items: start; margin-top: 2.5rem; }
.player { position: relative; aspect-ratio: 16 / 9; background: var(--plate-1); overflow: hidden; }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--ink); }
.play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; padding: 0; border: 0; background: none; }
.play:disabled { cursor: default; }
.play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play-icon { position: relative; display: grid; place-items: center; width: 4.25rem; height: 4.25rem; border: 1px solid var(--ink); border-radius: 50%; background: var(--paper); color: var(--ink); padding-left: 3px; transition: transform 0.25s; }
.play:not(:disabled):hover .play-icon { transform: scale(1.06); }
.play-note { position: absolute; left: 0; right: 0; bottom: 1rem; text-align: center; color: var(--note); }
.now { margin-top: 1rem; display: grid; gap: 0.2rem; }
.now h3 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.1; }
.vlist { border-top: 1px solid var(--rule); }
.vitem { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; align-items: center; width: 100%; padding: 0.9rem 0; background: none; border: 0; border-bottom: 1px solid var(--rule); text-align: left; }
.vthumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--plate-1); overflow: hidden; }
.vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vname { display: block; font-family: var(--serif); font-size: 1.35rem; line-height: 1.15; }
.vitem .small { display: block; }
.vitem[aria-current="true"] .vname { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* About --------------------------------------------------------------- */
.about-grid, .contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem 4rem; }
.stack { display: grid; gap: 3rem; }
.lead { font-family: var(--serif); font-weight: 300; font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.3; max-width: 32ch; }
.steps { counter-reset: step; border-top: 1px solid var(--rule); max-width: 46rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.1rem 1rem; padding-block: 1.1rem; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step); grid-row: span 2; font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; color: var(--graphite); }
.steps strong { font-weight: 500; }
.steps span { color: var(--graphite); }

/* Contact ------------------------------------------------------------- */
.contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 3rem 5rem; }
.c-info { display: grid; gap: 2rem; align-content: start; }
.c-list { border-top: 1px solid var(--rule); }
.c-list > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.3rem 1rem; padding-block: 0.85rem; border-bottom: 1px solid var(--rule); }
.c-list dd { overflow-wrap: anywhere; }
.brief { display: grid; gap: 1.5rem; align-content: start; }
.field { display: grid; gap: 0.4rem; min-width: 0; }
.field > label, .field > legend { font-size: 0.85rem; font-weight: 500; padding: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
input[type="text"], input[type="date"], select, textarea { width: 100%; border: 1px solid var(--rule); border-radius: 0; background: transparent; padding: 0.7rem 0.85rem; color-scheme: light; }
textarea { resize: vertical; min-height: 7rem; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--error) !important; }
.err { font-size: 0.8125rem; color: var(--error); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 0.55rem 1.1rem; border: 1px solid var(--rule); font-size: 0.9rem; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.chip input:hover + span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn { justify-self: start; padding: 0.8rem 1.7rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-size: 0.9rem; transition: background 0.2s, color 0.2s; }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.sent { display: grid; gap: 0.9rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.sent textarea { min-height: 9rem; font-size: 0.85rem; }

footer { border-top: 1px solid var(--rule); padding-block: 1.75rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 2rem; }

/* Khung xem ảnh chi tiết ------------------------------------------------ */
.viewer {
  position: fixed; inset: 0; z-index: 100; background: var(--paper);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
  padding-top: calc(env(safe-area-inset-top, 0px) + 0.9rem);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.9rem);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  opacity: 0; transition: opacity 0.28s ease;
}
.viewer.open { opacity: 1; }
.v-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.v-titles { display: grid; gap: 0.15rem; min-width: 0; }
.v-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: 1.1; }
.v-desc { max-width: 62ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-btn { background: none; border: 0; border-bottom: 1px solid var(--rule); padding: 0.25rem 0; font-size: 0.9rem; white-space: nowrap; }
.link-btn:hover { border-bottom-color: var(--ink); }
.v-stage { display: grid; place-items: center; min-height: 0; padding-block: 1rem; }
.v-fig { position: relative; background: var(--plate-1); }
.v-fig .media img { object-fit: contain; }
.v-fig.swap { animation: fade 0.25s ease both; }
.v-thumbs { display: flex; gap: 0.5rem; overflow-x: auto; padding-block: 0.4rem 0.75rem; justify-content: safe center; }
.vt { flex: none; height: 3.25rem; aspect-ratio: var(--r); position: relative; padding: 0; border: 0; background: var(--plate-2); overflow: hidden; opacity: 0.6; transition: opacity 0.2s; }
.vt .media img { object-fit: cover; }
.vt:hover, .vt[aria-current="true"] { opacity: 1; }
.vt[aria-current="true"] { outline: 1px solid var(--ink); outline-offset: 2px; }
.v-foot { display: grid; grid-template-columns: 5rem minmax(0, 1fr) 5rem; align-items: center; gap: 1rem; }
.v-foot .link-btn:last-child { justify-self: end; }
.v-cap { display: grid; text-align: center; }
@media (max-height: 560px) { .v-thumbs { display: none; } }

/* Nhỏ hơn ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .v-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .menu-btn { display: inline-block; }
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding-block: 0.25rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .menu[data-open="true"] { display: flex; animation: fade 0.2s ease both; }
  .menu a { padding-block: 0.9rem; border-bottom: 0; border-top: 1px solid var(--rule); }
  .menu a:first-child { border-top: 0; }
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 2rem; }
  .item { grid-column: var(--gm); margin-top: 0; }
  .row { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.25rem 1.1rem; align-items: start; padding-block: 1.1rem; }
  .row .thumb { grid-row: span 3; }
  .r-meta { text-align: left; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .c-list > div { grid-template-columns: minmax(0, 1fr); }
  .v-foot { grid-template-columns: 4rem minmax(0, 1fr) 4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .enter, .v-fig.swap, .menu[data-open="true"] { animation: none; }
}
