:root {
  --ink: #132238;
  --muted: #5f6f82;
  --paper: #f4f7fb;
  --surface: #ffffff;
  --line: #d8e2ee;
  --navy: #0d2b4c;
  --blue: #1d67c8;
  --cyan: #0aa6c7;
  --green: #1a8f73;
  --coral: #d95745;
  --gold: #d39b21;
  --shadow: 0 18px 42px rgba(15, 38, 68, 0.12);
}

/* Base layout */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", "Helvetica Neue", Tahoma, Arial, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(120deg, rgba(29, 103, 200, 0.08), transparent 32%),
    linear-gradient(250deg, rgba(10, 166, 199, 0.07), transparent 35%),
    linear-gradient(0deg, rgba(26, 143, 115, 0.06), transparent 45%);
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p,
dl,
dd,
figure {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  max-width: 820px;
  font-size: clamp(2.35rem, 5.2vw, 4.25rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.55rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
  text-wrap: balance;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}

p {
  margin-bottom: 14px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
}

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(19, 34, 56, 0.12);
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  font-weight: 700;
  line-height: 1;
}

.brand-text {
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active {
  color: var(--navy);
  background: #e7f1ff;
  outline: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

/* Page sections */
.hero-section,
.page-hero,
.intro-section,
.products-section,
.skills-section,
.ai-section,
.summary-section {
  padding: clamp(48px, 7vw, 92px) clamp(18px, 5vw, 76px);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 76px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(13, 43, 76, 0.94), rgba(29, 103, 200, 0.88)),
    var(--navy);
}

.page-hero {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(13, 43, 76, 0.94), rgba(29, 103, 200, 0.88)),
    var(--navy);
}

.page-hero h1,
.page-hero p {
  max-width: 900px;
}

.page-hero p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.06rem;
}

.hero-subtitle {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.14rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.42;
}

.hero-lead {
  max-width: 860px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-section .eyebrow {
  color: #9ee8ff;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 6px;
}

.hero-badge-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 6px 11px;
  color: #e8f7ff;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.9rem;
  font-weight: 600;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.identity-grid div {
  min-height: 106px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.identity-grid dt {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
}

.identity-grid dd {
  margin-left: 0;
  color: #fff;
  font-weight: 700;
  line-height: 1.42;
}

.hero-actions,
.link-row,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button,
.filter-button,
.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 10px 16px;
  border: 0;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible,
.filter-button:hover,
.filter-button:focus-visible,
.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button.primary {
  color: var(--navy);
  background: #fff;
}

.button.secondary {
  color: #fff;
  background: var(--green);
}

.button.ghost {
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  background: transparent;
}

.hero-visual {
  position: relative;
  min-height: 560px;
}

.hero-photo-card {
  position: relative;
  width: min(420px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.hero-photo-card::before {
  position: absolute;
  inset: -20px;
  z-index: -1;
  border-radius: 8px;
  content: "";
  background:
    linear-gradient(135deg, rgba(158, 232, 255, 0.35), transparent 42%),
    linear-gradient(315deg, rgba(26, 143, 115, 0.4), transparent 46%);
}

.hero-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
}

.hero-photo-card figcaption {
  margin-top: 12px;
  color: #fff;
  font-weight: 700;
}

.hero-stat-card {
  position: absolute;
  display: grid;
  gap: 4px;
  min-width: 154px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 14px 16px;
  color: #fff;
  background: rgba(13, 43, 76, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.hero-stat-card strong {
  font-size: 2rem;
  line-height: 1;
}

.hero-stat-card span {
  color: rgba(255, 255, 255, 0.78);
}

.stat-one {
  top: 44px;
  left: 0;
}

.stat-two {
  right: 0;
  bottom: 62px;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 28px;
}

.home-intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(20px, 4vw, 44px);
  padding: clamp(46px, 7vw, 86px) clamp(18px, 5vw, 76px);
  background: #fff;
}

.home-intro-copy,
.home-goal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(15, 38, 68, 0.08);
}

.home-intro-copy {
  padding: clamp(22px, 3vw, 32px);
}

.home-goal-panel {
  padding: clamp(22px, 3vw, 30px);
  border-left: 6px solid var(--green);
}

.home-goal-panel ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  font-weight: 600;
}

.section-heading > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.03rem;
}

.split-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  max-width: none;
}

.intro-layout,
.ai-block.media-block {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(290px, 0.92fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: start;
}

.intro-copy,
.detail-card,
.ai-block,
.principles,
.summary-grid article,
.evidence-table-wrap,
.final-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 38, 68, 0.08);
}

.intro-copy {
  padding: clamp(20px, 3vw, 30px);
}

