html, body{ height: 100%; font-family: 'Open Sans', sans-serif; } body{ background-image: radial-gradient(ellipse at top, white, #bdc3c7 80%); } a{ color: white; text-decoration: none; } img{ max-width: 100%; box-sizing: border-box; height: auto; } h1{ font-size: 2rem; margin-bottom: 1rem; } #desc{ padding: 3rem; font-weight: 100; h1{ font-size: 2rem; margin-left: 4rem; margin-bottom: 3rem; position: relative; text-transform: uppercase; font-weight: 700; &:before{ content: ''; position: absolute; top: 0; left: -5rem; width: 4rem; height: 6rem; background-color: #2c3e50; transform: perspective(300px) rotateY(-40deg); } } .open{ color: #2c3e50; font-size: 2rem; text-transform: uppercase; font-weight: 700; margin: 3rem; } } .modal{ transition: all 300ms ease; box-sizing: border-box; position: fixed; top: 10%; right: 3rem; width: 18rem; height: 35rem; background-color: #2c3e50; color: white; transform: perspective(300px) rotateY(-5deg); transform-origin: middle right; -webkit-font-smoothing: antialiased; backface-visibility: hidden; &:after{ content: ''; width: 100%; height: 1rem; position: absolute; left: 0; bottom: -3rem; background-image: radial-gradient(ellipse, rgba(black, 0.2), transparent 60%); } .close{ position: absolute; top: 0; right: 0; width: 3rem; height: 3rem; line-height: 3rem; font-size: 2rem; background-color: rgba(black, 0.5); text-align: center; &:hover{ } } figcaption{ padding: 2rem; p{ line-height: 1.2rem; } } } .closed{ transition: all 300ms ease; right: -25rem; }