@import url('./reset.css');

/* Defaults */
:root {
  --font-family: "Inter", sans-serif;
  background-color: #f9f9f9;
  --max-width: 70ch;
  --layout-spacing: max(8vh, 3rem);
  --size-step-1: clamp(1.1875rem, 1.05rem + 0.68vw, 1.625rem);
}

/* Layout */

body {
  display: flex;
  flex-direction: column;
  font-family: var(--font-family);
}

main,
main > * + * {
  margin-top: 2rem;
  width: min(100%, var(--max-width));
  margin-left: auto;
  margin-right: auto;
}

main {
  padding-left: 1vh;
  padding-right: 1vh;
}

main * + * {
  margin-top: 1em;
}

header {
  color: #ffffff;
  border-bottom: 1px solid #000000c2;
  position: sticky;
  top: 0;
  padding-top: 2vh;
  padding-bottom: 2vh;
  background: salmon;
}

.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(100%, var(--max-width));
  margin-left: auto;
  margin-right: auto;
  padding-left: 1vh;
  padding-right: 1vh;
}

.header-logo {
  color: #ffffff;
  font-size: 25px;
  font-weight: 700;
  font-style: italic;
  text-decoration: none;
}

/* Nav */

.nav-list {
   font-weight: bold;
   display: flex;
   flex-wrap: nowrap;
   gap: var(--gap, 2em);
}

.nav-list a {
  color: var(--clr-neutral-900);
  display: flex;
  text-decoration: none;
}
  
.nav-list a:focus,
.nav-list a:hover {
  color: var(--clr-primary-400);
  text-decoration: underline;
}

body > footer {
  padding-top: var(--layout-spacing);
}

body > footer div {
  border-top: 1px solid #ccc;
  padding-top: 0.5em;
  font-size: var(--size-step-1);
  color: #767676;
}

footer {
  width: min(100%, var(--max-width));
  margin-left: auto;
  margin-right: auto;
  padding-left: 1vh;
  padding-right: 1vh;
}

/* Typography */

:is(h1, h2, h3) {
  line-height: 1.2;
}

:is(h2, h3,):not(:first-child) {
  margin-top: 2em;
}

/* Applies disc bullets to unordered lists */
article ul {
  list-style-type: disc;
  margin-left: 1.5rem;
}

/* Applies decimal numbering to ordered lists */
article ol {
  list-style-type: decimal; 
  margin-left: 1.5rem;
}

:is(em) {
  font-size: smaller;
}

/* Media */

main img {
  object-fit: contain;
  margin: 2rem auto;
}

/* Table */

table {
  border-collapse: collapse;
  margin: 25px 0;
  font-size: 0.9em;
  min-width: 100%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

thead tr {
  background-color: #009879;
  color: #ffffff;
  text-align: left;
}

th,
td {
  padding: 12px 15px;
}

tbody tr {
  border-bottom: 1px solid #dddddd;
}

tbody tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

tbody tr:last-of-type {
  border-bottom: 2px solid #009879;
}

tbody tr.active-row {
  font-weight: bold;
  color: #009879;
}

/* custom link style and animations */

main a {
  text-decoration: none;
  font-weight: 500;
  color: rgb(245, 90, 72);
  box-shadow: 0 1.5px rgb(245, 90, 72);
  transition-duration: 0.2;
  transition-timing-function: ease;

}

main a:hover {
  box-shadow: 0 0px rgb(245, 90, 72);
}

.wave {
  animation-name: wave-animation;
  animation-duration: 2.5s;
  animation-iteration-count: infinite;
  transform-origin: 70% 70%;
  display: inline-block;
}

@keyframes wave-animation {
    0% { transform: rotate( 0.0deg) }
   10% { transform: rotate(14.0deg) }  /* The following five values can be played with to make the waving more or less extreme */
   20% { transform: rotate(-8.0deg) }
   30% { transform: rotate(14.0deg) }
   40% { transform: rotate(-4.0deg) }
   50% { transform: rotate(10.0deg) }
   60% { transform: rotate( 0.0deg) }  /* Reset for the last half to pause */
  100% { transform: rotate( 0.0deg) }
}