/* ===== my-bio / style.css — chỉ dùng var(--...) từ design-tokens.css ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:root {
  --radius-card: 24px;
  --radius-child: 18px;
  --radius-row: 14px;
  --font: "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --nav-h: 68px;
  --brand-glow-1: #7c5cff;
  --brand-glow-2: #22d3ee;
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}
/* nền gradient nhẹ, vẫn giữ đen chủ đạo */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 320px at 12% -4%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(560px 300px at 88% 6%, rgba(34,211,238,.14), transparent 60%),
    var(--bg-primary);
}
[data-theme="light"] body::before {
  background:
    radial-gradient(600px 320px at 12% -4%, rgba(124,92,255,.14), transparent 60%),
    radial-gradient(560px 300px at 88% 6%, rgba(34,211,238,.12), transparent 60%),
    var(--bg-primary);
}
.container { width: min(1120px, 92%); margin: 0 auto; }
.mono { font-family: var(--mono); }
.small { font-size: .92rem; color: var(--text-secondary); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: var(--widget-bg);
  border-bottom: 1px solid var(--widget-border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text-primary); font-weight: 800; font-size: 1.15rem; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand-glow-1), var(--brand-glow-2));
  position: relative;
}
.brand-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.brand-accent { color: var(--text-secondary); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { display: flex; gap: .6rem; align-items: center; }

.circle-btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--widget-border);
  background: var(--bg-interactive); color: var(--text-primary);
  cursor: pointer; font-size: 1.15rem;
  display: grid; place-items: center;
  transition: transform .2s ease, background .2s ease;
}
.circle-btn:hover { transform: translateY(-2px); background: var(--bg-hover-translucent); }
.menu-btn { display: none; }
#themeToggle .icon-sun { display: none; }
[data-theme="light"] #themeToggle .icon-sun { display: inline; }
[data-theme="light"] #themeToggle .icon-moon { display: none; }

/* ---------- Buttons / cards ---------- */
.btn {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 999px;
  text-decoration: none; font-weight: 700; border: 1px solid var(--widget-border);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--brand-glow-1), var(--brand-glow-2)); color: #fff; border: none; box-shadow: 0 8px 28px rgba(124,92,255,.35); }
