:root {
  --bg: #050816;
  --bg-soft: #0b1020;
  --accent: #60a5fa;
  --accent-soft: rgba(96, 165, 250, 0.12);
  --accent-strong: #3b82f6;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2933;
  --card-radius: 18px;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.8);
  --shadow-small: 0 10px 30px rgba(15, 23, 42, 0.6);
  --transition-fast: 200ms ease;
  --transition-slow: 400ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 40%, #000 80%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ========== Layout ========== */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 96px 24px 64px;
}

header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    to bottom,
    rgba(3, 7, 18, 0.96),
    rgba(3, 7, 18, 0.8),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  z-index: 40;
}

.nav-inner {
  max-width: 1120px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-logo {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--muted);
}

.nav-logo span {
  color: var(--accent);
}

nav ul {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
}

nav a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

nav a:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--accent);
  transform: translateY(-1px);
}

nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

main {
  margin-top: 80px;
}

section {
  padding: 60px 0;
}

.section-header {
  margin-bottom: 28px;
}

.section-kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
}

.section-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* ========== Hero ========== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3.2fr) minmax(0, 2.3fr);
  gap: 40px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px #22c55e;
}

.hero-title {
  font-size: clamp(2.2rem, 3vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-title span {
  background: linear-gradient(120deg, #60a5fa, #a855f7);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-role {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 18px;
}

.hero-text {
  color: #cbd5f5;
  font-size: 0.95rem;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.btn {
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast),
    border-color var(--transition-fast), color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.5);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--muted);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-small);
}

.hero-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-meta strong {
  color: #e5e7eb;
  font-weight: 600;
}

.hero-orbit {
  position: relative;
  border-radius: 24px;
  padding: 22px 20px 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: radial-gradient(circle at top left, #1e293b 0, #020617 48%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero-orbit::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(
      circle at 10% 0,
      rgba(96, 165, 250, 0.5),
      transparent 55%
    ),
    radial-gradient(circle at 90% 20%, rgba(217, 70, 239, 0.4), transparent 60%);
  inset: auto;
  top: -60%;
  left: -50%;
  opacity: 0.12;
  pointer-events: none;
}

.hero-tagline {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
  font-size: 0.78rem;
  color: #cbd5f5;
  backdrop-filter: blur(4px);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  font-size: 0.78rem;
  margin-top: 4px;
}

.stat {
  padding: 8px 9px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.stat-label {
  color: var(--muted);
  margin-bottom: 2px;
}

.stat-value {
  font-weight: 600;
  color: #e5e7eb;
  font-size: 0.9rem;
}

/* ========== Grid helpers ========== */

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.7fr);
  gap: 32px;
  align-items: flex-start;
}

/* ========== Cards ========== */

.card {
  border-radius: var(--card-radius);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow-small);
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-slow),
    box-shadow var(--transition-slow), border-color var(--transition-slow),
    background var(--transition-slow);
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 10% 0,
    rgba(96, 165, 250, 0.14),
    transparent 55%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.95);
  border-color: rgba(96, 165, 250, 0.7);
  background: radial-gradient(circle at top, #020617 0, #000 70%);
}

.card:hover::before {
  opacity: 1;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.card-body {
  font-size: 0.87rem;
  color: #d1d5db;
}

.card-body ul {
  margin-left: 1em;
  margin-top: 4px;
}

.card-body li {
  margin-bottom: 4px;
}

.tag-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--muted);
}

/* ========== Skills ========== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  font-size: 0.86rem;
}

.skill-item {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.96);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.skill-name {
  color: #e5e7eb;
}

.skill-level {
  color: var(--muted);
  font-size: 0.75rem;
}

.meter {
  margin-top: 4px;
  height: 4px;
  width: 100%;
  border-radius: 999px;
  background: #020617;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #a855f7);
  transform-origin: left;
  transform: scaleX(0.1);
  transition: transform 700ms ease-out;
}

/* ========== Timeline ========== */

.timeline {
  border-left: 1px solid rgba(148, 163, 184, 0.4);
  margin-left: 8px;
  padding-left: 16px;
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-dot {
  position: absolute;
  left: -27px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.2);
}

.timeline-title {
  font-size: 0.96rem;
  font-weight: 600;
}

.timeline-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.timeline-body {
  font-size: 0.86rem;
  color: #d1d5db;
}

.timeline-body ul {
  margin-top: 4px;
  margin-left: 1em;
}

/* ========== Contact ========== */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: flex-start;
}

.contact-list {
  font-size: 0.9rem;
  color: #e5e7eb;
}

.contact-list li {
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
}

.contact-label {
  width: 80px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.contact-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.contact-chip {
  font-size: 0.78rem;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--muted);
}

.contact-note {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 10px;
}

.contact-form {
  width: 100%;
}

.field {
  margin-bottom: 10px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.6);
  background: #020617;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-form .btn-primary {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
}

footer {
  padding: 20px 24px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ========== Animations on scroll ========== */

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 550ms ease-out, transform 550ms ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Responsive ========== */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-orbit {
    order: -1;
  }

  .grid-2,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  nav ul {
    gap: 10px;
  }
}

@media (max-width: 640px) {
  header {
    height: auto;
  }

  .nav-inner {
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 8px;
  }

  main {
    margin-top: 106px;
  }

  section {
    padding: 44px 0;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* ========== Light Mode ========== */

.light {
  --bg: #f5f7fa;
  --bg-soft: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d1d5db;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-strong: #1d4ed8;

  background: #f5f7fa !important;
  color: var(--text) !important;
}

.light header {
  background: rgba(255, 255, 255, 0.6);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.light .card,
.light .hero-orbit,
.light .pill,
.light .tag,
.light .contact-chip {
  background: #ffffff !important;
  border-color: var(--border) !important;
  color: var(--text);
}

.light nav a {
  color: var(--text);
}

.light nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Nút toggle theme */
.theme-toggle {
  margin-right: 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s;
}

.theme-toggle:hover {
  background: var(--accent-soft);
}
