html,
body {
  --secondary-color: hsl(207, 100%, 48%);
  --light-secondary-color: hsl(207, 86%, 80%);
  --red: hsl(0, 100%, 50%);
  --light-red: hsl(0, 100%, 70%);
  --background-color: hsl(0, 0%, 96%);
  --greyText-color: hsl(207, 21%, 43%);
  --lightGrey-color: hsl(207, 21%, 93%);
  --hoover-padding: 0.15em;
  height: 100%;

  --fs--header: clamp(0.6rem, 1.0vw + 0.8rem, 2.0rem);
  --fs-title: clamp(1rem, 0.6vw + 1rem, 3rem);
  --fs-big: 1.1rem;
  --fs--regular: 0.8rem;
  --fs-small: 0, 7rem;
  --fs-very-small: 0, 5rem;
  --fs-bigIcon: 1.5rem;

  --header-gap: 3rem;
}

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

a {
  text-decoration: none;
  color: black;
}

.header {
  width: 100%;
  background-color: var(--background-color);
  padding-top: 16px;
  padding-bottom: 16px;
  padding-right: clamp(2rem,
      3vw + 1rem,
      3.1rem);
  padding-left: clamp(2rem,
      3vw + 1rem,
      3.1rem);
  margin-bottom: 1rem;
}

.side-nav-ul a {
  text-decoration: none;
  color: black;
  cursor: pointer;
  line-height: 1.1em;
  padding-bottom: calc(2.1*var(--hoover-padding));
  background:
    conic-gradient(from 135deg at top, var(--secondary-color) 90deg, #0000 0) left 0 bottom var(--hoover-padding)/calc(2*var(--hoover-padding)) var(--hoover-padding) repeat-x,
    conic-gradient(from -45deg at bottom, var(--secondary-color) 90deg, #0000 0) left var(--hoover-padding) bottom 0/calc(2*var(--hoover-padding)) var(--hoover-padding) repeat-x;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0) 0/var(--_p, 0%) padding-box no-repeat;
  transition: .5s;
}

header a:focus {
  border: 1px solid var(--secondary-color);
}

#title {
  font-size: var(--fs-title);
  line-height: 2;
  white-space: line-break;
  text-align: left;
}

#coloredText {
  color: var(--secondary-color)
}

.nav-wrapper {
  display: flex;
  flex-direction: row;
  margin-right: auto;
  margin-left: auto;
  width: 55vw;
  /* border: 1px solid black */
}

.title-page {
  margin-right: auto;
}

.skip_nav_link {
  position: fixed;
  left: 20px;
  top: 0;
  background-color: var(--secondary-color);
  padding: 8px 16px;
  color: #FFFFFF;
  transform: translateY(-100%);
}

.skip_nav_link>a {
  color: #FFFFFF;
}

.skip_nav_link:focus {
  transform: translateY(0);
}

.side-nav {
  align-self: center;

}

.side-nav-ul {
  list-style-type: none;
  /* gap: clamp(
      1rem,
    12vw - 7rem,
    4rem
    ); */
  gap: var(--header-gap);
  padding: 0.1em;
  display: flex;
  align-items: center;
  word-wrap: break-word;
}

.side-nav-ul a:hover,
.side-nav-ul a:focus {
  --_p: 100%;
  color: var(--secondary-color);
}

.side-nav-ul a:focus {
  border: 1px solid var(--secondary-color);
}

.toggle-button {
  position: absolute;
  top: .65rem;
  right: 1rem;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  z-index: 9999;
}

.toggle-button .bar {
  height: 3px;
  width: 100%;
  background-color: var(--background-color);
  border-radius: 10px;
}

@media (max-width: 550px) {
  .side-nav-ul {
    display: none;
    position: fixed;
    inset: 0 0 0 50%;
    background: hsl(0 0% 100% / 0.1);
    backdrop-filter: blur(2rem);
    z-index: 2;
    flex-direction: column;
    align-items: flex-start;
    padding: min(25vh, 8rem) 2em;

    --header-gap: 1rem;
  }

  .toggle-button {
    display: flex;
  }

  .active {
    display: flex;
  }
}

/* About me section - picture */
.sectionComponent {
  align-self: center;
  /* margin-top: 1rem; */
  box-shadow: 1px 12px 32px -4px rgba(0, 0, 0, 0.46);
  width: 850px;
  background-color: var(--background-color);
  border-radius: 5px;
  margin-bottom: auto;
  flex-direction: column;
}


