:root {
  --bg: #121214;
  --bg-2: #1a1a1e;
  --text: #f4f4f6;
  --muted: #a6a6b0;
  --blue: #4f6bff;
  --violet: #7b3cff;
  --accent: #8fa2ff;
  --card: #222228;
  --radius: 14px;
  --gutter: clamp(16px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  /* nhiễu hạt giống bản Canva */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background .3s, padding .3s;
}
/* nền mờ đặt ở ::before để không làm hỏng menu mobile (position: fixed) */
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: rgba(18,18,20,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav.scrolled::before { opacity: 1; }
.nav.scrolled { padding-block: 12px; }
.nav-logo, .nav-toggle { position: relative; z-index: 2; }
.nav-logo { font-family: "Anton", sans-serif; font-size: 22px; letter-spacing: 2px; }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; font-weight: 600; font-size: 14px; }
.nav-links a { opacity: .8; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-cta { border: 1px solid var(--accent); padding: 8px 18px; border-radius: 99px; opacity: 1 !important; }
.nav-cta:hover { background: var(--accent); color: var(--bg); }
.nav-toggle { display: none; background: none; border: 0; width: 32px; height: 32px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--text); margin: 7px 4px; transition: transform .3s; }

.side-label {
  position: fixed; left: 10px; top: 50%; z-index: 40;
  transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl;
  font-family: "Montserrat"; font-weight: 800; font-size: 11px; letter-spacing: 3px;
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.side-label.show { opacity: .45; }
/* Chế độ Upwork: không có nút liên hệ nên đổi nút Contact trên menu thành link thường */
.upwork .nav-cta { border-color: transparent; }

/* ---------- GLOW ---------- */
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; pointer-events: none; }
.glow-a { width: 45vw; height: 45vw; background: var(--violet); top: -15%; right: 5%; }
.glow-b { width: 35vw; height: 35vw; background: var(--blue); bottom: -10%; left: 0; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1.3fr; align-items: end;
  padding: 0 var(--gutter);
}
.hero-photo { align-self: end; height: 82svh; max-width: 480px; width: 100%; position: relative; z-index: 1; }
/* ảnh có sẵn nền tối: làm mờ mép để hoà vào nền trang */
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center bottom;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 70%, transparent), linear-gradient(to bottom, transparent, #000 18%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 70%, transparent), linear-gradient(to bottom, transparent, #000 18%);
}
.about-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%); mask-image: linear-gradient(to right, transparent, #000 22%);
}
.hero-text { align-self: center; text-align: center; position: relative; z-index: 2; padding-bottom: 4vh; }
.hero-title {
  font-family: "Anton", sans-serif; font-weight: 400;
  font-size: clamp(64px, 13vw, 210px); line-height: .9; letter-spacing: 2px;
  text-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.hero-script {
  font-family: "Great Vibes", cursive; font-size: clamp(40px, 7vw, 110px);
  color: var(--accent); margin-top: -.45em; line-height: 1.1;
  text-shadow: 0 0 25px rgba(79,107,255,.8);
}
.btn {
  display: inline-block; margin-top: 28px; padding: 12px 26px; border-radius: 99px;
  background: linear-gradient(90deg, var(--blue), var(--violet)); font-weight: 600; font-size: 14px;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(79,107,255,.5); }

/* ---------- SECTIONS ---------- */
.section { padding: 110px var(--gutter); max-width: 1280px; margin: 0 auto; scroll-margin-top: -40px; }
.h2 { font-family: "Montserrat"; font-weight: 800; font-size: clamp(34px, 5vw, 60px); line-height: 1.1; }
.sub { font-family: "Oswald"; color: var(--muted); font-size: 18px; margin: 8px 0 36px; }
.tag {
  display: inline-block; margin: 14px 0 22px; padding: 2px 12px;
  background: var(--blue); color: #10142e;
  font-family: "Montserrat"; font-weight: 800; font-size: clamp(24px, 3vw, 36px);
}

/* ABOUT */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.about-text p { font-family: "Oswald"; font-size: 18px; color: #dcdce2; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 24px 0; }
.chips li { border: 1px solid #3a3a46; border-radius: 99px; padding: 5px 14px; font-size: 13px; color: var(--muted); }
.contact-line { display: flex; flex-wrap: wrap; gap: 10px 32px; list-style: none; font-family: "Oswald"; font-size: 16px; }
.contact-line a:hover { color: var(--accent); }
.about-photo { aspect-ratio: 4/5; border-radius: var(--radius); }

/* BANNER */
.banner { position: relative; overflow: hidden; }
.banner-img { width: 100%; max-height: 70svh; object-fit: cover; display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 85%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 85%, transparent); }
.timeline { position: absolute; inset: 0; padding: 30px var(--gutter); display: flex; flex-direction: column; gap: 10px; opacity: .55; background: #0d0d10; }
.track { height: 22px; border-radius: 4px; }
.banner-title {
  position: relative; font-family: "Montserrat"; font-weight: 800;
  font-size: clamp(64px, 14vw, 200px); line-height: .8; letter-spacing: -2px;
  text-shadow: 0 0 40px rgba(0,0,0,.7);
}

/* PHOTO GRID */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 210px; gap: 14px; }
.photo { position: relative; border-radius: var(--radius); overflow: hidden; }
.photo.tall { grid-row: span 2; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.photo:hover img { transform: scale(1.05); }
.photo figcaption {
  position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px; font-size: 13px; font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}

/* FILTERS */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  background: var(--card); border: 1px solid transparent; padding: 8px 18px; border-radius: 99px; transition: all .2s;
}
.filter:hover { color: var(--text); }
.filter.active { color: var(--text); border-color: var(--accent); background: rgba(79,107,255,.18); }
.filter .count { opacity: .55; margin-left: 4px; font-weight: 400; }

/* VIDEO GRID */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; grid-auto-flow: dense; }
.video {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  aspect-ratio: 9/16; border: 0; padding: 0; color: inherit; font: inherit; text-align: left;
  transition: transform .3s, box-shadow .3s; background: var(--card);
}
.video.horizontal { grid-column: span 2; aspect-ratio: 16/9; align-self: start; }
.video:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(79,107,255,.3); }
.video img { width: 100%; height: 100%; object-fit: cover; }
.video .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  display: grid; place-items: center; transition: transform .2s, background .2s;
}
.video .play::after { content: ""; border-left: 16px solid #fff; border-block: 10px solid transparent; margin-left: 4px; }
.video:hover .play { transform: translate(-50%,-50%) scale(1.12); background: var(--blue); }
.video .meta { position: absolute; inset: auto 0 0 0; padding: 28px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.video .meta b { display: block; font-size: 13px; font-weight: 600; line-height: 1.35; margin-top: 2px; color: #e8e8ee; }
.video .meta small { display: block; font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.video.hide { display: none; }
/* nhãn nổi bật: Featured + lượt xem */
.video .badges { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.badge { padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 800; letter-spacing: .3px; color: #fff; }
.badge-featured { background: linear-gradient(90deg, var(--blue), var(--violet)); box-shadow: 0 4px 18px rgba(79,107,255,.5); }
.badge.views { background: linear-gradient(90deg, #ff3b6b, #ff8a3d); box-shadow: 0 4px 18px rgba(255,59,107,.55); }
.video.featured { outline: 2px solid rgba(143,162,255,.7); outline-offset: -2px; }
.video:has(.views) { outline-color: rgba(255,90,90,.75); }

/* ---------- SHOWREEL ---------- */
.showreel { display: grid; grid-template-columns: auto 1fr; gap: 64px; align-items: center; }
.reel-frame {
  position: relative; height: min(78svh, 720px); aspect-ratio: 9/16; border-radius: 28px; overflow: hidden;
  border: 6px solid #26262e; background: #000; box-shadow: 0 30px 80px rgba(79,107,255,.35), 0 0 0 1px rgba(255,255,255,.06);
}
.reel-frame video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.stats { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 8px 0 32px; max-width: 620px; }
.stats li { background: var(--card); border: 1px solid #2e2e38; border-radius: var(--radius); padding: 18px; }
.stats strong { display: block; font-family: "Anton", sans-serif; font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.1;
  background: linear-gradient(90deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { font-size: 13px; color: var(--muted); }
.btn-ghost { background: none; border: 1px solid var(--accent); margin-top: 0; }

/* placeholder khi chưa có ảnh */
.ph { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.4); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }

/* ---------- CONTACT ---------- */
.contact { position: relative; overflow: hidden; text-align: center; padding: 140px var(--gutter) 40px; background: #0d0d10; }
.thanks { position: relative; font-family: "Great Vibes", cursive; font-weight: 400; font-size: clamp(72px, 14vw, 200px); line-height: 1; }
.contact-sub { position: relative; font-family: "Oswald"; color: var(--muted); font-size: 20px; margin: 10px 0 36px; }
.contact-btns { position: relative; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.contact-btns a {
  padding: 12px 24px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  font-weight: 600; font-size: 14px; transition: background .2s;
}
.contact-btns a:hover { background: var(--blue); }
.copyright { position: relative; margin-top: 90px; font-size: 12px; color: var(--muted); }

/* ---------- MODAL ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.85); backdrop-filter: blur(6px); }
.modal-box { position: relative; width: min(420px, 100%); }
.modal-box.wide { width: min(1000px, 100%); }
.modal-media { aspect-ratio: 9/16; max-height: 82svh; margin: 0 auto; border-radius: var(--radius); overflow: hidden; background: #000; }
.modal-box.wide .modal-media { aspect-ratio: 16/9; }
.modal-media iframe, .modal-media video { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; background: #000; }
.modal-title { text-align: center; margin-top: 12px; font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.modal-close { position: absolute; top: -44px; right: 0; background: none; border: 0; color: #fff; font-size: 36px; cursor: pointer; line-height: 1; }
.modal-empty { height: 100%; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); font-size: 14px; }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- MOBILE ---------- */
@media (max-width: 820px) {
  .side-label { display: none; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 30px; font-size: 22px;
    background: rgba(13,13,16,.97); z-index: 1;
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; }
  .nav.open .nav-toggle span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

  .hero { grid-template-columns: 1fr; align-content: end; gap: 32px; padding-top: 110px; }
  .hero-text { order: -1; padding-bottom: 0; }
  .hero-photo { height: 50svh; margin: 0 auto; max-width: 300px; }
  .about { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { order: -1; max-width: 360px; }
  .section { padding: 80px var(--gutter); }
  .banner-img { aspect-ratio: 4/3; }
  .photo-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .video .play { width: 44px; height: 44px; }
  .video.solo { grid-column: 1 / -1; justify-self: center; width: calc(50% - 5px); }
  .badge { font-size: 10px; padding: 4px 8px; }
  .video .meta b { font-size: 11px; }
  .showreel { grid-template-columns: 1fr; gap: 32px; justify-items: center; text-align: center; }
  .reel-frame { height: auto; width: min(78vw, 340px); }
  .stats { margin-inline: auto; text-align: left; }
}
