/* ============================================================================
   davidnguyen.sg — Executive Premium
   Deep navy + warm ivory + restrained gold · Fraunces (display) / Be Vietnam Pro
   ========================================================================== */

:root {
  --bg: #F7F4EC;            /* main ivory */
  --bg-2: #F1ECE0;          /* alt band (ventures) */
  --surface: #FFFFFF;       /* cards, logo chips */
  --navy: #14213B;          /* hero, quote */
  --navy-deep: #0E1830;     /* contact / footer */
  --navy-soft: #223250;     /* borders / hover on dark */

  --ink: #182238;           /* headings on light */
  --body: #4A4E57;          /* body text on light */
  --muted: #6C6E77;         /* muted labels on light */

  --gold: #B08D4C;          /* accent */
  --gold-bright: #CBA75F;   /* gold text on navy / hover */
  --gold-deep: #86662A;     /* gold-family text on light (AA) */

  --line: #E4DECF;          /* hairline on light */
  --line-2: #D7D0BE;        /* stronger hairline on light */
  --on-navy: #ECE8DD;       /* text on navy */
  --on-navy-2: #A9AFBD;     /* muted text on navy */
  --on-navy-line: rgba(236, 232, 221, 0.16);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --wrap: 1180px;
  --pad-x: clamp(20px, 5vw, 56px);
  --sec-y: clamp(64px, 9vw, 118px);
  --r-card: 5px;
  --r-btn: 5px;
  --r-chip: 11px;
  --ease: cubic-bezier(0.22, 0.65, 0.25, 1);
  --sh-card: 0 1px 2px rgba(20, 33, 59, 0.05);
  --sh-hover: 0 22px 44px -20px rgba(20, 33, 59, 0.28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p { text-wrap: pretty; margin: 0; }
h1, h2, h3, h4, blockquote { text-wrap: balance; margin: 0; }
strong { font-weight: 600; color: var(--ink); }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--gold); color: #1a1508; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad-x); }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  transform: translateY(-160%);
  background: var(--navy); color: var(--on-navy);
  padding: 10px 16px; font-size: 13px; font-weight: 600; border-radius: var(--r-btn);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: 0.01em;
  padding: 14px 26px; border-radius: var(--r-btn); border: 1px solid transparent;
  cursor: pointer; line-height: 1; white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
  touch-action: manipulation;
}
.btn-sm { padding: 10px 17px; font-size: 13px; }
.btn-gold { background: var(--gold); color: #1c1608; }
.btn-gold:hover { background: var(--gold-bright); color: #1c1608; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--on-navy-line); color: var(--on-navy); }
.btn-ghost:hover { border-color: var(--gold-bright); color: #fff; }
.btn-navy { background: var(--navy); color: var(--on-navy); }
.btn-navy:hover { background: var(--navy-soft); color: #fff; transform: translateY(-1px); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 66px; }
.brand { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--on-navy); letter-spacing: -0.01em; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.site-nav > a:not(.btn) {
  font-size: 14px; font-weight: 500; color: var(--on-navy);
  padding: 8px 2px; transition: color 0.2s;
}
.site-nav > a:not(.btn):hover { color: var(--gold-bright); }
.site-header.scrolled { background: rgba(247, 244, 236, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(20, 33, 59, 0.5); }
.site-header.scrolled .brand { color: var(--ink); }
.site-header.scrolled .site-nav > a:not(.btn) { color: var(--body); }
.site-header.scrolled .site-nav > a:not(.btn):hover { color: var(--ink); }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; color: var(--on-navy); overflow: hidden;
  background: radial-gradient(130% 110% at 82% 0%, #1E2E4D 0%, #16233D 42%, #101A31 100%);
  padding: clamp(122px, 17vh, 188px) 0 clamp(52px, 7vw, 80px);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-name {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(46px, 7.5vw, 92px); line-height: 0.98; letter-spacing: -0.015em;
  color: #fff; margin: 6px 0 0;
}
.hero-vn {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(19px, 2.3vw, 27px); color: var(--gold-bright); margin: 14px 0 0;
}
.hero-lede {
  font-size: clamp(16px, 1.35vw, 19px); line-height: 1.62; color: var(--on-navy-2);
  max-width: 54ch; margin: clamp(20px, 2.4vw, 28px) 0 0;
}
.hero-roles { list-style: none; margin: clamp(24px, 3vw, 32px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 34px; }
.hero-roles li { padding-left: 15px; border-left: 2px solid rgba(203, 167, 95, 0.65); }
.role-k { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 3px; }
.role-v { display: block; font-size: 14.5px; color: var(--on-navy); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(28px, 3.5vw, 38px); }

.hero-portrait { margin: 0; }
.portrait-frame { position: relative; max-width: 400px; margin-left: auto; }
.portrait-frame img {
  position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  border: 1px solid rgba(203, 167, 95, 0.35);
  box-shadow: 0 44px 80px -28px rgba(0, 0, 0, 0.6);
}
.portrait-frame::after {
  content: ""; position: absolute; z-index: 0;
  top: 20px; left: 20px; right: -20px; bottom: -20px;
  border: 1px solid rgba(203, 167, 95, 0.4);
}

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(22px, 3vw, 52px);
  margin-top: clamp(46px, 6vw, 74px); padding-top: 38px; border-top: 1px solid var(--on-navy-line);
}
.stat::before { content: ""; display: block; width: 26px; height: 2px; background: var(--gold); margin-bottom: 20px; }
.stat-n { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 4.7vw, 58px); line-height: 0.92; letter-spacing: -0.015em; color: var(--gold-bright); }
.stat-plus { color: var(--gold); }
.stat-l { display: block; margin-top: 15px; font-size: 12.5px; line-height: 1.4; letter-spacing: 0.02em; color: var(--on-navy-2); }

/* --------------------------------------------------------------- sections */
.section { padding: var(--sec-y) 0; scroll-margin-top: 70px; }
.profile { background: var(--bg); }
.ventures { background: var(--bg-2); }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-deep); margin: 0; }
.eyebrow-gold { color: var(--gold-bright); }
.sec-head { max-width: 760px; margin-bottom: clamp(36px, 4.5vw, 60px); }
.sec-title { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.05; letter-spacing: -0.015em; color: var(--ink); margin: 0; }
.sec-intro { font-size: clamp(15.5px, 1.3vw, 17.5px); line-height: 1.65; color: var(--body); margin: 20px 0 0; max-width: 66ch; }
/* refined gold rule replaces the per-section word-eyebrows */
.sec-title::before, .contact-title::before { content: ""; display: block; width: 46px; height: 3px; background: var(--gold); margin-bottom: clamp(18px, 2vw, 26px); }

/* --------------------------------------------------------------- profile */
.profile-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.profile-lede { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.5vw, 31px); line-height: 1.28; letter-spacing: -0.01em; color: var(--ink); }
.profile-body { font-size: 16.5px; line-height: 1.75; color: var(--body); }
.profile-body p + p { margin-top: 18px; }

.profile-panels { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); margin-top: clamp(48px, 6vw, 84px); }
.block-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 22px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative; padding: 0 0 22px 26px; border-left: 1px solid var(--line-2);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 5px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--gold);
}
.tl-when { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold-deep); }
.tl-what { display: block; font-size: 15.5px; color: var(--ink); margin-top: 3px; }

