/* ==========================================================================
   Hệ thống thiết kế Antigravity Glass 3D — Tone sáng Clean chuẩn Google
   ========================================================================== */

:root {
  --bg-page: #FAFCFF;
  --text-main: #0F172A;
  --text-muted: #5F6368;
  --text-subtle: #94A3B8;
  --accent-blue: #2563EB;
  --accent-emerald: #10B981;
  --accent-violet: #6366F1;
  --border-soft: rgba(15, 23, 42, 0.08);
  --radius-card: 28px;
  --radius-pill: 9999px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-page);
  background-image: radial-gradient(rgba(15, 23, 42, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Vầng sáng nền pastel dịu nhẹ */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.aura {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: floatAura 14s ease-in-out infinite alternate;
}

.aura-1 {
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 620px;
  height: 320px;
  background: linear-gradient(120deg, #A7F3D0, #BFDBFE, #DDD6FE);
}

.aura-2 {
  bottom: 10%;
  left: -120px;
  width: 360px;
  height: 360px;
  background: #BAE6FD;
  opacity: 0.25;
  animation-delay: -4s;
}

.aura-3 {
  top: 42%;
  right: -120px;
  width: 380px;
  height: 380px;
  background: #C7D2FE;
  opacity: 0.24;
  animation-delay: -8s;
}

@keyframes floatAura {
  from {
    transform: translate(-50%, 0) scale(1);
  }
  to {
    transform: translate(-50%, 18px) scale(1.05);
  }
}

/* ==========================================================================
   Vật liệu Glass 3D & Nút bo tròn
   ========================================================================== */

.glass-3d,
.btn-glass-3d {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(244, 247, 252, 0.78) 100%);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow:
    0 10px 26px -10px rgba(15, 23, 42, 0.12),
    0 2px 6px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 2px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card-glass-light {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.72) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 18px 40px -16px rgba(15, 23, 42, 0.08),
    0 2px 8px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.card-ai-dark {
  background:
    radial-gradient(circle at 88% 92%, rgba(99, 102, 241, 0.52) 0%, transparent 55%),
    radial-gradient(circle at 12% 18%, rgba(16, 185, 129, 0.42) 0%, transparent 50%),
    #0F131A;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 22px 44px -16px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-primary-3d {
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 12px 24px -8px rgba(15, 23, 42, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary-3d:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 28px -8px rgba(15, 23, 42, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-glass-3d {
  color: var(--text-main);
}

.btn-glass-3d:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px -10px rgba(15, 23, 42, 0.16),
    0 4px 10px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* ==========================================================================
   Bố cục chung & Thanh điều hướng nổi
   ========================================================================== */

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar-wrap {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}

.navbar {
  width: 100%;
  max-width: 720px;
  border-radius: var(--radius-pill);
  padding: 8px 10px 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue), var(--accent-violet));
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.45);
}

.brand-ext {
  color: var(--accent-blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.18s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-menu {
  margin-top: 10px;
  width: 100%;
  max-width: 720px;
  border-radius: 24px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-link {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

.mobile-link:hover {
  background: rgba(15, 23, 42, 0.04);
}

/* ==========================================================================
   Hero & Khung tương tác AI
   ========================================================================== */

.hero {
  padding: 68px 0 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.sparkle {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue), var(--accent-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 14px;
}

.hero-title {
  margin: 0;
  font-size: clamp(36px, 6vw, 58px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text-main);
}

.gradient-text {
  background: linear-gradient(120deg, #0F172A 15%, #2563EB 60%, #10B981 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 18px auto 34px;
  max-width: 580px;
  font-size: 16px;
  color: var(--text-muted);
}

/* Khung Interactive Bio */
.ai-console {
  width: 100%;
  max-width: 680px;
  border-radius: 30px;
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.ai-console-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.ai-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.chip.is-active {
  border-color: rgba(37, 99, 235, 0.45);
  color: var(--accent-blue);
}

.ai-response {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(241, 245, 249, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.05);
  min-height: 68px;
}

.ai-response-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue), var(--accent-violet));
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.ai-response-text {
  margin: 0;
  font-size: 14px;
  color: #1E293B;
  line-height: 1.6;
}

.inline-link {
  color: var(--accent-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-link:hover {
  color: #1D4ED8;
}

.zalo-icon {
  display: inline-block;
  flex-shrink: 0;
}

.ai-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.04);
}

.ai-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-main);
}

.ai-input::placeholder {
  color: var(--text-subtle);
}

.btn-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease;
}

/* ==========================================================================
   Các phân khu nội dung (About, Projects, Contact)
   ========================================================================== */

.section {
  padding: 52px 0;
}

.section-head {
  margin-bottom: 26px;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  border-radius: var(--radius-card);
  padding: 24px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.icon-orb {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 16px;
}

.icon-blue {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-blue);
}

.icon-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

.icon-violet {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-violet);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Thanh Tech Stack */
.stack-bar {
  margin-top: 18px;
  border-radius: var(--radius-card);
  padding: 16px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stack-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-tag {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: var(--text-main);
}

/* Lưới dự án */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  border-radius: 30px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: transform 0.22s ease;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-featured {
  grid-column: span 2;
  padding: 32px;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-pill {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.pill-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.pill-blue {
  background: rgba(37, 99, 235, 0.1);
  color: #1D4ED8;
}

.project-pill-dark {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #A7F3D0;
}

.project-year,
.project-year-dark {
  font-family: var(--font-mono);
  font-size: 12px;
}

.project-year {
  color: var(--text-subtle);
}

.project-year-dark {
  color: rgba(255, 255, 255, 0.55);
}

.project-body h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-body p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-muted);
  max-width: 640px;
}

.project-featured .project-body h3 {
  font-size: 24px;
  color: #FFFFFF;
}

.project-featured .project-body p {
  color: rgba(255, 255, 255, 0.76);
}

.project-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-tags,
.project-tags-dark {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-muted);
}

.project-tags-dark span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.btn-light-pill {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  color: #0F172A;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.16s ease;
}

.btn-light-pill:hover {
  transform: translateY(-2px);
}

.project-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-blue);
}

/* Khối Liên hệ */
.contact-card {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 48px 28px;
  text-align: center;
}

.contact-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.22), rgba(59, 130, 246, 0.22));
  filter: blur(55px);
  pointer-events: none;
}

.contact-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.contact-desc {
  margin: 12px auto 26px;
  max-width: 480px;
  font-size: 15px;
  color: var(--text-muted);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.social-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.social-pill {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
}

/* Chân trang */
.footer {
  padding: 28px 20px 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.back-top {
  font-weight: 600;
  color: var(--text-main);
}

/* Thông báo Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: #065F46;
  z-index: 100;
}

.toast[hidden] {
  display: none;
}

/* Hiệu ứng xuất hiện khi cuộn */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive trên máy tính bảng & điện thoại */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    padding: 46px 0 28px;
  }

  .cards-grid-3,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-featured {
    grid-column: span 1;
    padding: 24px;
  }

  .contact-card {
    padding: 36px 20px;
  }
}
