*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
   /* background-color: #ffffff72; */
   color: #444;
   font-family: Arial, Helvetica, sans-serif;
   border-top: 10px solid #8b1bb4;
   position: relative;
}
.container{
    width: 1200px;
    /* margin-left: auto;
    margin-right: auto;  */
    /* both margins will calculate automatically
    by browser */
    margin: 0 auto;
    /* it works the same */

}
.main-header{
    background-color: #f7f7f7;
    /* padding: 20px;
    padding-left: 40px;
    padding-right: 40px; */

    /* styling bottom and top, and them left right */
    padding: 20px 40px;
    margin-bottom: 60px;
    /* real height of the element is 80px + 20 px
    (height plus padding) */
    /* height: 80px;  */
 }
 aside{
    /* shorthand property, we can style
    3 properties in one */
    border-top: 4px solid #b1158d;
    border-bottom: 4px solid #b1158d;
    background-color: #f7f7f7;
    padding: 50px 40px;
    box-sizing: border-box;
}

article{
    margin-bottom: 60px;
}

nav{
    font-size: 18px;
    text-align: center;
}

nav a:link{
    /* display: block; */
    font-size: 18px;
    margin-right: 30px;
    margin-top: 10px;
    display: inline-block;
    /* inline block allows us to create block of single 
    elements like links  */
}

/* removing margin from the last element */
nav a:link:last-child{
    margin-right: 0;
}

/* SMALLER ELEMENTS */
h1,
h2,
h3{
    color: #b1158d;
}

.post-header{
    margin-bottom: 40px;
}

ul,
ol{
    margin-left: 50px ;
    margin-bottom: 20px;
}

h1 {
    font-size: 26px;
    text-transform: uppercase;
    font-style: italic;
}

h2{
    font-size: 40px;
    margin-bottom: 30px;
}

h3{
    font-size: 30px;
    margin-bottom: 20px;
    margin-top: 40px;
}
h4{
    font-size: 20px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 30px;
}
p{
    font-size: 22px;
    line-height: 1.5;
    margin-bottom: 15px;
}

li{
    font-size: 20px;
    margin-bottom: 10px;
}
li:last-child{
    margin-bottom: 0;
}
/* footer p{
    font-size: 16px;
} */

#copyright{
    font-size: 16px;
}

#author{
    font-style: italic;
    font-size: 18px; 
}

/* for class we use -> . and for id -> # */
.related-author{
    font-size: 18px;
    font-weight: bold;
}

.related-posts{
    list-style: none;
    margin-left: 0;
}

/* photos are inline boxes */
.code-photo{
    width: 100%;
    height: auto;
    /* margin: 100px; */
}
 /* comment */


 /* .first-li{
    font-weight: bold;
 } */

 /* different ways to style first child of the
 list */
 li:first-child{
    font-weight: bold; 
 }
 li:last-child{
    font-style: italic;
 }
 /* li:nth-child(odd){
color: #b1158d;
 } */
 
 /* Misconception: this won't work! */
 article p:first-child{
    color: #b1158d;
 }

 /* Styling links */
 a:link {
    color: #b1158d;
    text-decoration: none;
 }
 a:visited {
    color: #b1158d;
 }

 a:hover{
    color: #41094e;
    font-weight: bold;
    text-decoration: underline #41094e;
 }

 a:active{
    background-color: black;
    font-style: italic;
    color: #f7f7f7;
 }

 button{
    font-size: 22px;
    padding: 20px;
    cursor: pointer;
    position: absolute;
    bottom:50px;
    right: 50px;
 }

 /* pseudo-elements */
 h1::first-letter{
    font-style: normal;
    margin: 5px;
 }
 p::first-line{
    color: rgb(133, 25, 152);
}

h3 + p::first-line{
    /* color: #41094e; */
}

h2{
    position: relative;
 }
 
 h2::after {
    content: "TOP";
    background-color: rgb(96, 34, 76);
    color: #f7f7f7;
    font-size: 16px;
    font-weight: bold;
    display: inline-block;
    padding: 5px 10px;
    position: absolute;
    top: -10px;
    right: -25px;
 }
 /* h2::first-letter{W
    font-size: 80px;
 } */
 /* nav a:link{
    background-color: #8b1bb4;
    margin: 20px;
    padding: 20px;

    display:block;
 } */

 /* LVHA - link, visited, hover, active */


 /* CSS Theory 1: Selectors priority: 

 1.ID (#) selector
 2.Class (.) selector
 3.Element (p,h2,li,div,etc.) selector
 
 If it has more than 1 element last one 
 selectors has the highest priority.
 This rule works for all of three selectors.

 CSS Theory 2: Selectors priority:
 Elements selectors have more higher priority
 than the universal selectors (for example
 body)
 */

  /* FLOATS */
 
  .author-img{
    float: left;
    margin-bottom: 20px;
  }

  .author{
    margin-top: 10px;
    float: left;
    margin-left: 20px;
  }

  h1{
    float: left;
  }
  nav{
    float: right;
  }
  .clear{
    clear: both;
  }

  .clearfix::after {
    clear: both;
    content:"";
    display: block;
  }

  article{
    width: 825px;
    float: left;
  }

  aside{
    width: 300px;
    float: right;
  }

  footer{
    clear: both;
  }