@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/roboto-300.woff2') format('woff2');
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/roboto-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/roboto-700.woff2') format('woff2');
}

/* Colors:
    Light Gray: #FFFFFF, rgba(224, 224, 224, 1)
    Primary - Cyan Azure: #539AB5, rgba(83, 154, 181, 1)
    Accent - Dark Cerulean: #0F4470, rgba(15, 68, 112, 1)
    Accent - Medium Electric Blue: #06599E, rgba(6, 89, 158, 1)
*/


/******************************
*
*
* General Use Classes
*
*
******************************/

a {
    color: #FFFFFF;
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
}

h1, h2, h3, h4 {
    margin: 16px 0;
    font-family: Roboto, sans-serif;
}

hr {
    width: 100%;
    height: 1px;
    margin: 32px 0;
    border: 0;
    background: #0F4470;
}

p {
    margin: 16px 0;
    font-family: Roboto, sans-serif;
    font-weight: 300;
	font-size: 1.25em;
}

#computer-svg, #tablet-svg, #trigram, #down-btn {
    width: 100%;
}

ul {
    list-style-type: none;
    padding: 0;
}

#contacts, #experience, #profile, #projects {
    overflow: hidden;
}

.column {
    flex-flow: column nowrap;
}

.content-wrapper {
    width: 75%;
    margin: 8vw 12.5% 8px 12.5%;
}

.flex-box {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.full-screen {
    position: absolute;
    width: 100vw;
    height: 100vh;
}

.page-header {
    width: 100%;
    font-size: 200%;
    text-align: center;
}

.style-dark {
    color: #FFFFFF;
    background: #539AB5;
}

.style-dark h1, .style-dark h2 {
    color: #0F4470;
}


.style-light {
    color: rgba(0,0,0,0.64);
    background: #FFFFFF;
}

.style-light h1, .style-light h2 {
    color: #539AB5;
}

.style-dark::before, .style-light::before {
    content:'';
    height: 216px;
    width: 120%;
    transform-origin: bottom right;
    transform: rotate(-5deg);
    margin: -216px 0 0 -20%;
}

.style-dark::before {
    background: #FFFFFF;
    box-shadow: 4px 4px 10px 5px rgba(0, 0, 0, 0.2);
}

.style-light::before {
    background: #539AB5;
    box-shadow: 4px 4px 10px 5px rgba(0, 0, 0, 0.4);
}

.style-light:first::before {
    display: none;
}

/******************************
*
*
* .style-light / .style-dark
*   specific changes in case styles are reversed
*
*
******************************/

.style-light .contact > .fa {
    color: #539AB5;
}

.style-light .contact {
    color: rgba(0, 0, 0, 0.64);
}

.style-dark .project-info {
    background: rgba(224, 224, 224, 0.9);
}

.style-dark .project-info h2 {
    color: #539AB5;
}

.style-dark .project-info hr {
    background: #539AB5;
}

.style-dark .project-date, .style-dark .project-desc {
    color: rgba(0, 0, 0, 0.64);
}

/******************************
*
*
* Navigation Classes
*
*
******************************/

#side-nav {
    position: fixed;
    z-index: 1;
    right: 0;
    justify-content: space-around;
    margin: 20vh 24px;
    height: 60vh;
}

.nav-circle {
    position: relative;
    z-index: 1;
    order: 2;
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 5px;
    border: 2px solid #0F4470;
    background: transparent;
    border-radius: 20px;
    outline: none;
}

.nav-circle:hover {
    width: 20px;
    height: 20px;
    margin: 0;
    background: #FFFFFF;
    transition: width 0.1s, height 0.1s, margin 0.1s;
}

.nav-circle:hover + .nav-info-wrapper > .nav-info {
    backface-visibility: hidden; /* Included to fix 1px vert. shift bug in chrome. */
    transform: translate(0);
    transition: transform 0.1s 0.1s ease-out;
}

.nav-info {
    padding: 2px 20px 2px 12px;
    line-height: 20px;
    font-size: 16px;
    color: #FFFFFF;
    background: rgba(15, 68, 112, 0.7);
    border-radius: 20px 0 0 20px;
    transform: translateX(125%);
}

.nav-info-wrapper {
    position: relative;
    z-index: 0;
    order: 1;
    margin: 0 -12px 0 0;
    overflow: hidden;
}

