/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: "Sora", sans-serif;

}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

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

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  * {
    box-sizing: border-box;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

.view--layout {
  position: relative;
  min-height: 100vh;
  overflow: hidden;

  display: flex;
  flex-direction: column;
}

.view--layout__background {
  display: flex;
  position: fixed;
  inset: 0;
  background-image: linear-gradient(to bottom, #030303, #1D1D1D, #868585);
  z-index: 0;
}

.view--layout__layer {
  position: fixed;
  inset: 0;
  background-color: rgb(22 27 34 / 90%);
  z-index: 0;
  pointer-events: none;
}

.view--layout__layer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../img/bg-square.avif");
  background-size: cover;
  filter: url("../img/tv-static.webp");

  /* Control ONLY the grid opacity here */
  opacity: 2%;

  /* This ensures the grid blends with the colors behind it */
  mix-blend-mode: screen;
  pointer-events: none; /* Allows clicks to pass through to content */
}

.view--layout__layer > .view--layout__round-1 {
  top: 10%;
  left: 10%;
  background-color: #B794F4;
}

.view--layout__layer > .view--layout__round-2 {
  top: 15%;
  left: 40%;
  background-color: #0041C2;
}

.view--layout__layer > .view--layout__round-3 {
  top: 20%;
  right: 10%;
  background-color: #B794F4;
}

.view--layout__round {
  position: absolute;
  width: 40vw;
  height: 40vw;
  filter: blur(95px);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  opacity: 30%;
}

.view--container {
  position: relative;
  z-index: 5;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  max-width: 55%;
  margin: auto;
  padding: 1rem
}

.view--container > h2, .view--container > p {
  margin: 0;
  color: #F0F6FC;
  text-align: center;
}

.view--container > h2 {
  font-weight: bold;
  font-size: 2.5rem;
  margin-top: 3rem;
}

.view--container > p {
  font-weight: lighter;
  font-size: 1.75rem;
  margin-bottom: 3rem;

}

.console--container {
  padding: 0.2rem;
  border-radius: 0.5rem;
  box-sizing: content-box;

  width: 90%;
}

.view--container > img {
  width: 23%;
  height: auto;
}

.console--container > .console--header {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;

  background-color: rgba(11, 11, 11, 0.5);
  backdrop-filter: blur(1rem);
  color: #8B949E;

  border-radius: 1rem 1rem 0 0;
}

.console--header > .console--header-actions {
  display: flex;
  gap: 0.3rem;
  margin-left: 0.7rem;
}

.console--header-actions > .console--header-round {
  height: 1em;
  width: 1em;
  border-radius: 1rem;
  background-color: black;
  display: flex;
  justify-content: center;
  align-items: center;
}

.console--header-round > span {
  font-size: 0.8rem;
  color: black;
  display: none;
}

.console--header-round:hover span {
  display: block;
  cursor: pointer;
}


.console--header-actions > .console--header-round:first-child {
  background-color: #D20C3D;
}

.console--header-actions > .console--header-round:nth-child(2) {
  background-color: #C38D00;
}

.console--header-actions > .console--header-round:last-child {
  background-color: #10B981;
}

.console--header > h2 {
  text-align: center;
  font-size: 1rem;
  flex: 1
}

.console--container > .console--body {
  box-sizing: border-box;
  width: 100%;
  height: 20rem;
  padding: 1.5rem;

  overflow: auto;

  background-color: rgba(11, 11, 11, 0.2);
  backdrop-filter: blur(1rem);

  border-radius: 0 0 1rem 1rem;

  font-family: "Cutive Mono", monospace;
}

.console--body > p {
  margin: 0;
  animation: logPop 0.4s forwards;
}

.console--body > .outdated-log {
  color: #A3B1BF
}

.console--body > .error-log {
  color: #FF6161
}


.console--body > .updated-log {
  color: #7DFFB3
}

.console--body > .info-log {
  color: #4D91FF
}

.time-machine--container {
  position: fixed;
  bottom: 0.5rem;
  right: -1rem;
  overflow: hidden;

  text-align: center;
  z-index: 5;
}



.time-machine--container > img:not(.portefolio-img) {
  width: 7rem;
  height: 6rem;
  object-fit: cover;
  object-position: top;
}

.time-machine--container > .delorean--img {
  margin-right: -1rem;
}

.time-machine--container > .scientific-me--img {
  transform: rotate(10deg);
  margin-left: -1rem;
  object-position: top;
}

.time-machine--container--open .delorean--img {
  animation: open-left 0.4s forwards;
}

.time-machine--container--open .scientific-me--img {
  animation: open-right 0.4s forwards;
}

.time-machine--versions-container {
  position: fixed;
  bottom: 3rem;
  right: 3rem;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  opacity: 0;
  z-index: 5;
  color: #F0F6FC;
}

.time-machine--versions-container:hover {
  text-decoration: underline;
}
.time-machine--versions-container > .portefolio-img {
  width: 9rem;
  height: auto;
}

.time-machine--versions-container--open {
  cursor: pointer;
  animation: pop-in 0.4s forwards;

}

.time-machine--versions-container--close {
  animation: pop-out 0.4s forwards;
}

.time-machine--call-to-action {
  position: relative;
  left: 0;

  margin-top: -2rem;
  display: flex;
  justify-content: center;

  font-size: 1rem;
  color: #F0F6FC;
}

.time-machine--call-to-action > img {
  object-fit: contain;
  width: 4.5rem;
  height: auto;
}

.time-machine--container-animation:hover {
  cursor: pointer;
}

.time-machine--container-animation:hover .delorean--img {
  animation: floating-right 2s linear infinite;
}

.time-machine--container-animation:hover .scientific-me--img {
  animation: floating-left 2s linear infinite;
}

.time-machine--container-animation:hover p {
  text-decoration: underline;
}

.time-machine--call-to-action > p {
  width: 50%;
  text-align: left;
}

@keyframes floating-right {
  0% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(0.04turn) scale(1.1);
  }
  50% {
    transform: rotate(0);
  }
  75% {
    transform: rotate(-0.04turn) scale(1);
  }
  100% {
    transform: rotate(0);
  }
}


