@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --hue-color: 250;

    --font-family: 'Poppins', sans-serif;
    
    --primary-color: hsl(var(--hue-color), 100%, 96%);
    --primary-color-second: hsl(var(--hue-color), 69%, 61%);

    --title-color: hsl(var(--hue-color), 8%, 15%);
    --text-color: hsl(var(--hue-color), 8%, 30%);
    --body-color: hsl(var(--hue-color), 60%, 99%);
    --border-color: #ececec;

    --normal-font-size: .938rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
}

ul {
    list-style-type: none;
    display: flex;
    align-items: center;
}

a {
    text-decoration: none;
}

.page-wrapper {
    max-width: 968px;
    margin: auto;
}

/*==================== NAV CSS ====================*/
nav {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    max-width: 968px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #fff;
    border-style: none solid solid;
    border-width: 1px;
    border-color: var(--border-color);
    border-radius: 0 0 24px 24px;
    box-shadow: 0 24px 48px -24px rgba(56,56,138,.16);
    z-index: 100;
}

.nav-logo-title {
    display: flex;
    align-items: center;
}

.nav-logo-title img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    content: url(https://codecreator.my.id/dicky/logo.png);
}

.nav-logo-title a {
    font-size: 1.2rem;
    color: var(--title-color);
    font-weight: 600;
}

nav ul {
    display: flex;
}

nav ul li a {
    color: var(--title-color);
    font-weight: 600;
    border-radius: 10px;
    padding: .375rem 1rem;
    transition: transform .3s,background-color .3s;
}

nav ul li a:hover {
    background-color: rgba(0,0,0,.06);
    opacity: .8
    ;
}

/*==================== HEADER CSS ====================*/
#header {
    padding: 4rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#header .header-texts {
    margin: auto;
    text-align: center;
}

#header .header-texts h1 {
    margin-top: 4rem;
    font-size: 1rem;
    display: inline-block;
    padding: .5rem .8rem;
    background-color: var(--primary-color);
    border-radius: 10px;
    margin-bottom: .5rem;
    color: var(--primary-color-second);
}

#header .header-texts h3 {
    font-size: 3rem;
    line-height: 3.2rem;
    margin-bottom: .7rem;
    color: var(--title-color);
}

#header .header-texts p {
    line-height: 1.4375rem;
}

#header .header-texts p abbr {
    font-weight: 700;
    color: var(--primary-color-second);
}

#header .header-filler {
    max-width: 48rem;
    width: 100%;
    content: url(https://codecreator.my.id/dicky/home-hero.png);
}

/*==================== C0NTENT CSS ====================*/
.content-aside {
    padding: 2rem 1rem;
    display: flex;
    gap: 1rem;
}

.content-aside .content {
    padding-top: 6rem;
    width: 70%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.content-aside .content .content-first h2,
.content-aside .content .content-second h2 {
    font-size: 1.2rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--primary-color-second);
}

.content-aside .content .content-first p,
.content-aside .content .content-second p {
    font-size: 1rem;
    margin-bottom: .5rem;
}

.content-aside .content .content-second h4 {
    font-size: 1.5rem;
    line-height: 2rem;
    margin-bottom: .5rem;
    color: var(--title-color);
    font-weight: 600;
}

.content-aside aside {
    margin-top: 6rem;
    position: sticky;
    top: 5rem;
    width: 30%;
    height: 100%;
    background-color: #fff;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 24px;
}

