body {
  background:
    radial-gradient(circle at top left, rgba(69, 229, 138, 0.12), transparent 32rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 34rem),
    linear-gradient(135deg, #020817 0%, #071426 48%, #0a1020 100%);
  background-attachment: fixed;
  color: #f8fafc;
}

.cv-page-wrap {
  min-height: 100vh;
}

.cv-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 90px;
}

.cv-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.72fr);
  gap: 28px;
  align-items: stretch;
}

.cv-hero-copy,
.cv-upload-card {
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 66% 28%, rgba(26, 82, 55, 0.18), transparent 42%),
    linear-gradient(145deg, rgba(4, 16, 30, 0.95), rgba(4, 22, 37, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.cv-hero-copy {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: clamp(30px, 5vw, 58px);
}

.cv-hero-copy::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -70px;
  bottom: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(65, 215, 114, 0.18), transparent 64%);
  pointer-events: none;
}

.cv-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cv-kicker .icon {
  width: 18px;
  height: 18px;
}

.cv-hero h1 {
  max-width: 740px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.cv-hero h1 span {
  color: var(--accent);
}

.cv-subtitle {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.72;
}

.cv-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.cv-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(126, 233, 166, 0.3);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(10, 26, 42, 0.7);
  font-weight: 800;
  text-decoration: none;
  transition: 160ms ease;
}

.cv-text-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.cv-upload-card {
  border-radius: 24px;
  padding: 22px;
}

.cv-dropzone {
  display: grid;
  min-height: 260px;
  place-items: center;
  gap: 10px;
  padding: 30px;
  border: 1.5px dashed rgba(126, 233, 166, 0.36);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
  background:
    radial-gradient(circle at 50% 0%, rgba(65, 215, 114, 0.16), transparent 55%),
    rgba(8, 26, 42, 0.6);
}

.cv-dropzone.is-dragging {
  border-color: var(--accent);
  background:
    radial-gradient(circle at 50% 0%, rgba(65, 215, 114, 0.28), transparent 60%),
    rgba(12, 34, 54, 0.78);
}

.cv-dropzone strong {
  color: var(--text);
  font-size: 1.28rem;
}

.cv-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cv-upload-icon {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 22px;
  color: var(--accent);
  background: rgba(65, 215, 114, 0.14);
}

.cv-upload-icon .icon {
  width: 30px;
  height: 30px;
}

.cv-file-name,
.cv-privacy,
.cv-status {
  margin: 14px 6px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.cv-status[data-tone="error"] {
  color: #ff8f8f;
  font-weight: 700;
}

.cv-status[data-tone="loading"] {
  color: var(--accent);
  font-weight: 800;
}

.cv-submit,
.cv-reset,
.cv-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.cv-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  color: #e9f7ee;
  border: 1px solid rgba(130, 234, 168, 0.28);
  background: linear-gradient(135deg, #3ccc6c, #30af5b);
  box-shadow: 0 18px 34px rgba(41, 162, 87, 0.32);
}

.cv-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.cv-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.cv-results-panel {
  margin-top: 30px;
  padding: clamp(8px, 2vw, 16px) 0;
}

.cv-results-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.cv-results-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  letter-spacing: -0.02em;
}

.cv-results-head p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

.cv-reset {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  color: #e8f0f8;
  border: 1px solid rgba(132, 181, 217, 0.35);
  background: rgba(10, 26, 42, 0.84);
}

.cv-reset:hover {
  filter: brightness(1.08);
}

.cv-summary {
  margin: 28px 0;
}

.cv-profile-card {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(15, 29, 49, 0.86), rgba(8, 18, 35, 0.88));
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cv-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.cv-profile-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: var(--accent);
  border: 1px solid rgba(69, 229, 138, 0.28);
  background: rgba(69, 229, 138, 0.12);
}

.cv-profile-icon .icon {
  width: 24px;
  height: 24px;
}

.cv-profile-head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.25rem;
}

.cv-profile-head p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.cv-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 1.4rem;
}

.cv-summary-group {
  min-width: 0;
}

.cv-summary-label {
  display: block;
  margin-bottom: 0.7rem;
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cv-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cv-chip,
.cv-reasons li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.35rem 0.78rem;
  border-radius: 999px;
  color: #dfffee;
  border: 1px solid rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.1);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.cv-source {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #96d9b4;
  border: 1px solid rgba(83, 180, 130, 0.4);
  background: rgba(24, 88, 60, 0.3);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.cv-matches {
  display: grid;
  gap: 1rem;
}

.cv-match-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(15, 29, 49, 0.86), rgba(8, 18, 35, 0.88));
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 320ms ease,
    box-shadow 320ms ease;
}

@media (hover: hover) {
  .cv-match-card:hover {
    transform: translateY(-3px);
    border-color: rgba(126, 233, 166, 0.5);
    box-shadow: 0 26px 60px rgba(1, 10, 20, 0.45);
  }
}

.cv-match-score {
  display: flex;
  justify-content: center;
}

.cv-match-ring {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.cv-match-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.cv-match-ring-track,
.cv-match-ring-value {
  fill: none;
  stroke-width: 10;
}

.cv-match-ring-track {
  stroke: rgba(148, 163, 184, 0.16);
}

.cv-match-ring-value {
  stroke: var(--match-color);
  stroke-linecap: round;
  stroke-dasharray: var(--dash-array);
  stroke-dashoffset: var(--dash-offset);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--match-color), transparent 45%));
}

