﻿:root {
  --resume-accent: #67e8f9;
  --card-gradient:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92)),
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.38), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(37, 99, 235, 0.28), transparent 36%);
  --shadow: 0 30px 90px rgba(2, 6, 23, 0.35);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(226, 232, 240, 0.14);
  --page-max: 1360px;
  --side-col: 560px;
  --frame-inset: 44px;
  --left-indent: 52px;
  --section-gap: 28px;
  --card-min-height: max(920px, calc(100vh - 48px));
  --name-band-height: clamp(148px, 16vh, 200px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: #e2e8f0;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.22), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(37, 99, 235, 0.22), transparent 32%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #111827 100%);
  padding: 16px 12px 24px;
}

.page {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
}

.resume-card {
  position: relative;
  overflow: hidden;
  min-height: var(--card-min-height);
  border-radius: 32px;
  background: var(--card-gradient);
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: var(--shadow);
}

.resume-card::after {
  content: "";
  position: absolute;
  right: -100px;
  top: -100px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  filter: blur(14px);
  pointer-events: none;
}

.cv-glass {
  padding: 24px 26px;
  border-radius: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cv-grid {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: var(--card-min-height);
  grid-template-columns: 1fr;
  grid-template-rows: var(--name-band-height) auto;
  grid-template-areas:
    "name"
    "body";
  align-items: start;
}

/* Banner + Core | Profile — khung avatar span 2 hàng để mép dưới Core = mép dưới avatar */
.cv-body {
  grid-area: body;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side-col);
  grid-template-areas:
    "banner photo"
    "core photo"
    "profile contact";
  column-gap: 20px;
  row-gap: var(--section-gap);
  padding: 4px var(--frame-inset) 36px var(--left-indent);
  min-width: 0;
}

.cv-body > .cv-banner { grid-area: banner; }
.cv-body > .cv-core { grid-area: core; }
.cv-body > .cv-profile { grid-area: profile; }
.cv-body > .cv-glass-photo { grid-area: photo; }
.cv-body > .cv-glass-contact { grid-area: contact; }

/* Tên — ảnh PNG trong suốt, căn giữa vùng header */
.cv-name {
  grid-area: name;
  align-self: stretch;
  margin: 0;
  min-height: 0;
  padding: 0 var(--frame-inset);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cv-name-img {
  display: block;
  width: min(96%, 840px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.cv-banner {
  width: 100%;
  margin: 0;
  padding: 26px 30px 28px;
  color: #ffffff;
}

.cv-banner-title {
  margin: 0 0 12px;
  font-size: clamp(15px, 1.65vw, 19px);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.42;
  text-transform: uppercase;
}

.cv-banner-sub {
  margin: 0;
  font-size: clamp(15px, 1.45vw, 18px);
  font-weight: 500;
  line-height: 1.52;
  color: #e2e8f0;
}

.cv-core,
.cv-profile {
  display: flex;
  flex-direction: column;
  padding: 24px 26px 26px;
  min-height: 0;
}

.cv-core {
  align-self: stretch;
  height: 100%;
}

.cv-profile {
  text-align: center;
}

.cv-profile p {
  margin: 0;
  font-size: 17px;
  line-height: 1.72;
  color: #cbd5e1;
  text-align: center;
}

.cv-glass-photo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  min-height: 0;
  margin-top: 0;
  padding: 24px 20px 20px;
  align-self: stretch;
}

.cv-photo {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 32px rgba(2, 6, 23, 0.5);
}

.cv-photo-tagline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0 10px;
  width: 100%;
  max-width: 420px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: #e2e8f0;
  text-align: left;
}

.cv-photo-tagline .cv-list-tick {
  margin-top: 3px;
}

@keyframes cv-btn-shake {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(-3px, 0, 0);
  }
  75% {
    transform: translate3d(3px, 0, 0);
  }
}

.cv-template-btn {
  width: 100%;
  align-self: stretch;
  margin-top: 4px;
  min-height: 80px;
  padding: 22px 20px;
  gap: 12px;
  font-size: 22px;
  text-align: center;
  line-height: 1.35;
  white-space: nowrap;
  border-radius: 20px;
  box-sizing: border-box;
  animation: cv-btn-shake 1.5s ease-in-out infinite;
}

.primary-btn.cv-template-btn:hover {
  animation-play-state: paused;
  transform: translateY(-2px);
}

.cv-btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #1d4ed8;
}

