/* =====================================================================
   Hoang Tran-Huy — personal / executive profile
   macrostructure: portrait-led hero → metrics band → about → focus →
   quote → journey timeline → company → contact  ·  nav: refined top bar
   footer: minimal contact  ·  type: Space Grotesk (display) + Inter (body)
   color anchor: tech blue (#2563EB) + sky cyan (#0EA5E9), light surfaces
   signature: portrait on gradient + circuit grid, floating stat chips
   ===================================================================== */

:root {
  /* shadcn-style semantic tokens (HSL channels) */
  --background: 210 40% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --primary: 221 83% 53%;          /* tech blue */
  --primary-foreground: 0 0% 100%;
  --primary-700: 224 76% 45%;
  --accent: 199 89% 48%;           /* sky cyan */
  --accent-foreground: 222 47% 11%;
  --muted: 214 33% 96%;
  --muted-foreground: 215 16% 42%;
  --secondary: 214 40% 94%;
  --border: 214 32% 88%;
  --ring: 221 83% 53%;
  --ink-900: 224 64% 12%;

  --radius: 0.9rem;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;

  --maxw: 1140px;
  --shadow-sm: 0 1px 3px hsl(221 40% 20% / .07), 0 1px 2px hsl(221 40% 20% / .06);
  --shadow-md: 0 10px 30px -12px hsl(221 60% 30% / .22);
  --shadow-lg: 0 30px 60px -20px hsl(221 70% 30% / .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, .brand__name { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.12; margin: 0 0 .4rem; text-wrap: balance; }
h3 { font-size: 1.2rem; margin: 0 0 .35rem; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }

.skip-link {
  position: absolute; left: 12px; top: -50px; z-index: 200;
  background: hsl(var(--primary)); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid hsl(var(--ring) / .55); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--primary));
  margin: 0 0 .8rem;
}
.eyebrow--light { color: hsl(var(--accent)); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  padding: .82rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  will-change: transform;
}
.btn--primary {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
  color: #fff; box-shadow: 0 8px 20px -8px hsl(var(--primary) / .6);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -8px hsl(var(--primary) / .7); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost {
  background: transparent; border-color: hsl(var(--border));
  color: hsl(var(--foreground)); box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: hsl(var(--primary)); color: hsl(var(--primary)); transform: translateY(-2px); }
