/* resetting the base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* variables */
:root {
  --primary-color: rgb(128, 0, 0);
  --secondary-color: rgb(255, 217, 0);
  --primary-background-color: rgb(250, 235, 215);
  --primary-border: 3px solid var(--primary-color);
  --primary-page-width: 80%;
}

/* page wide style start */
body {
  font-size: 18px;
  background-color: var(--primary-background-color);
}

h1 {
  font-size: 30px;
}

h2 {
  color: var(--primary-color);
  text-align: center;
}

h3 {
  font-size: 24px;
}
/* page wide style end*/

/* section style start */
section {
  padding: 20px 0;
}
/* section style end */

/* header style start */
header {
  display: flex;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 5px 5px 15px 5px;
  box-shadow: 0 6px 10px 0 black;
  text-align: center;
}

.header-text {
  margin: auto;
}

nav {
  margin: auto 15px;
}

.open-nav-btn {
  font-size: 30px;
  cursor: pointer;
  color: var(--secondary-color);
}

/* side navigation menu */
.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: var(--primary-background-color);
  overflow-x: hidden;
  padding-top: 15px;
  transition: 0.5s;
}

/* navigation menu links */
.sidenav a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  color: var(--primary-color);
  display: block;
  transition: 0.3s;
}

.sidenav a:hover {
  font-weight: bold;
}

/* close button */
.sidenav .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}
/* nav bar style end */

/* image section style start */
.image img {
  display: block;
  width: 50%;
  max-width: 350px;
  margin: 10px auto 0px auto;
}

.image .caption {
  text-align: center;
  width: 65%;
  margin: 10px auto;
}
/* image section style end */

/* life section style start */
.life {
  width: var(--primary-page-width);
  margin: 0 auto;
  padding-top: 0;
  border-bottom: var(--primary-border);
}

.life h2 {
  width: 75%;
  border-bottom: var(--primary-border);
  margin: 0 auto;
}

.timeline {
  margin: 0 auto;
  padding-top: 10px;
  list-style: none;
}

.timeline li {
  margin: 10px 0;
}

.events {
  width: var(--primary-page-width);
  margin: 0 auto;
  border-bottom: var(--primary-border);
}

.major-event h3 {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  display: block;
  margin: 20px auto 10px auto;
  max-width: 300px;
  min-width: 200px;
  text-align: center;
  padding: 5px;
  border-bottom: 2px solid black;
  border-right: 2px solid black;
  border-left: 2px solid black;
  box-shadow: 0 0 4px 0 black;
}
/* life section style end */

/* final thoughts section style start */
.final-thoughts {
  width: var(--primary-page-width);
  margin: 0 auto 20px auto;
}

.final-thoughts h2 {
  margin-bottom: 20px;
}
/* final thoughts section style end */

/* footer style start */
  footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
  }

  footer p {
    width: var(--primary-page-width);
    margin: 0 auto;
    padding: 20px 0;
  }

  footer a {
    color: var(--secondary-color);
  }
/* footer style end */

/* media queries */
/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (min-height: 500px) {
  .sidenav {
    padding-top: 60px;
  }
  
  .sidenav a {
    font-size: 25px;
  }
}

@media screen and (min-width: 800px) {
  body {
    font-size: 20px;
  }

  h1 {
    font-size: 34px;
  }

  /* return to top button */
  #myBtn {
    display: none;
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
  }

  #myBtn:hover {
    background-color: rgba(128, 0, 0, 0.7);
  }

  .image {
    margin: auto;
  }

  .image img {
    min-width: 350px;
  }

  .life {
    border: none;
    max-width: 600px;
  }

  .life h2, ul {
    width: 90%;
  }

  .events {
    border-top: var(--primary-border);
  }

  .major-event h3 {
    margin-left: 0;
    margin-top: 40px;
    border-left: none;
  }

  .major-event:nth-child(1) h3 {
    margin-top: 20px;
  }
}

@media screen and (min-width: 1200px) {
  .flex-container {
    display: flex;
    margin: 30px auto;
    max-width: 1200px;
  }
}