.profile-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.profile-list div {
  display: grid;
  grid-template-columns: minmax(130px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.profile-list dt {
  color: var(--muted);
  font-weight: 600;
}

.profile-list dd {
  margin-left: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.42;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.skill-tags span,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

.skill-tags span {
  color: var(--navy);
  background: #e8f3ff;
}

.personal-gallery {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 14px;
  align-items: end;
}

.photo-frame {
  margin: 0;
}

.photo-frame img,
.photo-placeholder,
.feature-image img,
.evidence-strip img,
.process-gallery img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #edf3f8;
  object-fit: cover;
}

.primary-photo img,
.primary-photo .photo-placeholder {
  aspect-ratio: 4 / 5;
}

.secondary-photo img,
.secondary-photo .photo-placeholder {
  aspect-ratio: 1 / 1;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(135deg, #e8f3ff, #f7fafc 55%, #e9f8f4);
}

.photo-placeholder strong {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.products-section {
  background: #fff;
}

.filter-button {
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
}

.filter-button.active {
  color: #fff;
  background: var(--navy);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  display: block;
  min-height: 318px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 26px rgba(15, 38, 68, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.nav-card {
  position: relative;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.nav-card::after {
  position: absolute;
  right: 20px;
  bottom: 18px;
  content: "Mở trang";
  color: var(--blue);
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.product-card:hover {
  border-color: rgba(29, 103, 200, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.nav-card:hover::after,
.nav-card:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.nav-card:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(29, 103, 200, 0.18), var(--shadow);
  outline: none;
}

.product-card.hidden {
  display: none;
}

.product-card.featured {
  border-top: 5px solid var(--green);
}

.card-index {
  display: inline-flex;
  margin-bottom: 14px;
  border-radius: 8px;
  padding: 5px 10px;
  color: #fff;
  background: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
}

.product-card p,
.detail-card p,
.ai-copy p,
.summary-grid p,
.final-note p {
  color: var(--muted);
}

.product-card strong,
.detail-card strong,
.ai-copy strong {
  color: var(--ink);
}

.text-link,
.link-row a,
.site-footer a {
  color: var(--blue);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.skills-section {
  background: linear-gradient(180deg, #f4f7fb, #eaf2fb);
}

.detail-list {
  display: grid;
  gap: 18px;
}

.detail-card {
  padding: clamp(20px, 3vw, 28px);
}

.detail-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.detail-title span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--cyan));
  font-weight: 700;
  line-height: 1;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.detail-evidence-figure {
  margin-top: 18px;
}

.search-evidence-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: 8px;
  padding: 16px;
  background: #f7fbff;
}

.search-evidence-card h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.search-evidence-card p {
  margin-bottom: 8px;
  color: var(--muted);
}

.detail-evidence-figure img {
  width: 100%;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.link-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.missing {
  color: #8a5a00;
  font-weight: 600;
}

.ai-section {
  background: #fff;
}

.ai-block {
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 28px);
}

.evidence-strip,
.process-gallery {
  display: grid;
  gap: 14px;
}

.evidence-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.evidence-strip img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.feature-image {
  margin: 0;
}

.feature-image img {
  max-height: 620px;
  object-fit: contain;
}

.process-gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
}

.process-gallery figure {
  margin: 0;
}

.process-gallery img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

.principles {
  padding: clamp(20px, 3vw, 28px);
}

.principles ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  font-weight: 700;
}

.summary-section {
  background: linear-gradient(180deg, #eef5fb, #f7fafc);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.summary-grid article {
  padding: 20px;
}

.evidence-table-wrap {
  overflow-x: auto;
  padding: 20px;
}

.evidence-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.evidence-table th,
.evidence-table td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.evidence-table th {
  color: #fff;
  background: var(--navy);
}

.evidence-table tr:nth-child(even) td {
  background: #f7fafc;
}

.status.ok {
  color: #fff;
  background: var(--green);
}

.status.warn {
  color: #583a00;
  background: #fff0c7;
}

.final-note {
  margin-top: 18px;
  padding: 20px;
  border-left: 6px solid var(--blue);
}

.final-note p {
  margin-bottom: 0;
  font-weight: 700;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 46px;
  height: 46px;
  padding: 0;
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 28px clamp(18px, 5vw, 76px);
  color: #fff;
  background: var(--ink);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #fff;
}

/* Section reveal */
.section-observe {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.section-observe.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .hero-section,
  .home-intro-section,
  .intro-layout,
  .ai-block.media-block {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: auto;
  }

  .hero-stat-card {
    position: static;
    margin-top: 12px;
  }

  .hero-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .hero-photo-card {
    grid-column: 1 / -1;
  }

  .identity-grid,
  .product-grid,
  .summary-grid,
  .process-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-heading {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
  }

  .brand small {
    display: none;
  }

  .nav-toggle {
    display: block;
    flex: 0 0 auto;
  }

  .main-nav {
    position: absolute;
    top: 76px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px;
  }

  .hero-section {
    min-height: auto;
  }

  .identity-grid,
  .hero-visual,
  .personal-gallery,
  .profile-list div,
  .product-grid,
  .detail-grid,
  .evidence-strip,
  .process-gallery,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .hero-badge-row,
  .filter-bar,
  .link-row,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .filter-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
