:root {
  --main-text-color: white;
}

/* Base */
body {
  background-image: url(content/background.jpg);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: 100% 100%;
  color: var(--main-text-color);
  font-family: 'doto';
  font-weight: 500;
}

a,
a:visited {
  padding: 5px;
  color: white;
  text-decoration: none;
}

a:hover {
  padding: 5px;
  background-color: white;
  color: black;
}

/* Header and startup dialog */
header {
  display: flex;
  justify-content: space-between;
  margin: 50px;
  text-align: center;
  animation: strugglingBoot 4s ease forwards;
}

.header_clock {
  margin: 10px 5px;
  font-size: medium;
}

#clock {
  font-weight: bold;
}

#work-in-progress {
  width: min(420px, calc(100vw - 48px));
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid white;
  border-radius: 5px;
  background: #080808;
  color: white;
  font-family: inherit;
  text-align: center;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.7);
  animation: fadein 1s;
}

#work-in-progress::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

#work-in-progress h2 {
  margin-top: 0;
}

#close-work-in-progress {
  padding: 8px 18px;
  border: 1px solid white;
  border-radius: 2px;
  background: white;
  color: black;
  font: inherit;
  cursor: pointer;
}

#close-work-in-progress:hover,
#close-work-in-progress:focus-visible {
  background: black;
  color: white;
}

/* Portfolio information */
#informations {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin: 0 100px;
}

#portrait {
  width: 30vw;
  border-radius: 5px;
}

#ascii-container {
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.507);
  color: white;
  font-size: 5px;
  line-height: 1;
  text-align: center;
}

.Decorated_paragraph {
  padding-right: 20px;
  border-right: 2px solid;
}

.left_info {
  text-align: left;
  animation: strugglingBoot 2s ease forwards;
}

.right_info {
  margin-top: 0;
  text-align: right;
  animation: strugglingBoot 2s ease forwards;
}

.right_info_deco {
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 0.1;
}

#bio {
  width: 35vw;
  margin-bottom: 50px;
}

.right_info ul {
  list-style-type: none;
}

.right_info h4 {
  margin-bottom: 5px;
}

.contact,
.equipement {
  margin-top: 50px;
  padding-left: 50px;
}

/* Loader and memory display */
#fake-loader {
  display: flex;
  flex-direction: row;
  justify-content: right;
  gap: 2px;
  padding-right: 10px;
}

.block {
  width: 8px;
  height: 20px;
  background: #38383856;
  transition: background 0.2s;
}

.block.active {
  background: white;
}

#memory {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px;
}

#memory-line {
  opacity: 0;
  animation: fadein 0.3s;
}

/* Projects carousel */
#projects {
  margin: 80px 100px;
}

.projects-carousel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.projects-carousel-viewport {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.projects-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.projects-carousel-track {
  display: flex;
  gap: 20px;
}

.project-placeholder {
  position: relative;
  display: flex;
  flex: 0 0 calc((100% - 40px) / 3);
  align-items: center;
  justify-content: center;
  min-height: 220px;
  box-sizing: border-box;
  border: 1px dashed rgba(255, 255, 255, 0.6);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.35);
  scroll-snap-align: start;
}

.project-placeholder-number,
.project-placeholder-label {
  position: absolute;
  color: rgba(255, 255, 255, 0.75);
}

.project-placeholder-number {
  top: 12px;
  left: 14px;
}

.project-placeholder-label {
  bottom: 12px;
  font-size: small;
  text-transform: uppercase;
}

.projects-carousel-button {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid white;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font: inherit;
  cursor: pointer;
}

.projects-carousel-button:hover:not(:disabled),
.projects-carousel-button:focus-visible:not(:disabled) {
  background: white;
  color: black;
}

.projects-carousel-button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Professional experience */
#experiences {
  margin: 100px 150px 0 150px;
}

#experiences .align_left,
#experiences .align_right {
  margin-top: 20px;
}

#experiences .align_left {
  text-align: left;
}

#experiences .align_right {
  text-align: right;
}

#experiences ul {
  line-height: 1.5;
  animation: strugglingBoot 6s ease forwards;
}

#experiences .align_right ul {
  list-style-type: none;
}

/* Visual effects */
.highlight-word {
  background-color: aliceblue;
  color: black;
  font-weight: bolder;
  transition: 0.3s;
}

.noise {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 5px;
  background: rgba(240, 231, 231, 0.671);
  opacity: 1;
  box-sizing: border-box;
  box-shadow:
    -2px 1px 10px rgba(255, 0, 0, 0.1),
    2px -1px 10px rgba(0, 0, 255, 0.1);
}

.noise h1,
.noise h2,
.noise h3,
.noise h4,
.noise p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: black;
}

.pixel {
  position: absolute;
  width: 5px;
  height: 5px;
  background: black;
  pointer-events: none;
}

.text-idle {
  animation: blink 1s steps(1, start) infinite;
}

/* Responsive layout */
@media screen and (max-width: 768px) {
  header {
    margin-right: 5px;
    margin-left: 0;
  }

  header .noise h1 {
    padding: 10px;
    font-size: medium;
  }

  .header_clock {
    font-size: small;
  }

  #informations {
    margin: 0;
  }

  #informations h2,
  #informations h1 {
    font-size: large;
  }

  #informations #ascii-container {
    font-size: 2px;
    line-height: 1.1;
  }

  #projects {
    margin: 60px 16px;
  }

  .project-placeholder {
    flex-basis: 100%;
    min-height: 190px;
  }
}

/* Animations */
@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }

  50.01%,
  100% {
    opacity: 0;
  }
}

@keyframes fadein {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes strugglingBoot {
  0% {
    opacity: 0;
    filter: brightness(0);
  }

  8% {
    opacity: 0.15;
    filter: brightness(0.3);
  }

  10% {
    opacity: 0;
  }

  18% {
    opacity: 0.25;
    filter: brightness(0.6);
  }

  20% {
    opacity: 0.05;
  }

  35% {
    opacity: 0.6;
    filter: brightness(1.5);
  }

  38% {
    opacity: 0.2;
  }

  45% {
    opacity: 0.9;
    filter: brightness(2);
  }

  48% {
    opacity: 0.3;
  }

  60% {
    opacity: 0.6;
  }

  70% {
    opacity: 0.8;
    filter: brightness(1.2);
  }

  100% {
    opacity: 1;
    filter: brightness(1);
  }
}
