/* ===== Biến màu (theo theme) ===== */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --sidebar: #1f2937;
  --text: #1f2937;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --border: #e5e7eb;
  --sidebar-text: #e5e7eb;
  --sidebar-muted: #9ca3af;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
  --bg: #111827;
  --surface: #1f2937;
  --sidebar: #0b1220;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #60a5fa;
  --accent-soft: #1e3a5f;
  --border: #374151;
  --sidebar-text: #e5e7eb;
  --sidebar-muted: #9ca3af;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

/* ===== Nút theme ===== */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.theme-toggle .icon-moon {
  display: none;
}
[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}
[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* ===== Bố cục ===== */
.container {
  display: grid;
  grid-template-columns: 300px 1fr;
  max-width: 1000px;
  margin: 40px auto;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ===== Sidebar ===== */
.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.name {
  font-size: 24px;
  text-align: center;
  color: #fff;
}

.title {
  text-align: center;
  color: var(--sidebar-muted);
  font-size: 14px;
  margin-top: -16px;
}

.block-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
}

.contact-list,
.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.contact-list li {
  color: var(--sidebar-text);
  word-break: break-word;
}

.skill-list li::before {
  content: "▹ ";
  color: var(--accent);
}

/* ===== Main ===== */
.main {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.main .block-title {
  color: var(--accent);
}

.summary {
  color: var(--text);
}

.timeline-item {
  margin-bottom: 20px;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-head h3 {
  font-size: 16px;
}

.period {
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 4px 0 8px;
}

.bullet-list {
  padding-left: 20px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px 0 32px;
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .container {
    grid-template-columns: 1fr;
    margin: 16px;
  }
  .theme-toggle {
    top: 12px;
    right: 12px;
  }
}

/* ===== In ấn ===== */
@media print {
  .theme-toggle,
  .footer {
    display: none;
  }
  body {
    background: #fff;
  }
  .container {
    box-shadow: none;
    margin: 0;
  }
}