.content-aside aside h2 {
    color: var(--title-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.content-aside aside ul {
    display: flex;
    flex-direction: column;
}

.content-aside aside ul li {
    width: 100%;
}

.content-aside aside ul li a {
    display: inline-block;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 10px;
    padding: .5rem .8rem;
    margin-top: .5rem;
    color: var(--primary-color-second);
}

.content-aside aside ul li a:hover {
    background-color: var(--primary-color-second);
    color: #fff;
  }
  

.content-aside aside ul + h2 {
    margin-top: 1rem;
}

/*==================== ARTICLES CSS ====================*/
.articles {
    padding: 2rem 1rem;
    display: flex;
}

.articles table {
    margin-top: 4rem;
}

.articles table tr {
    display: flex;
    gap: 1rem;
}

.articles table tr.row-first {
    margin-bottom: 3rem;
}

.articles table .row-first .article img {
    width: 100%;
    border-radius: 10px;
}

.articles table .row-first .article h3,
.articles table .row-second .article-long h3 {
    color: var(--title-color);
}

.articles table .row-first .article p {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    white-space: pre-wrap;
    margin: .5rem 0 1rem;
}

.articles table .row-second .article-long p {
    margin: .5rem 0 1rem;
}

.articles table .row-first .article a {
    display: block;
    background-color: var(--primary-color);
    border-radius: 10px;
    padding: .5rem .8rem;
    color: var(--primary-color-second);
    text-align: center;
}

.articles table .row-first .article a:hover {
    background-color: var(--primary-color-second);
    color: #fff;
  }

.articles table .row-first .article:nth-child(1) img {
    content: url(https://source.unsplash.com/featured/300x201)
}

.articles table .row-first .article:nth-child(2) img {
    content: url(https://source.unsplash.com/featured/300x202)
}

.articles table .row-first .article:nth-child(3) img {
    content: url(https://source.unsplash.com/featured/300x203)
}

.articles table .row-second td:nth-child(2) img {
    width: 100%;
    border-radius: 10px;
    content: url(https://source.unsplash.com/featured/300x204)
}

/*==================== CREATIVITY CSS ====================*/
.creativity {
    padding: 6rem 1rem;
}


.creativity-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.creativity-wrapper .mini-content {
    position: relative;
    background-color: #fff;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    overflow-wrap: break-word;
    width: 100%;
}

.creativity-wrapper > div {
    display: flex;
    gap: .5rem;
}

.creativity-wrapper > div:nth-child(even) {
    text-align: right;
    flex-direction: row-reverse;
}

.creativity-wrapper img {
    width: 78px;
    height: 78px;
}

.creativity-wrapper .mini-one img {
    content: url(https://api.dicebear.com/6.x/adventurer/png?seed=Oliver&flip=true)
}

.creativity-wrapper .mini-two img{
    content: url(https://api.dicebear.com/6.x/adventurer/png?seed=Loki)
}

.creativity-wrapper .mini-three img{
    content: url(https://api.dicebear.com/6.x/adventurer/png?seed=Harley&flip=true)
}

.creativity-wrapper .mini-four img {
    content: url(https://api.dicebear.com/6.x/adventurer/png?seed=Troublessss)
}

.creativity-wrapper h2 {
    color: var(--title-color);
}

.creativity-wrapper:hover:before {
    content: "";
  }

.creativity-wrapper:hover .mini-one {
    animation-delay: 0.5s;
    animation: fadeInLeft 2s ease-in-out both;
}

.creativity-wrapper:hover .mini-two {
    animation-delay: 1s;
    animation: fadeInRight 2s ease-in-out both;
}

.creativity-wrapper:hover .mini-three {
    animation-delay: 1.5s;
    animation: fadeInLeft 2s ease-in-out both;
}

.creativity-wrapper:hover .mini-four {
    animation-delay: 2s;
    animation: fadeInRight 2s ease-in-out both;
}
  
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  @keyframes fadeInLeft {
    from {
      opacity: 0;
      transform: translateX(-50px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes fadeInRight {
    from {
      opacity: 0;
      transform: translateX(50px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

/*==================== FOOTER CSS ====================*/
footer {
    padding: 2rem 1rem 0;
}

footer .footer-logo {
    padding: 1rem;
    background-color: var(--primary-color-second);
    border-radius: 10px;
    color: #fff;
    text-align: center;
}

footer .footer-logo h3 {
    font-size: 2rem;
}

footer .footer-form {
    margin: 3rem auto;
}

footer .footer-form p:nth-child(1) {
    font-size: 1.2rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--primary-color-second);
    font-weight: 600;
    margin-bottom: .5rem;
}

footer .footer-form form p,
footer .footer-form form label {
    font-weight: 600;
    letter-spacing: .5px;
}

footer .footer-form form input[id="name"],
footer .footer-form form select {
    margin-top: .3rem;
    margin-bottom: 1rem;
    display: block;
    width: 100%;
    padding: .8rem 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fdfdff;
    border-color: #e4e6fc;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    font-family: inherit;
    font-size: inherit;
}

footer .footer-form form select {
    cursor: pointer;
    appearance: none;
}

footer .footer-form form input[id="name"]:focus,
footer .footer-form form select:focus {
    background-color: #fefeff;
    border-color: #95a0f4;
    box-shadow: none !important;
    outline: none;
}

footer .footer-form form input[type="radio"] {
    margin-right: .3rem;
    margin-bottom: .5rem;
}

footer .footer-form form br {
    display: none;
}

footer .footer-form form label[for="html"] + br,
footer .footer-form form label[for="css"] + br,
footer .footer-form form label[for="javascript"] + br {
    display: block;
}

footer .footer-form form button {
    margin-top: 1rem;
    display: block;
    background-color: var(--primary-color-second);
    border-radius: 10px;
    padding: 1rem 2rem;
    color: var(--primary-color);
    text-align: center;
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
}

footer .footer-form form button:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
  }

footer .footer-credit {
    padding: 1rem;
    border-style: solid solid none;
    border-width: 1px;
    border-color: var(--border-color);
    border-radius: 24px 24px 0 0;
    background-color: #fff;
    box-shadow: 0 24px 48px -24px rgba(56,56,138,.16);
    text-align: center;
}

footer .footer-credit h3 {
    color: var(--title-color);
    font-size: 1rem;
    font-weight: 600;
}


/* RESPONSIVE */
@media only screen and (max-width: 640px) {
    nav {
        position: relative;
        flex-direction: column;
        gap: 1rem;
    }

    #header .header-texts h1 {
        margin-top: 0;
    }
    
    #header .header-texts h3 {
        font-size: 2.5rem;
        line-height: 2.5rem;
    }

    .content-aside {
        flex-direction: column;
    }

    .content-aside .content {
        padding-top: 1rem;
        width: 100%;
    }

    .content-aside aside {
        margin-top: 0;
        width: 100%;
    }

    .articles table {
        margin-top: 0;
    }

    .articles table tr {
        gap: 2rem;
        flex-direction: column;
        text-align: center;
    }

    .articles table tr.row-second {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .creativity {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    footer .footer-credit h3 {
        font-size: .8rem;
    }
}