:root {
  --color: orange;
  --second-font: "Courier New", Courier, monospace;
}

body {
  position: relative;
  max-width: 50rem;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 10rem 0.5rem 6rem 0.5rem;
}

/*------------------------ Header -----------------------*/
header {
  box-sizing: border-box;
  padding: 0.5rem 0.5rem 0 0.5rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
}

header > div {
  max-width: 50rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  font-family: var(--second-font);
}

img#ID {
  border-radius: 50%;
  width: 5rem;
  margin: 0 1rem;
  box-shadow: 0.3rem 0.3rem 1rem lightgrey;
}

nav {
  max-width: 50rem;
  margin: 0 auto;
  margin-top: 1rem;

  border: 2px solid lightgrey;
  border-right: none;
  border-left: none;
  padding: 1rem 0;

  display: flex;
  flex-wrap: wrap;
  row-gap: 0.8rem;
  gap: 1rem;

  font-family: var(--second-font);
  font-size: 1.1rem;
}

nav a {
  flex: fit-content;
  flex-grow: 5;
  flex-shrink: 10;

  line-height: 1.5rem; /*avoid box resizing when hover*/
  text-align: center;
  color: inherit;
  text-decoration: none;

  transition-duration: 0.2s;
  transition-property: all;
}

nav a:hover {
  font-size: 1.5rem;
  color: inherit;
}

/*------------------------ Footer -----------------------*/
footer {
  position: fixed;
  bottom: 0;

  width: 100%;
  height: 10rem;
  max-width: 50rem;

  display: flex;
  align-items: end;
  text-align: center;

  background: linear-gradient(transparent, white);
}

footer ul {
  padding: 0;
  width: 100%;
  text-align: center;
}

footer li {
  display: inline-block;
  margin: 0 0.2rem;
}

footer img {
  width: 3rem;

  transition-duration: 0.2s;
  transition-property: all;
}

footer img:hover {
  width: 3.8rem;
}

/*------------------------ Content -----------------------*/
h1 {
  font-family: var(--second-font);
  text-align: center;
  text-transform: lowercase;
  font-variant: small-caps;
}

h2 {
  font-family: var(--second-font);
  font-size: 1.1rem;
  font-weight: bold;
  text-indent: 1rem;
}

a {
  color: inherit;
}

a:hover {
  color: blue;
}

a.action-btn {
  display: block;
  width: fit-content;
  padding: 0.8rem;
  font-size: 1.2rem;
  background-color: white;
  color: black;
  border: 3px solid black;
  border-radius: 1rem;
  text-decoration: none;
}

a.action-btn:hover {
  background-color: black;
  color: white;
}

section {
  margin: 5rem 0;
  font-size: 1.1rem;
}

section > img,
section > p,
section > a {
  margin: 2rem auto; /* `auto` to center btn and img */
}

section p {
  text-align: justify;
  text-indent: 1rem;
}

section img {
  display: block;
  box-shadow: 0 0 2rem 0.5rem lightgrey;
  border-radius: 0.5rem;
  width: 100%;
  max-width: 30rem;
}

.placetime,
.placetime time {
  font-size: 0.8rem;
  text-indent: 0;
}

hr {
  width: 20%;
}

ul {
  list-style-type: square;
}

#competences > ul {
  list-style-type: none;
  padding-left: 0;
}

#competences li > ul {
  padding-left: 4rem;
}

/*------------------------ Cards -----------------------*/

.card {
  display: flex;
  margin: 2rem 0;
  background-color: white;
  box-shadow: 0.5rem 0.5rem 1.5rem grey;
  border-radius: 0.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.card > * {
  flex-basis: 20rem;
  flex-grow: 2;
  flex-shrink: 5;
}

.card h3 {
  text-align: center;
}

.card img {
  width: 100%;
  box-shadow: unset;
}

.card p {
  padding: 1rem;
}