.aboutMe__header {
  display: flex;
  flex-wrap: wrap;
  /* background-color: var(--secondary-color); */
  border-radius: 10px 10px 10px 10px;
}

picture {
  border-radius: 10px 0px 0px 0px;
  flex: 1;
  flex-basis: 200px;
  background-color: var(--secondary-color);
}

picture img {
  display: block;
  margin-top: 3em;
  margin-right: auto;
  margin-left: auto;
  border: 3px solid var(--background-color);
  width: 75%;
  min-width: 200px;
  filter: drop-shadow(0 0 0.5rem rgba(0, 0, 0, 0.46));
}

picture img:hover {
  transform: translateY(-6px);
  filter: drop-shadow(0 0 0.5rem rgba(0, 0, 0, 0.6));
  transition: transform 200ms ease-in;
}

picture img:not(:hover) {
  transform: translateY(6px);
  filter: drop-shadow(0 0 0.5rem rgba(0, 0, 0, 0.46));
  transition: transform 200ms ease-in;
}


/* About me section - position */
.aboutMe__header__position {
  border-radius: 0px 10px 0px 0px;
  background-color: var(--secondary-color);
  flex: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-basis: 400px;
}


#nameAndSurname {
  font-size: var(--fs--header);
  background-color: inherit;
  color: var(--background-color);
  margin-top: 16px;
}

#positionName,
#positionName1,
#positionName2 {
  font-size: clamp(0.75rem, 0.6196rem + 0.6522vw, 1.125rem);
  font-weight: 500;
  color: var(--background-color);
  background-color: inherit;
}

.companyLogos {
  background-color: inherit;
  display: flex;
}

.companyLogos a,
svg {
  background-color: inherit;
  cursor: pointer;
}

.companyLogos svg:hover {
  transform: translateY(-3px);
  transition: transform 200ms ease-in;
}

.companyLogos svg:not(:hover) {
  transform: translateY(3px);
  transition: transform 200ms ease-in;
}

.aboutMe__details {
  display: flex;
  flex-wrap: wrap;
  padding: 3.5rem 0rem 1rem 2.7rem;
  border-radius: 0px 0px 5px 5px;
}

.aboutMe__details__description {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 8;
  flex-basis: 300px;
  padding-right: 1rem;
  position: relative;
}

#downloadBtn {
  border: none;
  border-radius: 3px;
  box-shadow: 0 1px 1px rgb(0 0 0 / 10%), 0 2px 4px rgb(0 0 0 / 30%);
  width: fit-content;
  line-height: 2.8;
  font-weight: 500;
  padding: 0rem 0.5rem;
  font-size: var(--fs--regular);
  margin-bottom: 1.5rem;
  cursor: pointer;
}

#downloadBtn:hover {
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%), 0 4px 8px rgb(0 0 0 / 30%);
}

#password {
  border: none;
  border-radius: 3px;
  background-color: var(--secondary-color);
  color: var(--background-color);
  font-size: var(--fs--regular);
  padding-inline: 0.5rem;
  line-height: 2.8;
  box-shadow: 0 1px 1px rgb(0 0 0 / 10%), 0 2px 4px rgb(0 0 0 / 30%);
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
  cursor: pointer;

  &:hover {
    background-color: var(--background-color);
    color: var(--secondary-color);
  }
}


.aboutMe__details__personalData {
  flex: 10;
  flex-basis: 250px;
  display: grid;
  font-size: var(--fs--regular);
  grid-template-columns: minmax(70px, 1fr) minmax(150px, 10fr);
  gap: 0.8em;
  grid-template-rows: 2rem 2rem 2rem 2rem;
  padding: 2.7rem;
}

.aboutMe__details__personalData p {
  white-space: nowrap;
}

#greyText {
  color: var(--greyText-color);
  overflow-wrap: break-word;
}


/* Footer */
footer {
  width: 100%;
  min-height: 5%;
  margin-top: 2rem;
}

footer div:first-of-type {
  font-size: var(--fs--regular);
  padding: 1rem 0rem;
  text-align: center;
  background-color: transparent;
}




/* Portfolio */
#portfolio {
  width: min(1000px, 80%)
}

.section__header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--secondary-color);
  border-radius: 10px 10px 0px 0px;
  padding: 30px 50px;
  background-color: var(--secondary-color);
}

.section__header h2 {
  font-size: var(--fs--header);
  background-color: inherit;
  color: var(--background-color);
}