.creds { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(20px, 3vw, 36px); }
.cred { padding: 15px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.cred:nth-child(-n+2) { border-top: 1px solid var(--line-2); }
.cred-k { font-size: 10.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 6px; }
.cred-t { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.cred-s { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

/* -------------------------------------------------------------- ventures */
.sector { margin-top: clamp(40px, 6vw, 68px); }
.sector:first-child { margin-top: 0; }
.sector-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--line-2); }
.sector-name { font-family: var(--serif); font-weight: 500; font-size: clamp(20px, 2.3vw, 27px); color: var(--ink); display: flex; align-items: center; gap: 12px; }
.sector-name::before { content: ""; width: 8px; height: 8px; background: var(--gold); flex: 0 0 auto; }
.sector-count { font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); white-space: nowrap; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 18px; }
.card {
  text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 24px; min-height: 208px; display: flex; flex-direction: column; cursor: pointer;
  font-family: var(--sans); color: inherit; box-shadow: var(--sh-card);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
  touch-action: manipulation;
}
@media (hover: hover) { .card:hover { border-color: rgba(176, 141, 76, 0.55); box-shadow: var(--sh-hover); transform: translateY(-3px); } }
.card:active { box-shadow: var(--sh-hover); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.card-logo { width: 46px; height: 46px; flex: 0 0 auto; border-radius: var(--r-chip); background: #fff; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-logo img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.card-logo.is-mono { background: var(--navy); border-color: var(--navy); }
.card-logo.is-mono span { font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--gold-bright); }
.card-badge { font-size: 10px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--gold-deep); background: rgba(176, 141, 76, 0.1); border: 1px solid rgba(176, 141, 76, 0.3); border-radius: 100px; padding: 5px 11px; white-space: nowrap; }
.card-name { font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.14; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 8px; }
.card-line { font-size: 14.5px; line-height: 1.55; color: var(--body); flex: 1 1 auto; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.card-domain { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-view { font-size: 12.5px; font-weight: 600; color: var(--gold-deep); flex: 0 0 auto; }

/* ----------------------------------------------------------------- quote */
.quote-band { background: var(--navy); color: var(--on-navy); padding: clamp(72px, 10vw, 132px) 0; }
.quote-band .wrap { max-width: 940px; text-align: center; }
.q-mark { font-family: var(--serif); font-size: 80px; line-height: 0.3; color: var(--gold); margin: 0 0 22px; }
.quote { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(23px, 3.3vw, 40px); line-height: 1.32; letter-spacing: -0.01em; color: #fff; }
.q-attr { margin-top: 30px; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-bright); }

/* ------------------------------------------------------------------- faq */
.faq { background: var(--bg); }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 4vw, 52px) clamp(40px, 6vw, 84px); }
.faq-q { font-family: var(--serif); font-weight: 500; font-size: clamp(19px, 2vw, 24px); line-height: 1.22; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 12px; }
.faq-a { font-size: 15.5px; line-height: 1.7; color: var(--body); margin: 0; }
.faq-a a { color: var(--gold-deep); font-weight: 600; border-bottom: 1px solid rgba(134, 102, 42, 0.35); }
.faq-a a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* --------------------------------------------------------------- contact */
.contact { background: var(--navy-deep); color: var(--on-navy); }
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(36px, 6vw, 88px); }
.contact-title { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -0.02em; color: #fff; margin: 0 0 22px; max-width: 12ch; }
.contact-copy { font-size: 17px; line-height: 1.62; color: var(--on-navy-2); max-width: 42ch; margin: 0 0 32px; }
.contact-info { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(20px, 3vw, 32px); align-content: start; }
.info { padding: 16px 0; border-top: 1px solid var(--on-navy-line); display: flex; flex-direction: column; gap: 6px; }
.info-k { font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-navy-2); }
.info a, .info span:not(.info-k) { font-size: 14.5px; color: var(--on-navy); word-break: break-word; }
.info a { transition: color 0.2s; }
.info a:hover { color: var(--gold-bright); }

