:root {
  --bg: #050911;
  --panel: #0a1120;
  --line: #2a3e63;
  --text: #eef3ff;
  --muted: #a9b8d7;
  --blue: #3b79ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 30px 16px;
  font-family: Inter, Arial, sans-serif;
  background: radial-gradient(circle at top left, #13284f, var(--bg) 35%);
  color: var(--text);
}

.cv-page {
  width: min(980px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(10, 17, 32, 0.98), rgba(6, 11, 21, 0.98));
  padding: 30px;
}

.cv-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.cv-header h1 {
  margin: 0;
  font-size: 2rem;
}

.cv-title {
  margin: 8px 0 0;
  color: var(--blue);
  font-weight: 700;
}

.cv-contact p {
  margin: 0 0 8px;
  text-align: right;
  color: #c8d6f0;
}

.cv-section {
  margin-top: 22px;
}

.cv-section h2 {
  margin: 0 0 12px;
  color: var(--blue);
  letter-spacing: 0.05em;
  font-size: 1rem;
  text-transform: uppercase;
}

.cv-section p,
.cv-section li {
  color: #d8e2f7;
  line-height: 1.6;
}

.item {
  border: 1px solid #28406a;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(10, 18, 34, 0.72);
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.item-head h3 {
  margin: 0;
}

.item-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills span {
  border: 1px solid #385894;
  color: #dfe9ff;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 29, 56, 0.8);
  font-weight: 600;
}

@media (max-width: 760px) {
  .cv-page {
    padding: 18px;
  }

  .cv-header,
  .item-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .cv-contact p {
    text-align: left;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
    padding: 0;
  }

  .cv-page {
    width: 100%;
    border: none;
    border-radius: 0;
    background: #fff;
    color: #111;
    padding: 12mm;
  }

  .cv-title,
  .cv-section h2 {
    color: #1e4ec8;
  }

  .cv-section p,
  .cv-section li,
  .cv-contact p,
  .item-head span {
    color: #222;
  }

  .item,
  .skills span,
  .cv-header {
    border-color: #b9c8e6;
    background: #fff;
  }
}
