
/* css reset rule */

* {
    margin: 0;
    padding: 0;
    
}

/* type selector */

body {
    background-color: aquamarine;
    color: black;
    font-family: verdana, arial, sans-serif;
    padding: 12px;
    border: 8px solid slategray;
    
}

header {
    border: 8px solid black;
    background-color: slategray;
    padding: 12px;
}

/* child selector */

header > h1 {
    text-align: center;
    font-weight: normal;
    text-transform: uppercase;
    color: white;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid black;
}

/* descendant selector */

header span {
    display: block;
    color: yellow;
}


/* class selector */

.subtitle {
    text-align: center;
    /* border: 3px solid white; */
    padding: 10px;
    line-height: 1.5;
    text-transform: lowercase;   
    letter-spacing: 8px; 
}

/* adjacent selector */

header + p {
    display: none;
}

/* =================================== */

/* CSS Examples */

section {
    display: flex;
    justify-content: center;
    flex-flow: row wrap;
    border: 2px solid yellow;
    margin-bottom: 800px;
}

section article {
    border: 2px solid hotpink;
    min-width: 360px;
    min-height: 200px;
    margin: 10px;
    flex: 0 0 auto;
    padding: 4px;
}

article h2 {
    font-size: 16pt;
}

article p {
    margin: 8px;
    line-height: 1.4px;
}

/* ID selector */

#art1 div {
    width: 70%;
    aspect-ratio: 2/1;
    background-color: turquoise;
    margin: 20px auto;
    border-radius: 20px;
}

#art2 div {
    width: 70%;
    aspect-ratio: 2.5/1;
    background-color: black;
    /* center a block */
    margin: 20px auto;
    border-radius: 20px;
    box-shadow: -4px 8px 14px yellow;
}

#art3 h2 {
    font-family: "Bungee Spice", sans-serif;
    text-align: center;
    font-size: 18pt;
    border: 2px solid red;
    
}

#art4 {
    /* use postion relative on the parent */
    position: relative;
}

#art4 h2 {
    color: yellow;
    /* use postion absolute on the child you want to manipulate */
    position: absolute;
    bottom: 10px; left: 0;
    border: 0px solid yellowgreen;
    width: 100%;
    text-align: center;
    /* padding-bottom: 10px; */

}

#art5 {
    position: relative;
}

#art5 div {
    /* setting postion absolute to all asides within art5 */
    position: absolute;
}

#art5 div:nth-last-of-type(1) {
    width: 40%; aspect-ratio: 1;
    background-color: #f44;
    bottom: 10px; left: 64px;
    z-index: 1;
}

#art5 div:nth-last-of-type(2) {
    width: 40%; aspect-ratio: 1;
    background-color: #44f;
    bottom: -10px; right: 64px;
    z-index: 2;
}

#art6 {
    transition: all 300ms linear;
}

/* pseudo element */
#art6:hover {
    background-color: rebeccapurple;
    color: yellow;
    border: 2px solid yellowgreen;
}















/* css ruleset, aka rule 
selector {
    declaration1;
    declaration2;
    property: value;
    property: value;
    property: value1, value2, value3;
    property: value value;
}
     */

