@charset "UTF-8";
/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

body {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: "";
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  overflow-y: hidden;
  scroll-behavior: smooth;
}

/* --- Web Fonts: phục vụ cục bộ để hover không phải chờ tải font-weight mới --- */
@font-face {
  font-family: "Avenir Next";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: local("Avenir Next Ultra Light"), local("Avenir Next UltraLight"), local("Avenir Next-UltraLight"), local("Avenir Next Thin"), url("/fonts/avenir/AvenirNextLTPro-UltLt.woff") format("woff");
}
@font-face {
  font-family: "Avenir Next";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("Avenir Next Regular"), local("Avenir Next"), url("/fonts/avenir/AvenirNextLTPro-Regular.woff") format("woff");
}
@font-face {
  font-family: "Avenir Next";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local("Avenir Next Demi"), local("Avenir Next-Demi"), url("/fonts/avenir/AvenirNextLTPro-Demi.woff") format("woff");
}
@font-face {
  font-family: "Avenir Next";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local("Avenir Next Bold"), local("Avenir Next-Bold"), url("/fonts/avenir/AvenirNextLTPro-Bold.woff") format("woff");
}
/* Default Body Typography: Avenir Next Ultra Light (font-weight: 200) */
body {
  font-size: 1.6rem;
  font-family: "Avenir Next", "Avenir Next LT Pro", "Avenir", "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 200;
  color: #111;
  margin: 0;
  padding: 0;
  background-color: #f8f8f8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* --- Global Typography Variables & Core Rules --- */
:root {
  --logo-size: 75px;
  --logo-weight: 200;
  --nav-size: 28px;
  --nav-weight: 200;
  --nav-hover-weight: 400;
  --title-size: 32px;
  --title-weight: 300;
  --meta-size: 12.5px;
  --meta-weight: 200;
}

/* Áp dụng cỡ chữ và độ đậm thống nhất cho toàn bộ hệ thống */
.logo,
.logo a {
  font-size: var(--logo-size, 7.5rem) !important;
  font-weight: var(--logo-weight, 200) !important;
}

.nav-menu__link {
  font-size: var(--nav-size, 2.8rem) !important;
  font-weight: var(--nav-weight, 200);
}
.nav-menu__link:hover, .nav-menu__link.is-active {
  font-weight: var(--nav-hover-weight, 400) !important;
}

.project-info__title,
#projectTitle {
  font-size: var(--title-size, 3.2rem) !important;
  font-weight: var(--title-weight, 300) !important;
}

.project-info__meta,
.project-info__meta .meta-row,
.meta-table tr,
.meta-row {
  font-size: var(--meta-size, 1.25rem) !important;
  font-weight: var(--meta-weight, 200) !important;
}

/* === THEME 1: AVENIR NEXT (ULTRA LIGHT DEFAULT) === */
body[data-font=avenir],
body:not([data-font=courier]) {
  font-family: "Avenir Next", "Avenir Next LT Pro", "Avenir", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 200;
}
body[data-font=avenir] .logo,
body[data-font=avenir] .logo a,
body:not([data-font=courier]) .logo,
body:not([data-font=courier]) .logo a {
  font-family: "Avenir Next", "Avenir Next LT Pro", "Avenir", sans-serif !important;
  letter-spacing: 2px;
}
body[data-font=avenir] .nav-menu__link,
body:not([data-font=courier]) .nav-menu__link {
  font-family: "Avenir Next", "Avenir Next LT Pro", "Avenir", sans-serif !important;
  letter-spacing: 4px;
}
body[data-font=avenir] .column-code,
body[data-font=avenir] .project-card__code,
body[data-font=avenir] .code-text,
body:not([data-font=courier]) .column-code,
body:not([data-font=courier]) .project-card__code,
body:not([data-font=courier]) .code-text {
  font-family: "Avenir Next", "Avenir Next LT Pro", "Avenir", sans-serif !important;
  font-weight: 300 !important;
  letter-spacing: 1px;
}
body[data-font=avenir] .project-info,
body[data-font=avenir] .meta-table,
body[data-font=avenir] .meta-row,
body[data-font=avenir] .meta-label,
body[data-font=avenir] .meta-value,
body[data-font=avenir] .meta-title,
body:not([data-font=courier]) .project-info,
body:not([data-font=courier]) .meta-table,
body:not([data-font=courier]) .meta-row,
body:not([data-font=courier]) .meta-label,
body:not([data-font=courier]) .meta-value,
body:not([data-font=courier]) .meta-title {
  font-family: "Avenir Next", "Avenir Next LT Pro", "Avenir", sans-serif !important;
}
body[data-font=avenir] .footer,
body[data-font=avenir] .footer-text,
body[data-font=avenir] .footer-left,
body:not([data-font=courier]) .footer,
body:not([data-font=courier]) .footer-text,
body:not([data-font=courier]) .footer-left {
  font-family: "Avenir Next", "Avenir Next LT Pro", "Avenir", sans-serif !important;
  font-weight: 200 !important;
}

