/* LAYOUT */

html,
body {
  height: 100%;
}

body {
  color: #333;
  font-size: 125%;
  line-height: 1.5;
  max-width: 42rem;
  padding: 1rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  text-align: justify;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-bottom: 2rem;
  transition: margin-top 0.5s ease-in-out;
}

/* margins in paragraphs (p) default above*/

p {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

#footer {
  margin-top: 2rem;
  /* space footer down a bit */
}

h1 {
  margin-bottom: 0.5rem;
}

h3.date {
  margin-top: 0;
  margin-bottom: 0.25em;
  font-size: 1em;
  font-weight: bold;
}

/* tooltip  *//* tooltip  */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip-trigger {
  border-bottom: 1px dotted black;
}

.tooltip-content {
  visibility: hidden;
  opacity: 0;
  width: 200px;
  background-color: #cb7d7d;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 5px;
  font-size: 1rem;
  transition: opacity 0.3s, visibility 0.3s;
}

.tooltip-content a {
  color: #9cf;
  text-decoration: none;
}

.tooltip-content a:hover {
  text-decoration: underline;
}

/* Hover styles for non-touch devices */
@media (hover: hover) and (pointer: fine) {
  .tooltip-wrapper:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
  }
}

/* Active class for touch devices */
.tooltip-content.active {
  visibility: visible;
  opacity: 1;
}

/* COLORS */

.site-nav,
footer {
  background: linear-gradient(to left, purple, white);
}

hr {
  border: 0;
  margin: 0;
  /*above we reset the defaults, otherwise hr wouldn't show*/
  height: 1px;
  background-image: linear-gradient(to left, purple, white);
}

blockquote {
  background-color: rgba(128, 0, 128, 0.1);
  border-left: 4px solid purple;
  margin: 1em 0;
  padding: 0.5em 10px;
  font-style: italic;
  color: #444;
}

blockquote p {
  display: inline;
}

/* NAVIGATION */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.site-nav a {
  display: flex;
  justify-content: flex-end;
  color: white;
  /*make it look like a button with rectangular pill shape*/
  padding: 0.1em 0.4em;
  margin: 0.1em 0;
  border: 1px solid none;
  border-radius: 10px;
  /*remove underlines*/
  text-decoration: none;
}

.site-nav a:hover {
  background: rgba(200, 180, 220, 0.5);
  color: purple
}

.site-nav .logo {
  font-weight: bold;
  padding-left: 1%;
  /*logo different colour*/
  color: purple;
  justify-content: flex-start;

}

.main-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  align-self: center;
  width: 30px;
  height: 21px;
  cursor: pointer;
  border-radius: 10px;
  padding-right: 1rem;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: white;
  transition: all 0.5s ease-in-out;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* SMALL SCREENS / MOBILE */

@media screen and (max-width: 600px) {

  .main-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: calc(100% - 2rem);
    margin: 0;
    background: linear-gradient(to left, purple, white);
    padding: 1rem;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s ease-in-out;
  }

  .main-menu.active {
    display: flex;
    transform: scaleY(1);
  }


  .menu-toggle {
    display: flex;
  }
}

/* LISTS */

.post-snippet {
  margin-bottom: 1rem;
}

.post-snippet h3 {
  margin-bottom: 0.25rem;
}