.nav-item {
    margin: auto 0 auto auto;
    justify-content: flex-end;
}

.nav-item.active > .nav-circle {
    background: #0F4470;
    width: 20px;
    height: 20px;
    margin: auto 0;
    cursor: pointer;
}

.nav-item.active > .nav-circle:hover {
    margin: auto 0;
    background: #0F4470;
}

/* Mobile Nav Classes */

#mobile-nav {
    position: fixed;
    right: 0;
    z-index: 5;
    width: 45%;
    height: calc(100vh - 96px);
    padding: 96px 0 0 0;
    background: #0F4470;
    transition: transform 0.5s ease-out;
    transform: translateX(105%);
}

#mobile-nav.open {
    transform: translateX(0);
}

#mobile-nav > a {
    line-height: 96px;
    font-size: 125%;
    text-align: center;
    color: #FFFFFF;
    transition: background 0.2s;
}

#mobile-nav > a:hover {
    background: rgba(224, 224, 224, 0.5);
}

#mobile-nav > a.active {
    color: #539AB5;
    background: #FFFFFF;
}

#mobile-nav > a.active:hover {
    background: #FFFFFF;
}

#mobile-header {
    position: fixed;
    right: 0;
    z-index: 4;
    width: 100%;
    height: 48px;
    background: #0F4470;
}

#screen-tint {
    position: fixed;
    z-index: -1;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

#screen-tint.open {
    z-index: 4;
    opacity: 1;
}

#trigram-anchor {
    position: fixed;
    right: 0;
    z-index: 6;
    width: 48px;
    height: 48px;
    margin: 0 16px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

#trigram {
    width: 24px;
    height: 24px;
    margin: auto;
}

.bar {
    transform-origin: 50% 50%;
    transform: translateY(0%) rotate(0deg);
    transition: opacity 1ms 250ms linear;
}

/* End Mobile Nav Classes */

/******************************
*
*
* Intro Page Classes
*
*
******************************/

.icon-bar {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    height: 48px;
    margin: 0;
}

.icon-link {
    overflow: hidden;
    width: 36px;
    height: 36px;
    margin: auto 8px auto 0;
    font-size: 20px;
    border-radius: 48px;
    border: 2px solid #539AB5;
    color: #FFFFFF;
    transition: color 0.5s, background 0.5s;
    animation: icon-fade-in 1s backwards;
}

.icon-link:hover {
    color: #0F4470;
    background: rgba(224, 224, 224, 0.5)
}

.icon {
    width: 20px;
    height: 20px;
    margin: auto;
    fill: currentColor;
}

/* Icons that sit inline with a line of text. */
.inline-icon {
    width: 1em;
    height: 1em;
    margin-right: 6px;
    vertical-align: -0.125em;
    fill: currentColor;
}

#intro {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    background: #539AB5;
}

#intro h1, #intro h2 {
    padding: 0 8px;
    margin: 0 auto;
    color: #FFFFFF;
    text-align: center;
    font-weight: 400;
    font-size: 1.25em;
}

/* Hidden only when the typewriter is able to reveal them again. */
.js #intro h1, .js #intro h2 {
    opacity: 0;
}

#intro h1 {
    font-size: 225%;
    margin: 16px auto;
}

#intro h2 {
    margin: 16px auto;
    font-size: 125%;
}

#intro > .content-wrapper {
    position: relative;
    width: initial;
    max-width: 65vh;
    margin: 18vh auto auto auto;
    align-items: center;
}

#intro hr {
    display: none;
    width: 100%;
    height: 1px;
    margin: 0 auto;
    background: #FFFFFF;
}

.down-btn-anchor {
    margin: 16px;
    width: 36px;
    height: 36px;
    animation: fade-in 0.5s 6.5s backwards;
}

.svg-wrapper {
    position: absolute;
    width: 100vw;
    height: 100vh;
}

#computer-svg {
    position: absolute;
    z-index: -1;
    width: 80vw;
    height: 80vh;
    margin: 10vh 10vw;
    stroke: #FFFFFF;
    fill: none;
    stroke-dasharray: 310;
    stroke-dashoffset: 310;
    stroke-width: 0.3px;
    animation: draw 2s 1s linear forwards;
}