/* === THEME 2: COURIER NEW (ARCHITECTURAL TYPEWRITER / MONOSPACE) === */
body[data-font=courier],
body[data-font=courier] * {
  font-family: "Courier New", Courier, "Lucida Console", monospace !important;
}

body[data-font=courier] .logo,
body[data-font=courier] .logo a {
  letter-spacing: 0px !important;
}
body[data-font=courier] .nav-menu__link {
  letter-spacing: 3px !important;
}
body[data-font=courier] .column-code,
body[data-font=courier] .project-card__code {
  letter-spacing: 0.5px !important;
}

/* Khoảng trắng dính coi như header ở trên có độ cao 38px đồng nhất với footer */
.site-header-line {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 38px;
  background-color: #f8f8f8;
  border-bottom: 1.5px solid #ffffff; /* Dải viền trắng mảnh đồng nhất y hệt như footer */
  z-index: 9999;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
@media (max-width: 768px) {
  .site-header-line {
    display: none;
  }
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: none;
}

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

/* Layout container - cân bằng khoảng cách 2 bên mép đúng 80px */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 65px 0 40px;
  background-color: #f8f8f8;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  html, body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
  }
  .app-layout {
    flex-direction: column !important;
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
}
.sidebar {
  width: 265px;
  flex-shrink: 0;
  padding-left: 30px;
  background-color: #f8f8f8;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100; /* Luôn nằm trên các lớp phóng to, tuyệt đối không bị che */
}
.sidebar__inner {
  margin-top: 100px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  justify-content: space-between; /* Logo & menu ở trên, thông tin dự án ở dưới */
}

.logo {
  font-size: var(--logo-size, 7.5rem);
  font-weight: var(--logo-weight, 200);
  letter-spacing: 1px;
  margin-bottom: 40px;
  line-height: 1;
}
.logo a {
  color: #111111;
  display: inline-block;
  font-size: inherit;
  font-weight: inherit;
  transition: opacity 0.2s ease;
}
.logo a:hover {
  opacity: 0.75;
}

.nav-menu__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-menu__item {
  margin-bottom: 40px;
}
.nav-menu__link {
  font-size: var(--nav-size, 2.8rem);
  font-weight: var(--nav-weight, 200);
  letter-spacing: 6.5px;
  color: #222222;
  display: inline-block;
  position: relative;
  white-space: nowrap;
  transition: color 160ms ease-out, opacity 160ms ease-out, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  will-change: transform;
}
.nav-menu__link:hover {
  color: #000000;
  transform: translateX(2px);
}
.nav-menu__link.is-active {
  color: #000000;
}
.nav-menu {
  /* Khi 1 mục đang active, các mục khác có độ tương phản nhẹ hơn đúng mẫu */
}
.nav-menu.has-active .nav-menu__link:not(.is-active) {
  color: #777777;
  font-weight: var(--nav-weight, 200);
}
.nav-menu.has-active .nav-menu__link:not(.is-active):hover {
  color: #000000;
}

