* {
  box-sizing: border-box; 
  font-family: monospace;
}

html, body {
  width: 100%;
  height: 100%;
  paddding: 0;
  margin: 0;
}

body {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  font-size:13px;
}

a {
  line-height: 1.125;
  font-size: 1.25em;
  text-decoration: none;
  color: lightgray;
  transition: color 0.3s;
}
a:before {
  content: '\00a0\00a0';
}
a:after {
  content: '\00a0\00a0';
}
a:hover {
  color: gray;
}
a:hover:before {
  content: '-\00a0';
}
a:hover:after {
  content: '\00a0-';
}

.border {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 2em;
}
.left {
  padding-right: 2.375em;
}
.right {
  padding-left: 2.375em;
}
.top {
  padding-bottom: 2.25em;
}
.bottom {
  padding-top: 2.25em;
  padding-bottom: 2.375em;
}
.left a {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.right a {
  writing-mode: vertical-rl;
}

.middle {
  flex: 1 0 0;
  max-width: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.center {
  flex: 1 0 0;
  background-image: url(http://boub.one/assets/lap1/square-transparent.svg);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: auto 95%;
  background-color: red;
  box-shadow: 0 0 1.875em lightgrey;
  transition: box-shadow 0.2s;
}
.center:hover {
  box-shadow: 0 0 1.125em grey;
  cursor: cell;
}

@media screen and (max-width: 640px) {
  .border {
    padding: 1.5em;
  }
  .left {
    padding-right: 1.78125em;
  }
  .right {
    padding-left: 1.78125em;
  }
  .top {
    padding-bottom: 1.6875em;
  }
  .bottom {
    padding-top: 2.25em;
    padding-bottom: 1.78125em;
  }
}