@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #0b061f;
    --text-color: #fdfdfd;
    --main-color: #754ef9;
    --white-color: #fdfdfd;
    --shadow-color: #3f279c;
    --box-color: #2e1f6c;
    --profile-image: url('images/daniel-night.png');
    --transition-time: .5s ease;
}

.dark-mode {
    --bg-color: #fdfdfd;
    --text-color: #333333;
    --shadow-color: rgba(0, 0, 0, .2);
    --box-color: var(--white-color);
    --profile-image: url('images/daniel-day.png');
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

/* header design */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 7%;
    background: var(--bg-color);
    box-shadow: 0 .1rem 1rem var(--shadow-color);
    display: flex;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 3.5rem;
    font-family: 'lobster', sans-serif;
    color: var(--main-color);
    font-weight: bold;
    cursor: default;
    margin-right: auto;
}

nav a {
    position: relative;
    font-family: 'lobster', sans-serif;
    font-size: 2rem;
    color: var(--text-color);
    font-weight: normal;
    margin-right: 3.5rem;
    transition: var(--transition-time);
}

nav a:hover {
    color: var(--main-color);
}

nav a.active {
    font-size: 2.5rem;
    color: var(--main-color);
    font-weight: bold;
}

nav a.active:hover {
    color: var(--shadow-color);
}

nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: .2rem;
    background: var(--main-color);
    opacity: .7;
}

#darkMode-icon {
    font-size: 2.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition-time);
}

#darkMode-icon:hover {
    color: var(--main-color);
}

#menu-icon {
    font-size: 3.5rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
    transition: var(--transition-time);
}

#menu-icon:hover {
    color: var(--main-color);
}

/* section */
section {
    min-height: 100vh;
    padding: 10rem 7% 2rem;
}

/* home section design */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

.home-content {
    width: 100rem;
}

.home-content h3 {
    font-family: 'lobster', sans-serif;
    font-size: 3.2rem;
    font-weight: normal;
    line-height: 1.3;
}

.home-content h1 {
    font-family: 'lobster', sans-serif;
    color: var(--main-color);
    font-size: 4rem;
    font-weight: normal;
    line-height: 1.3;
    margin-bottom: .3rem;
}

.home-content p {
    font-size: 1.6rem;
}

.home-content .social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    box-shadow: 0 .2rem .5rem var(--shadow-color);
    font-size: 2.5rem;
    color: var(--main-color);
    margin: 2.5rem 1.5rem 3rem 0;
    transition: var(--transition-time);
}

.home-content .social-media a:hover {
    background: var(--main-color);
    color: var(--white-color);
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: .6rem;
    box-shadow: 0 .2rem .5rem var(--shadow-color);
    font-size: 1.6rem;
    color: var(--white-color);
    letter-spacing: .1rem;
    font-weight: 600;
    border: .2rem solid transparent;
    transition: var(--transition-time);
}

.btn:hover {
    background: transparent;
    color: var(--main-color);
    border-color: var(--main-color);
}

.about-img img {
    width: 28vw;
    border-radius: 5%;
    content: var(--profile-image)
}

/* work section design */
h2 {
    font-size: 4.5rem;
    text-align: center;
    margin-bottom: 4rem;
    font-family: 'lobster', sans-serif;
}

.container {
    width: 100rem;
    position: relative;
    margin: 0 auto;
}

.slide {
    height: 50rem;
    width: 100%;
    border-radius: 10px;
    outline: .5rem solid transparent;
    outline-color: var(--shadow-color);
    position: relative;
    margin: 0 auto;
    background: none;
    overflow: hidden;
    padding: 0;
}

.slide img {
    animation-name: fade;
    animation-duration: .5s;
}

@keyframes fade {
    from {
        opacity: .5
    }

    to {
        opacity: 1
    }
}

@keyframes fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.slide img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: var(--transition-time);
}

.slide img:hover {
    transform: scale(1.02);
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: var(--white-color);
    font-weight: bold;
    font-size: 18px;
    transition: var(--transition-time);
    border-radius: 0 9px 9px 0;
    user-select: none;
}

.next {
    right: 0;
    border-radius: 9px 0 0 9px;
}

.prev:hover,
.next:hover {
    opacity: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.caption-container {
    position: absolute;
    text-align: center;
    bottom: 0;
    background: rgb(0, 0, 0);
    background: rgba(0, 0, 0, 0.8);
    color: var(--white-color);
    width: 100%;
    padding: 16px;
}

.caption-container p {
    font-size: 1.4rem;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 8px;
    background-color: var(--shadow-color);
    outline: .17rem solid transparent;
    outline-color: var(--white-color);
    border-radius: 50%;
    display: inline-block;
    transition: var(--transition-time);
}

.dot.active,
.dot:hover {
    background-color: var(--text-color);
}

/* portfolio section design */
.portfolio-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    grid-gap: 40px;
}

.portfolio-container .portfolio-box {
    height: 40rem;
    width: 100%;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.portfolio-box img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: .5s ease;
}

.portfolio-box:hover img {
    filter: blur(8px);
    -webkit-filter: blur(8px);
    transform: scale(1.1);
}