@media (prefers-reduced-motion: reduce) {
  .nav-menu__link {
    transition: none;
  }
}
/* Khối thông tin chi tiết dự án ở góc dưới bên trái của header */
.project-info {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  transform: translateY(12px);
  padding-bottom: 24px;
}
.project-info.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.project-info.is-updating {
  opacity: 0.2;
}
.project-info__title {
  font-size: var(--title-size, 3.2rem);
  font-weight: var(--title-weight, 300);
  line-height: 1.15;
  letter-spacing: 0.5px;
  color: #111111;
  margin: 0 0 20px 0;
}
.project-info__meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.project-info__meta .meta-row {
  font-size: var(--meta-size, 1.25rem);
  line-height: 1.45;
  color: #333333;
  font-weight: var(--meta-weight, 200);
  letter-spacing: 0.2px;
}

/* Tối ưu riêng cho màn hình laptop và Mac (<= 920px) giúp thông tin không bị sát footer */
@media (max-height: 920px) {
  .sidebar__inner {
    margin-top: 50px;
    height: calc(100vh - 90px);
  }
  .logo {
    margin-bottom: 20px;
    font-size: 6.2rem;
  }
  .nav-menu__item {
    margin-bottom: 20px;
  }
  .nav-menu__link {
    font-size: 2.2rem;
    letter-spacing: 5px;
  }
  .project-info {
    padding-bottom: 24px;
  }
  .project-info__title {
    font-size: 2.4rem;
    margin-bottom: 12px;
  }
  .project-info__meta {
    gap: 2.5px;
  }
  .project-info__meta .meta-row {
    font-size: 1.15rem;
    line-height: 1.35;
  }
}
/* Cho màn hình laptop độ cao hẹp hơn (<= 740px) */
@media (max-height: 740px) {
  .sidebar__inner {
    margin-top: 42px;
    height: calc(100vh - 82px);
  }
  .logo {
    margin-bottom: 14px;
    font-size: 5.4rem;
  }
  .nav-menu__item {
    margin-bottom: 14px;
  }
  .nav-menu__link {
    font-size: 2rem;
    letter-spacing: 4.5px;
  }
  .project-info {
    padding-bottom: 24px;
  }
  .project-info__title {
    font-size: 2.1rem;
    margin-bottom: 8px;
  }
  .project-info__meta {
    gap: 1.5px;
  }
  .project-info__meta .meta-row {
    font-size: 1.05rem;
    line-height: 1.3;
  }
}
/* Giao diện Header chuẩn cho Mobile theo mẫu Vuvi Va (tiêu đề to ở giữa, 3 menu ở dưới) */
@media (max-width: 768px) {
  .sidebar {
    width: 100% !important;
    height: auto !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    padding: 15px 16px 10px 16px !important;
    background-color: #f8f8f8 !important;
    border-top: 1.5px solid #ffffff !important;
    border-bottom: 1.5px solid #ffffff !important;
    margin: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  }
  .sidebar__inner {
    margin-top: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important; /* Khoảng cách đều đặn, cân đối giữa NNA+ và menu */
  }
  .sidebar__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .sidebar .logo {
    margin: 0 !important;
    padding: 10px !important;
    font-size: 3rem !important;
    line-height: 1 !important;
    height: auto !important;
    text-align: center;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .sidebar .logo a {
    font-size: 3rem !important;
    font-weight: 400 !important; /* Mỏng thanh thoát, tinh tế chuẩn architectural brand */
    letter-spacing: 2px !important;
    color: #000000 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .sidebar .nav-menu {
    width: 100%;
  }
  .sidebar .nav-menu__list {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }
  .sidebar .nav-menu__item {
    margin-bottom: 0 !important;
  }
  .sidebar .nav-menu__link {
    font-size: 1.4rem !important;
    font-weight: 500 !important;
    letter-spacing: 2px !important;
    color: #777777 !important;
    text-transform: uppercase !important;
    padding: 2px 6px !important;
    transition: color 0.2s ease, font-weight 0.2s ease;
  }
  .sidebar .nav-menu__link.is-active {
    font-weight: var(--nav-hover-weight, 400) !important;
    color: #000000 !important;
  }
  .sidebar .nav-menu.has-active .sidebar .nav-menu__link:not(.is-active) {
    color: #888888 !important;
    font-weight: 500 !important;
  }
  .sidebar .project-info {
    display: none !important; /* Ẩn khối thông tin chân trang khỏi header mobile */
  }
}
.main-content {
  flex-grow: 1;
  padding: 0 0 0 75px;
  background-color: #f8f8f8;
  height: 100vh;
  overflow: hidden;
  display: flex;
}

/* Khóa cứng bố cục bằng CSS Grid 1fr 1fr để 2 bên không bao giờ bị xê dịch dù đổi nội dung gì */
.portfolio-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 2.2vw, 42px);
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative; /* Định vị tuyệt đối để lightbox chỉ nằm trọn trong 4 cột, không đè lên header */
}

