
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: #eee;
    text-align: center;
    font-family: Arial, sans-serif;
    background-image: url(/assets/images/wood.png);
    background-attachment: fixed;
    background-repeat: repeat;
}

button {
    margin: 30px;
    padding: 10px 20px;
}

.scene {
    perspective: 1600px;
}
.logo{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 30px;
}
.logo img{
    width: 100%;
    max-width:400px;
}
.book {
    width: min(560px, 100vw);
    aspect-ratio: 640 / 1136;
    margin: auto;
    transform-style: preserve-3d;
}

/* 공통 페이지 */
.page {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .8s ease;
    /*overflow: hidden;*/
}

/* 앞/뒤 면 */
.face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.face.front {
    transform: rotateY(0deg);   /* ★ 추가 */
}

/* back(안쪽 면) */
.face.back {
    transform: rotateY(180deg);
    background: #fafafa;
}

/* CENTER */
.center {
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 6px 4px -2px rgba(0, 0, 0, 0.2);
    background: #f9f9f9;
}

/* LEFT */
.left {
    z-index: 3;
    transform-origin: left center;
    box-shadow: 2px 4px 4px rgba(0, 0, 0, 0.2);
    background: #fafafa;
}

/* RIGHT */
.right {
    z-index: 2;
    transform-origin: right center;
    box-shadow: -2px 4px 4px rgba(0, 0, 0, 0.2);
    background: #fafafa;
}

/* OPEN 상태 */
.book.open .left {
    transform: rotateY(-180deg);
    transition-delay: 0s;
}

.book.open .right {
    transform: rotateY(180deg);
    transition-delay: 0.4s;
}

.book.close .left {
    transition-delay: 0.4s;
}

.book.close .right {
    transition-delay: 0s;
}

.open-btn{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 18%;
    width: clamp(100px, 10vw, 185px);
    height: clamp(100px, 10vw, 185px);
    border-radius: 50%;
    background: #d64b4b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 1px 3px 5px rgba(0,0,0,.3);
    font-size: 24px;
    font-weight: 800;
}
@media (max-width: 1800px) {
    .book {
        width: min(450px, 100vw);
    }
}
@media (max-width: 1280px) {
    .book {
        width: min(300px, 100vw);
    }
}

.content{
    position: relative;
    padding: 2em;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;

    /* Firefox */
    scrollbar-width: thin;
}
.content::-webkit-scrollbar {
    width: 8px;
    opacity: 0;
}

/* 트랙 */
.content::-webkit-scrollbar-track {
    background: transparent;
}
.content h2 {
    font-weight: 800;
}
.content h2, .content h3 {
    position: relative;
    margin-bottom: 1.4em;
    text-align: center;
}
.content h2 span {
    font-weight: 800;
    padding: .2em .4em;
    color: #fff;
    background: #333;
    border-radius: 4px;
}
.portfolio-items {
    min-height: 200px;
    width: 106%;
    margin-left: -3%;
}
.portfolio-items .hentry {
    float: left;
    width: 50%;
    padding: 10px 15px;
    margin-bottom: 0;
    text-align: center;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
}
.portfolio-items .media-box {
    position: relative;
    padding: 4px;
    background-color: #fff;
    border-radius: 2px;
    -webkit-border-radius: 2px;
    -webkit-box-shadow: 1px 1px 1px #d1d1d1;
    box-shadow: 1px 1px 1px #d1d1d1;
}
.portfolio-items .media-box:before {
    content: " ";
    position: absolute;
    width: 50%;
    height: 100px;
    z-index: -10;
}
.portfolio-items .media-box:before {
    height: 75%;
    top: 15px;
    left: 0;
    width: 100%;
    -webkit-border-radius: 12px / 65px;
    -ms-border-radius: 12px / 65px;
    border-radius: 12px / 65px;
    -webkit-box-shadow: 0 0 10px #555;
    -ms-box-shadow: 0 0 10px #555;
    -o-box-shadow: 0 0 10px #555;
    box-shadow: 0 0 10px #555;
}
.portfolio-items .hentry img {
    display: block;
}
img {
    width: auto;
    max-width: 100%;
    height: auto;
}
.media-box .mask {
    opacity: 0;
    filter: alpha(opacity = 0);
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    text-align: center;
    overflow: hidden;
}
.portfolio-items .mask:before {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
    padding: 1.0em;
    line-height: 1;
    text-align: center;
    content: "\f0ca";
    background: #fff;
}
.media-box .mask a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: 0;
    filter: alpha(opacity = 0);
}

h4 {
    font-size: 1.00em;
    margin: 1.0em 0 .6em 0;
}
h4.about-text {
    font-weight: 300;
    text-align: center;
    font-size: 1.4em;
    line-height: 160%;
    padding: .3em 0;
}