.portfolio__details {
  background-color: var(--background-color);
  border-radius: 0px 0px 10px 10px;
}

.portfolio__grid {
  display: grid;
  place-items: center;
  margin: 5rem 4rem;
  gap: 0.5rem;
  line-height: 1.6;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr))
}

.card {
  color: var(--background-color);
  padding: 10rem 0 0;
  width: 280px;
  border-radius: 3px;
  overflow: hidden;
  transition: transform 500ms ease;
}

.knowledgeGame {
  background-image: url(images/knowledgeGame.png);
  background-size: 200%;
  background-position: center;
  background-repeat: no-repeat;
}

.productivity {
  background-image: url(images/rssfeed.png);
  background-size: 200%;
  background-position: 50% 0px;
  background-repeat: no-repeat;
}

.etime {
  background-image: url(images/bookmark.jpg);
  background-size: 125%;
  background-position: center;
  background-repeat: no-repeat;

}

.card:hover,
.card:focus-within {
  transform: scale(1.05);
}

.card:hover .card-title::after,
.card:focus-within .card-title::after {
  transform: scaleX(1);
}

.card:hover .card-content>* {
  opacity: 1;
}

.card-content {
  --padding: 1.5rem;
  background: linear-gradient(hsl(0 0% 0% / 0),
      hsl(20 0% 0% / 0.2) 20%,
      hsl(0 0% 0% / 1));
  padding: var(--padding);

}

.card-content>* {
  background: transparent;
}