.portfolio-box .portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    border-radius: 10px;
    background: linear-gradient(rgba(0, 0, 0, .6), var(--main-color));
    color: var(--white-color);
    display: flex;
    justify-content: center;
    overflow: hidden;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 .5rem;
    opacity: 0;
    transition: .5s ease;
}

.portfolio-box:hover .portfolio-layer {
    opacity: 1;
    height: 100%;
}

.portfolio-layer h4 {
    font-size: 3rem;
}

.portfolio-layer p {
    font-size: 1.25rem;
    margin: .5rem 0 1rem;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: var(--white-color);
    border-radius: 50%;
    outline: .4rem solid transparent;
    transition: .5s ease;
}

.portfolio-layer a:hover {
    outline-color: var(--box-color);
}

.portfolio-layer a i {
    font-size: 2rem;
    color: #333333;
}

/* contact section design */
.contact form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    /*replace bg-color with something else later*/
    background: var(--box-color);
    border-radius: .8rem;
    margin: .7rem 0;
    box-shadow: 0 .1rem .5rem var(--shadow-color);
}

.contact form .input-box input {
    width: 49%;
}

.contact form textarea {
    resize: none;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}

/* footer design */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 7%;
    background: var(--main-color);
}

.footer-text p {
    font-size: 1.5rem;
    color: var(--white-color);
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--white-color);
    border-radius: .8rem;
    border: .2rem solid var(--main-color);
    outline: .2rem solid transparent;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    outline-color: var(--white-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: #333333;
}

/* breakpoints */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 1024px) {
    header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }
}

@media (max-width: 991px) {

    /* nav a:nth-child(1),
    nav a:nth-child(2) {
        color: var(--main-color);
    } */

    nav a.active::before {
        background: var(--main-color);
        opacity: .7;
    }

    .home-content {
        max-width: 50rem;
    }

    .portfolio {
        padding-bottom: 7rem;
    }

    .portfolio-box .portfolio-layer h4 {
        font-size: 20px;
    }

    .portfolio-box .portfolio-layer p {
        font-size: 12px;
    }

    .contact {
        min-height: auto;
    }

    .footer {
        padding: 2rem 3%;
    }

    .footer p {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    #darkMode-icon {
        position: absolute;
        right: 7rem;
        font-size: 2.6rem;
        color: var(--text-color);
        margin-bottom: .1rem;
    }

    #menu-icon {
        display: block;
    }

    nav {
        position: absolute;
        top: 80%;
        bottom: 0;
        left: 100%;
        width: 100%;
        height: 100vh;
        padding: 1rem 3%;
        background: var(--bg-color);
        transition: left 0.25s ease;
    }

    nav.active {
        box-shadow: 0 2rem 1rem var(--shadow-color);
        left: 40%;
    }

    nav a {
        display: block;
        font-size: 3rem;
        margin: 3rem 3rem;
        color: var(--text-color);
    }

    nav a::after {
        content: '';
        position: absolute;
        width: calc(100%);
        height: .15rem;
        background-color: var(--shadow-color);
        bottom: -.5rem;
        left: 45%;
        transform: translateX(-50%);
    }

    nav a:nth-child(1),
    nav a:nth-child(2) {
        color: var(--text-color);
    }

    nav a:hover {
        color: var(--main-color);
    }

    nav a.active {
        font-size: 3.5rem;
        color: var(--main-color)
    }

    nav a::before {
        display: none;
    }

    /* .home {
        padding: 0 3% 23rem;
        justify-content: center;
        text-align: center;
    } */

    .home-content {
        max-width: 90vw;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 4rem;
    }

    .home-content .social-media a {
        margin: 2.5rem .75rem 3rem;
    }

    .about {
        flex-direction: column-reverse;
        text-align: center;
    }

    .about-img img {
        width: 70vw;
        margin-top: -2rem;
    }

    h2 {
        margin-bottom: 3rem;
    }

    .container {
        width: 90vw;
        margin-top: -2rem;
    }

    .work .about:nth-child(odd) .container {
        order: 1;
    }

    .work .about:nth-child(odd) .home-content {
        order: 2;
    }

    .prev {
        left: 0;
    }

    .portfolio-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 617px) {
    .logo {
        font-size: 3rem;
    }

    .portfolio-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }

    #darkMode-icon {
        right: 6rem;
    }

    /* .home {
        padding: 0 3% 30rem;
    } */

    .prev,
    .next {
        font-size: 20px;
    }

    .contact form .input-box input {
        width: 100%;
    }
}

@media (max-width: 365px) {
    .about-img img {
        width: 90vw;
    }

    .footer {
        flex-direction: column-reverse;
    }

    .footer p {
        text-align: center;
        margin-top: 2rem;
    }
}

/* EXPERIMENTAL CODE */
.tablinks {
    cursor: pointer;
}

.tabcontent {
    display: none;
    animation-name: content;
    animation-duration: 1s;
}

@keyframes content {
    from {
        opacity: 0;
        transform: translateY(5%);
    }

    to {
        opacity: 1;
        transform: translateY(0%);
    }
}