/* 2 Cụm lớn: Cụm trái và Cụm phải */
.portfolio-col {
  position: relative;
  height: 100vh;
  overflow: hidden;
  width: 100%;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.portfolio-col.is-col-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.portfolio-col.is-infos-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}
.portfolio-col.is-infos-entering .portfolio-view--default {
  transition: none;
}
.portfolio-col--left:hover .portfolio-track {
  animation-play-state: paused;
}
.portfolio-col--right:hover .portfolio-view--default .portfolio-track {
  animation-play-state: paused;
}

/* Các view bên cụm phải đặt position absolute để chuyển đổi mượt mà tại chỗ không gây giật */
.portfolio-view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.portfolio-view--default {
  opacity: 1;
  visibility: visible;
  overflow: hidden;
}
.portfolio-view--default.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.portfolio-view--details {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none; /* Ẩn thanh cuộn để tránh giật giao diện khi cuộn */
  -ms-overflow-style: none;
}
.portfolio-view--details::-webkit-scrollbar {
  display: none;
}
.portfolio-view--details.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.portfolio-columns {
  display: flex;
  gap: 6px;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.portfolio-subcol {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.portfolio-subtrack {
  display: flex;
  flex-direction: column;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.portfolio-subtrack img {
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

.portfolio-columns.is-dragging {
  cursor: grabbing !important;
}
.portfolio-columns.is-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

.portfolio-subtrack__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 6px; /* Khớp đúng gap 6px để khi nối Set 2 thì khoảng cách giữa các ảnh luôn luôn là 6px chuẩn xác */
  width: 100%;
}

/* Kiểu ô ảnh cơ bản: chỉ giới hạn bề ngang, dọc tự nhiên theo chuẩn ảnh gốc */
.grid-item {
  width: 100%;
  height: auto;
  min-height: 120px; /* Giữ chỗ ban đầu tránh sập layout giật màn hình (CLS) */
  overflow: hidden;
  background-color: transparent;
  display: block;
  cursor: url("/favicon/icons8-plus-32.png") 16 16, pointer;
}
.grid-item img {
  width: 100%;
  height: auto;
  display: block;
  content-visibility: auto; /* Tối ưu GPU: bỏ qua render các card ngoài khung nhìn cho tới khi cuộn tới */
  transition: transform 0.35s ease, opacity 0.35s ease;
  cursor: url("/favicon/icons8-plus-32.png") 16 16, pointer;
}

/* Thẻ dự án ở cả 2 cụm */
.project-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: url("/favicon/icons8-plus-32.png") 16 16, pointer;
  border: 2px solid transparent;
  transition: border-color 0.25s ease;
}
.project-card img, .project-card__overlay, .project-card__code {
  cursor: url("/favicon/icons8-plus-32.png") 16 16, pointer;
}
.project-card__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.project-card__code {
  font-size: 3.2rem;
  font-weight: 500;
  letter-spacing: 9px;
  color: #111111;
  text-align: center;
  padding-left: 9px;
  line-height: 1;
  user-select: none;
}
.project-card {
  /* Khi hover hoặc khi dự án đang được chọn */
}
.project-card:hover, .project-card.is-active {
  border-color: #d84333;
}
.project-card:hover .project-card__overlay, .project-card.is-active .project-card__overlay {
  opacity: 1;
}

/* Lưới chi tiết dự án (Bọc bởi Scaler giữ nguyên 100% tỷ lệ ô vuông 22x22px chuẩn như Admin) */
.portfolio-details__grid {
  display: block;
  width: 100%;
  padding: 50px 0 120px 0; /* Khoảng cách mép trên 50px thoáng đãng, không bị dính sát mép */
  transition: opacity 0.2s ease;
}
.portfolio-details__grid.is-updating {
  opacity: 0.15;
}

/* Khối Scaler giữ nguyên 100% bố cục 30 ô vuông chuẩn như Admin trên cả PC & Mobile */
.grid-scaler-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin: 0;
}

.grid-scaler-target {
  width: 660px;
  min-width: 660px;
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  grid-auto-rows: 22px;
  gap: 0;
  position: relative;
  transform-origin: top left;
  margin: 0;
}

.detail-item {
  overflow: visible;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  cursor: url("/favicon/icons8-plus-32.png") 16 16, pointer; /* Con trỏ hình dấu cộng */
}
.detail-item img {
  width: 100%;
  height: 100%;
  object-fit: var(--img-fit, contain) !important;
  object-position: var(--img-pos, center);
  display: block;
  transition: transform 0.35s ease, opacity 0.35s ease;
  cursor: url("/favicon/icons8-plus-32.png") 16 16, pointer;
  background: transparent !important;
  border: none !important;
}
.detail-item img.detail-lazy-img {
  opacity: 0;
}
.detail-item img.detail-lazy-img.is-loaded {
  opacity: 1;
}
.detail-item video {
  width: 100%;
  height: 100%;
  object-fit: var(--img-fit, contain) !important;
  object-position: var(--img-pos, center);
  display: block;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  transition: opacity 0.35s ease;
  transform: none !important; /* Không scale video khi hover để loại bỏ hoàn toàn hiện tượng giật hình */
}
.detail-item:hover img {
  transform: scale(1.02);
}
.detail-item:hover video {
  transform: none !important;
}
.detail-item--video {
  position: relative;
  cursor: url("/favicon/icons8-plus-32.png") 16 16, pointer !important;
}
.detail-item--video video {
  pointer-events: none; /* Click vào ô lưới luôn mở Lightbox phóng to */
}
.detail-item--video .video-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform 0.25s ease, background 0.25s ease;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%);
}
.detail-item--video .video-play-badge svg {
  margin-left: 2px;
}
.detail-item--video:hover .video-play-badge {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(0, 0, 0, 0.82);
}
.detail-item--wide {
  grid-column: span 30;
  grid-row: span 16;
}
.detail-item--text {
  grid-column: span 30;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  padding: 4px 0;
  cursor: default;
}
.detail-item--text .description-text {
  cursor: default;
  font-family: inherit;
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
  font-weight: inherit !important;
  font-style: inherit !important;
  text-align: inherit !important;
  margin: 0;
  padding: 0;
  letter-spacing: 0.2px;
  white-space: pre-wrap;
  word-break: break-word;
}
.detail-item--text .description-text a {
  color: #0d6efd !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer !important;
  transition: opacity 0.2s ease;
}
.detail-item--text .description-text a:hover {
  opacity: 0.6;
}
.detail-item--drawing {
  grid-column: span 15;
  grid-row: span 14;
  background-color: #ffffff;
  border: 1px solid #f0f0f0;
  padding: 8px;
}
.detail-item--drawing img {
  object-fit: contain;
}
.detail-item--section {
  grid-column: span 30;
  grid-row: span 16;
  background-color: #ffffff;
  border: 1px solid #f0f0f0;
  padding: 12px;
}
.detail-item--section img {
  object-fit: contain;
}
.detail-item--detail {
  grid-column: span 15;
  grid-row: span 14;
}

