@import url("fonts.css");
@import url("reset.css");
@import url("wfc.css");

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font: 100 normal 15px/1.5 Rubik, sans-serif;
    color: #111;
}

h2 {
    font-size: 2rem;
    font-weight: 400;
    padding: 0 0 1.25rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    font-size: 1.4rem;
    line-height: 1.7;
    padding: 0 0 1rem;
}

a {
    color: mediumvioletred;
}

a:hover {
    color: #de94c3;
}

a:active {
    color: #7d0350;
}

button {
    appearance: none;
    background: none;
    font: inherit;
    color: inherit;
    border: none;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

strong {
    font-weight: bold;
}

.hidden {
    display: none;
}

.keyword-links a {
    --hover-bg: #444;
    --hover-fg: white;
    color: inherit;
    text-decoration-style: dotted;
    box-shadow: none;
    transition: all .1s;
}

a[data-header] {
    --hue-diff: 30;
    --hue: calc(120 + var(--i) * var(--hue-diff));
    --bg: hsl(var(--hue) 100% 90%);
    --hover-bg: hsl(var(--hue) 100% 80%);
    --hover-fg: inherit;
    background: var(--bg);
    box-shadow: 0 0 0 3px var(--bg);
    text-decoration: none;
    border-radius: 0.1px;
}

.keyword-links a:hover {
    background: var(--hover-bg);
    color: var(--hover-fg);
    text-decoration: none;
    box-shadow: 0 0 0 5px var(--hover-bg);
    border-radius: 0.1px;
}

.content-container {
    width: 960px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .content-container {
        width: 100%;
        padding: 0 1em;
    }
}

.skip-link {
    position: absolute;
    top: -100px;
    left: -500px;
    padding: .5em 1.5em;
    background: #eee;
    font-size: 1.5em;
}

.skip-link:focus {
    top: 10px;
    left: 10px;
}

.masthead-container {
    position: relative;
    height: 500px;
}

.masthead {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-bottom: 1px solid #eee;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s .5s;
}

.masthead--active {
    opacity: 1;
    pointer-events: auto;
}

.masthead--astrophotography {
    background-size: cover;
    background-position-y: 80%;
}

@media (max-width: 959px) {
    .masthead--astrophotography {
        /* Intentional delay in mobile so it won't flicker initially */
        animation: set-astrophotography-bg 0.1s 1s linear forwards;
    }
}

@media (min-width: 960px) {
    .masthead--astrophotography {
        background-size: 80%;
        background-position: 80% 60%;
        background-image: url('../assets/orion.jpg');
    }

    .masthead--astrophotography .masthead__overlay {
        background: radial-gradient(
            circle at 60%,
            transparent 20%,
            #171716 60%
        );
    }
}

@keyframes set-astrophotography-bg {
    to {
        background-image: url('../assets/orion-sm.jpg');
    }
}

.masthead--astrophotography .title-container {
    color: white;
}

@media (max-width: 960px) {
    .masthead-container {
        height: 400px;
    }
}

@media (max-width: 720px) {
    .masthead-container {
        height: 300px;
    }
}

.masthead__overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.title-container {
    width: max-content;
}

@media (max-width: 960px) {
    .title-container {
        font-size: .8em;
    }
}

@media (max-width: 720px) {
    .title-container {
        max-width: 100%;
        padding: 0 1em;
        font-size: .7em;
    }
}

@media (max-width: 480px) {
    .title-container {
        font-size: .6em;
    }
}

.masthead__name {
    font-weight: 400;
    font-size: 3.6em;
    line-height: 1;
    margin-bottom: .2em;
}

.masthead__summary {
    font-size: 2.5em;
    font-weight: 100;
}

.masthead--default .masthead__name {
    padding-right: .3em;
    background: #fffb;
    border-radius: .5em;
}

@supports (backdrop-filter: blur(1px)) {
    .masthead--default .masthead__name {
        backdrop-filter: blur(5px);
        background: #fffa;
    }
}

@media (max-width: 720px) {
    .masthead--default .masthead__name {
        display: inline;
        border-radius: .2em;
    }

    .masthead--default .masthead__summary {
        margin-top: .3em;
    }
}

.masthead__visuals {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.masthead__visual,
.masthead__fallback {
    --top-offset: 0%;
    --left-offset: 0%;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(
        var(--left-offset),
        calc(-50% + var(--top-offset))
    );
}

.masthead__fallback {
    display: none;
}

@media (max-width: 720px) {
    .masthead__visual {
        display: none;
    }
    .masthead__fallback {
        display: block;
    }
}

.masthead--default .masthead__fallback {
    --top-offset: -3%;
    --left-offset: 23%;
}

.section {
    padding: 5em 0;
}

@media (max-width: 720px) {
    .section {
        padding: 3em 0;
    }
}

.about-me-section {}

.works-section {
    overflow: hidden;
}

.works-section-container {
    position: relative;
}

.works-section__video-container {
    position: absolute;
    top: 0;
    left: -15%;
    width: 33%;
    transform: rotate(206.5deg);
}

@media (max-width: 720px) {
    .works-section__video-container {
        transform: rotate(10deg);
    }
}

.works-section__video {
    width: 100%;
}

.works-section__video-fallback {
    display: none;
}

@media (max-width: 720px) {
    .works-section__video {
        display: none;
    }
    .works-section__video-fallback {
        display: block;
    }
}

.works-section__overlay {
    position: relative;
    z-index: 1;
}

.works-section .section__title {}

.works-buttons {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #ddd;
}

.works-button {
    font-size: 1.2em;
    padding: .75em 1.5em;
    min-width: 160px;
    transition: all .5s;
}

@media (max-width: 585px) {
    .works-button {
        font-size: 1em;
        padding: .75em 1.25em;
        min-width: 120px;
    }
}

@media (max-width: 470px) {
    .works-button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: .5em 1em;
    }
}

@media (max-width: 410px) {
    .works-button {
        padding: .33em .5em;
    }
}

.works-button:focus {
    outline: none;
}

.works-button:hover,
.works-button:focus,
.works-button--active,
.works-button--active:focus {
    position: relative;
    background: #f0f0f5;
}

.works-button:active {
    background: #e0e0e8;
}

.works-button--active::after,
.works-button--active:focus::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    height: 1px;
    width: 100%;
    background: #aaa;
    animation: works-button-line .5s forwards;
}

