/* ====================================================
   RESET & BIẾN MÀU SẮC (THEME VARIABLES)
   ==================================================== */
:root {
  --primary-color: #1e3a8a;      /* Xanh navy đậm */
  --accent-color: #2563eb;       /* Xanh dương tươi */
  --sidebar-bg: #0f172a;         /* Xanh đen sang trọng */
  --sidebar-text: #e2e8f0;       /* Chữ sáng màu ở sidebar */
  --sidebar-muted: #94a3b8;      /* Chữ xám phụ */
  --main-bg: #ffffff;            /* Nền trắng nội dung */
  --text-main: #1e293b;          /* Màu chữ chính */
  --text-muted: #64748b;         /* Màu chữ phụ */
  --body-bg: #e2e8f0;            /* Nền ngoài trang web */
  --border-color: #e2e8f0;       /* Viền phân cách */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--body-bg);
  color: var(--text-main);
  line-height: 1.6;
  padding: 40px 15px;
}

/* ====================================================
   CONTAINER CHÍNH CỦA CV
   ==================================================== */
.cv-container {
  max-width: 950px;
  margin: 0 auto;
  background-color: var(--main-bg);
  display: flex;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  min-height: 1000px;
}

/* ====================================================
   SIDEBAR (CỘT TRÁI)
   ==================================================== */
.sidebar {
  width: 35%;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 40px 30px;
}

.avatar-container {
  text-align: center;
  margin-bottom: 25px;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #38bdf8;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.sidebar .section {
  margin-bottom: 30px;
}

.sidebar-title {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #38bdf8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Danh sách liên hệ */
.contact-list {
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  word-break: break-word;
}

.contact-list li i {
  color: #38bdf8;
  width: 18px;
  text-align: center;
}

.contact-list a {
  color: var(--sidebar-text);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-list a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

/* Học vấn sidebar */
.sidebar-item {
  margin-bottom: 15px;
}

.sidebar-item .timeline {
  display: inline-block;
  font-size: 0.8rem;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 4px;
}

.sidebar-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.sidebar-item p {
  font-size: 0.9rem;
  color: var(--sidebar-muted);
}

.sidebar-item .subtext {
  font-size: 0.85rem;
  margin-top: 2px;
}

/* Kỹ năng (Tags) */
.skills-group {
  margin-bottom: 15px;
}

.skills-group h4 {
  font-size: 0.9rem;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 8px;
}

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

.tag {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.simple-list {
  list-style: none;
}

.simple-list li {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--sidebar-text);
}

/* ====================================================
   NỘI DUNG CHÍNH (CỘT PHẢI)
   ==================================================== */
.main-content {
  width: 65%;
  padding: 45px 40px;
  background-color: var(--main-bg);
}

.cv-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.fullname {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

.job-title {
  font-size: 1.05rem;
  color: var(--accent-color);
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 4px;
}

.main-content .section {
  margin-bottom: 32px;
}

.main-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-bottom: 8px;
}

.main-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.bio {
  font-size: 0.95rem;
  color: #334155;
  text-align: justify;
  line-height: 1.7;
}

/* Timeline & Kinh nghiệm */
.timeline-item {
  margin-bottom: 22px;
  padding-left: 15px;
  border-left: 2px solid #cbd5e1;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-color);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.role {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
}

.company {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent-color);
  display: block;
}

.date-badge {
  font-size: 0.82rem;
  background-color: #f1f5f9;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.desc-list {
  padding-left: 18px;
  font-size: 0.92rem;
  color: #475569;
}

.desc-list li {
  margin-bottom: 6px;
  line-height: 1.5;
}

/* Dự án */
.project-item {
  background: #f8fafc;
  padding: 16px 20px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.project-name {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.project-desc {
  font-size: 0.92rem;
  color: #475569;
  margin-bottom: 8px;
}

.project-tech {
  font-size: 0.88rem;
  color: var(--accent-color);
}

/* ====================================================
   RESPONSIVE DESIGN (CHO MÀN HÌNH NHỎ / MOBILE)
   ==================================================== */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .cv-container {
    flex-direction: column;
  }

  .sidebar,
  .main-content {
    width: 100%;
    padding: 30px 20px;
  }

  .timeline-header,
  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ====================================================
   IN ẤN / XUẤT RA PDF (CTRL + P)
   ==================================================== */
@media print {
  body {
    padding: 0;
    background: transparent;
  }

  .cv-container {
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
  }

  .date-badge {
    background-color: transparent;
    border: 1px solid #cbd5e1;
  }
}