.btn-ghost { color: var(--text-primary); background: var(--bg-interactive); }
.btn-small { padding: .5rem 1rem; font-size: .9rem; }
.btn-block { display: block; text-align: center; width: 100%; }
.glass {
  background: var(--widget-bg);
  border: 1px solid var(--widget-border);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-card);
}
.card { padding: 1.6rem; }
.card h3 { margin: .2rem 0 .7rem; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 4.5rem 0 3rem; }
.hero-glow {
  position: absolute; inset: -40px 0 0; z-index: -1; filter: blur(60px); opacity: .5;
  background: radial-gradient(400px 200px at 30% 20%, rgba(124,92,255,.35), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid var(--widget-border); background: var(--bg-interactive);
  padding: .4rem .9rem; border-radius: 999px; font-size: .88rem; color: var(--text-secondary);
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.12; margin: 1rem 0; }
.gradient-text { background: linear-gradient(90deg, var(--brand-glow-1), var(--brand-glow-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.typed { color: var(--text-secondary); font-size: .62em; font-weight: 600; }
.caret { animation: blink 1s steps(1) infinite; color: var(--brand-glow-2); }
@keyframes blink { 50% { opacity: 0; } }
.lede { color: var(--text-secondary); font-size: 1.08rem; max-width: 34rem; }
.hero-cta { display: flex; gap: .8rem; margin: 1.4rem 0; flex-wrap: wrap; }
.hero-meta { display: flex; gap: .6rem; flex-wrap: wrap; }
.meta-chip { border: 1px solid var(--widget-border); background: var(--bg-interactive); padding: .4rem .8rem; border-radius: 999px; font-size: .85rem; color: var(--text-secondary); text-decoration: none; }

/* profile card */
.profile-card { text-align: center; padding: 2rem 1.6rem; }
.avatar {
  width: 96px; height: 96px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #111, var(--bg-secondary));
  border: 2px solid var(--widget-border); position: relative;
}
.avatar-dot { position: absolute; top: 6px; right: 6px; width: 14px; height: 14px; border-radius: 50%; background: #22c55e; border: 3px solid var(--bg-primary); }
.profile-card .role { color: var(--text-secondary); margin: .2rem 0 1rem; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1rem 0; }
.profile-stats div { background: var(--bg-hover-translucent); border-radius: var(--radius-row); padding: .7rem .3rem; }
.profile-stats strong { display: block; font-size: 1.2rem; }
.profile-stats span { font-size: .78rem; color: var(--text-secondary); }
.profile-tags { display: flex; gap: .45rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.profile-tags span, .tags span {
  font-size: .8rem; padding: .28rem .7rem; border-radius: 999px;
  background: var(--bg-interactive); border: 1px solid var(--widget-border); color: var(--text-secondary);
}
.scroll-hint { display: block; text-align: center; margin-top: 2.5rem; color: var(--text-secondary); text-decoration: none; font-size: 1.4rem; animation: float 1.8s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(6px); } }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; scroll-margin-top: calc(var(--nav-h) + 12px); }
.section-eyebrow { color: var(--brand-glow-2); font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: .3rem 0 .6rem; line-height: 1.2; }
.section-sub { color: var(--text-secondary); margin-top: 0; }
.section-sub code { font-family: var(--mono); background: var(--bg-interactive); padding: .1rem .4rem; border-radius: 6px; }

.about-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 1.2rem; }
.tick-list { padding-left: 1.1rem; color: var(--text-secondary); }
.tick-list li { margin: .35rem 0; }
.tick-list li::marker { content: "✓ "; color: #22c55e; }
.about-side { display: grid; gap: 1.2rem; align-content: start; }
.timeline div { display: grid; gap: .1rem; padding: .6rem 0; border-top: 1px dashed var(--widget-border); }
.timeline span { font-family: var(--mono); font-size: .8rem; color: var(--text-secondary); }

.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 1.4rem; }
.skill-head { display: flex; align-items: center; gap: .6rem; }
.skill-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--bg-interactive); border: 1px solid var(--widget-border); }
.skill-head h3 { flex: 1; margin: 0; font-size: 1.05rem; }
.level { font-family: var(--mono); font-size: .85rem; color: var(--text-secondary); }
.bar { height: 8px; border-radius: 999px; background: var(--bg-interactive); margin: .8rem 0; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--brand-glow-1), var(--brand-glow-2)); transition: width 1s ease; }
.skill { transition: transform .2s ease; }
.skill:hover { transform: translateY(-4px); }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 1.4rem; }
.project { display: flex; flex-direction: column; gap: .5rem; transition: transform .2s ease, box-shadow .2s ease; }
.project:hover { transform: translateY(-5px); box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.project-top { display: flex; align-items: center; justify-content: space-between; }
.project-emoji { font-size: 1.8rem; }
.badge { font-size: .75rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; background: linear-gradient(135deg, var(--brand-glow-1), var(--brand-glow-2)); color: #fff; }
.badge-dim { background: var(--bg-interactive); color: var(--text-secondary); border: 1px solid var(--widget-border); }
.project p { color: var(--text-secondary); flex: 1; }
.project-links { display: flex; gap: 1rem; }
.project-links a { color: var(--text-primary); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--accent-color); }
.tags { display: flex; gap: .45rem; flex-wrap: wrap; }

.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.2rem; margin-top: 1.2rem; }
.contact-side { display: grid; gap: 1.2rem; align-content: start; }
form label { display: grid; gap: .4rem; margin-bottom: .9rem; font-weight: 600; font-size: .92rem; }
input, textarea {
  font: inherit; color: var(--text-primary);
  background: var(--bg-hover-translucent); border: 1px solid var(--widget-border);
  border-radius: var(--radius-row); padding: .75rem .9rem; width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--brand-glow-1); border-color: transparent; }
.form-note { min-height: 1.4em; }
.social-list { display: grid; gap: .5rem; margin-bottom: 1rem; }
.social-list a {
  display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--text-primary);
  padding: .7rem .9rem; border-radius: var(--radius-row);
  background: var(--bg-hover-translucent); border: 1px solid var(--widget-border);
}
.social-list a:hover { background: var(--bg-interactive); }
.social-list em { margin-left: auto; font-style: normal; color: var(--text-secondary); }

.footer { border-top: 1px solid var(--widget-border); margin-top: 2rem; background: var(--widget-bg); backdrop-filter: blur(12px); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 0; color: var(--text-secondary); font-size: .9rem; }
.footer-inner .circle-btn { width: 40px; height: 40px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease var(--d, 0s), transform .6s ease var(--d, 0s); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .menu-btn { display: grid; }
  .nav-links {
    position: fixed; top: var(--nav-h); right: 0; left: 0;
    flex-direction: column; gap: 0; padding: .6rem 4%;
    background: var(--bg-tertiary); border-bottom: 1px solid var(--widget-border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem .2rem; width: 100%; border-top: 1px solid var(--widget-border); }
  .nav-cta { margin: .7rem 0; text-align: center; }
}
