@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

:root {
  --green-dark:   #3c5123;
  --green-mid:    #52712f;
  --green-light:  #7aaa45;
  --cream:        #f2e8d2;
  --cream-border: #dfd1b5;
  --page-bg:      #e5dccb;
  --white:        #ffffff;
  --text:         #1c1c1c;
  --text-mid:     #474747;
  --text-muted:   #7a7a7a;
  --sidebar-text: #3a2a10;
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-sans:    'Source Sans 3', 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }

html, body {
  min-height: 100%;
  font-family: var(--font-sans);
  background: var(--page-bg);
  color: var(--text);
  overflow-x: hidden;
}

body {
  display: flex;
  justify-content: center;
  padding: 44px 20px 64px;
}

.page { width: 100%; max-width: 960px; }

.cv {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: 1080px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 2px 4px  rgba(0,0,0,0.06),
    0 8px 24px rgba(0,0,0,0.13),
    0 32px 64px rgba(0,0,0,0.11);
}

/* SIDEBAR */
.sidebar {
  background: var(--cream);
  border-right: 1px solid var(--cream-border);
  padding: 36px 26px 44px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.anh {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 10px 0;
}

.avatar-img {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  box-shadow: 0 4px 20px rgba(60,81,35,0.32);
  display: block;
}

.contact-list { display: flex; flex-direction: column; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--cream-border);
  font-size: 0.875rem;
  color: var(--sidebar-text);
  line-height: 1.52;
  overflow-wrap: anywhere;
}

.contact-item:last-child { border-bottom: none; }
a.contact-item:hover { color: var(--green-dark); }
.contact-note span { color: var(--text-muted); font-style: italic; }

.c-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--green-dark);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 2px;
}

.sidebar-heading {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-dark);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-light);
  margin-bottom: 16px;
}

.cert-item { margin-bottom: 16px; }
.cert-item:last-child { margin-bottom: 0; }

.cert-date {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--white);
  background: var(--green-dark);
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 5px;
  letter-spacing: 0.04em;
}

.cert-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sidebar-text);
  line-height: 1.4;
}

.cert-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* MAIN */
.main { display: flex; flex-direction: column; background: var(--white); }

.main-header {
  background: var(--green-dark);
  padding: 36px 36px 30px;
  position: relative;
  overflow: hidden;
}

.main-header::before,
.main-header::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255,255,255,0.04);
}
.main-header::before { width: 220px; height: 220px; right: -55px; top: -55px; }
.main-header::after  { width: 130px; height: 130px; right: 55px; bottom: -55px; }

.name-block { margin-bottom: 24px; }

.cv-name {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: 0.01em;
}

.name-rule {
  width: 46px;
  height: 2px;
  background: var(--green-light);
  margin: 11px 0;
  border-radius: 1px;
}

.cv-role {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: rgba(255,255,255,0.58);
  text-transform: uppercase;
}

.block-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  margin-bottom: 12px;
}

.skills-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 22px;
}

.skills-grid li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.46;
}

.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-light);
  flex-shrink: 0;
  margin-top: 6px;
}

.main-body {
  padding: 32px 36px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-dark);
  padding-bottom: 9px;
  border-bottom: 2px solid var(--green-dark);
  margin-bottom: 20px;
}

.entry {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #ede6d4;
}

.entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3px;
}

.entry-org {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.35;
}

.entry-period {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--white);
  background: var(--green-mid);
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.entry-role {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 300;
}

.entry-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }

.entry-list li {
  font-size: 1rem;
  color: var(--text-mid);
  padding-left: 16px;
  position: relative;
  line-height: 1.65;
}

.entry-list li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--green-light);
  font-size: 0.65rem;
}

/* PRINT */
@media print {
  html, body { background: none; padding: 0; }
  .page { max-width: none; }
  .cv { box-shadow: none; border-radius: 0; min-height: unset; }
  .main-header::before, .main-header::after { display: none; }
  .entry, .section { break-inside: avoid; }
}

/* RESPONSIVE: tablet va dien thoai (duoi 768px) */
@media (max-width: 768px) {

  body { padding: 0; }

  .cv {
    grid-template-columns: 1fr;
    min-height: unset;
    border-radius: 0;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--cream-border);
    padding: 28px 22px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .cv-name { font-size: 2.1rem; }

  .main-header { padding: 28px 22px 24px; }
  .main-body { padding: 26px 22px 32px; }

  .entry-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* RESPONSIVE: dien thoai nho (duoi 420px) */
@media (max-width: 420px) {

  .avatar-img {
    width: 140px;
    height: 140px;
  }

  .cv-name { font-size: 1.8rem; }

  .sidebar { padding: 22px 18px; }
  .main-header { padding: 22px 18px 20px; }
  .main-body { padding: 22px 18px 28px; }

  .entry-org { font-size: 1rem; }
  .entry-list li { font-size: 0.95rem; }
  .contact-item { font-size: 0.85rem; }
}