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

:root {
    --bg-color: #000000;
    --text-color: #fff;
    --card-bg-color: #1A1A1A99;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-font: 'inter', sans-serif;
    font-size: 62.5%;
}

body.light-theme {
    --bg-color: #fff;
    --text-color: #000000;
    --card-bg-color: #fafafa;
    --border-color: rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--text-font);

    transition: background-color ease-in-out 300ms,
        color ease-in-out 300ms;
}

#switch-theme {
    position: fixed;
    top: 1rem;
    right: 1rem;

    width: 4rem;
    height: 4rem;

    background-color: var(--bg-color);
    color: var(--text-color);
    border: solid 1px var(--border-color);
    border-radius: 50%;
    padding: 1rem;

    transition: background-color ease-in-out 300ms,
        color ease-in-out 300ms,
        transform ease-in-out 300ms;
    cursor: pointer;
}

#switch-theme:active {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(1px);
    z-index: 10;
}

.hidden {
    display: none;
}

h1 {
    font-size: 3.2rem;
}

p {
    font-size: 1.4rem;
}

main {
    width: 67.2rem;
    padding: 48px 24px;
    margin: 0px auto;
}

.profile-section {
    display: flex;
    gap: 2rem;
}

.profile-img img {
    width: 10rem;
    height: 10rem;

    border: solid 1px var(--border-color);
    border-radius: 1.2rem;
    object-fit: cover;
}

.profile-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

section {
    margin-top: 3.2rem;
}

section h2 {
    font-size: 2.2rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.list-items.tech-stack {
   display: flex;
   flex-wrap: wrap;
}

.list-items.tech-stack li {
    border-radius: .8rem;
}

.list-items.tech-stack li span{
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background-color: var(--card-bg-color);
    padding: 2.4rem;
    border: solid 1px var(--border-color);
    border-radius: 1.5rem;
    transition: backdrop-filter ease-in-out 300ms;
}

.card:hover {
    backdrop-filter: blur(4px);
}

.title {
    font-size: 1.8rem;
    font-weight: 500;
}

#project-modal {
    background-color: var(--bg-color);
    border-radius: 1.5rem;
    border: solid 1px var(--border-color);
    overflow: hidden;

    width: 50rem;
    max-height: 40rem;

    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;

    animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.modal-header {
    position: relative;
}

.modal-header div {
  width: 100%;
    height: 20rem;
}

.modal-header div > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;

    background-color: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;

    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin-top: 1rem;
}

.project-title {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.links {
    margin-top: 1rem;
    display: flex;
    gap: 0.8rem;
}

.links a {
    display: flex;
    align-items: center;
    gap: .1rem;

    padding: .5rem;
    border-radius: .8rem;
    border: solid 1px var(--border-color);

    text-decoration: none;
    font-size: 1.4rem;

    color: var(--text-color);
    background-color: var(--bg-color);

    transition: transform ease-in-out 500ms,
        opacity ease-in-out 500ms;
}

.links a:hover {
    opacity: .8;
    transform: scale(1.1);
}

.list-items {
    display: flex;
    gap: 0.8rem;
}

.list-items li {
    list-style: none;

    background-color: var(--card-bg-color);
    border: solid 1px var(--border-color);
    border-radius: 10rem;
    padding: 1rem;

    transition: transform ease-in-out 300ms;
}

.list-items li:hover {
    transform: translateX(5px);
    opacity: .8;
}

.contact-form {
    background-color: var(--card-bg-color);

    border-radius: 1.2rem;
    border: solid 1px var(--border-color);
    padding: 2.4rem;
    max-width: 50%;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    margin-bottom: 1rem;
}

input,
textarea {
    background-color: var(--bg-color);

    border-radius: .8rem;
    border: 1px solid var(--border-color);
    padding: 1rem;

    color: var(--text-color);
}

.contact-form button {
    background-color: var(--text-color);
    color: var(--bg-color);

    border: solid 1px var(--border-color);
    border-radius: 1rem;
    padding: 1rem;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
}

.social-links a {
    font-size: 2rem;
    text-decoration: none;

    padding: 1.2rem;
    border-radius: 1rem;
    margin-right: .8rem;
    max-width: 5rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--text-color);
    background-color: var(--card-bg-color);

    transition: transform ease-in-out 300ms,
        opacity ease-in-out 300ms;
}

.social-links a:hover {
    transform: scale(1.2);
    opacity: .8;
}

@media (max-width: 900px) {
    main {
        width: 100%;
        padding: 32px 8px;
    }
    .project-modal, #project-modal {
        width: 90vw;
        min-width: unset;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.2rem;
    }
    section h2 {
        font-size: 1.5rem;
    }
    .profile-section {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .profile-img img {
        width: 7rem;
        height: 7rem;
    }
    .card-list {
        gap: 1rem;
    }
    .card {
        padding: 1.2rem;
        font-size: 1.2rem;
    }
    .project-modal, #project-modal {
        width: 98vw;
        min-width: unset;
        left: 50%;
        top: 2%;
        transform: translateX(-50%);
    }
    .modal-header div {
        height: 10rem;
    }
    .contact-form {
        max-width: 100%;
        padding: 1.2rem;
    }
    .links a {
        font-size: 1.1rem;
        padding: .5rem;
    }
}