.btn--ghost-light { color: #fff; border-color: hsl(0 0% 100% / .4); box-shadow: none; }
.btn--ghost-light:hover { border-color: #fff; color: #fff; background: hsl(0 0% 100% / .08); }

/* ================= HEADER ================= */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .25s, box-shadow .25s, backdrop-filter .25s;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.header.scrolled {
  background: hsl(var(--background) / .82);
  backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 hsl(var(--border) / .9);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand__mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  box-shadow: 0 6px 14px -6px hsl(var(--primary) / .7);
}
.brand__name { font-size: 1.05rem; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { font-weight: 500; font-size: .96rem; color: hsl(var(--foreground) / .8); transition: color .18s; }
.nav a:hover { color: hsl(var(--primary)); }
.nav__cta { padding: .55rem 1.2rem; border-radius: 999px; color: #fff !important;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
  box-shadow: 0 8px 18px -8px hsl(var(--primary) / .6); font-family: var(--font-display); }
.nav__cta:hover { transform: translateY(-1px); }

.menu-toggle {
  display: none; flex-direction: column; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px;
  color: hsl(var(--foreground));
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .25s; }
.menu-toggle span + span { margin-top: 6px; }

/* ================= HERO ================= */
.hero { padding-top: 128px; padding-bottom: clamp(48px, 7vw, 90px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 82% 22%, hsl(var(--accent) / .16), transparent 70%),
    radial-gradient(50% 50% at 12% 8%, hsl(var(--primary) / .12), transparent 70%);
}
.hero__grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero__title { font-size: clamp(2.2rem, 5.2vw, 3.7rem); line-height: 1.04; margin: 0 0 1.1rem; text-wrap: balance; }
.hero__lead { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: hsl(var(--muted-foreground)); max-width: 34ch; margin: 0 0 1.8rem; }
.hero__lead strong { color: hsl(var(--foreground)); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.2rem; }
.hero__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 1.6rem; padding: 0; margin: 0;
  border-top: 1px solid hsl(var(--border)); padding-top: 1.4rem; }
.hero__meta li { font-size: .95rem; font-weight: 600; }
.hero__meta span { display: block; font-weight: 500; font-size: .78rem; letter-spacing: .04em;
  text-transform: uppercase; color: hsl(var(--muted-foreground)); margin-bottom: .15rem; }

/* portrait */
.hero__portrait { justify-self: center; }
.portrait {
  position: relative; width: min(410px, 86vw); aspect-ratio: 1134 / 1165;
}
.portrait__glow {
  position: absolute; inset: -8% -12% -2% -12%; z-index: 0; border-radius: 40% 40% 30% 30%;
  background: linear-gradient(160deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  filter: blur(2px);
  -webkit-mask: radial-gradient(closest-side, #000 78%, transparent);
          mask: radial-gradient(closest-side, #000 78%, transparent);
}
.portrait__grid {
  position: absolute; inset: -6% -10% 4% -10%; z-index: 1; border-radius: 30px;
  background:
    linear-gradient(160deg, hsl(var(--primary-700)), hsl(var(--primary)) 55%, hsl(var(--accent)));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.portrait__grid::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(hsl(0 0% 100% / .10) 1px, transparent 1px),
    linear-gradient(90deg, hsl(0 0% 100% / .10) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask: radial-gradient(120% 90% at 50% 20%, #000, transparent 78%);
          mask: radial-gradient(120% 90% at 50% 20%, #000, transparent 78%);
}
.portrait__grid::after {
  content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%;
  top: 16%; left: 14%; background: hsl(var(--accent));
  box-shadow: 0 0 0 4px hsl(var(--accent) / .3), 120px 60px 0 -2px hsl(0 0% 100% / .8),
    40px 320px 0 -3px hsl(var(--accent) / .8);
  animation: floaty 6s ease-in-out infinite;
}
.portrait img {
  position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain; object-position: bottom center;
  border-radius: 0 0 20px 20px;
  -webkit-mask-image: linear-gradient(to bottom, #000 96.5%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 96.5%, transparent 100%);
  opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease;
}
.portrait img.loaded { opacity: 1; transform: none; }
.chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: .5rem;
  background: hsl(var(--card)); color: hsl(var(--foreground));
  font-size: .82rem; font-weight: 600; padding: .55rem .85rem; border-radius: 999px;
  box-shadow: var(--shadow-md); border: 1px solid hsl(var(--border));
}
.chip--top { top: 6%; left: -7%; }
.chip--bottom { bottom: 10%; right: -7%; }
.chip--bottom strong { color: hsl(var(--primary)); }
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(142 71% 45%);
  box-shadow: 0 0 0 3px hsl(142 71% 45% / .25); }
@keyframes floaty { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .portrait__grid::after { animation: none; } }

/* ================= METRICS ================= */
.metrics { background: hsl(var(--ink-900)); color: #fff; padding: clamp(40px, 5vw, 60px) 0; }
.metrics__kicker { font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--accent)); margin: 0 0 1.6rem; text-align: center; }
.metrics__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.metric { text-align: center; position: relative; }
.metric + .metric::before { content: ""; position: absolute; left: -.75rem; top: 15%; bottom: 15%;
  width: 1px; background: hsl(0 0% 100% / .14); }
.metric__num { display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1;
  background: linear-gradient(120deg, #fff, hsl(var(--accent))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metric__label { display: block; margin-top: .5rem; font-size: .9rem; color: hsl(0 0% 100% / .72); }

/* ================= ABOUT ================= */
.about__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 64px); }
.about__body p { color: hsl(var(--muted-foreground)); font-size: 1.05rem; margin: 0 0 1.1rem; }
.about__body strong { color: hsl(var(--foreground)); }
.about__body em { color: hsl(var(--primary)); font-style: normal; font-weight: 600; }
.section__head--center { text-align: center; max-width: 42rem; margin-inline: auto; }

/* ================= FOCUS CARDS ================= */
.focus { background: linear-gradient(180deg, hsl(var(--muted) / .5), transparent); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 3rem; }
.card {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  padding: 2rem 1.7rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: hsl(var(--primary) / .4); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: linear-gradient(135deg, hsl(var(--primary) / .12), hsl(var(--accent) / .16));
  color: hsl(var(--primary));
}
.card__icon svg { width: 26px; height: 26px; }
.card p { color: hsl(var(--muted-foreground)); margin: 0; font-size: .98rem; }

/* ================= QUOTE ================= */
.quote-band { background: hsl(var(--ink-900)); color: #fff; padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.quote-band::before { content: "\201C"; position: absolute; top: -.1em; left: 4%; font-family: var(--font-display);
  font-size: 16rem; line-height: 1; color: hsl(var(--accent) / .16); }
.quote-band blockquote { margin: 0; max-width: 46rem; margin-inline: auto; text-align: center; position: relative; }
.quote-band p { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.3; margin: 0 0 1.2rem; text-wrap: balance; }
.quote-band cite { font-style: normal; color: hsl(var(--accent)); font-weight: 600; letter-spacing: .02em; }

/* ================= TIMELINE ================= */
.timeline { list-style: none; margin: 3rem 0 0; padding: 0; max-width: 46rem; }
.tl { position: relative; padding-left: 2.5rem; padding-bottom: 2.4rem; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: 7px; top: 1.4rem; bottom: -.4rem; width: 2px;
  background: linear-gradient(hsl(var(--primary)), hsl(var(--accent))); }
.tl:last-child::before { display: none; }
.tl__dot { position: absolute; left: 0; top: .35rem; width: 16px; height: 16px; border-radius: 50%;
  background: hsl(var(--card)); border: 3px solid hsl(var(--primary)); z-index: 1; }
.tl__time { display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  letter-spacing: .04em; color: hsl(var(--primary)); background: hsl(var(--primary) / .09);
  padding: .2rem .6rem; border-radius: 6px; margin-bottom: .5rem; }
.tl__org { color: hsl(var(--muted-foreground)); font-weight: 600; font-size: .95rem; margin: 0 0 .5rem; }
.tl__body > p:last-child { color: hsl(var(--muted-foreground)); margin: 0; }

/* ================= COMPANY ================= */
.company { background: linear-gradient(180deg, transparent, hsl(var(--muted) / .5)); }
.company__grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.company__lead { color: hsl(var(--muted-foreground)); font-size: 1.05rem; margin: 1rem 0 1.8rem; }
.company__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.company__list li { display: flex; align-items: center; gap: .7rem; font-weight: 500;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 12px;
  padding: .85rem 1.1rem; box-shadow: var(--shadow-sm); }
.company__list span { color: hsl(var(--accent)); font-size: .7rem; }

/* ================= CONTACT ================= */
.contact { background:
    radial-gradient(80% 120% at 20% 0%, hsl(var(--primary-700)), hsl(var(--primary)) 55%, hsl(var(--accent)));
  color: #fff; text-align: center; }
.contact__inner { max-width: 42rem; margin-inline: auto; }
.contact h2 { color: #fff; }
.contact__lead { color: hsl(0 0% 100% / .85); font-size: 1.1rem; margin: .6rem 0 2rem; }
.contact__actions { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; }
.contact .btn--primary { background: #fff; color: hsl(var(--primary-700)); box-shadow: var(--shadow-md); }
.contact .btn--primary:hover { background: #fff; }

/* ================= FOOTER ================= */
.footer { background: hsl(var(--ink-900)); color: hsl(0 0% 100% / .7); padding: 2.6rem 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; }
.footer__brand { display: flex; align-items: center; gap: .8rem; }
.footer__name { color: #fff; font-family: var(--font-display); font-weight: 600; margin: 0; }
.footer__role { margin: 0; font-size: .85rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-left: auto; }
.footer__links a { transition: color .18s; }
.footer__links a:hover { color: hsl(var(--accent)); }
.footer__copy { width: 100%; font-size: .82rem; color: hsl(0 0% 100% / .5);
  border-top: 1px solid hsl(0 0% 100% / .12); padding-top: 1.2rem; margin: .4rem 0 0; }

/* ================= FAB ================= */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: inline-flex; align-items: center; gap: .5rem; padding: .8rem;
  background: #0A66C2; color: #fff; border-radius: 999px; box-shadow: var(--shadow-lg);
  transition: transform .2s, padding .2s; overflow: hidden;
}
.fab svg { width: 24px; height: 24px; flex: none; }
.fab__label { max-width: 0; opacity: 0; white-space: nowrap; font-weight: 600; font-size: .92rem;
  transition: max-width .25s, opacity .2s, margin .25s; }
.fab:hover { transform: translateY(-2px); }
.fab:hover .fab__label { max-width: 90px; opacity: 1; margin-right: .3rem; }

/* ================= MODAL ================= */
.modal { position: fixed; inset: 0; z-index: 200; display: none; place-items: center;
  background: hsl(224 64% 12% / .55); backdrop-filter: blur(4px); padding: 20px; }
.modal.open { display: grid; animation: fade .2s ease; }
.modal__panel {
  background: hsl(var(--card)); border-radius: 20px; padding: 2.2rem; width: min(460px, 100%);
  box-shadow: var(--shadow-lg); position: relative; animation: pop .25s ease;
}
.modal__close { position: absolute; top: 14px; right: 16px; background: none; border: 0;
  font-size: 1.8rem; line-height: 1; color: hsl(var(--muted-foreground)); cursor: pointer; }
.modal__close:hover { color: hsl(var(--foreground)); }
.modal h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.modal__text { color: hsl(var(--muted-foreground)); margin: 0 0 1.4rem; font-size: .96rem; }
.modal__channels { display: grid; gap: .7rem; }
.modal__channel { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem;
  border: 1px solid hsl(var(--border)); border-radius: 12px; transition: border-color .18s, background .18s, transform .15s; }
.modal__channel:hover { border-color: hsl(var(--primary)); background: hsl(var(--primary) / .05); transform: translateX(2px); }
.modal__channel span:last-child { display: flex; flex-direction: column; font-size: .9rem; color: hsl(var(--muted-foreground)); min-width: 0; overflow-wrap: anywhere; }
.modal__channel strong { color: hsl(var(--foreground)); font-family: var(--font-display); }
.modal__ch-ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px;
  background: linear-gradient(135deg, hsl(var(--primary) / .12), hsl(var(--accent) / .16));
  color: hsl(var(--primary)); font-weight: 700; font-size: .95rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ================= REVEAL ================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .btn, .card, .fab, .modal__channel { transition: none !important; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { order: 2; }
  .hero__portrait { order: 1; }
  .hero__lead { max-width: none; margin-inline: auto; }
  .hero__actions, .hero__meta { justify-content: center; }
  .about__grid, .company__grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .menu-toggle { display: flex; }
  .nav {
    position: fixed; inset: 0 0 auto 0; top: 72px; flex-direction: column; gap: 0;
    background: hsl(var(--background)); padding: 1rem 24px 1.5rem;
    box-shadow: 0 20px 30px -20px hsl(221 60% 20% / .4);
    transform: translateY(calc(-100% - 80px)); transition: transform .3s ease; align-items: stretch;
  }
  body.menu-open .nav { transform: translateY(0); }
  .nav a { padding: .9rem 0; border-bottom: 1px solid hsl(var(--border)); font-size: 1.05rem; }
  .nav__cta { text-align: center; margin-top: .8rem; border-bottom: 0 !important; }
  body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}
@media (max-width: 560px) {
  .metrics__grid { grid-template-columns: 1fr 1fr; gap: 1.8rem 1rem; }
  .metric:nth-child(2)::before { display: none; }
  .cards { grid-template-columns: 1fr; }
  .footer__links { margin-left: 0; }
}

@media (max-width: 620px) {
  /* keep the blue portrait panel inset from the screen edges so the frame reads */
  .portrait { width: min(400px, 82vw); }
  .portrait__grid { left: 0; right: 0; }
  .portrait__glow { left: -3%; right: -3%; }
}