.cv-match-ring-text {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.1rem;
  justify-items: center;
  text-align: center;
}

.cv-match-ring-text strong {
  color: #f8fafc;
  font-size: 1.65rem;
  line-height: 1;
}

.cv-match-ring-text span {
  max-width: 78px;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-match-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0 0 8px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  color: #02140b;
  background: linear-gradient(135deg, #5df59a, #24c967);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.cv-source {
  margin: 0 0 8px;
  width: fit-content;
}

.cv-match-body h3 {
  margin: 0.2rem 0 0.35rem;
  color: #f8fafc;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.25;
}

.cv-meta {
  margin: 0 0 0.2rem;
  color: #cbd5e1;
}

.cv-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.cv-match-actions {
  display: grid;
  gap: 0.75rem;
  justify-items: end;
}

.cv-bookmark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  transition: 160ms ease;
}

.cv-bookmark .icon {
  width: 20px;
  height: 20px;
}

.cv-bookmark:hover,
.cv-bookmark.is-saved {
  color: #45e58a;
  border-color: rgba(69, 229, 138, 0.42);
  background: rgba(34, 197, 94, 0.1);
}

.cv-apply {
  min-width: 160px;
  min-height: 48px;
  padding: 0 1.25rem;
  border-radius: 16px;
  color: #02140b;
  border: 0;
  background: linear-gradient(135deg, #5df59a, #24c967);
  box-shadow: 0 14px 32px rgba(34, 197, 94, 0.22);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.cv-apply:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 18px 42px rgba(34, 197, 94, 0.3);
}

.cv-empty {
  padding: 28px;
  border-radius: 16px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(8, 26, 42, 0.6);
  text-align: center;
  font-weight: 800;
}

@media (max-width: 900px) {
  .cv-hero {
    grid-template-columns: 1fr;
  }

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

  .cv-match-card {
    grid-template-columns: auto 1fr;
  }

  .cv-match-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .cv-main {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .cv-hero-copy,
  .cv-upload-card {
    border-radius: 24px;
  }

  .cv-results-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .cv-summary-grid {
    grid-template-columns: 1fr;
  }

  .cv-match-card {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.95rem;
    row-gap: 0.9rem;
    align-items: start;
    padding: 1.1rem 1.15rem;
    text-align: start;
  }

  .cv-match-score {
    justify-content: flex-start;
    align-self: start;
  }

  .cv-match-ring {
    width: 76px;
    height: 76px;
  }

  .cv-match-ring-text strong {
    font-size: 1.2rem;
  }

  .cv-match-ring-text span {
    max-width: 54px;
    font-size: 0.58rem;
    letter-spacing: -0.02em;
  }

  .cv-match-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
  }

  .cv-bookmark {
    flex: 0 0 auto;
  }

  .cv-apply {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
}

/* Source badge variants (brand-aligned) */
.cv-source.source-linkedin {
  color: #a8d6f3;
  border-color: rgba(79, 170, 224, 0.46);
  background: rgba(31, 86, 122, 0.34);
}

.cv-source.source-emploitic {
  color: #c9b8ff;
  border-color: rgba(157, 124, 249, 0.48);
  background: rgba(90, 59, 154, 0.34);
}

.cv-source.source-jobdz,
.cv-source.source-jobindz {
  color: #f1c79a;
  border-color: rgba(237, 166, 96, 0.5);
  background: rgba(137, 75, 24, 0.35);
}

/* Designed empty / error states */
.cv-state {
  display: grid;
  gap: 12px;
  place-items: center;
  padding: 38px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 26, 42, 0.6);
  text-align: center;
}

.cv-state-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  color: var(--accent);
  background: rgba(65, 215, 114, 0.14);
}

.cv-state-icon .icon {
  width: 26px;
  height: 26px;
}

.cv-state h3 {
  margin: 0;
  color: var(--text);
}

.cv-state p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
}

.cv-state[data-tone="error"] .cv-state-icon {
  color: #ff8f8f;
  background: rgba(180, 60, 60, 0.18);
}

.cv-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}

/* Skeleton loading */
.cv-skeleton {
  display: grid;
  gap: 14px;
}

.cv-skel-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 26, 42, 0.7);
}

.cv-skel-block {
  height: 92px;
  border-radius: 16px;
}

.cv-skel-lines {
  display: grid;
  gap: 10px;
}

.cv-skel-line {
  height: 13px;
  border-radius: 999px;
}

.cv-skel-block,
.cv-skel-line {
  background:
    linear-gradient(
      90deg,
      rgba(126, 170, 210, 0.08) 25%,
      rgba(126, 170, 210, 0.2) 37%,
      rgba(126, 170, 210, 0.08) 63%
    );
  background-size: 200% 100%;
  animation: cvShimmer 1.4s ease-in-out infinite;
}

@keyframes cvShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Staggered card reveal */
@keyframes cvUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.cv-match-card {
  opacity: 0;
  animation: cvUp 520ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

/* Focus states */
.cv-submit:focus-visible,
.cv-reset:focus-visible,
.cv-apply:focus-visible,
.cv-bookmark:focus-visible,
.cv-text-link:focus-visible,
.cv-dropzone:focus-within {
  outline: 2px solid rgba(126, 233, 166, 0.9);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .cv-match-card {
    animation: none;
    opacity: 1;
  }

  .cv-skel-block,
  .cv-skel-line {
    animation: none;
  }

  .cv-text-link:hover,
  .cv-submit:hover:not(:disabled),
  .cv-match-card:hover {
    transform: none;
  }
}