.history-group {
    padding-top: 0.4em;
}
.history-unit {
    position: relative;
    padding: 0.5em 0;
}
.history-unit:before {
    content: "";
    position: absolute;
    z-index: 90;
    top: 66px;
    left: 50px;
    bottom: 4px;
    border-left: 1px dashed #ccc;
}
.history-unit h4, .skill-unit h4 {
    margin-bottom: 2px;
    font-weight: 400;
}
.history-unit h4.work-time {
    position: relative;
    z-index: 100;
    float: left;
    margin-top: 0;
    min-width: 80px;
    text-align: center;
    font-size: 2.2em;
    font-family: 'Tulpen One', cursive;
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.history-unit .work-desc {
    margin-left: 124px;
    position: relative;
    margin-left: 126px;
}
.history-unit h4, .skill-unit h4 {
    margin-bottom: 2px;
    font-weight: 400;
}
.history-unit .work-desc h4 {
    margin-top: 0;
}
.history-unit .work-desc h5 {
    margin: .2em 0 .4em;
    font-size: .8em;
    color: #999;
}
.history-unit .work-desc h5:before {
    content: "→ ";
    display: inline-block;
    margin-right: 6px;
}
.history-unit .work-desc p {
    margin-top: 0.6em;
}
.content h3 {
    font-size: 1.0em;
    font-weight: 800;
}
.content h2, .content h3 {
    position: relative;
}
.content h3 span {
    display: inline-block;
    position: relative;
    padding: .2em 1em;
    letter-spacing: 1px;
    border: 1px dashed #ccc;
}
.contact-form {
    padding-top: 1em;
    margin-top: 30px;
    background: url(/assets/images/letter-lines.png) left top repeat-x;
    background-size: 45px 5px;
}
.letter {
    padding-bottom: 10px;
    display: block;
    clear: both;
    overflow: hidden;
}
.cf:before, .cf:after {
    content: " ";
    display: table;
}
.letter-info {
    float: left;
    margin-left: .4em;
    width: 100%;
}
.letter-info h4 {
    margin: .5em 0 0 0;
    font-size: 2.2em;
    line-height: 120%;
    font-family: 'Sacramento', cursive;
    text-align: left;
}
.letter-info p {
    margin: 0;
}
p, ul, ol {
    font-size: .875em;
    line-height: 160%;
}
form p {
    position: relative;
    margin: 1.6em 0;
}
.contact-form p {
    margin: .8em 0;
    display: flex;
}
label {
    display: block;
    font-size: 10px;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 0.6em;
    text-transform: uppercase;
}
input, textarea {
    display: block;
    padding: 10px;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: none;
    -webkit-box-shadow: none;
    -webkit-appearance: none;
}
.contact-form p label{
    width: 100px;
}
.contact-form input, .contact-form textarea {
    display: block;
    float: left;
    width: 70% !important;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
}
input:not([type=submit]):not([type=button]):not([type=file]):not([type=radio]):not([type=checkbox]), textarea, select {
    padding: 12px 16px;
    width: 100%;
    font-size: 14px;
    color: #345;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    background-color: transparent;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}
textarea {
    min-height: 9em;
    line-height: 1.6;
    resize: vertical;
}
.contact-form input, .contact-form textarea {
    display: block;
    float: left;
    width: 70% !important;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
}
.contact-form textarea {
    height: 100px;
}
input[type=submit], input[type=button], button, a.button {
    display: inline-block;
    position: relative;
    padding: 1.1em 2em;
    margin-bottom: .25em;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: .08em;
    outline: 0;
    border: 2px solid #345;
    color: #345;
    text-shadow: none;
    background: none;
    border-radius: 0;
}
.contact-form input.submit {
    width: auto !important;
    margin-top: 1.2em;
    float: right !important;
}
.rm-close {
    color: #fff;
    position: absolute;
    top: 0;
    right: 30px;
    cursor: pointer;
    z-index: 300;
}
.rm-close {
    background: #333;
    border-left: 1px dashed #888;
    border-right: 1px dashed #888;
    box-shadow: 3px 0 0 #333, -3px 0 0 #333;
    text-align: center;
    width: 40px;
    height: 50px;
}
.rm-container .rm-front > *, .rm-container .rm-back > * {
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -o-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: perspective(200px) rotateX(0deg);
}
.rm-close:after, .rm-close:before {
    border-top: 15px solid #333;
    content: '';
    height: 0;
    position: absolute;
    top: 100%;
    width: 0;
}
.rm-close:before {
    border-right: 25px solid transparent;
    left: -4px;
}
.rm-close:after {
    border-left: 25px solid transparent;
    right: -4px;
}
.rm-close span {
    display: inline-block;
    margin-top: 14px;
}


.mask{
    cursor: pointer;
}
.img-pop{
    width: 100%;
    max-width:800px;
    background-color: #ffffff;
    box-shadow: 1px 3px 5px rgba(0,0,0,.5);
    position: absolute;
    left: 50%;
    top: -100%;
    opacity: 0;
    transform: translateX(-50%);
    transition:top .6s ease, opacity .4s ease;
    border-radius: 5px;
    overflow: hidden;

}
.img-pop.on{
    opacity: 1;
    top: 20%;
    /*transform: translate(-50%, 100%);*/
}
.img-box{
    width: 100%;
}
.img-box img{
    width: 100%;
}
.img-txt{
    padding: 30px;
}
.img-txt pre{
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
}


@media (max-width: 950px) {
    .face{
        position: unset !important;
        transform: unset !important;
    }
    .face.front{
        display: none;
    }
    .logo{
        margin-top: 20px;
        margin-bottom: 20px;
    }
    .page{
        position: unset !important;
        height: auto;
    }
    .scene{
        padding: 0 20px;
    }
    .book{
        width: 100% !important;
    }
    .portfolio-items .hentry{
        padding: 10px;
    }
    .portfolio-items .hentry img{
        width: 100%;
    }
    .portfolio-items .media-box:before{
        display: none;
    }
    .img-pop{
        position: fixed;
    }

    .book.open .left, .book.open .right{
        transform: unset !important;
    }

    .rm-close{
        display: none;
    }
}
