/* ==========================================================================
   Dự Án Thiết Lập Server — Dark Editorial / Precision Tech Design System
   ========================================================================== */

:root {
  --bg-canvas: #07080b;
  --bg-surface: #101218;
  --bg-elevated: #161922;
  --bg-subtle: #1e2330;
  --text-primary: #f5f7fa;
  --text-secondary: #a3aab8;
  --text-muted: #6f7787;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-text: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --accent-border: rgba(96, 165, 250, 0.3);
  --status-success: #10b981;
  --status-success-soft: rgba(16, 185, 129, 0.12);
  --shadow-card: 0 14px 40px rgba(0, 0, 0, 0.42);
  --header-bg: rgba(7, 8, 11, 0.85);

  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --container-max: 1180px;
}

[data-theme="light"] {
  --bg-canvas: #f8f9fb;
  --bg-surface: #ffffff;
  --bg-elevated: #f3f5f8;
  --bg-subtle: #eaeef4;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-subtle: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.18);
  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-text: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-border: rgba(37, 99, 235, 0.25);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.07);
  --header-bg: rgba(248, 249, 251, 0.88);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-primary);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 180ms, color 180ms, background 180ms;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background 180ms, border-color 180ms;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
}

.desktop-only {
  display: none;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 12px 20px 18px;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 11px 6px;
  font-size: 15px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* Hero */
.hero {
  padding: 64px 0 76px;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(62% 70% at 18% 12%, rgba(59, 130, 246, 0.2), transparent 68%),
    radial-gradient(45% 55% at 84% 25%, rgba(99, 102, 241, 0.14), transparent 70%),
    var(--bg-canvas);
}

[data-theme="light"] .hero {
  background: radial-gradient(62% 70% at 18% 12%, rgba(37, 99, 235, 0.09), transparent 68%),
    var(--bg-canvas);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-success);
  box-shadow: 0 0 0 4px var(--status-success-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}

.hero-title {
  margin: 18px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-title span {
  color: var(--accent-text);
}

.hero-desc {
  margin: 0;
  max-width: 560px;
  font-size: 15.5px;
  color: var(--text-secondary);
}

.hero-cta {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stats-row {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 460px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Leader Card */
.leader-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 45%),
    var(--bg-surface);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .leader-card {
  background: var(--bg-surface);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.leader-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-frame {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  color: #ffffff;
  flex-shrink: 0;
}

.leader-role-pill {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.leader-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.leader-title {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.leader-bio {
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.skill-bars {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.skill-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 5px;
}

.skill-bar-track {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.leader-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Sections */
.section {
  padding: 68px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-alt {
  background: rgba(255, 255, 255, 0.015);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  font-weight: 600;
}

.section-title {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-subtitle {
  margin: 0;
  max-width: 600px;
  font-size: 14.5px;
  color: var(--text-secondary);
}

/* Presentation Script Card */
.script-card {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), transparent 45%),
    var(--bg-surface);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.script-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 22px;
}

.script-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.script-body {
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-primary);
  transition: font-size 200ms var(--ease-out);
}

.script-body strong {
  color: var(--accent-text);
  font-weight: 700;
}

.script-body.large {
  font-size: 20px;
  line-height: 1.95;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tab {
  height: 36px;
  padding: 0 15px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 180ms;
}

.filter-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

/* Team Bento Grid (3 + 2) */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.member-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
    var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 220ms var(--ease-out), border-color 220ms, box-shadow 220ms;
  cursor: pointer;
}

.member-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-card);
}

.member-accent-bar {
  width: 44px;
  height: 3px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.member-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.member-avatar {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: #ffffff;
  flex-shrink: 0;
}

.member-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.member-role {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--accent-text);
  font-weight: 500;
}

.member-bio {
  margin: 14px 0 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.member-action {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
}

.member-action strong {
  color: var(--accent-text);
}

/* Architecture Cards */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-preview {
  height: 108px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-dots {
  display: flex;
  gap: 6px;
}

.preview-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.preview-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--border-strong);
}

.preview-bar.primary {
  height: 12px;
  width: 60%;
}

.preview-bar.mid {
  width: 85%;
  opacity: 0.55;
}

.preview-bar.short {
  width: 65%;
  opacity: 0.35;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.project-tag {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}

.project-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.project-desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.project-impact {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--status-success);
  font-weight: 600;
}

/* Timeline */
.timeline-list {
  display: grid;
  gap: 14px;
}

.timeline-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: start;
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-text);
  padding-top: 2px;
}

.timeline-item h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 16px;
}

.timeline-item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 540px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--status-success);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 220ms, transform 220ms var(--ease-out);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  padding: 34px 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}

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

@media (min-width: 768px) {
  .nav-links,
  .desktop-only {
    display: inline-flex;
  }

  .mobile-only {
    display: none;
  }

  .section-header,
  .script-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: 84px 0 92px;
  }

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
  }

  .team-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .team-grid .member-card {
    grid-column: span 2;
  }

  .team-grid[data-count="5"] .member-card:nth-child(4),
  .team-grid[data-count="5"] .member-card:nth-child(5) {
    grid-column: span 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