@keyframes floating-left {
  0% {
    transform: rotate(0);
  }
  33% {
    transform: rotate(-0.04turn) scale(0.8);
  }
  66% {
    transform: rotate(0.04turn) scale(1.1);
  }
  100% {
    transform: rotate(0);
  }
}

@keyframes logPop {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes open-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: rotate(-20deg);
    margin-right: 1rem;
  }
}

@keyframes open-right {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: rotate(20deg);
    margin-right: 1rem;
  }
}

@keyframes pop-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
    transform: translateY(-8rem);
  }
}

@keyframes pop-out {
  0% {
    opacity: 1;
    transform: translateY(-8rem);
  }
  100% {
    opacity: 0;
    transform: translateY(0rem);
  }
}

/**
Tablet
 */

@media (max-width: 1400px) {
  .view--container {
    max-width: 65%;
  }
}


@media (max-width: 1000px) {
  .view--container {
    max-width: 85%;
  }
}

@media (max-width: 768px) {

  .view--container > img {
    width: 10rem;
    height: auto;
  }

  .view--container > h2 {
    font-size: 1.8rem;
  }

  .view--container > p {
    font-size: 1.3rem;
  }

  .console--container {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .console--header > .console--header-actions, .console--header > h2 {
    font-size: 0.75rem
  }

  .view--container {
    max-width: 95%;
  }

  .console--container > .console--body {
    font-size: 0.75rem;
    height: 15rem;
  }

  .time-machine--container {
    right: 0.3rem;
  }

  .time-machine--container > img:not(.portefolio-img) {
    width: 4rem;
    height: 4rem;
  }

  .time-machine--call-to-action {
    margin-top: -0.8rem;
    font-size: 0.5rem;
  }

  .time-machine--call-to-action > img {
    width: 1.7rem;
  }

  .time-machine--container > .delorean--img {
    margin-right: -0.3rem;
  }

  .time-machine--container > .scientific-me--img {
    margin-left: -0.3rem;
  }
}

