:root {
    --text-primary: #582727;
    --outside-padding: 4.5rem;
}

::-webkit-scrollbar {
    width: 0px;
}

html,
body {
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #EBE1DD;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22168%22%20height%3D%2232%22%3E%3Cpath%20fill%3D%22%23350A0A%22%20opacity%3D%22.0125%22%20d%3D%22M156%2014V8h-4v6h-6v4h6v6h4v-6h6v-4zm-96%200V8h-4v6h-6v4h6v6h4v-6h6v-4zM20%200h4v32h-4zm12%200h8v32h-8zM4%200h8v32H4zm100%200h4v32h-4zM76%200h4v32h-4zm56%200h4v32h-4zm-16%200h12v32h-12zM84%200h12v32H84z%22%20%2F%3E%3C%2Fsvg%3E");
}

* {
    box-sizing: border-box;
    font-family: Chiron Sung HK WS;
}

.sidebar {
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    padding: var(--outside-padding) var(--outside-padding) 2.5rem var(--outside-padding);
    position: fixed;
    flex-direction: column;
    justify-content: space-between;
}

.nav,
.nav-list {
    display: flex;
    align-items: start;
    flex-direction: column;
}

.nav-logo {
    flex-shrink: 0;
    text-decoration: none;
    box-shadow: 0 0 2rem 0 rgba(235, 225, 221, .75);
}

.nav-logo,
.nav-logo img {
    display: block;
}

.nav-list {
    margin-top: 1rem;
}

.nav-list a {
    color: var(--text-primary);
    margin: .75rem 0;
    font-size: 1.375rem;
    text-decoration: none;
}

.card {
    width: 75rem;
    margin: auto;
    height: 48rem;
    overflow: hidden;
    position: relative;
    border-radius: 3rem;
    transition:
        background-color .375s,
        background-image .375s;
    background-color: #FFF9F9;
    box-shadow: 0 .25rem 4.5rem 0 rgba(53, 10, 10, .05);
    background-image: url(/new/images/keary.svg);
    background-position: center;
    background-repeat: no-repeat;
    /* border: solid 1px rgba(44, 18, 18, .25); */
}

.card-item {
    width: 100%;
    height: 100%;
    opacity: 0;
    display: none;
    padding: 4rem;
    overflow: auto;
    position: relative;
    flex-direction: column;
}

.card-item-active {
    display: flex;
    animation: .375s cardShow .375s both;
}

.card-item-hide {
    display: flex;
    animation: .375s cardHide both;
}

.card-head {
    height: 2.25rem;
    display: flex;
    align-items: center;
}

.card-head-back {
    color: var(--text-primary);
    opacity: .5;
    transition: all .25s;
    cursor: pointer;
}

.card-head-back:hover,
.card-head-back:active,
.card-item-hide .card-head-back {
    opacity: .75;
    transform: translateX(-.25rem);
}

.card-head-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-left: 1.5rem;
}

.card::before {
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    content: '';
    position: absolute;
    transition: opacity .375s;
    background-repeat: no-repeat;
    background-position: top right;
    background-image: url('/new/images/osborn.png');
}

[data-active-card="home"]::before {
    opacity: 1;
}

.top,
.top-social,
.mobile-social {
    display: flex;
    flex-direction: row;
}

.mobile-social,
.mobile-nav {
    display: none;
}

.top-avatar {
    width: 12rem;
    height: 12rem;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: .75rem;
    flex-shrink: 0;
}

.top-info {
    display: flex;
    margin-left: 2.5rem;
    flex-direction: column;
}

.top-name {
    width: 6rem;
    margin: .5rem 0;
}

.top-social,
.mobile-social {
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
}