#tablet-svg {
    position: absolute;
    z-index: -1;
    opacity: 0;
    width: 90vw;
    height: 85vh;
    margin: 7.5vh 5vw;
    stroke: #FFFFFF;
    fill: none;
    stroke-dasharray: 335;
    stroke-dashoffset: 335;
    stroke-width: 0.3px;
    animation: draw 2s 1s linear forwards;
}

/* Down Button SVG Classes */

/* On hover the white chevron gives way to a filled white disc with the
   blue chevron on top. The original morphed one path into the other with
   Snap.svg; this is the same end state using transforms only. */

#circle {
    opacity: 0;
    transform: scale(0.3);
    transform-origin: center center;
    transition: opacity 300ms, transform 300ms;
}

#chevron {
    transform-origin: center center;
    transform: translateY(0);
    animation: chevron-bounce 1.5s infinite;
    transition: opacity 300ms;
}

#arrow {
    opacity: 0;
    transform-origin: center center;
    transition: opacity 300ms 100ms;
}

#down-btn:hover {
    transform: translateY(0);
    transform-origin: center center;
    animation: heartbeat 1.5s linear infinite;
}

#down-btn:hover #circle {
    opacity: 1;
    transform: scale(1);
}

#down-btn:hover #chevron {
    animation: none;
    opacity: 0;
}

#down-btn:hover #arrow {
    opacity: 1;
}

/* End Down Button SVG Classes */

/******************************
*
*
* Profile Page Classes
*
*
******************************/

.bio-pic {
    width: 100%;
    height: auto;
    margin: 16px auto 16px 0;
    padding: 8px 0 0 0;
    border-radius: 48px;
    background: linear-gradient(to top left, #06599E, #EEE);
}

.profile__box {
    width: 100%;
}

.profile__column {
    width: calc(100% - 32px);
    margin: 0 16px;
}

.skill {
    width: calc(100% - 8px);
    margin: 0 8px 0 0;
    transition: color 0.3s;
}

.skill-line {
    width: calc(50% - 20px);
    padding: 8px 4px;
    border-radius: 4px;
    box-shadow: none;
    transition: background 0.3s, box-shadow 0.3s;
}

.skill-line:nth-of-type(2n+1) {
    margin: 0 8px 0 4px;
}

.skill-line:nth-of-type(2n) {
    margin: 0 4px 0 8px;
}

.skill-line:hover {
	color: #FFFFFF;
    background: rgba(6, 89, 158, 0.6);
    box-shadow: -4px 3px 4px -1px rgba(0, 0, 0, 0.4);
}

.skill-rating {
    width: calc(100% - 4px);
    margin: 2px;
}

.skill-rating > span {
    margin: auto 4px;
    color: #539AB5;
    transition: margin 0.3s;
}

.welcome-msg {
    width: 100%;
    text-align: center;
}

.style-dark .skill-rating > span {
    color: #0F4470;
}

.style-dark .skill-line:hover .skill {
    color: rgba(0, 0, 0, 0.64);
}

/******************************
*
*
* Experience Page Classes
*
*
******************************/

.exp-container {
    width: 100%;
}

.exp-line {
    width: 100%;
    margin: 8px 0;
}

.exp-col-title {
    width: 30%;
    margin: 0 8px 0 0;
}

.exp-col-desc {
    width: 70%;
    margin: 0 0 0 8px;
}

.exp-col-desc p {
    margin: 0 0 8px 0;
}

.exp-col-desc a {
    color: inherit;
}

.exp-col-desc ul {
    list-style-type: disc;
    margin: 0 0 0 0;
}

.exp-col-desc li {
    margin: 0 0 8px 16px;
    font-family: Roboto, sans-serif;
    font-weight: 300;
	font-size: 1.12em;
}

.exp-col-desc a:hover {
    border-bottom: 2px solid;
}

.exp-data {
    color: #06599E;
}

.exp-data hr {
    display: inline;
    border: 1px solid #FFFFFF;
    margin: 0 8px;
    background: #FFFFFF;
}

.style-light .exp-data {
    color: #539AB5;
}

.style-light .exp-data hr {
    border: 1px solid rgba(0, 0, 0, 0.54);
}

/******************************
*
*
* Projects Page Classes
*
*
******************************/

.image-box {
    display: none;
    width: 100%;
    height: 100%;
}

.project {
    position: relative;
    width: 100%;
    height: 100%;
}

.project > div {
    position: absolute;
}

.project-box {
    width: calc(50% - 16px);
    height: 40vh;
    margin: 8px auto;
    background: rgba(0, 0, 0, 0.7);
}

.project:hover .project-info {
    display: flex;
    opacity: 1;
}

.project-date, .project-desc {
    margin: 8px 7.5%;
    color: #FFFFFF;
    transition: transform 0.2s ease-out;
    transform: translateX(105%);
}

.project:hover .project-date, .project:hover .project-desc {
    transform: translate(0);
}

.project-image {
    position: relative;
    width: 100%;
    height: 100%;
    margin: auto;
}

.project-info {
    z-index: 2;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    height: 100%;
    opacity: 0;
    background: rgba(83, 154, 181, 0.9);
}

.project-info h2 {
    color: #FFFFFF;
}

.project-info > hr {
    width: 2px;
    margin: 8px 7.5%;
    background: #FFFFFF;
    transition: width 0.2s ease-out;
}

.project:hover .project-info > hr {
    width: 85%;
}

.project-link-icon {
    z-index: 3;
    right: 0;
    width: 48px;
    height: 48px;
    font-size: 32px;
    color: #FFFFFF;
    background: #0F4470;
    border-radius: 0 0 0 8px;
}

.project-link-icon > span {
    margin: auto;
}

.project-title {
    margin: 40px 7.5% 8px 7.5%;
    font-size: 225%;
    color: #FFF;
}

/******************************
*
*
* Contacts Page Classes
*
*
******************************/

.contact {
    display: inline-flex;
    width: calc(50% - 28px);
    margin: 8px 12px 8px 0;
    padding: 0 8px;
    font-size: 125%;
    color: #FFFFFF;
    border-radius: 8px;
    transition: background 0.3s, box-shadow 0.3s;
}

.contact:hover {
    background: rgba(6, 89, 158, 0.6);
    box-shadow: -4px 3px 4px -1px rgba(0, 0, 0, 0.4);
}

.contact:hover > .contact-icon {
    fill: #0F4470;
}

.contact > .contact-icon {
    flex: none;
    width: 36px;
    height: 36px;
    margin: 8px 16px 8px 0;
    fill: #06599E;
    transition: fill 0.3s;
}

.contact-info {
    margin: auto 0;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s;
}

/******************************
*
*
* Keyframe Animations
*
*
******************************/

@keyframes chevron-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20%);
    }
    60% {
        transform: translateY(-10%);
    }
}