.cv-btn-download svg {
  width: 28px;
  height: 28px;
  display: block;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  font-weight: 800;
  text-decoration: none;
  color: #06111f;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  box-shadow: 0 14px 36px rgba(56, 189, 248, 0.32);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.cv-glass-contact {
  flex: none;
  width: 100%;
  padding: 18px 22px 18px;
  display: flex;
  flex-direction: column;
}

.cv-glass-contact h2 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--resume-accent);
  border-bottom: 2px solid rgba(103, 232, 249, 0.35);
}

.cv-block { margin-bottom: 0; }

.cv-heading-check {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding-bottom: 12px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--resume-accent);
  border-bottom: none;
  position: relative;
}

.cv-heading-check::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(103, 232, 249, 0.75), rgba(103, 232, 249, 0.15));
}

.cv-heading-center {
  justify-content: center;
}

.cv-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  color: #cbd5e1;
}

.cv-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  font-size: 17px;
  line-height: 1.58;
}

/* Dấu tích Core: vòng cyan + tick đen (flat) */
.cv-list-tick {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--resume-accent);
  position: relative;
}

.cv-list-tick::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 5px;
  height: 9px;
  border: solid #0f172a;
  border-width: 0 1.75px 1.75px 0;
  transform: translate(-50%, -58%) rotate(45deg);
}

.cv-contact {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-contact li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 18px;
  line-height: 1.52;
  color: #e2e8f0;
}

.cv-contact li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.cv-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(103, 232, 249, 0.2);
  border: 1px solid rgba(103, 232, 249, 0.55);
  color: #67e8f9;
}

.cv-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  shape-rendering: geometricPrecision;
}

.cv-contact a {
  color: #e2e8f0;
  text-decoration: none;
}

.cv-contact a:hover {
  color: var(--resume-accent);
}

.cv-stats-frame {
  margin-top: 16px;
  padding: 16px 8px 14px;
  border-radius: 18px;
  background: #0f172a;
  border: 1.5px solid rgba(103, 232, 249, 0.45);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.cv-stat {
  position: relative;
  text-align: center;
  padding: 0 4px;
}

.cv-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 6%;
  height: 88%;
  width: 1px;
  background: rgba(148, 163, 184, 0.5);
}

.cv-stat-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(34, 211, 238, 0.16);
  border: 1.5px solid rgba(103, 232, 249, 0.55);
  box-shadow: none;
}

.cv-stat-icon svg {
  width: 26px;
  height: 26px;
  display: block;
  shape-rendering: geometricPrecision;
}

.cv-stat-value {
  margin: 0 0 6px;
  font-size: clamp(14px, 1.1vw, 18px);
  font-weight: 800;
  line-height: 1.15;
  color: #67e8f9;
  letter-spacing: 0.02em;
}

.cv-stat-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #f8fafc;
}

.cv-glass-photo .status {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  width: auto;
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.35;
}

.status.success { color: #34d399; }
.status.error { color: #f87171; }

@media (prefers-reduced-motion: reduce) {
  .cv-template-btn {
    animation: none;
  }

  .primary-btn.cv-template-btn:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 900px) {
  :root {
    --frame-inset: 20px;
    --left-indent: 20px;
    --side-col: 1fr;
    --section-gap: 18px;
    --card-min-height: auto;
  }

  .resume-card,
  .cv-grid {
    min-height: auto;
  }

  .cv-grid {
    grid-template-rows: clamp(120px, 22vw, 160px) auto;
    grid-template-areas:
      "name"
      "body";
  }

  .cv-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "banner"
      "core"
      "profile"
      "contact";
    row-gap: 18px;
    padding: 4px var(--frame-inset) 28px;
  }

  .cv-core {
    height: auto;
  }

  .cv-glass-photo {
    min-height: auto;
  }

  .cv-name {
    padding: 0 var(--frame-inset);
  }

  .cv-name-img {
    width: min(98%, 580px);
  }

  .cv-glass-contact {
    flex: none;
  }

  .cv-stats-frame {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 0;
    padding: 16px 12px 14px;
  }

  .cv-stat::after {
    display: none;
  }

  .cv-stat:nth-child(odd)::after {
    display: block;
    content: "";
    position: absolute;
    right: 0;
    top: 6%;
    height: 88%;
    width: 1px;
    background: rgba(148, 163, 184, 0.28);
  }

  .cv-stat:nth-child(-n + 2) {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.45);
  }

}
