* {
    margin: 0;
    padding: 0;
}

:root {
    --backgroundColor: #ffffff;
    --highlightColor: #5E77EE;
    --lightHighlightColor: #bec8f8;
    --textColor: black;
    --textHover: black;
    --iconFilter: brightness(1);
}

.highlightColour {
    background-color: var(--highlightColor);
}

[data-theme="skyTheme"] {
    --backgroundColor: #ffffff;
    --highlightColor: #5E77EE;
    --textColor: black;
    --iconFilter: invert(0%);
    --themeSwitcher: #f7f7f7;
}

[data-theme="nightTheme"] {
    --backgroundColor: black;
    --textColor: lightgrey;
    --textHover: white;
    --highlightColor: #4d60bf;
    --lightHighlightColor: #192042;
    --iconFilter: invert(90%);
    --themeSwitcher: #192042;
}

html,
body {
    height: 100%;
    width: 100%;
    font-family: 'Quattrocento Sans', sans-serif;
    font-size: 1.05em;
    background-color: var(--backgroundColor);
    color: var(--textColor);
}

.subtitleFont {
    font-size: 1.2em;
    font-weight: bold;
}

@media screen and (max-width:600px) {

    /* CSS for screens that are 600 pixels or less will be put in this section */
    #all {
        display: flex;
        flex-flow: column;
        height: 100%;
    }

    #centerDiv {
        display: flex;
        flex-direction: column;
        margin: 0 auto;
        flex-grow: 1;
        align-items: center;
        margin-top: 2em;
        width: 100%;
    }

    #PFPDiv {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: fit-content;
        margin: inherit;
    }

    #PFPContainer {
        display: block;
        margin: 0 auto;
        background-image: url("images/PFP.jpg");
        border-radius: 50%;
        width: 15em;
        height: 15em;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: 50% 50%;
    }

    #PFPOverlay {
        border-radius: 50%;
        display: flex;
        margin-top: 1em;
        justify-content: center;
        align-items: center;
        text-align: center;
        background: rgba(0, 0, 0, 0.0);
        opacity: 1;
    }

    #themeSwitcher {
        height: auto;
        width: 100%;
        margin-right: 2em;
        display: flex;
        flex-direction: row-reverse;
    }

    #currentTheme {
        background-color: var(--themeSwitcher);
        color: var(--textColor);
        padding: 1em;
        border-radius: 0.4em;
    }

    #padme {
        text-align: center;
        padding: 1em;
    }

    #left {
        /* None */
    }

    #right {
        /* None */
    }

    #header {
        height: 0.8em;
    }

    #footer {
        height: 0.8em;
    }

    .detailsLink {
        border-radius: 0.2em;
        padding: 0.3em;
        background-color: var(--lightHighlightColor);
        color: var(--highlightColor);
        font-size: 0.95em;
        cursor: pointer;
    }

    #padMe>.titleFont {
        font-size: 2.3em;
        font-weight: bold;
    }

    .titleFont {
        font-size: 1.1em;
        font-weight: bold;
    }

    #detailsWindowCenter {
        display: none;
        position: absolute;
        height: 150vh;
        background-color: #f7f7f7;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        opacity: 0;
        padding: 2em;
    }

    #detailsWindowClose {
        display: table-cell;
        vertical-align: middle;
        width: 1em;
        font-size: 1em;
        height: 1em;
        padding: 0.15em;
        color: white;
        background-color: firebrick;
        position: absolute;
        text-align: center;
        left: 90%;
        cursor: pointer;
        border-radius: 0.2em;
    }

    #webDevTable,
    #programmingContestsTable {
        width: 95%;
        display: block;
        overflow: auto;
        flex-direction: column;
        align-content: center;
        font-size: 1em;
        text-align: center;
    }

    #webDevTable>div:nth-child(n),
    #programmingContestsTable>div:nth-child(n) {
        border-bottom: 0.2em solid lightgray;
        padding-top: 0.4em;
        padding-bottom: 1em;
    }

    #webDevTable>div>div,
    #programmingContestsTable>div>div {
        margin-top: 1.5em;
    }

    .webSS {
        height: 8em;
        display: block;
        margin: auto;
        cursor: pointer;
    }

    #robotCodeTable {
        width: 90%;
        margin: 0 auto;
        text-align: center;
        display: block;
    }

    #robotCodeTable>div {
        display: block;
        margin-bottom: 1em;
    }

    iframe {
        width: 18em;
        height: 12em;
        margin-bottom: 1em;
    }

    #tableLinks>th,
    #tableLinks>tbody>tr>td {
        padding: 0;
        padding-left: 1.8em;
    }

}