@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}


@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}


@keyframes heartbeat {
    0%, 35%, 50%, 65%, 100% {
        transform: scale(1,1);
    }
    45%, 55% {
        transform: scale(1.07,1.07);
    }
}


@keyframes icon-fade-in {
    0%, 20%, 50%, 80% {
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Trigram Animation */

@keyframes bottom-bar-close {
    0% {
        transform: translateY(-250%) rotate(45deg);
    }
    15% {
        transform: translateY(-250%) rotate(60deg);
    }
    50% {
        transform: translateY(-250%) rotate(0deg);
    }
    85% {
        transform: translateY(50%) rotate(0deg);
    }
    100% {
        transform: translateY(0%) rotate(0deg);
    }
}


@keyframes bottom-bar-open {
    0% {
        transform: translateY(0%) rotate(0deg);
    }
    15% {
        transform: translateY(50%);
    }
    50% {
        transform: translateY(-250%) rotate(0deg);
    }
    85% {
        transform: translateY(-250%) rotate(60deg);
    }
    100% {
        transform: translateY(-250%) rotate(45deg);
    }
}


@keyframes top-bar-close {
    0% {
        transform: translateY(250%) rotate(-45deg);
    }
    15% {
        transform: translateY(250%) rotate(-60deg);
    }
    50% {
        transform: translateY(250%) rotate(0deg);
    }
    85% {
        transform: translateY(-50%) rotate(0deg);
    }
    100% {
        transform: translateY(0%) rotate(0deg);
    }
}


@keyframes top-bar-open {
    0% {
        transform: translateY(0%) rotate(0deg);
    }
    15% {
        transform: translateY(-50%);
    }
    50% {
        transform: translateY(250%) rotate(0deg);
    }
    85% {
        transform: translateY(250%) rotate(-60deg);
    }
    100% {
        transform: translateY(250%) rotate(-45deg);
    }
}

/******************************
*
*
* Media Queries
*
*
******************************/

@media screen and (min-width: 901px) {
    #mobile-header, #trigram-anchor, #mobile-nav, #screen-tint {
        display: none;
    }
}

@media screen and (max-width: 900px) {
    .profile__column {
        width: 100%;
        margin: 0;
    }

    #side-nav {
        display: none;
    }

    .exp-container h2, .profile__column h2 {
        margin: 8px auto;
    }

    .exp-line {
        flex-flow: wrap;
    }

    .exp-col-title, .exp-col-desc {
        width: 100%;
        margin: 4px 0;
    }

    .exp-col-title > h3 {
        margin: 8px 0;
    }

    .exp-col-desc > h4 {
        margin: 0 0 8px 0;
		font-size: 1.25em;
    }

    .icon-bar {
        display: none;
    }

    .project-box {
        width: 100%;
        height: 40vh;
    }
}

