@import url(https://fonts.bunny.net/css?family=alegreya:500,500i);

* {
  box-sizing: border;
  --bg: hsl(180, 15%, 95%);
  --text: hsl(130, 20%, 10%);
  --accent: hsl(130, 20%, 40%);
  --spring: cubic-bezier(0.5, 3, 0.5, 0.8);
}

@media (prefers-color-scheme: dark) {
  * {
    --bg: hsl(180, 10%, 10%);
    --text: hsl(130, 35%, 72%);
  }
}

html {
  font: min(18pt, 5vw) / 150% "Alegreya";
  background: var(--bg);
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  align-content: center;
  padding: 2rem;
}

nav {
  width: 19ch;
  margin: 1rem;
}

nav ul {
  flex: 0 1;
  margin: 0px;
  padding: 0px;
  text-align: justify;
  text-align-last: justify;
}

nav li {
  display: inline;
}

a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
  font-style: italic;
  position: relative;
  transition: color 0.2s 0.05s;
}

a:before {
  width: 100%;
  height: 2pt;
  box-sizing: content-box;
  padding: 0 2pt;
  border-radius: 2pt;
  position: absolute;
  background-color: var(--text);
  bottom: 0;
  content: "";
  z-index: -1;
  transform: translate(-2pt, -1pt);
  transition: height 0.3s;
}

.hammock {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  transition: transform var(--spring) 0.8s;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  background-image: url("kajtek.png");
  background-size: cover;
}

.rock {
  transform: rotate(10deg);
}

@media (hover: hover) {
  a:hover {
    color: var(--bg);
  }

  a:hover::before {
    height: 85%;
  }

  img.hammock:hover {
    transform: rotate(10deg);
  }
}