.social-item {
    gap: .5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.social-item .social-logo {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-item span {
    color: #BA9C9C;
}

.container {
    display: flex;
    flex-direction: column;
}

.description {
    color: #753F3F;
    max-width: 40rem;
    margin-top: 3rem;
    line-height: 2.25rem;
    font-size: 1.25rem;
}

.contents {
    color: #753F3F;
    max-width: 48rem;
    margin-top: 3rem;
    line-height: 2.25rem;
    font-size: 1.25rem;
}

.contents a {
    color: #753F3F;
}

.works {
    display: flex;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.works img {
    width: 16rem;
    height: 16rem;
}

.fw-700 {
    font-weight: 700;
}

.opacity-75 {
    opacity: .75;
}

.opacity-50 {
    opacity: .5;
}

.line {
    text-decoration: line-through;
}

.footer {
    color: #753F3F;
}

.footer a {
    color: #753F3F;
}

.mobile-only {
    display: none;
}

.nav-ani a {
    position: relative;
    animation: .5s fadeInUp both;
}

.nav-ani .nav-ani-item::after {
    top: 50%;
    width: 1rem;
    height: .75rem;
    opacity: 0;
    content: '';
    position: absolute;
    transform: translate(.25rem, -50%);
    transition: all .25s;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2212%22%3E%3Cpath%20fill%3D%22%23582727%22%20d%3D%22m14.043%206.5-4.647%204.646.708.708L15.957%206%2010.104.146l-.708.708L14.043%205.5H0v1z%22%2F%3E%3C%2Fsvg%3E");
}

.nav-ani a:nth-child(1) {
    animation-delay: .125s;
}

.nav-ani a:nth-child(2) {
    animation-delay: .375s;
}

.nav-ani a:nth-child(3) {
    animation-delay: .625s;
}

.nav-ani a:nth-child(4) {
    animation-delay: .875s;
}

.nav-ani-item:hover::after,
.nav-ani-item:active::after {
    opacity: 1;
    transform: translate(.75rem, -50%);
}

.friends {
    gap: 1.5rem;
    display: flex;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.friend-item {
    width: 100%;
    height: 4.5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.friend-item-avatar {
    width: 4.5rem;
    height: 4.5rem;
    overflow: hidden;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    border-radius: .5rem;
    flex-shrink: 0;
}

.friend-item-name {
    color: var(--text-primary);
    position: relative;
    font-size: 1.25rem;
    margin-left: 1.75rem;
}

.projects {
    gap: 1.5rem;
    display: flex;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.project-item {
    width: 100%;
    height: 4.5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.project-item-avatar {
    width: 4.5rem;
    height: 4.5rem;
    overflow: hidden;
    object-fit: contain;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

.project-item-name {
    color: var(--text-primary);
    position: relative;
    font-size: 1.25rem;
    margin-left: 1.75rem;
}

.external-link,
.external-link-attr {
    position: relative;
}

.external-link-attr::after {
    top: 50%;
    left: 100%;
    width: .75rem;
    height: .75rem;
    opacity: 0;
    content: '';
    position: absolute;
    transform: translate(.25rem, -50%);
    transition: all .25s;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20fill%3D%22%23582727%22%20d%3D%22M12%2012H0V0h5v1H1v10h10V7h1zM4%208v-.75L10.25%201H6.5V0H12v5.5h-1V1.75L4.75%208z%22%2F%3E%3C%2Fsvg%3E");
}

.external-link-attr:hover::after,
.external-link-attr:active::after,
.external-link:hover .external-link-attr::after,
.external-link:active .external-link-attr::after {
    opacity: 1;
    transform: translate(.75rem, -50%);
}

@media (max-width: 108rem) {
    .card {
        margin-right: var(--outside-padding);
        margin-left: auto;
    }

    .works .work-item {
        width: 25%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 96rem) {
    .card {
        width: 64rem;
    }
}

@media (max-width: 84rem) {
    .card {
        width: 56rem;
    }
}

@media (max-width: 80rem) {
    .card {
        width: 54rem;
    }

    .works .work-item {
        width: 33.333%;
    }
}

@media (max-width: 74rem) {
    .card {
        width: 50rem;
    }
}

@media (max-width: 70rem) {
    .card {
        width: 48rem;
    }

    /* .top-name {
        margin: 0;
    } */
}

@media (max-width: 67.5rem) {
    :root {
        --outside-padding: 3.5rem
    }

    .card {
        width: 46rem;
    }

    .card-item {
        padding: var(--outside-padding);
    }
}

@media (max-width: 62rem) {
    :root {
        --outside-padding: 2.5rem
    }

    .nav,
    .nav-list {
        align-items: center !important;
        flex-direction: row;
    }

    .nav-logo,
    .nav-logo img {
        width: 2.5rem;
        height: 2.5rem;
    }

    .nav-list {
        margin-top: 0;
        margin-left: 2.5rem;
    }

    .nav-list a {
        font-size: 1.25rem;
        margin-right: 1.25rem;
    }

    .nav-ani .nav-ani-item::after {
        top: 150%;
        right: 0;
        transform: translate(-.75rem, -50%);
        background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2212%22%3E%3Cpath%20fill%3D%22%23582727%22%20d%3D%22m14.043%206.5-4.647%204.646.708.708L15.957%206%2010.104.146l-.708.708L14.043%205.5H0v1z%22%2F%3E%3C%2Fsvg%3E");
    }

    .nav-ani-item:hover::after,
    .nav-ani-item:active::after {
        opacity: 1;
        transform: translate(0, -50%);
    }

    .card {
        width: calc(100% - var(--outside-padding) * 2);
        height: 40rem;
        border-radius: 2rem;
        margin: auto var(--outside-padding);
    }

    .top-name {
        margin: .5rem 0;
    }
}

@media (max-height: 60rem) and (max-width: 88rem) {
    .card {
        height: 42rem;
    }
}

@media (max-height: 52rem) or (max-width: 62rem) {
    .card {
        height: 36rem;
    }
}

@media (max-height: 52rem) and (max-width: 88rem) {
    .card {
        height: 34rem;
    }
}

@media (max-height: 50rem) and (max-width: 62rem) {
    .card {
        margin-top: calc(var(--outside-padding) + 5rem);
    }
}

@media (max-height: 48rem) and (max-width: 62rem) {
    .card {
        height: 34rem;
    }
}

@media (max-height: 46rem) and (max-width: 62rem) {
    .card {
        height: 30rem;
    }
}

@media (max-width: 42rem) or (max-height: 43rem) {

    html,
    body {
        background: #FFF9F9;
    }

    .mobile-only {
        display: flex;
    }

    .sidebar {
        opacity: 0;
    }

    .top-avatar {
        width: 8rem;
        height: 8rem;
    }

    .top-info {
        margin-left: 2rem;
    }

    .top-name {
        width: 4rem;
        margin: auto 0 .5rem 0;
    }

    .top-social {
        display: none;
    }

    .mobile-nav {
        display: flex;
        padding: 2rem 0;
        margin-top: auto;
        flex-direction: column;
    }

    .mobile-nav a {
        color: #582727;
        margin: .75rem 0;
        font-size: 1.375rem;
        text-decoration: none;
    }

    .mobile-social {
        display: flex;
        margin: 2rem 0;
    }

    .card {
        width: 100%;
        height: 100%;
        border-radius: 0;
        background-size: contain;
        margin: 0;
    }

    .card::before {
        background-size: contain;
    }

    .card-item {
        padding: 3.5rem 2rem;
    }

    .description {
        margin-top: 0;
    }
}

@media (max-width: 42rem) {
    .works .work-item {
        width: 50%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardShow {
    0% {
        opacity: 0;
        transform: translateX(1rem);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes cardHide {
    0% {
        opacity: 1;
        transform: translateX(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-1rem);
        display: none;
    }
}