/* color scheme sourced from http://khroma.co/generator/ */
:root {
  --outer-space: #33393f;
  --bright-turquoise: #2aefcb;
  --gin: #e0eae4;
  --heliotrope: #e866ec;
}

::selection {
  background-color: var(--bright-turquoise);
  color: var(--outer-space);
}

body {
  /* Sans Serif font stack is implemented to help select the best font for each type of computer operating system */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';

  /* set body font size to 1.75rem, which is 1.75x more than the font-size of 10px, making it 17.5px  */
  font-size: 16px;
  line-height: 1.5;
  color: var(--gin);
  background-color: var(--outer-space);
  box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 16px;
  color: var(--heliotrope);
  font-weight: 700;
  line-height: 1;
}

h1 {
  /* 4rem = 40px (4 * 10px) */
  font-size: 40px;
}

h2 {
  font-size: 35px;
}

h3 {
  font-size: 30px;
}

h4 {
  font-size: 25px;
}

h5 {
  font-size: 20px;
}

h6 {
  font-size: 15px;
}

p {
  margin-bottom: 16px;
}

/* setting flexbox and centering the header */
header {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  margin: 50px;
  text-align: center;
}

/* unsure about width properties */
main {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 90vw;
  margin: 0 auto;
}

/* card styling */
.card {
  border: 2px dashed var(--gin);
  margin: 20px 20px 30px 20px;
  /* help on this bit to get the width correct because of margin*/
  flex: 1 0 30%;
    /* width: calc(33.333% - margin); */
}

.card-header {
  border: 2px solid var(--gin);
  border-radius: 10px;
  margin: -30px 40px 10px 40px;
  padding-left: 10px;
  padding-top: 5px;
  z-index: 1;
  background-color: var(--outer-space);
  position: relative;

}

.card-description {
  color: var(--heliotrope);
  padding: 10px;
}

.card-code {
  background-image: linear-gradient(rgba(232, 102, 236, 0.3) 0%, rgba(232, 102, 236, 0.6) 100%);
  /* flex-grow: 1; */
  margin: 20px;
  border-radius: 10px;
  height: 30vh;
  transition: all 0.5s ease-in-out;
  font-family: monospace;

}

/* need pre to wrap */
pre {
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  user-select: all;
}

.heart::after {
  content: "\2764";
  color: red;
}

footer {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

/* media query for screen size */
@media screen and (max-width: 992px) {
  .card {
    width: 50vw;
  }
}

@media screen and (max-width: 768px) {
  .card {
    width: 100vw;
  }
}


/* hover effect */
.card:hover,
.card:hover .card-header {
  box-shadow: inset 0px 0px 8px var(--heliotrope), 0 0 15px var(--heliotrope);
  transition: all 0.5s ease-in-out;
}