@media screen and (max-width: 650px) {
    .contact {
        width: 100%;
    }
}

@media screen and (max-width: 550px) {
    .content-wrapper {
        width: calc(100% - 32px);
    }

    .exp-data a {
        display: block;
    }

    .exp-data hr {
        display: block;
        margin: 8px 0;
        width: 33%;
        border: 0;
    }

    .skill-line:hover > .skill-rating > span {
        margin: 4px;
    }
}

@media screen and (orientation: portrait) {
    #computer-svg {
        opacity: 0;
    }

    #tablet-svg {
        opacity: 1;
    }

    #intro > .content-wrapper {
        max-width: 60vw;
        margin: 25vh auto auto auto;
    }
}

@media screen and (orientation: landscape) and (max-height: 700px) {
    #computer-svg {
        opacity: 0;
    }

    #tablet-svg {
        opacity: 0;
    }
}

/* Tester */

.meter {
    position: relative;
    width: 100%;
    height: 12px;
    margin: auto;
    background: rgba(0, 0, 0, 0.34);
    border-radius: 12px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
}

.meter > span {
    position: relative;
    display: block;
    height: 100%;
    border-radius: 12px;
    background: #539AB5;
    background: linear-gradient(to bottom right, #539AB5, #0F4470);
    overflow: hidden;
}

/******************************
*
*
* Report Embed
*
*
******************************/

/* Percentage padding resolves against the container's width, so this holds
   the embed at 16:9 plus 60px of Power BI chrome -- the same figure the old
   resize listener computed, but without any JavaScript. */
.report-embed {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: calc(56.25% + 60px);
}

.report-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/******************************
*
*
* Scroll Reveal
*
* The hidden state is scoped to `.js` (set on <html> by an inline script in
* the head) so that without JavaScript every element renders normally
* instead of sitting at opacity 0 forever. js/site.js adds `.in-view`.
*
******************************/

.js .page-header,
.js .welcome-msg,
.js #profile__about-me-header,
.js #profile__about-me-info,
.js #profile__skills-header,
.js .skill-line,
.js .exp__headers,
.js .exp-col-title,
.js .exp-col-desc,
.js .project-box,
.js .contact {
    opacity: 0;
    transform: translateY(10px);
    transition: transform .3s, opacity .3s;
}

.js .skill-line:nth-of-type(2n),
.js .exp-col-desc,
.js .project-box:nth-of-type(2n),
.js .contact:nth-of-type(2n) {
    transition: transform .3s .15s, opacity .3s .15s;
}

/* Rules grow out from the centre rather than fading up. */
.js hr.full-width {
    width: 1px;
    margin-left: auto;
    margin-right: auto;
    transition: width .3s linear;
}

.js hr.full-width.in-view {
    width: 100%;
}

.js .in-view {
    opacity: 1;
    transform: translateY(0);
}

/******************************
*
*
* Reduced Motion
*
*
******************************/

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .js .page-header,
    .js .welcome-msg,
    .js #profile__about-me-header,
    .js #profile__about-me-info,
    .js #profile__skills-header,
    .js .skill-line,
    .js .exp__headers,
    .js .exp-col-title,
    .js .exp-col-desc,
    .js .project-box,
    .js .contact,
    .js #intro h1,
    .js #intro h2 {
        opacity: 1;
        transform: none;
    }

    .js hr.full-width {
        width: 100%;
    }
}
