@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
@import url('./src/nyght-serif-main/nyght-serif.css');

:root {
    --black: 10, 10, 12;
    --white: 248,248,250;
    --gray: 80, 80, 82;
    --dark-gray: 25, 25, 27;
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: rgb(var(--white));
    font-size: 1rem;
    font-weight: 400;
    box-sizing: border-box;
    transition-duration: 0.25s;
}

html {
    background-color: rgb(var(--black));
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    cursor: pointer;
}

h1, h1 * {
    font-size: 6rem;
    font-weight: 700;
}

h2 {
    font-size: 3rem;
    font-weight: bold;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

button, .button {
    color: rgb(var(--black));
    background-color: rgb(var(--white));
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    display: inline-flex;
    cursor: pointer;
}

label {
    margin: 0 0.5rem;
    margin-bottom: 0.25rem;
}

input[type='text'], input[type='email'], textarea {
    background-color: rgba(var(--gray), 0.25);
    border: solid 0.0625rem rgba(var(--gray), 0.5);
    border-radius: calc(0.5rem + 0.0625rem);
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    /* width: 100%; */
    display: inline-block;
    resize: none;
}

section {
    max-width: 72rem;
    margin: 4rem auto;
    padding: 3rem 4.625rem;
    border-radius: 1rem;
}

section .head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

/* nav bar */

nav {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    z-index: 1;
    margin: 0 auto;
    width: min-content;
}

nav div {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    background-color: rgba(var(--gray), 0.25);
    border: solid 0.0625rem rgba(var(--gray), 0.5);
    border-radius: calc(0.75rem + 0.0625rem);
    backdrop-filter: blur(2rem);
}

nav div a {
    padding: 0.5rem 2rem;
}

nav div a:hover {
    background-color: rgba(var(--gray), 0.5);
    border-radius: calc(0.75rem);
}

nav div .divider {
    display: inline-block;
    width: 0.0625rem;
    height: 1rem;
    background-color: rgba(var(--white), 0.5);
}

/* name */
#name {
    height: calc(75vh - (7.25rem * 2));
    margin: 7.25rem auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#name > div {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#name h1 {
    line-height: 4rem;
}

#name h1 span {
    display: inline-flex;
    padding: 0 0.5rem;
    align-items: center;
    background-color: rgb(var(--white));
    color: rgb(var(--black));
    height: 5.5rem;
}

#name p, #name p span {
    color: rgba(var(--white), 0.75);
    text-align: center;
    font-size: 1.25rem;
    margin: 0.5rem 0;
}

#name p span {
    font-family: 'Nyght Serif', serif;
    font-style: italic;
}

p i {
    font-family: 'Nyght Serif', serif;
    font-style: italic;
    letter-spacing: 0.1rem;
}

/* featured works */
#featured-works {
    background-color: rgba(var(--gray), 0.10);
    display: flex;
    flex-direction: column;
}

#portfolio-tab-button-3 {
    width: max-content;
    margin: 2rem auto 0 auto;
    display: none;
}
/* work */
.work-content {
    margin-top: 2rem;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

.work {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 16.875rem;
}

.work:hover {
    cursor: pointer;
    scale: 1.1;
}

.work .image::after {
    content: "";
    background-image: url("./src/icons/open-new-window.svg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 1rem 1rem;
    position: absolute;
    background-color: rgba(var(--dark-gray), 0.5);
    border-radius: 0.50rem;
    backdrop-filter: blur(2rem);
    opacity: 0;
    transition: 0.25s;
    right: 0.25rem;
    top: 0.25rem;
    width: 1.5rem !important;
    height: 1.5rem !important;
}

.work[data-preview] .image::after {
    background-image: url("./src/icons/eye-solid.svg");
}

.work[data-package] .image::after {
    background-image: url("./src/icons/cube.svg");
}

.work:hover .image::after {
    opacity: 1;
}

.work .image {
    width: 100%;
    height: 10rem;
    border-radius: 0.5rem;
    border: solid 0.0625rem rgba(var(--gray), 0.5);
    overflow: hidden;
    padding: 0;
}

.work .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

.work:hover .image img {
    scale: 1.2;
}

.work .name {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.5rem;
}


.work .name h3 {
    opacity: 0.8;
}

.work:hover .name h3 {
    opacity: 1;
}

.work .tag {
    opacity: 0.65;
    border: solid 0.0625rem rgba(var(--gray), 1);
    color: rgba(var(--white), 0.85);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    /* text-transform: uppercase; */
    font-size: 0.875rem;
    font-weight: 400;
    background-color: rgba(var(--gray), 0.1);
    align-self: flex-start;
}

.work:hover .tag {
    opacity: 1;
}

/* services */
#services {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: space-between;
}

#services > .content {
    display: grid;
    grid-template-columns: auto auto;
    gap: 1.5rem;
}

#services .service {
    display: flex;
    flex-direction: column;
    width: 16.875rem;
    background-color: rgba(var(--gray), 0.25);
    border: solid 0.0625rem rgba(var(--gray), 0.5);
    padding: 2rem;
    border-radius: 1rem;
    gap: 1rem;
    margin: 0 auto;
}

#services .service .title {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

#services .service .title .icon {
    display: block;
    width: 3rem;
    height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(var(--gray), 0.5);
    border-radius: 3rem;
    padding: 0.5rem;
}

#services .service .title .icon img {
    height: 100%;
    opacity: 0.9;
}

#services .service .title h3 {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#services .service > .content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
}

#services .service > .content > span {
    display: block;
    opacity: 0.8;
    background-color: rgba(var(--gray), 0.5);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    flex-grow: 1;
    text-align: center;
    position: relative;
}