@media screen and (min-width:601px) {
    .titleFont {
        font-size: 2.3em;
        font-weight: bold;
    }

    #all {
        display: flex;
        flex-flow: column;
        height: 100%;
    }

    #centerDiv {
        display: flex;
        flex-grow: 1;
        width: 100%;
    }

    #PFPDiv {
        display: flex;
        flex-direction: column;
        height: inherit;
        justify-content: center;
        vertical-align: middle;
    }

    #PFPContainer {
        margin: 0 auto;
        background-image: url("images/PFP.jpg");
        position: relative;
        border-radius: 50%;
        width: 28em;
        height: 28em;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: 50% 50%;
    }

    #PFPOverlay {
        position: absolute;
        width: 28em;
        height: 28em;
        margin: 0 auto;
        margin-left: 7.8em;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        color: white;
        background: rgba(0, 0, 0, 0.0);
        opacity: 0;
    }

    #themeSwitcher {
        margin-top: 36em;
        height: auto;
        margin-right: 2em;
        width: 100%;
        float: right;
        padding: 0.4em;
        display: flex;
        flex-direction: row-reverse;
    }

    #currentTheme {
        background-color: var(--themeSwitcher);
        color: var(--textColor);
        padding: 0.28em;
        border-radius: 0.4em;
    }

    #padme {
        -ms-transform: translateY(-50%);
        transform: translateY(-50%);
        margin: 0;
        position: absolute;
        top: 50%;
    }

    #left {
        width: 50%;
        height: 100%;
    }

    #header {
        height: 0.8em;
        width: 100%;
        top: 0;
        position: relative;
    }

    #footer {
        height: 0.8em;
        width: 100%;
        bottom: 0;
        position: relative;
    }

    .detailsLink {
        border-radius: 0.2em;
        padding: 0.3em;
        background-color: var(--lightHighlightColor);
        color: var(--highlightColor);
        cursor: pointer;
    }

    #detailsWindow {
        width: 100%;
        height: 100%;
        position: absolute;
        background-color: black;
        z-index: -1;
        opacity: 0;
    }

    #detailsWindowCenter {
        display: none;
        color: black;
        position: absolute;
        background-color: #f7f7f7;
        width: 60%;
        height: 60%;
        margin: auto;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        opacity: 0;
        padding: 2em;
        border-radius: 0.8em;
    }

    #detailsWindowClose {
        display: table-cell;
        vertical-align: middle;
        width: 1.2em;
        font-size: 1.2em;
        height: 1.2em;
        padding: 0.1em;
        color: white;
        background-color: firebrick;
        position: absolute;
        text-align: center;
        left: 93%;
        cursor: pointer;
        border-radius: 0.2em;
    }


    #webDevTable,
    #programmingContestsTable {
        flex: 1 1 0;
        width: 95%;
        display: flex;
        align-content: center;
        font-size: 0.88em;
        text-align: center;
    }

    #webDevTable>div,
    #programmingContestsTable>div {
        flex-basis: 100%;
    }

    #webDevTable>div>div,
    #programmingContestsTable>div>div {
        margin-top: 1.5em;
    }

    .webSS {
        height: 6em;
        display: block;
        margin: auto;
        cursor: pointer;
    }

    #robotCodeTable {
        width: 90%;
        margin: 0 auto;
        text-align: center;
        display: table;
        font-size: 0.9em;
    }

    #robotCodeTable>div {
        padding: 1em;
        vertical-align: middle;
        display: table-cell;
    }

    #robotCodeTable>div>iframe {
        margin-bottom: 1em;
    }


    iframe {
        width: 28em;
        height: 18em;
    }

    #tableLinks>th,
    #tableLinks>tbody>tr>td {
        padding: 0;
        padding-left: 2.8em;
    }
}

@media screen and (min-width:1801px) {
    #PFPOverlay {
        position: absolute;
        width: 28em;
        height: 28em;
        margin: 0 auto;
        margin-left: 13.2em;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        color: white;
        background: rgba(0, 0, 0, 0.0);
        opacity: 0;
    }
}

#centerDiv>div {
    animation: fadein 1.5s;
    -moz-animation: fadein 1.5s;
    -webkit-animation: fadein 1.5s;
    -o-animation: fadein 1.5s;
}

@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@-moz-keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@-webkit-keyframes fadein {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@-o-keyframes fadein {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#PFPOverlay:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
    transition: .3s ease-in-out;
    cursor: pointer;
}

#PFPOverlay>span>a {
    text-decoration: none;
    color: lightblue;
}

#PFPOverlay>span>a:hover {
    text-decoration: underline;
}

#right {
    flex-grow: 1;
    height: 100%;
}

.mainText {
    line-height: 1.7;
}

#mainName {
    border-bottom: 0.13em solid var(--highlightColor);
}

#tableLinks {
    text-align: center;
    height: 3em;
    width: 3em;
    table-layout: auto;
    border-spacing: 0;
}

#tableLinks>th {
    height: 3em;
    width: 3em;
}

#tableLinks>tbody>tr>td>a>img {
    width: 1.6em;
    height: auto;
    filter: var(--iconFilter);
}

#tableLinks>tbody>tr>td>a {
    text-decoration: none;
    font-weight: bold;
    color: var(--highlightColor);
}

#tableLinks>tbody>tr>td>a:hover>span {
    text-decoration: underline;
}

#themeExpand {
    display: flex;
    flex-direction: row-reverse;
}

#themeExpand>div {
    width: 2.5em;
    padding: 0.2em;
}

.themeOptions:hover {
    cursor: pointer;
    font-weight: bold;
}

#currentTheme:hover {
    cursor: pointer;
    font-weight: bold;
}

#skyTheme:hover {
    color: #5E77EE;
}

#lightTheme:hover {
    color: darkgoldenrod;
}

#nightTheme:hover {
    color: darkgray;
}

#currentThemeIcon {
    display: inline-block;
}

.detailsLink:hover {
    color: var(--textHover);
}

#detailsWindowClose:hover {
    background-color: darkred;
}

.spacer {
    height: 0.8em;
}