:root {
  --font: "Times New Roman", serif;
  --main-color: #216ce1;
  --medium-color: #85b0e6;
  --light-color: #d9eaff;
  --outline-color: #92baeb;
  --shadow-color: #08337933;
  --border-color: #80808040;
  --add-hover-color: #1378d6;
  --add-hover-background-color: #1378d63b;
  --remove-color: #ac2043;
  --remove-hover-color: #db476c;
  --remove-hover-background-color: #db476c3b;
  --white: white;
  --black: black;
}

html {
  font-family: var(--font);
  background: linear-gradient(180deg, var(--light-color), var(--medium-color));
  overflow-x: hidden;
}

body {
  margin: 50px 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

header {
  text-align: center;
  font-weight: bold;
  font-size: 44px;
  margin-bottom: 50px;
  background: linear-gradient(0, var(--medium-color), var(--main-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--white);
  font-family: Tahoma;
  -webkit-text-stroke: 10px transparent;
  text-shadow: 2px 2px var(--main-color);
}

.main-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
  align-items: center;
}

/* Page content */
.page {
  width: 210mm;
  min-height: 297mm;
  height: fit-content;
  background: var(--white);
  padding: 20mm;
  box-shadow: 0 0 15px var(--shadow-color);
  position: relative;
}

input {
  font-family: var(--font);
  font-size: 16px;
  height: 24px;
  padding: 3px 5px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
}

input:focus {
  outline: 2px solid var(--outline-color);
}

.name {
  font-size: 22px;
  display: flex;
  margin: 0 auto 10px auto;
  font-weight: bold;
}

.contacts-section {
  display: flex;
  justify-content: center;
  font-size: 15px;
  gap: 15px;
}

.flex-container {
  display: flex;
}

h1 {
  font-weight: bold;
  font-size: 20px;
  margin-top: 20px;
}

.add {
  margin: 19px 0 0 10px;
  font-size: 24px;
  background: none;
  border: 2px solid var(--main-color);
  border-radius: 10px;
  width: 25px;
  height: 25px;
  font-weight: bold;
  cursor: pointer;
  color: var(--main-color);
  padding: 0;
  line-height: 0;
}

.add:hover {
  color: var(--add-hover-color);
  border-color: var(--add-hover-color);
  background: var(--add-hover-background-color);
  width: 26px;
  height: 26px;
  margin-top: 19px;
}

.job-title-container,
.degree-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.remove {
  font-size: 24px;
  background: none;
  border: 2px solid var(--remove-color);
  border-radius: 10px;
  width: 25px;
  height: 25px;
  font-weight: bold;
  cursor: pointer;
  color: var(--remove-color);
  line-height: 0;
}

.remove:hover {
  color: var(--remove-hover-color);
  border-color: var(--remove-hover-color);
  background: var(--remove-hover-background-color);
  width: 26px;
  height: 26px;
}

hr {
  margin: -10px auto 15px auto;
  color: var(--black);
  border: none;
  border-top: 2px solid var(--black);
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

.second-title {
  font-size: 18px;
  font-weight: bold;
}

.date-container {
  display: flex;
  gap: 5px;
  justify-self: end;
}

.work-start-date,
.education-start-date {
  text-align: end;
}

p {
  margin: auto;
}

.third-title {
  font-size: 16px;
  margin-top: 10px;
}

.location {
  justify-self: end;
}

li {
  list-style: none;
  position: relative;
}

li::before {
  content: "•";
  position: absolute;
  left: -25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

.text {
  font-family: var(--font);
  font-size: 14px;
  width: 100%;
  height: 16px;
  text-align: start;
  padding: 5px;
  margin-left: -15px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: pre-wrap;
  border-radius: 5px;
  border: 1px solid var(--border-color);
}

.text:focus {
  outline: 2px solid var(--outline-color);
}

.grid-container.skills {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.grid-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin: 0;
}

.skill-list::before {
  content: "•";
  position: absolute;
  left: -25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
}

.second-title[placeholder="Language"] {
  margin-bottom: 5px;
}

#certification-input {
  display: grid;
  margin-bottom: 5px;
}

/* Buttons */
.buttons-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: fixed;
  top: 152px;
  margin-left: 1110px;
  align-items: start;
  z-index: 1000;
}

.buttons-container button {
  font-family: Tahoma;
  height: fit-content;
  width: fit-content;
  position: relative;
  background: linear-gradient(180deg, var(--light-color), var(--medium-color));
  color: var(--main-color);
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 0 10px var(--shadow-color);
  text-shadow: 1px 1px var(--light-color);
}

.buttons-container button:hover {
  zoom: 1.05;
  background: linear-gradient(0deg, var(--light-color), var(--medium-color));
}

footer {
  text-align: center;
  width: 100%;
  margin: 50px 0 -30px 0;
}

/* Print */
@page {
  size: A4;
  margin: 15mm;
}

@page :first {
  margin-top: 0;
}

@media print {
  button,
  header,
  .load-file,
  footer {
    display: none;
  }

  input,
  .text {
    border: none;
  }

  .page {
    box-shadow: none;
    margin: 0;
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
  }

  .name {
    margin-top: -10mm;
    font-size: 22px;
  }

  input.contact {
    display: none;
  }

  .contact-print {
    display: block;
    pointer-events: auto;
    font-size: 13px;
    margin: 0 0 25px 0;
  }

  h1 {
    font-size: 18px;
    margin-top: 5px;
  }

  hr {
    margin: -8px auto 20px auto;
  }

  .grid-container {
    width: 103%;
    margin-left: -5px;
    margin-top: -15px;
  }

  .second-title {
    font-size: 15px;
  }

  .third-title {
    font-size: 13px;
    margin-top: -5px;
  }

  p {
    margin: auto;
    line-height: 1.8;
  }

  ul {
    margin-top: 0;
  }

  li {
    margin-bottom: -5px;
  }

  .text {
    font-size: 12px;
  }

  .grid-list {
    gap: 0;
  }

  .skill-list {
    margin-bottom: 0;
  }

  .second-title[placeholder="Language"],
  #certification-input {
    margin-top: -12px;
  }

  .third-title[placeholder="CEFR Level"] {
    margin: -12px auto auto -10px !important;
  }

  #language-divider {
    display: none;
  }

  #languages-title,
  #certifications-title {
    margin-top: 20px !important;
  }

  .category-container {
    page-break-inside: avoid;
  }

  .category-container {
    page-break-inside: avoid;
  }
}