/* Khối phóng to ảnh toàn màn hình 4 cột khi click vào ảnh chi tiết */
.portfolio-lightbox {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.portfolio-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.portfolio-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.portfolio-lightbox__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  max-width: min(92vw, 1500px);
  max-height: 90vh;
  pointer-events: none;
}
.portfolio-lightbox__content img {
  display: block;
  margin: 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain; /* Chuẩn 100% tỉ lệ thật của ảnh */
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.16);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  transform: scale(0.98);
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.portfolio-lightbox__content video {
  display: block;
  margin: 0 auto;
  object-fit: contain;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  transform: none !important;
  transition: opacity 0.25s ease !important;
  background: transparent !important;
  border-radius: 2px;
}
.portfolio-lightbox.is-open .portfolio-lightbox__content img {
  transform: scale(1);
}
.portfolio-lightbox.is-open .portfolio-lightbox__content video {
  transform: none !important;
}
@media (max-width: 768px) {
  .portfolio-lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 999999 !important;
  }
  .portfolio-lightbox .portfolio-lightbox__backdrop {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background-color: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }
  .portfolio-lightbox__content {
    width: 100% !important;
    max-width: calc(100vw - 20px) !important;
    max-height: 85vh !important;
    max-height: 85dvh !important;
  }
  .portfolio-lightbox__content img {
    max-width: 100% !important;
    max-height: 85vh !important;
    max-height: 85dvh !important;
    object-fit: contain !important;
  }
}

