/* ============================================================
   Haoda Le — personal site, apple.com inspired
   SF-style typography · dark hero · promo tiles · glass nav
   ============================================================ */

:root {
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --muted: #6e6e73;
  --faint: #86868b;
  --blue: #0071e3;
  --link: #06c;
  --link-dark: #2997ff;
  --line: #d2d2d7;
  --tile: #f5f5f7;
  --page: #fbfbfd;
  --black: #000;
  --radius: 18px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- shared type ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.eyebrow-dark { color: #a1a1a6; }

h1, h2 { letter-spacing: -0.03em; }

.gradient-text {
  background: linear-gradient(94deg, #0090ff 0%, #7d5cff 45%, #ff5e8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-light {
  background: linear-gradient(94deg, #0071e3 0%, #7d5cff 55%, #b04dff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-link {
  color: var(--link);
  font-size: 17px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.text-link span { font-size: 22px; font-weight: 400; transition: transform .25s ease; }
.text-link:hover span { transform: translateX(4px); }
.text-link:hover { text-decoration: underline; }

/* ---------- ribbon ---------- */
.ribbon {
  background: var(--tile);
  text-align: center;
  padding: 11px 16px;
}
.ribbon p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}
.ribbon span { color: var(--faint); margin: 0 6px; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - 1024px) / 2));
  background: rgba(251, 251, 253, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled {
  background: rgba(251, 251, 253, 0.85);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
.nav-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-size: 12px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--blue);
  color: #fff !important;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 980px;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.nav-cta:hover { background: #0077ed; transform: scale(1.03); }

/* ---------- hero ---------- */
.hero {
  background: var(--black);
  color: #f5f5f7;
  text-align: center;
  padding: 110px 24px 0;
  overflow: hidden;
  position: relative;
}
.hero-copy { position: relative; z-index: 3; max-width: 900px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(48px, 7.2vw, 92px);
  line-height: 1.02;
  font-weight: 700;
  margin: 22px 0 20px;
}
.lede {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.4;
  color: #a1a1a6;
  max-width: 560px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}
.cta-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 24px;
}
.cta-row .text-link { color: var(--link-dark); }

.hero-stage {
  position: relative;
  height: 420px;
  max-width: 900px;
  margin: 40px auto 0;
  perspective: 900px;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.75;
  animation: drift 14s ease-in-out infinite alternate;
}
.blob-a { width: 340px; height: 340px; background: #0a3cff; left: 8%; bottom: -60px; }
.blob-b { width: 280px; height: 280px; background: #7d2bff; right: 10%; bottom: -40px; animation-delay: -5s; }
.blob-c { width: 200px; height: 200px; background: #ff2e88; left: 44%; bottom: 40px; opacity: .5; animation-delay: -9s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(46px, -34px) scale(1.12); }
}

.glass-card {
  position: absolute;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) rotateX(54deg);
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 34px 52px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.03));
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255,255,255,.35);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: float 7s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes float {
  0%, 100% { margin-bottom: 0; }
  50%      { margin-bottom: 16px; }
}
.gc-label {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c7c9d1;
}
.gc-track { display: flex; align-items: center; gap: 8px; }
.gc-track i {
  display: block;
  width: 42px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #6ea8ff, transparent);
}
.gc-track:last-of-type i { background: linear-gradient(90deg, transparent, #b48cff); }
.gc-arrow { font-size: 20px; color: #fff; }
.glass-card strong {
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: linear-gradient(94deg, #7db4ff, #c49bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stage-floor {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  width: min(620px, 88%);
  height: 120px;
  background: radial-gradient(ellipse at center, rgba(80,120,255,.35) 0%, transparent 65%);
  filter: blur(10px);
}

/* ---------- statement ---------- */
.statement {
  text-align: center;
  padding: 150px 24px 140px;
  background: var(--page);
}
.statement h2 {
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.05;
  font-weight: 700;
  margin: 20px 0 24px;
}
.body-large {
  font-size: 21px;
  line-height: 1.42;
  color: var(--muted);
  max-width: 660px;
  margin: 0 auto;
  letter-spacing: -0.015em;
}
.stats {
  display: flex;
  justify-content: center;
  gap: clamp(30px, 7vw, 110px);
  margin-top: 70px;
}
.stat strong {
  display: block;
  font-size: clamp(38px, 4.6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #1d1d1f, #6e6e73);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  max-width: 150px;
}

/* ---------- experience: promos + roles ---------- */
.experience { padding: 0 12px 12px; }
.promos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.promo {
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 680px;
  transition: transform .4s cubic-bezier(.2,.6,.2,1), box-shadow .4s ease;
}
.promo:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .12);
}
.promo-dark { background: #000; color: #f5f5f7; }
.promo-dark:hover { box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
.promo-light { background: var(--tile); color: var(--ink); }
.promo-copy {
  text-align: center;
  padding: 74px 40px 20px;
  max-width: 480px;
  margin: 0 auto;
}
.promo-copy h2 {
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.06;
  font-weight: 700;
  margin: 16px 0 18px;
}
.promo-copy > p:not(.eyebrow) {
  font-size: 16px;
  line-height: 1.5;
  color: var(--faint);
  margin: 0 0 20px;
}
.promo-light .promo-copy > p:not(.eyebrow) { color: var(--muted); }
.promo-dark .text-link { color: var(--link-dark); }
.promo-visual {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 30px 30px 60px;
  min-height: 340px;
}

/* terminal visual */
.terminal {
  width: min(400px, 92%);
  background: rgba(20, 24, 40, 0.92);
  border: 1px solid #33427a;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(10, 40, 160, .45);
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: left;
}
.term-bar { display: flex; gap: 7px; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #4a587f; }
.term-bar i:first-child { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-body { padding: 20px 22px 26px; font-size: 12.5px; line-height: 2.05; }
.term-body p { margin: 0; }
.cmd { color: #9fb4e8; }
.prompt { color: #7d5cff; margin-right: 8px; }
.ok { color: #c9d6f7; }
.ok em { font-style: normal; color: #6b7ea8; margin: 0 4px; }
.check { color: #34d399; margin-right: 8px; }
.done { color: #8ea2d8; margin-top: 10px !important; animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .45; } }

/* orbit visual */
.orbit-scene {
  position: relative;
  width: 340px;
  height: 340px;
  display: grid;
  place-items: center;
}
.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1.5px solid #c3c9d6;
  border-radius: 50%;
}
.orbit-1 { width: 320px; height: 150px; transform: translate(-50%, -50%) rotate(-20deg); }
.orbit-2 { width: 230px; height: 300px; transform: translate(-50%, -50%) rotate(38deg); }
.orbit-core {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.05em;
  background: linear-gradient(145deg, #ffffff, #d9dee9);
  box-shadow: 18px 18px 34px #bcc2cf, -14px -14px 30px #ffffff;
  position: relative;
  z-index: 2;
}
.tag {
  position: absolute;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a93a6;
  background: rgba(255,255,255,.7);
  padding: 5px 10px;
  border-radius: 980px;
  border: 1px solid #dfe3ec;
}
.tag-1 { transform: translate(-118px, -66px); }
.tag-2 { transform: translate(104px, 74px); }
.tag-3 { transform: translate(24px, -138px); }

/* roles row */
.roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.role-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 30px 30px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
  transition: transform .35s cubic-bezier(.2,.6,.2,1), box-shadow .35s ease;
}
.role-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.09);
}
.role-years {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.role-card h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
  margin: 12px 0 8px;
}
.role-card p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.45; }

/* ---------- selected work ---------- */
.work {
  padding: 130px max(24px, calc((100vw - 1024px) / 2)) 120px;
  background: var(--page);
}
.work h2 {
  font-size: clamp(36px, 4.8vw, 60px);
  line-height: 1.06;
  font-weight: 700;
  margin: 20px 0 54px;
}
.work-list { border-top: 1px solid var(--line); }
.work-list article {
  padding: 30px 4px 32px;
  border-bottom: 1px solid var(--line);
  transition: background .25s ease, padding-left .25s ease;
}
.work-list article:hover { background: #fff; padding-left: 20px; }
.work-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 10px;
}
.work-head h3 { font-size: 20px; letter-spacing: -0.02em; margin: 0; }
.work-head span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--faint);
  white-space: nowrap;
}
.work-list article > p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  max-width: 880px;
}

/* ---------- expertise ---------- */
.expertise {
  text-align: center;
  padding: 140px max(24px, calc((100vw - 1024px) / 2)) 130px;
  background: #fff;
}
.expertise h2 {
  font-size: clamp(36px, 4.8vw, 60px);
  line-height: 1.06;
  font-weight: 700;
  margin: 20px 0 64px;
}
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  text-align: left;
}
.cap-card {
  background: var(--tile);
  border-radius: var(--radius);
  padding: 34px 30px 40px;
  transition: transform .35s cubic-bezier(.2,.6,.2,1), box-shadow .35s ease;
}
.cap-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .1);
}
.cap-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #fff;
  background: linear-gradient(135deg, #2997ff, #7d5cff);
  box-shadow: 0 10px 24px rgba(41, 151, 255, .35);
  margin-bottom: 22px;
}
.cap-card h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.cap-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}
.cap-ai {
  background: linear-gradient(140deg, #0a1830 0%, #141b33 60%, #1c1440 100%);
  color: #f5f5f7;
}
.cap-ai:hover { box-shadow: 0 24px 55px rgba(20, 40, 120, 0.35); }
.cap-ai h3 { color: #fff; }
.cap-ai h3 em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fb8ff;
  vertical-align: 2px;
}
.cap-ai p { color: #a7adbd; }

/* ---------- education ---------- */
.education {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  padding: 130px max(24px, calc((100vw - 1024px) / 2));
  background: var(--page);
  align-items: start;
}
.edu-head { position: sticky; top: 110px; }
.edu-head h2 {
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.06;
  font-weight: 700;
  margin: 20px 0 0;
}
.edu-list { border-top: 1px solid var(--line); }
.edu-list article {
  padding: 30px 4px 34px;
  border-bottom: 1px solid var(--line);
  transition: background .25s ease, padding-left .25s ease;
}
.edu-list article:hover { background: #fff; padding-left: 18px; }
.edu-years { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--faint); }
.edu-list h3 { font-size: 21px; letter-spacing: -0.02em; margin: 12px 0 8px; }
.edu-list p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.5; }

/* ---------- contact ---------- */
.contact {
  background: #000;
  color: #f5f5f7;
  text-align: center;
  padding: 150px 24px 140px;
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -140px;
  transform: translateX(-50%);
  width: 700px;
  height: 340px;
  background: radial-gradient(ellipse, rgba(60, 110, 255, .28) 0%, transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}
.contact h2 {
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.05;
  font-weight: 700;
  margin: 20px 0 36px;
  position: relative;
}
.pill-button {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  padding: 14px 34px;
  border-radius: 980px;
  text-decoration: none;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
  position: relative;
}
.pill-button:hover {
  background: #0077ed;
  transform: scale(1.05);
  box-shadow: 0 14px 40px rgba(0, 113, 227, .45);
}
.contact-alt { margin: 26px 0 0; position: relative; }
.contact-alt a { color: var(--link-dark); font-size: 15px; text-decoration: none; }
.contact-alt a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.footer {
  background: var(--tile);
  color: var(--muted);
  font-size: 12px;
}
.footer-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 26px 22px 30px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.footer-brand { font-weight: 700; color: var(--ink); letter-spacing: -0.01em; font-size: 13px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  color: var(--faint);
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .glass-card, .done { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .promos { grid-template-columns: 1fr; }
  .promo { min-height: 0; }
  .roles { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr; }
  .education { grid-template-columns: 1fr; gap: 40px; }
  .edu-head { position: static; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding-top: 80px; }
  .hero-stage { height: 360px; }
  .glass-card { padding: 24px 30px; gap: 12px; bottom: 90px; transform: translateX(-50%) rotateX(54deg) scale(.82); }
  .gc-track i { width: 26px; }
  .statement { padding: 100px 24px 90px; }
  .body-large { font-size: 18px; }
  .stats { flex-direction: column; gap: 30px; align-items: center; }
  .stat span { max-width: none; }
  .expertise { padding: 90px 24px; }
  .work { padding: 90px 24px; }
  .work-head { flex-direction: column; gap: 6px; align-items: flex-start; }
  .education { padding: 90px 24px; }
  .contact { padding: 100px 24px 90px; }
  .cta-row { flex-direction: column; gap: 14px; align-items: center; }
  .footer-top, .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}
