/* Giữ tinh thần trang cũ: hero ảnh toàn màn hình, phần giới thiệu sáng, phần lĩnh vực nền núi xanh, chân trang tối */
:root {
  --ink: #17231b;
  --muted: #55625a;
  --paper: #f8f9fa;
  --white: #ffffff;
  --forest: #043500;
  --leaf: #4fd08a;
  --footer: #201a1a;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.7; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(28px, 4.5vw, 38px); line-height: 1.25; text-align: center; text-wrap: balance; }
h3 { font-size: 20px; line-height: 1.35; }

.container { width: min(100%, 1080px); margin: 0 auto; }
.section { padding: clamp(56px, 9vw, 96px) max(20px, env(safe-area-inset-right, 0px)) clamp(56px, 9vw, 96px) max(20px, env(safe-area-inset-left, 0px)); scroll-margin-top: 0; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  justify-items: center;
  align-content: end;
  padding: 80px 20px 104px;
  color: var(--white);
  text-align: center;
  background: linear-gradient(rgba(0, 0, 0, .12) 40%, rgba(0, 0, 0, .78) 72%), url("/assets/le-dang-hieu-hero.jpg") center 30% / cover no-repeat;
}
.hero-text { display: grid; gap: 10px; }
.hero-hello { font-size: clamp(18px, 3vw, 24px); font-weight: 500; }
.hero h1 { font-size: clamp(42px, 10vw, 84px); line-height: 1.1; font-weight: 700; }
.hero-role { font-size: clamp(19px, 3.4vw, 28px); min-height: 1.7em; }
.typist { color: var(--leaf); font-weight: 600; }
.typist.typing::after { content: "|"; margin-left: 2px; animation: blink 1s steps(2, start) infinite; }

.mouse {
  position: absolute;
  bottom: 28px;
  left: calc(50% - 14px);
  width: 28px;
  height: 46px;
  border: 2px solid var(--white);
  border-radius: 16px;
}
.mouse::before {
  content: "";
  position: absolute;
  top: 8px;
  left: calc(50% - 2px);
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--white);
  animation: wheel 1.8s ease-in-out infinite;
}
a:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }

/* Giới thiệu */
.about h2, .work h2 { margin-bottom: 40px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; align-items: start; }
.about-side { display: grid; gap: 18px; }
.about-side img { border-radius: 8px; }
.contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; color: var(--muted); overflow-wrap: anywhere; }
.contact a { color: var(--forest); font-weight: 500; }
.about-story { display: grid; gap: 14px; }
.about-story h3 { color: var(--forest); margin-top: 10px; }
.about-story h3:first-child { margin-top: 0; }

/* Lĩnh vực */
.fields {
  color: var(--white);
  background: linear-gradient(rgba(4, 53, 0, .72), rgba(4, 53, 0, .72)), url("/assets/nen-nui.jpg") center / cover no-repeat;
}
.fields h2 { margin-bottom: 40px; }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.fields-grid article { display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 2px solid var(--leaf); }

/* Làm việc */
.work { background: var(--white); }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; }
.work-grid > div { display: grid; gap: 14px; }
.work-grid img { border-radius: 8px; }

/* Chân trang */
.footer {
  padding: 28px 20px;
  background: var(--footer);
  color: #d9d4d4;
  text-align: center;
  font-size: 15px;
}

/* Trang 404 */
.not-found { min-height: 100vh; display: grid; place-content: center; gap: 12px; padding: 20px; text-align: center; }
.not-found a { color: var(--forest); font-weight: 600; }

/* Hiệu ứng */
.anim-tada { animation: tada 1.1s ease both; }
.anim-bounce-up { animation: bounce-up 1.2s ease .5s both; }
.js .reveal { opacity: 0; transform: translateY(-24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.shown { opacity: 1; transform: none; }

@keyframes tada {
  0% { transform: scale(1); }
  10%, 20% { transform: scale(.94) rotate(-2deg); }
  30%, 50%, 70%, 90% { transform: scale(1.06) rotate(2deg); }
  40%, 60%, 80% { transform: scale(1.06) rotate(-2deg); }
  100% { transform: none; }
}
@keyframes bounce-up {
  0% { opacity: 0; transform: translateY(120px); }
  60% { opacity: 1; transform: translateY(-14px); }
  80% { transform: translateY(6px); }
  100% { transform: none; }
}
@keyframes wheel {
  0% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(16px); }
}
@keyframes blink { to { visibility: hidden; } }

@media (max-width: 760px) {
  .about-grid, .fields-grid, .work-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .about-side img { max-width: 340px; margin: 0 auto; }
  .hero { background-position: 52% 30%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim-tada, .anim-bounce-up, .mouse::before { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
