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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    transition:
        background-color 0.6s ease-in-out,
        color 1.2s cubic-bezier(0.85, 0, 0.72, 1),
        fill 1.2s cubic-bezier(0.85, 0, 0.72, 1);

    font-family: "MadeTommy", system-ui, sans-serif;
}

header {
    position: fixed;
    z-index: 1000;

    width: 100%;
    padding: var(--padding-body);

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

nav {
    display: flex;
    flex-direction: row;
    gap: 2rem;
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25dvh;
}

section {
    width: 100dvw;
    scroll-margin-top: 10rem;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;

    font-size: 0.875rem;
    font-weight: 200;
}

a p {
    opacity: 0.4;
}

a:hover p {
    opacity: 1;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

img {
    display: block;
    border-radius: var(--radius-img);
    align-items: center;
    object-fit: cover;

}

/* FONTS STYLE */

.title {
    font-size: 1.5rem;
    font-weight: 200;
}

.text {
    font-size: 0.875rem;
    font-weight: 200;
}

.text-bold {
    font-size: 0.875rem;
    font-weight: 400;
}













/* HEADER */

header .logo {
    width: 6rem;
    fill: var(--color-primary);
}

















/* HERO */

#hero {
    width: 100%;
    height: 100dvh;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.carousel {
    width: 100%;
    overflow: hidden;

    display: flex;

    >* {
        flex: 0 0 300%;
    }
}

ul.hero-project {
    width: 100dvw;

    display: flex;
    gap: var(--gap-img);
    padding-right: var(--gap-img);

    will-change: transform;
    animation: heroScroll 60s linear infinite;
}

#hero img {
    width: 100%;
}

.hero-footer {
    width: 100%;
    padding: var(--padding-body);

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-space {
    width: 100%;
    height: 12dvh;
}

/* ANIMATION */

@keyframes heroScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}











/* DAILY DEIGN */
#daily_design {
    width: 100%;
    padding: var(--padding-body);

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    grid-column-gap: 0;
    grid-row-gap: 3rem;
}

.div-flex,
#daily_design ul,
#contact ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dd1 {
    grid-area: 1 / 1 / 2 / 3;
}

.dd2 {
    grid-area: 2 / 1 / 3 / 2;
}

.dd3 {
    grid-area: 2 / 2 / 3 / 3;
}

#daily_design ul,
#contact ul {
    gap: 0.75rem;
    padding-left: 1.5rem;
}






/* CONTACT */
#contact {
    width: 100%;
    padding: var(--padding-body);

    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, auto);
    grid-column-gap: 0;
    grid-row-gap: 3rem;
}

.c1 {
    grid-area: 1 / 1 / 2 / 2;
}

.c2 {
    grid-area: 2 / 1 / 3 / 2;
}
















#projects {
    width: 100%;
    padding: var(--padding-body);

    display: flex;
    flex-direction: column;
    gap: 3rem;
}

#gallery {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex-wrap: wrap;
    gap: var(--gap-img);
}

.item {
    position: relative;
    cursor: pointer;
    overflow: hidden;

    flex: 0 0 calc(50% - var(--gap-img) / 2);
    height: auto;

    transition: flex-basis 250ms ease, transform 250ms ease;
}

.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* hover text */
.item .label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 8px 10px;
    border-radius: 999px;

    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 14px;

    opacity: 0;
    transform: translateY(6px);
    transition: opacity 200ms ease, transform 200ms ease;
}

.item:hover .label {
    opacity: 1;
    transform: translateY(0);
}

/* expanded state */
.item.is-active {
    flex-basis: 100%;
}





























/* SWITCH */

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-switch-bg);
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: var(--color-primary);
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--color-switch-bg);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--color-switch-bg);
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}






























/* MEDIA QUERIES */
@media (max-width: 1024px) {
    #hero img {
        width: 20rem;
    }

    section {
        scroll-margin-top: 4rem;
    }
}

@media (max-width: 768px) {
    .item {
        flex: 0 0 100%;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-end;
    }

    #hero img {
        width: 40rem;
    }

    section {
        scroll-margin-top: 4rem;
    }
}