.works-button__icon {
    width: 20px;
    height: 20px;
    vertical-align: text-top;
    fill: currentColor;
}

@keyframes works-button-line {
    from {
        transform:
            translateX(-50%)
            scaleX(0);
    }
    to {
        transform:
            translateX(-50%)
            scaleX(1);
     }
}

.works-container {
    position: relative;
}

.work-container {
    position: absolute;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all .5s;
    transform: translateX(-100%);
}

.work-container--active ~ .work-container {
    transform: translateX(100%);
}

.work-container--active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.change-work-button {
    position: absolute;
    top: 40px;
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    background: #f8f8f8;
    border: 1px solid #d5d5d5;
    box-shadow:
        0 0 0 4px #fff,
        0 0 0 7px transparent;
    transform: scale(0);
    transition: transform .5s;
}

.work-container.has-prev .change-work-button--prev {
    transform: scale(1);
}

.work-container.has-next .change-work-button--next {
    pointer-events: auto;
    transform: scale(1);
}

.change-work-button--prev {
    left: 5px;
}

.change-work-button--next {
    right: 5px;
}

.change-work-button svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.change-work-button:focus {
    outline: none;
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 4px skyblue;
    transition: box-shadow .3s, background .3s, transform .5s;
}

.change-work-button:hover {
    background: #eee;
}

.change-work-button:active {
    background: #e5e5e5;
}

.work {
    position: absolute;
    top: 0;
    opacity: 0;
    visibility: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .6s .1s, visibility .6s .1s, opacity .4s;
}

.work--active ~ .work {
    transform: translateX(100%);
}

.work--active {
    opacity: 1;
    transform: translateX(0);
    transition: transform .4s, visibility .4s, opacity .6s .1s;
}

.work-container--active .work--active {
    visibility: visible;
}

.work-title {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    font-size: 1.2em;
    min-height: 115px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

@media (max-width: 720px) {
    .work-title {
        font-size: 1em;
        letter-spacing: 0.15em;
    }
}

.work .codepen::after {
    content: "";
    display: block;
    width: 100%;
    height: 470px;
}

.github-content {
    padding: 2em 0 0;
}

.github-item {
    padding: 1em;
}

.github-item:last-child {
    padding-bottom: 0;
}

.github-item__title {
    font-size: 1.4em;
}

.github-item p {
    font-size: 1.2em;
}

.photography-items {
    display: grid;
    grid-gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: 300px 200px;
    grid-auto-flow: dense;
    padding: 2em 0 0;
}

.photography-item {
    position: relative;
    background: #eee;
}

.photography-item__title,
.photography-item__title a {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.photography-item__title {
    font-size: 1.6em;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .7) 0%,
        transparent 100%
    );
    transition: all .3s;
}

@media (min-width: 720px) {
    .photography-item__title {
        opacity: 0;
    }

    .photography-item__title:hover  {
        opacity: 1;
    }
}

.photography-item__title a {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 1em;
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 0, 0, .5);
    text-decoration: none;
}

@media (min-width: 480px) {
    .photography-item:first-child {
        grid-area: 1 / 1 / span 2 / span 2;
    }
    .photography-item:nth-child(3n) {
        grid-column: span 2;
    }
    .photography-item:last-child {
        grid-column: auto;
    }
}

@media (min-width: 800px) {
    .photography-item:last-child {
        grid-column: span 2;
    }
}

.photography-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-section {
    background: #f5f5f5;
}

.blog-section .section__title {
}

.blog-posts-container {
}

.blog-posts__info {
    padding-top: 4em;
}

.blog-post-container {
    padding-bottom: 3em;
    margin-bottom: 3em;
    border-bottom: 1px solid #ddd;
}

.blog-post-container:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.blog-post {
}

.blog-post--photo {
    max-width: 500px;
    position: relative;
}

.blog-post__title {
    font-weight: 100;
}

.blog-post__content {}

.blog-post--photo .blog-post__title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #fff;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .65) 0%,
        transparent 100%
    );
}

.blog-post--photo .blog-post__title:hover {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .85) 0%,
        transparent 100%
    );
}

.blog-post--photo .blog-post__title a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 1em;
    color: inherit;
    text-shadow: 0 0 5px rgba(0, 0, 0, .5);
}

.blog-post--photo .blog-post__content img {
    vertical-align: middle;
    max-width: 100%;
}

.blog-post--text .blog-post__title,
.blog-post--link .blog-post__title {
    font-size: 1.5em;
}

.contact-section {
    overflow: hidden;
}

.contact-section__video-container {
    position: relative;
}

.contact-section__video,
.contact-section__fallback {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    transform:
        translate(70%, 10%)
        rotate(60deg)
}

.contact-section__fallback {
    display: none;
}

@media (max-width: 720px) {
    .contact-section__video {
        display: none;
    }
    .contact-section__fallback {
        display: block;
    }
}

.contact-section-container {
    position: relative;
    z-index: 1;
}

.email::after {
    content: "@gmail.com"
}

.footer-section {
    padding-bottom: 1em;
}

.build-info {
    font-size: 1rem;
    text-align: center;
    color: #666;
}
