/* ===========================================================================
   Quang Le — Portfolio
   Dark technical theme. Self-contained, no build step (GitHub Pages ready).
   =========================================================================== */

:root {
  --bg:        #0a0d12;
  --bg-2:      #10151d;
  --bg-3:      #161c26;
  --border:    #222b38;
  --border-2:  #303c4e;
  --text:      #e7edf5;
  --muted:     #93a1b3;
  --faint:     #6b7a8d;
  --accent:    #f16e00;   /* primary — hipages orange */
  --accent-2:  #ff9a4d;   /* metrics — light orange */
  --accent-3:  #ffc24d;   /* awards — warm gold */
  --glow:      rgba(241, 110, 0, 0.16);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1080px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* subtle top glow */
  background-image:
    radial-gradient(900px 500px at 50% -180px, var(--glow), transparent 70%);
  background-repeat: no-repeat;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- skip link ---- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #06121f; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ============================ NAV ============================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10, 13, 18, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.brand {
  font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
  color: var(--text); display: inline-flex; align-items: center; gap: 9px;
}
.brand:hover { text-decoration: none; }
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--muted); font-size: 14px; padding: 8px 12px; border-radius: 8px;
  font-weight: 500; transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-3); text-decoration: none; }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--border-2) !important;
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--accent) !important; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border-2);
  color: var(--text); width: 40px; height: 38px; border-radius: 9px;
  cursor: pointer; font-size: 18px;
}

/* ============================ HERO ============================ */
.hero { padding: 84px 0 64px; }
.eyebrow {
  font-family: var(--mono); font-size: 13px; color: var(--accent-2);
  letter-spacing: 0.02em; margin: 0 0 20px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--accent-2); opacity: .6;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 68px); line-height: 1.03; margin: 0 0 18px;
  letter-spacing: -0.03em; font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: clamp(18px, 2.4vw, 23px); color: var(--text); font-weight: 600;
  margin: 0 0 20px; letter-spacing: -0.01em;
}
.hero-sub .sep { color: var(--faint); margin: 0 10px; font-weight: 400; }
.hero-blurb {
  font-size: 17px; color: var(--muted); max-width: 720px; margin: 0 0 30px;
}
.hero-blurb strong { color: var(--text); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 52px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border-2); color: var(--text);
  transition: transform .12s, border-color .15s, background .15s;
}
.btn:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.btn-primary {
  background: var(--accent); color: #06121f; border-color: var(--accent);
}
.btn-primary:hover { background: #ff8a2f; }
.btn svg { width: 16px; height: 16px; }

/* stat row */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--bg-2); padding: 22px 20px; }
.stat .num {
  font-family: var(--mono); font-size: clamp(26px, 4vw, 34px); font-weight: 700;
  color: var(--accent-2); letter-spacing: -0.02em; line-height: 1;
}
.stat .label { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ============================ SECTION ============================ */
section { padding: 70px 0; }
.section-head { margin-bottom: 40px; }
.section-head .kicker {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 38px); margin: 0; letter-spacing: -0.02em; font-weight: 800;
}
.section-head p { color: var(--muted); margin: 12px 0 0; max-width: 640px; font-size: 16px; }

.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ============================ WORK ============================ */
.work-grid { display: grid; gap: 20px; }
.project {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.project::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--accent), var(--accent-2)); opacity: 0;
  transition: opacity .2s;
}
.project:hover {
  border-color: var(--border-2); transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(0,0,0,0.8);
}
.project:hover::before { opacity: 1; }

.project-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 8px;
}
.project .pidx { font-family: var(--mono); font-size: 13px; color: var(--faint); }
.project h3 { font-size: 22px; margin: 6px 0 4px; letter-spacing: -0.015em; }
.project .role {
  font-family: var(--mono); font-size: 11px; font-weight: 600; white-space: nowrap;
  color: var(--accent-2); border: 1px solid var(--border-2); border-radius: 999px;
  padding: 5px 11px; background: var(--bg-3);
}
.project .role.owner { color: var(--accent-3); }
.project .lead { color: var(--muted); margin: 0 0 18px; font-size: 15.5px; }
.project ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 9px; }
.project li { position: relative; padding-left: 24px; color: var(--text); font-size: 15px; }
.project li::before {
  content: "▹"; position: absolute; left: 2px; top: 0; color: var(--accent);
}
.project li b { color: var(--accent-2); font-weight: 700; }
/* result callout — team/experiment outcomes */
.result {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: baseline;
  background: linear-gradient(180deg, rgba(241,110,0,.08), rgba(241,110,0,.03));
  border: 1px solid rgba(241,110,0,.28); border-radius: 10px;
  padding: 14px 18px; margin: 0 0 20px;
}
.result .rlabel {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-2); width: 100%; margin-bottom: 2px;
}
.result .metric { display: flex; flex-direction: column; }
.result .metric .v {
  font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--accent); line-height: 1.1;
}
.result .metric .k { font-size: 12px; color: var(--muted); margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 7px; padding: 4px 9px;
  background: var(--bg-3);
}

/* ============================ SKILLS ============================ */
.skill-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
}
.skill-card h4 {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 16px;
}
.skill-card .chips .chip { color: var(--text); font-size: 12.5px; padding: 6px 11px; }

/* ============================ TIMELINE ============================ */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px;
  background: var(--border);
}
.tl-item { position: relative; padding-bottom: 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -27px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
}
.tl-item.current::before { background: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.tl-head h3 { font-size: 19px; margin: 0; letter-spacing: -0.01em; }
.tl-head .co { color: var(--accent); font-weight: 600; }
.tl-when { font-family: var(--mono); font-size: 12.5px; color: var(--faint); margin-left: auto; }
.tl-role { color: var(--muted); font-size: 14px; margin: 0 0 12px; font-weight: 500; }
.tl-item ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 6px; }
.tl-item li { font-size: 14.5px; }
.tl-item li b { color: var(--accent-2); font-weight: 600; }

/* ============================ RECOGNITION ============================ */
.rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rec-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
}
.rec-card .ico { font-size: 22px; margin-bottom: 12px; }
.rec-card h4 { margin: 0 0 8px; font-size: 16px; }
.rec-card p { margin: 0; color: var(--muted); font-size: 14px; }
.rec-card .accent { color: var(--accent-3); font-weight: 600; }
.rec-card ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.rec-card li { margin-bottom: 5px; }

/* ============================ FOOTER ============================ */
footer {
  border-top: 1px solid var(--border); padding: 48px 0 60px; margin-top: 30px;
  text-align: center;
}
footer h3 { font-size: 26px; margin: 0 0 10px; letter-spacing: -0.02em; }
footer p { color: var(--muted); margin: 0 0 24px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-bottom: 30px; }
.foot-links a { color: var(--muted); font-size: 14px; }
.foot-links a:hover { color: var(--accent); }
.foot-note { font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* ============================ REVEAL ANIM ============================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 860px) {
  .skill-groups { grid-template-columns: 1fr; }
  .rec-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 12px 16px;
  }
  .nav-toggle { display: block; }
  .hero { padding: 56px 0 44px; }
  .project { padding: 22px; }
  .tl-when { margin-left: 0; width: 100%; }
}

/* ---------- Now (weekly bot) ---------- */
.week-log { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.week-log li { color: var(--muted); font-size: 14px; }
.week-log time { font-family: var(--mono); color: var(--faint); margin-right: 10px; }
