/* CSS reset rule */
* {
    margin: 0; padding: 0;
}

/* type selector */

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #0a0a0a 100%);
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 12px;
    border: 8px solid #b412ff;
}

header {
    border: 4px solid #b412ff;
    padding: 12px;
    background-color: rgba(41, 4, 65, 0.8);
}

/* child selector */

header > h1 {
    text-align: center;
    font-weight: normal;
    text-transform: uppercase;
    color: #b412ff;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid #9900ff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* descendent selector */

header span {
    display: block;
    border: 0px;
    color: #d080ff;
}

/* class selector */

.subtitle {
    text-align: center;
    border: 2px solid #9900ff;
    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 #b412ff;
    gap: 8px;
    margin-bottom: 800px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

section article {
    border: 2px solid #9900ff;
    min-width: 200px;
    min-height: 360px;
    margin: 10px;
    flex: 0 0 auto;
    padding: 4px;
    border-radius: 5px;
}

article h2 {
    font-size: 16pt;
    color: #9900ff;
    border-bottom: 2px solid #b412ff;
    padding-bottom: 10px;
}

article p {
    margin: 8px;
    line-height: 1.4;
    color: #d0d0d0;
}

/* ID selector */
#art1 div {
    width: 70%;
    aspect-ratio: 2/1;
    background-color: rgba(180, 18, 255, 0.3);
    margin: 20px auto;
    border-radius: 20px;
}

#art2 div {
    width: 70%;
    aspect-ratio: 2.5/1;
    background-color: rgba(153, 0, 255, 0.3);
    /* center a block */
    margin: 20px auto;
    box-shadow: -4px 8px 5px rgba(180, 18, 255, 0.4);
}

#art3 h2 {
    font-family: "Sekuya", system-ui;
    font-weight: 400;
    font-style: normal;
    text-align: center;
    font-size: 18pt;
    color: #b412ff;
}

#art4 {
    /* use position relative on the parent */
    position: relative;
}

#art4 h2 {
    /* use position absolute on the child you want to manipulate */
    position: absolute;
    bottom: 10px; left: 0;
    border: 2px solid #d0d0d0;
    width: 100%;
    text-align: center;
    padding-bottom: 10px;
    color: #9900ff;
}

#art5 {
    position: relative;
}

#art5 div{
    /* setting position absolute to ALL divs within art5 */
    position: absolute;
}

#art5 div:nth-of-type(1) {
    width: 40%; aspect-ratio: 1;
    background-color: rgba(180, 18, 255, 0.5);
    bottom: 10px; left: 64px;
    z-index: 2;
}

#art5 div:nth-of-type(2) {
    width: 40%; aspect-ratio: 1;
    background-color: rgba(153, 0, 255, 0.5);
    margin: 30px;
    bottom: -10px; right: 64px;
    z-index: 1;
}

#art6 {
    transition: all 300ms linear;
}

/* pseudo element */
#art6:hover {
    background-color: rgba(41, 4, 65, 0.6);
    color: #e0e0e0;
    border: 4px solid #b412ff;
}

/* extra credit */

#art7 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 20px auto;
    width: 80%;
    height: 120px;
}

#art7 div {
    background-color: rgba(180, 18, 255, 0.4);
    border-radius: 8px;
    border: 1px solid #9900ff;
}

#art8 {
    width: 80%;
    height: 120px;
    margin: 20px auto;
    background: linear-gradient(135deg, #b412ff 0%, #9900ff 50%, #6b00cc 100%);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(180, 18, 255, 0.4);
}

#art9 {
    width: 70%;
    height: 100px;
    margin: 20px auto;
    background-color: rgba(153, 0, 255, 0.4);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

#art9:hover {
    transform: rotate(15deg) scale(1.1);
}

#art10 {
    width: 80%;
    height: 100px;
    margin: 20px auto;
    background-color: rgba(180, 18, 255, 0.3);
    border-radius: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e0e0e0;
}

#art10::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 20px;
    height: 20px;
    background-color: #b412ff;
    border-radius: 50%;
}

#art10::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    background-color: #9900ff;
    border-radius: 50%;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }
}

#art11 {
    width: 70%;
    height: 100px;
    margin: 20px auto;
    background-color: rgba(180, 18, 255, 0.5);
    border-radius: 10px;
    animation: pulse 2s infinite ease-in-out;
}

#art12 {
    width: 70%;
    height: 100px;
    margin: 20px auto;
    background: linear-gradient(45deg, #b412ff, #9900ff);
    border-radius: 10px;
    filter: blur(0.5px) brightness(1.2);
    transition: filter 0.3s ease;
}

#art12:hover {
    filter: blur(2px) brightness(1.5) saturate(1.5);
}

/* css ruleset, aka rule selector {
    declaration1;
    declaration2;
    property: value;
    property: value;
    property: value1, value2, value3;
    property: value value;
}
    */

nav {
    background-color: rgba(41, 4, 65, 0.6);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
nav a {
    display: inline-block;
    padding: 12px 24px;
    color: var(--link);
    text-decoration: none;
    font-size: 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}
nav a:hover {
    background-color: rgba(153, 0, 255, 0.3);
    color: #d080ff;
}