/* #services .service > .content > span.asterisk {
    padding-right: 0.75rem;
}

#services .service > .content > span.asterisk::after {
    content: '';
    position: absolute;
    display: block;
    right: 0.25rem;
    top: 0.25rem;
    background-color: rgba(var(--white), 1);
    border-radius: 1rem;
    height: 0.5rem;
    width: 0.5rem;
} */
 
/* contacts */
#contacts {
    background-color: rgba(var(--gray), 0.10);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
}

#contacts #links {
    display: flex;
    flex-direction: column;
}

#contacts #links h2 {
    margin-bottom: 2rem;
}

#contacts #links a {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    opacity: 0.6;
    margin-bottom: 0.75rem;
}

#contacts #links a:hover {
    opacity: 1;
}

#contacts #links a .icon {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#contacts #links a .icon img {
    height: 100%;
}

#contacts #mail {
    flex: 1;
    max-width: 30rem;
}

#contacts #mail form {
    display: inline-flex;
    flex-direction: column;
    width: 100%;
}

#contacts #mail form input[type='submit'] {
    display: inline-flex;
    margin: 0.5rem auto 0 auto;
}

/* footer */
footer {
    background-color: rgba(var(--gray), 0.25);
    border-top: solid 0.0625rem rgba(var(--gray), 0.5);
}

footer .content {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 4.625rem;
    gap: 1rem;
}

footer .content .links {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

footer .content .links a {
    opacity: 0.6;
}

footer .content .links a:hover {
    opacity: 1;
}

/* portfolio */
#portfolio {
    overflow-y: auto;
}

#portfolio section {
    display: flex;
    flex-direction: column;
}

/* tab | modal */
.tab {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background-color: rgba(var(--black), 0.89);
    backdrop-filter: blur(2rem);
    /* display: none; */
}

.tab .head, .modal .head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.tab .close-button, .modal .close-button {
    display: block;
    width: 3rem;
    height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.tab .close-button img, .modal .close-button img {
    height: 100%;
}

.tab.dont-display {
    /* display: none; */
    top: 100%;
}

/* modal */
.modal {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* background-color: rgba(var(--black), 0.5); */
}

.modal > div {
    max-width: 50rem;
    background-color: rgba(var(--dark-gray), 0.89);
    backdrop-filter: blur(0.5rem);
    border: solid 0.0625rem rgba(var(--gray), 0.5);
    border-radius: calc(0.75rem + 0.0625rem);
    padding: 2rem 3rem;
    max-height: 80vh;
    overflow: auto;
    box-shadow: rgba(var(--black), 0.3) 0rem 1rem 2rem, rgba(var(--black), 0.22) 0rem 1rem 0.75rem;
    left: auto;
    position: fixed;
}

.modal h2 {
    font-size: 2rem;
}

.modal h3 {
    font-size: 1.25rem;
    font-weight: 500;
}

.modal.dont-display {
    /* display: none; */
    opacity: 0;
    scale: 1 0;
}

.modal .close-button {
    width: 2rem;
    height: 2rem;
}

/* package */
#package .work {
    width: 10rem;
}

#package .work-content {
    gap: 1rem;
    margin-top: 1.5rem;
}

#package .work {
    width: min-content;
}

#package .work .image {
    width: max-content;
    height: 10rem;
    border-radius: 0.5rem;
    border: solid 0.0625rem rgba(var(--gray), 0.5);
    overflow: hidden;
}

#package .work .image img {
    width: max-content;
}

#package .name {
    display: block;
}

#package .name h3 {
    text-align: center;
    font-size: 1rem;
}

#package .tag {
    display: none;
}

/* preview */
#preview > div {
    padding: 2rem 0;
}

#preview .head {
    padding: 0 3rem 1rem 3rem;
}

#preview .content img {
    max-width: 100%;
    max-height: calc(80vh - 10rem);
}

/* about */
#about {
    display: flex;
    flex-direction: column;
}

#about section {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

#about .content {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

#about .content div {
    width: 50ch;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#about p {
    font-weight: 300;
}

@media screen and (max-width: 900px) {
    #services {
        flex-direction: column;
    }
}

@media screen and (max-width: 700px) {
    #services > .content {
        grid-template-columns: auto;
    }
    
    #contacts {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    #contacts #mail {
        width: 100%;
        margin: 0 auto;
    }
    
    #name {
        height: 40vh;
    }
    
    #name p {
        /* font-size: 1.25rem; */
        margin: 0rem 0;
    }
    
    #name h1, #name h1 span {
        font-size: 4rem;
    }
    
    #name h1 span {
        padding: 0 0.25rem;
        height: 3.5rem;
    }
}

@media screen and (max-width: 600px) {
    nav {
        padding: 0;
        margin: 0 auto;
        width: 100%;
    }

    nav div {
        justify-content: center;
        padding: 1rem 2rem;
        border: solid 0.0625rem rgba(var(--gray), 0.5);
        border-radius: 0;
        width: 100%;
    }

    nav div a {
        padding: 0.5rem 1rem;
    }

    nav div a:hover {
        background-color: rgba(var(--gray), 0.5);
        border-radius: calc(0.75rem);
    }

    nav div .divider {
        display: inline-block;
        width: 0.0625rem;
        height: 1rem;
        background-color: rgba(var(--white), 0.5);
    }
    
    footer .content {
        flex-direction: column;
    }
    
    #portfolio-tab-button-2 {
        display: none;
    }
    
    #portfolio-tab-button-3 {
        display: inline-block;
    }
}

@media screen and (max-width: 400px) {
    section, footer .content {
        padding: 3rem 2rem;
    }
}