.card-title {
  position: relative;
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-title::after {
  content: '';
  position: absolute;
  height: 4px;
  left: calc(var(--padding) * -1);
  bottom: -2px;
  background: var(--secondary-color);
  width: calc(100% + var(--padding));

  transform-origin: left;
  transition: transform 500ms ease;
}

.card-body {
  margin-top: .5em;
  color: hsl(0 0% 100% / 0.8);
  font-size: var(--fs-small);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.button {
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  border: none;
  border-radius: 3px;
  background-color: var(--secondary-color);
  box-shadow: 0 1px 1px rgb(0 0 0 / 10%), 0 2px 4px rgb(0 0 0 / 30%);
  width: fit-content;
  line-height: 2.8;
  font-weight: 500;
  padding: 0rem 1rem;
  margin-top: 0.5em;
  font-size: var(--fs--regular);
  color: white;
}

.button:hover,
.button:focus {
  background-color: white;
  color: var(--secondary-color);
}

/* Experience */

.experience__wrapper {
  --column-count: 2;
  padding: 4rem 4rem 0rem 4rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(var(--column-count), 350px);
  grid-template-rows: 350px 470px 1fr;
  grid-column-gap: 3rem;
  grid-row-gap: 1rem;
}

.timeline {
  border-left: 2px solid hsl(208, 26%, 82%);
  margin-bottom: 2rem;
}

.timeline h3 {
  transform: translateY(-2.2rem);
}

.timeline.education {
  grid-row: 1 / 2;
  margin-bottom: 0rem;
}

.timeline.experience {
  grid-row: 1 / -1;
}

.skills {
  grid-row: 2 / 3;
  align-self: flex-start;
}

.timeline__element {
  --padding-top: 32px;
  --padding-left: 16px;
  --margin-left: 16px;
  border-left: 2px solid var(--secondary-color);
  box-shadow: 0 0 3px 0 rgba(0, 0, 0, .2);
  margin: 0rem 0rem 32px var(--margin-left);
  padding-left: var(--padding-left);
  padding-right: var(--padding-left);
  padding-top: var(--padding-top);
  padding-bottom: var(--padding-top);
  line-height: 1.7;
  width: 300px;
  position: relative;
}

.timeline__element p {
  font-size: var(--fs--regular);
}

.timeline__element::before {
  --height: 8px;
  content: '';
  position: absolute;
  width: 8px;
  height: var(--height);
  border-radius: 10px;
  border: 2px solid var(--secondary-color);
  background-color: white;
  left: calc(-9px - var(--padding-left));
  top: calc(var(--padding-top) - var(--height));
  z-index: 2;
}

.timeline.education>.timeline__element {
  height: 130px;
}

.timeline__element::after {
  content: '';
  position: absolute;
  width: 0.8rem;
  height: 0.1rem;
  border-radius: 10px;
  background-color: var(--secondary-color);
  left: calc(2px - var(--padding-left));
  bottom: calc(100% - 32px);
  z-index: 1;
}

.timeline__description {
  color: var(--greyText-color);
  margin: 0.2rem 0rem 0rem 1.1rem;
}

.timeline__description span {
  display: list-item;
}

.timeline__description span::marker {
  content: '⭐ ';
  font-size: var(--fs-small);
}

.skills h3,
.languages h3 {
  margin-bottom: 1.2rem;
}

.skill {
  width: 100%;
  height: 0.9rem;
  border: 1px solid var(--greyText-color);
  background-color: var(--lightGrey-color);
  margin: 0.3rem 0rem 0.7rem;
}

.skill-percent {
  background-color: var(--secondary-color);
  min-height: 100%;
  width: 0%;
  transition: width 2s;
}

.languages {
  grid-row: 3/4;
}

.languages svg {
  margin: 0.3rem 0rem 0.7rem;
}


/* contact section */
.contact__wrapper {
  display: flex;
  border-radius: 0px 0px 10px 10px;
  padding: 2rem 4rem 3rem 4rem;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4rem;
}

.contact__information h3 {
  text-align: center;
  margin-top: 2rem;
}

.form__wrapper h3 {
  margin-bottom: 1.2rem;
}

form {
  display: grid;
  gap: 2rem;
  place-content: center;
}

.form-group__input {
  margin-top: 0.5rem;
  border-bottom: 1px solid var(--lightGrey-color);
  transition: border-bottom 250ms ease-in-out;
}


.form-group input {
  border: 0;
  color: inherit;
  width: 80%;
}

.form-group input:focus {
  outline: none;
}

.form-group i {
  background-color: var(--lightGrey-color);
  padding: 0.5rem;
  color: var(--greyText-color);
  transition: color 250ms ease-in-out;
}

.form-group label {
  color: var(--greyText-color);
  padding-bottom: 0.5rem;
}

#sendMessageBtn {
  border: none;
  border-radius: 3px;
  background-color: var(--secondary-color);
  box-shadow: 0 1px 1px rgb(0 0 0 / 10%), 0 2px 4px rgb(0 0 0 / 30%);
  width: fit-content;
  line-height: 2.8;
  font-weight: 500;
  padding: 0rem 1rem;
  font-size: var(--fs--regular);
  color: white;
  cursor: pointer;

  &:hover {
    background-color: var(--background-color);
    color: var(--secondary-color);
  }
}

.errorLabel {
  display: none;
  width: 100%;
  background-color: var(--light-red);
  border: 1px solid var(--red);
  border-radius: 5px;
  margin-bottom: 1.2rem;
  color: white;
  padding: 0.3rem 0rem;
  text-align: center;
  font-size: var(--fs--regular);
  font-weight: 500;
}

.result__wrapper {
  display: flex;
  border-radius: 0px 0px 10px 10px;
  padding: 2rem 4rem 3rem 4rem;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  flex-direction: column;
  align-items: center;
}

/* Modal */
.overlay {
  display: grid;
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: hsl(0 0% 0% / 0.2);
  z-index: 9999;
  place-content: center;
  transform: scale(0);
  transform-origin: 30% 85%;
  transition: transform 500ms ease;
}

.backdrop {
  display: grid;
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: hsl(0 0% 0% / 0.2);
  z-index: 9999;
  place-content: center;
  transform: scale(0);
  transform-origin: 50% -50%;
  transition: transform 500ms ease;
}

.modal {
  background-color: var(--background-color);
  padding: 4rem 2rem;
  border-radius: 10px;
}

.modal-content {
  font-size: var(--fs--regular);
  font-weight: 500;
  text-align: center;
}

.modal-content>* {
  margin-top: 0.8rem;
}

.modal-content>i {
  font-size: 1.2rem;
}

.feedback-form {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-direction: column;
}

.input-group {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 4px;
  margin-left: 12px;
}

#send-feedback {
  border: none;
  border-radius: 3px;
  background-color: var(--secondary-color);
  color: var(--background-color);
  font-size: var(--fs--regular);
  padding-inline: 0.5rem;
  line-height: 2.8;
  box-shadow: 0 1px 1px rgb(0 0 0 / 10%), 0 2px 4px rgb(0 0 0 / 30%);
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
  cursor: pointer;
  margin-top: 0.8rem;

  &:hover {
    background-color: var(--background-color);
    color: var(--secondary-color);
  }
}

/* Animations */