.footer { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; justify-content: space-between; margin-top: clamp(52px, 7vw, 90px); padding-top: 24px; border-top: 1px solid var(--on-navy-line); }
.footer-brand { font-family: var(--serif); font-size: 17px; color: var(--on-navy); }
.footer-brand em { color: var(--on-navy-2); }
.footer-meta { font-size: 12.5px; color: var(--on-navy-2); letter-spacing: 0.02em; }

/* ----------------------------------------------------------------- modal */
.modal {
  padding: 0; border: none; border-radius: 8px; background: var(--bg); color: var(--body);
  max-width: 600px; width: calc(100% - clamp(28px, 8vw, 80px)); max-height: 88vh;
  box-shadow: 0 44px 100px -24px rgba(14, 24, 48, 0.55);
}
.modal::backdrop { background: rgba(14, 24, 48, 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal[open] { animation: pop 0.34s var(--ease) both; }
.modal[open]::backdrop { animation: fade 0.28s ease both; }
.modal-inner { padding: clamp(28px, 4vw, 46px); position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s, border-color 0.2s; touch-action: manipulation; }
.modal-close:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.modal-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding-right: 44px; }
.modal-logo { width: 58px; height: 58px; flex: 0 0 auto; border-radius: 13px; background: #fff; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.modal-logo img { width: 100%; height: 100%; object-fit: contain; padding: 9px; }
.modal-logo.is-mono { background: var(--navy); border-color: var(--navy); }
.modal-logo.is-mono span { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--gold-bright); }
.modal-lockup { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.modal-sector { font-size: 11px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }
.modal-role { font-size: 13px; font-weight: 600; color: var(--gold-deep); }
.modal-name { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 4vw, 40px); line-height: 1.06; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 8px; }
.modal-domain { font-size: 13px; font-weight: 600; color: var(--gold-deep); border-bottom: 1px solid currentColor; padding-bottom: 1px; display: inline-block; }
.modal-desc { font-size: 15.5px; line-height: 1.72; color: var(--body); margin: 20px 0 0; }
.modal-note { font-size: 12.5px; font-style: italic; color: var(--gold-deep); margin: 14px 0 0; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.modal-status { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- motion */
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.99); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.hero-text .reveal { transition-delay: calc(var(--i, 0) * 0.07s); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-portrait { order: -1; }
  .portrait-frame { max-width: 340px; margin: 0 auto; }
  .portrait-frame::after { right: -14px; bottom: -14px; top: 14px; left: 14px; }
  .profile-grid { grid-template-columns: 1fr; gap: 24px; }
  .profile-panels { grid-template-columns: 1fr; gap: 40px; }
  .faq-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .site-nav > a:not(.btn) { display: none; }        /* keep brand + CTA on phones */
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 30px clamp(20px, 5vw, 32px); }
  .creds { grid-template-columns: 1fr; }
  .cred:nth-child(2) { border-top: 1px solid var(--line); }
  .contact-info { grid-template-columns: 1fr; }
}