/* Keyframes */
@keyframes scrollDown {
  0% {
    transform: translateY(-50%);
  }
  100% {
    transform: translateY(0%);
  }
}
@keyframes scrollUp {
  0% {
    transform: translateY(0%);
  }
  100% {
    transform: translateY(-50%);
  }
}
/* Responsive */
@media (max-width: 1200px) {
  .app-layout {
    padding: 0 34px 0 24px;
  }
  .sidebar {
    width: 230px;
    padding-left: 20px;
  }
  .sidebar__inner {
    margin-top: 80px;
  }
  .sidebar .logo {
    font-size: 5.6rem;
  }
  .sidebar .nav-menu__link {
    font-size: 1.8rem;
    letter-spacing: 4px;
  }
  .main-content {
    padding-left: 47px;
  }
  .portfolio-wrapper {
    gap: 28px;
  }
}
@media (max-width: 992px) and (min-width: 769px) {
  .app-layout {
    padding: 0 15px;
  }
  .sidebar {
    width: 210px;
    padding-left: 15px;
  }
  .sidebar .logo a {
    font-size: 5rem;
  }
  .sidebar .nav-menu__link {
    font-size: 1.7rem;
    letter-spacing: 3.5px;
  }
  .main-content {
    padding-left: 30px;
  }
  .portfolio-wrapper {
    gap: 22px;
  }
}
/* Mobile: dưới 768px - Bố cục chuẩn 2 cột như mẫu Vuvi Va */
@media (max-width: 768px) {
  .app-layout {
    flex-direction: column !important;
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  .main-content {
    height: auto !important;
    overflow: visible !important;
    padding: 16px 14px 70px 14px !important;
    width: 100% !important;
  }
  .portfolio-wrapper {
    display: block !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    width: 100% !important;
  }
  .portfolio-col {
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    width: 100% !important;
    display: block !important;
  }
  .portfolio-col.is-col-hidden {
    display: none !important;
  }
  .portfolio-view {
    position: relative !important;
    height: auto !important;
    overflow: visible !important;
    inset: auto !important;
  }
  .portfolio-view--default.is-hidden {
    display: none !important;
  }
  .portfolio-view--details {
    display: none !important;
    height: auto !important;
    overflow: visible !important;
  }
  .portfolio-view--details.is-active {
    display: block !important;
  }
  /* Tắt chạy marquee vô tận trên mobile để cuộn tự nhiên theo ngón tay */
  .portfolio-columns {
    display: flex !important;
    gap: 6px !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 24px !important;
  }
  .portfolio-subcol {
    flex: 1 !important;
    min-width: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }
  .portfolio-subtrack {
    animation: none !important;
    transform: none !important;
    display: block !important;
  }
  /* Ẩn bộ ảnh thứ 2 lặp lại của marquee trên mobile để không bị trùng lặp ảnh */
  .portfolio-subtrack__content[aria-hidden=true] {
    display: none !important;
  }
  .mobile-hide-repeat {
    display: none !important;
  }
  .portfolio-subtrack__content {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding-bottom: 0 !important;
    width: 100% !important;
  }
  .grid-item {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
    background-color: transparent !important;
    display: block !important;
  }
  .grid-item img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: initial !important;
  }
  /* Container chi tiết dự án trên mobile */
  .portfolio-details__grid {
    padding: 0 0 40px 0 !important;
  }
  .grid-scaler-container {
    margin: 10px 0 20px 0;
  }
  /* Khối thông tin chi tiết dự án ở cuối */
  .mobile-detail-meta {
    margin-top: 25px;
    padding: 22px 0;
    border-top: 1px solid #eeeeee;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .mobile-detail-meta .meta-line {
    font-size: 1.35rem;
    color: #222;
    line-height: 1.5;
  }
  .mobile-detail-meta .meta-line .meta-label {
    font-weight: 600;
    color: #111;
    margin-right: 0;
  }
  .mobile-detail-meta .meta-line .meta-value {
    font-style: normal;
    color: #333;
    font-weight: 400;
  }
  /* Khối các dự án còn lại (liên quan) ở dưới cùng */
  .related-projects-section {
    margin-top: 30px;
    padding-bottom: 40px;
  }
  .related-projects-section .related-projects-grid {
    column-count: 2;
    column-gap: 6px;
    display: block;
    width: 100%;
  }
}
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 38px;
  background-color: #f8f8f8;
  border-top: 1.5px solid #ffffff; /* Dải trắng mảnh trên footer giúp giao diện không bị trôi tuột */
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  z-index: 99999 !important;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.site-footer__inner {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 65px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-footer__copyright {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.25rem;
  font-weight: 400;
  color: #222222;
  letter-spacing: 0.3px;
}
.site-footer__copyright .copyright-symbol {
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 400;
}
.site-footer__copyright .copyright-brand {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.5px;
}
.site-footer__social {
  display: flex;
  align-items: center;
}
.site-footer__social .social-link {
  color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.site-footer__social .social-link:hover {
  opacity: 0.6;
  transform: scale(1.08);
}
.site-footer__social .social-link .facebook-icon {
  display: block;
  width: 17px;
  height: 17px;
}
@media (max-width: 768px) {
  .site-footer {
    height: 36px;
  }
  .site-footer__inner {
    padding: 0 20px;
  }
  .site-footer__copyright {
    font-size: 1.2rem;
  }
  .site-footer__copyright .copyright-symbol {
    font-size: 1.25rem;
  }
  .site-footer__copyright .copyright-brand {
    font-size: 1.2rem;
  }
  .site-footer__social .social-link .facebook-icon {
    width: 16px;
    height: 16px;
  }
}

/* --- 404 Page (Minimalist Architectural) --- */
.page-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  width: 100%;
  padding: 40px 20px;
}
.page-404__inner {
  max-width: 480px;
  text-align: left;
}
.page-404__code {
  font-size: 7.2rem;
  font-weight: 200;
  letter-spacing: 4px;
  color: #111111;
  line-height: 1;
  margin-bottom: 12px;
}
.page-404__title {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 3px;
  color: #333333;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.page-404__desc {
  font-size: 1.4rem;
  line-height: 1.6;
  color: #666666;
  font-weight: 200;
  margin-bottom: 32px;
  letter-spacing: 0.3px;
}
.page-404__btn {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 2.5px;
  color: #111111;
  text-decoration: none;
  border-bottom: 1px solid #111111;
  padding-bottom: 4px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.page-404__btn:hover {
  opacity: 0.6;
  transform: translateX(4px);
}
@media (max-width: 768px) {
  .page-404 {
    min-height: 60vh;
    padding: 60px 24px;
  }
  .page-404__inner {
    text-align: center;
  }
  .page-404__code {
    font-size: 5.6rem;
  }
}

/* Accessibility Skip Link (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -120px;
  left: 16px;
  z-index: 999999;
  background: #111;
  color: #fff;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: top 0.2s ease;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.skip-link:focus {
  top: 0;
  outline: 2px solid #333;
}