@keyframes fadeIn {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

@keyframes slideOut {
  from {
    transform: translate(0px);
  }

  to {
    transform: translate(-3000px);
  }
}

.shown {
  animation: fadeIn 500ms ease-in;
  animation-fill-mode: forwards;
}

.hidden {
  animation: slideOut 1000ms ease-in;
  animation-fill-mode: forwards;
}

.active {
  color: var(--secondary-color);
}

/* background */
body {
  background-image: url('./background/background@1.png');
  background-size: 1250px;
}

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 2dppx) {
  body {
    background-image:
      url('./background/background@2.png');
  }
}

@media (-webkit-min-device-pixel-ratio: 3),
(min-resolution: 3dppx) {
  body {
    background-image:
      url('./background/background@3.png');
  }
}


@media (max-width: 1100px) {
  .header {
    background-color: var(--secondary-color);
  }

  .nav-wrapper {
    background-color: var(--secondary-color);
    justify-content: center;
  }

  .title-page {
    display: none;
  }

  .active {
    color: var(--background-color);
  }

  header a {
    color: white;
    background-color: var(--secondary-color);
  }

  .side-nav-ul a:hover {
    --_p: 100%;
    color: var(--background-color);
  }

  #surname {
    color: white;
    background-color: var(--secondary-color);
  }

  .side-nav-ul {
    color: white;
    background-color: var(--secondary-color);
  }

  .side-nav-ul li:first-of-type {
    background-color: var(--secondary-color);
    text-align: center;
  }

  #companyLogos {
    margin-bottom: 16px;
  }

  .background {
    background-size: 200%;
  }

  /* about me section */

  .page-header {
    flex-direction: column;
  }

  .col.paul-desc {
    padding: 8px 0px 0px 8px;
    border-radius: 0 0 0 0;
  }

  picture img {
    width: 30%;
  }
}

/* tablet  */
@media (max-width: 820px) {
  .background {
    background-size: 300%;
  }

  .aboutMe__details__personalData {
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    padding: 0;
  }

  .content-section {
    width: 90%
  }

  .sectionComponent {
    width: 90%;
  }

  .experience__wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0rem;
    justify-content: center;
  }

  .timeline.education {
    margin-bottom: 4rem;
  }

  .skills,
  .languages {
    width: 300px;
    margin-bottom: 2rem;
  }
}


/* laptop */
@media (max-width: 1600px) {
  .aboutMe__details {
    padding-top: 2.0rem;
  }

  /* .side-nav-ul li { 
    background-color: var(--secondary-color);
  } */
}

/* mobile  */
@media (max-width: 550px) {

  .sectionComponent {
    margin-bottom: 2rem;
  }

  #portfolio {
    width: 95%;
  }

  .aboutMe__details__personalData>p,
  .aboutMe__details__personalData>span {
    font-size: 0.9rem;
  }

  .aboutMe__header__position {
    margin-bottom: 2rem;
  }

  .portfolio__grid {
    margin: 1rem 2rem;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr))
  }

  .timeline__element {
    width: 210px;
    height: auto;
  }

  .contact__information>svg {
    width: 200px;
    height: 220px;
  }

  .contact__wrapper {
    gap: 2rem;
  }

  .header {
    padding-top: 20px;
    padding-bottom: 16px;
  }

  .side-nav-ul a {
    padding-bottom: 0px;
  }
}

@media (width < 750px) {
  .aboutMe__header__position {
    border-radius: 0px 10px 0px 0px
  }

  picture {
    background-color: var(--secondary-color);
    padding-bottom: 1rem;
  }

  .aboutMe__header__position {
    padding-bottom: 3rem;
  }
}

@media (width < 665px) {
  picture {
    border-radius: 10px 10px 0 0;
  }

  .aboutMe__header__position {
    border-radius: 0px;
  }
}

@media (hover: hover) {
  .card-content {
    transform: translateY(56%);
    transition: transform 500ms ease;
  }

  .card:hover .card-content,
  .card:focus-within .card-content {
    transform: translateY(0);
    transition-delay: 500ms;
  }

  .card:focus-within .card-content {
    transition-duration: 0ms;
  }

  .card:hover .card-content>*:not(.card-title),
  .card:focus-within .card-content>*:not(.card-title) {
    opacity: 1;
    transition-delay: 1000ms;
  }

  .card-content>*:not(.card-title) {
    opacity: 0;
    transition: opacity 500ms linear;
  }

  .card-title::after {
    transform: scaleX(0);
  }
}