<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Flex Image Gallery</title>

    <link rel="stylesheet" href="./styles.css"/>
  </head>

  <body>
    <div class="panels">
      <div class="panel one">
        <header class="title">About</header>

        <span class="highlight">Marina</span>

        <ul class="details">
          <li class="item">29 anos</li>
          <li class="item">São Paulo/SP</li>
          <li class="item">Engenharia de Materiais - Dez/2015</li>
        </ul>
      </div>

      <div class="panel two">
        <header class="title">Courses</header>

        <span class="highlight">Ferreira</span>

        <ul class="details">
          <li class="item">
            <a href="https://edx.org/course/introduction-computer-science-harvardx-cs50x">CS50 - edX</a>
          </li>

          <li class="item"><a href="https://campuscode.com.br/">Campus Code</a></li>

          <li class="item">
            <a class="line-break"href="https://coursera.org/learn/interactive-python-1">
              <span>An Introduction to Interactive Programming in Python</span>
            </a>
          </li>
        </ul>
      </div>

      <div class="panel three">
        <header class="title">Projects</header>

        <span class="highlight">Full</span>

        <ul class="details">
          <li class="item">
            <a href="http://convert-it-all.com/" target="_blank">Convert it all</a>
          </li>

          <li class="item">
            <a href="https://locaweb.com.br/criador-de-sites/" target="_blank">Criador de Sites</a>
          </li>
        </ul>
      </div>

      <div class="panel four">
        <header class="title">Contact</header>

        <span class="highlight">Stack</span>

        <ul class="details">
          <li class="item">
            <a href="https://linkedin.com/in/marinaferreiradeveloper/"  target="_blank">Linkedin</a>
          </li>

          <li class="item">
            <a href="https://github.com/inBlackAndWhite" target="_blank">GitHub</a>
          </li>
        </ul>
      </div>
      <div class="panel five">
        <header class="title">🌹</header>

        <span class="highlight developer">Developer</span>
        <span class="highlight sm-highlight">Dev</span>

        <ul class="details">
          <li class="item">Fabriqué avec amour ❤️</li>
        </ul>
      </div>
    </div>

    <script src="./scripts.js"></script>
  </body>
</html>
@import url('https://fonts.googleapis.com/css?family=Audiowide|Play');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  color: #fff;
  font-family: 'Audiowide', cursive;
}

.panels {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
}

.panel {
  padding: 0 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: flex 0.7s cubic-bezier(0.38, -0.06, 0.7, -0.11);
  text-shadow: 1px 1px 1px #000, -1px 1px 1px #000, 1px -1px 1px #000;
}

.panel .highlight {
  font-size: 36px;
  text-shadow: 1px 1px 1px #000, 2px 2px 1px #000;
  transition: font-size 0.7s cubic-bezier(0.38, -0.06, 0.7, -0.11);
}

.panel .sm-highlight {
  display: none;
}

.panel .title {
  flex: 3;
  font-family: 'Play', sans-serif;
  font-size: 24px;
  text-transform: uppercase;
}

.panel .details {
  flex: 3;
  font-family: 'Play', sans-serif;
  font-size: 24px;
}

.panel .details .item {
  list-style-type: none;
  margin: 5px 0;
}

.panel .details .item a {
  color: #fff;
  text-decoration: none;
}

.panel > * {
  flex: 1;
  display: flex;
  justify-content: center;
  flex-direction: column;
  transition: transform .5s cubic-bezier(0.38, -0.06, 0.7, -0.11);
}

.panel:last-of-type .details {
  text-align: center;
}

.panel.open {
  flex: 5;
}

.panel.open .highlight {
  font-size: 48px;
}

.panel > *:first-child { transform: translateY(-300px); }
.panel.active > *:first-child { transform: translateY(0); }
.panel > *:last-child { transform: translateY(300px); }
.panel.active > *:last-child { transform: translateY(0); }

.panel.one {
  background: #463785 url('https://source.unsplash.com/5pXwpRw6O8c/1000x1000');
  background-position: -100px 0;
}

.panel.two {
  background: #124559 url('https://source.unsplash.com/nIkuMWT4Imc/800x800');
  background-position: center;
}

.panel.three {
  background: #4A1942 url('https://source.unsplash.com/4rDCa5hBlCs/1000x1000');
  background-position: center;
}

.panel.four {
  background: #598392 url('https://source.unsplash.com/1DGD2_CKCbo/800x900');
  background-position: center;
}

.panel.five {
  background: #893168 url('https://source.unsplash.com/45bI5ezo3gE/800x1000');
  background-position: center;
}

@media screen and (max-width: 1080px) {
  .panel.open .highlight { font-size: 30px; }
  .panel .sm-highlight { display: flex; }
  .panel .highlight.developer { display: none; }
  .panel .highlight {
    font-size: 18px;
    transition: font-size .7s cubic-bezier(0.38, -0.06, 0.7, -0.11);
  }

  .panel .title,
  .panel .details {
    font-size: 12px;
    transition: transform .7s cubic-bezier(0.38, -0.06, 0.7, -0.11);
  }

  .panel .details .item { margin: 3px 0; }
}

@media screen and (max-width: 780px) and (max-height: 500px){
  .panel.one {
    background: #463785 url('https://source.unsplash.com/5pXwpRw6O8c/500x400');
  }

  .panel.two {
    background: #124559 url('https://source.unsplash.com/nIkuMWT4Imc/500x400');
    background-position: center;
  }

  .panel.three {
    background: #4A1942 url('https://source.unsplash.com/4rDCa5hBlCs/500x400');
    background-position: center;
  }

  .panel.four {
    background: #598392 url('https://source.unsplash.com/1DGD2_CKCbo/500x400');
  }

  .panel.five {
    background: #893168 url('https://source.unsplash.com/45bI5ezo3gE/500x400');
    background-position: center;
  }
}
const panels = document.querySelectorAll('.panel');

function togglePanel(e) {
  const delay = 300;
  let isOpen = this.classList.contains('open');

  if (isOpen) {
    this.classList.remove('active');
    setTimeout(() => this.classList.remove('open'), delay);

    return;
  }

  this.classList.add('open');
  setTimeout(() => this.classList.add('active'), delay);
}

panels.forEach(panel => panel.addEventListener('click', togglePanel));