@font-face {
    font-family: sourceSansPro;
    src: local('Source-Sans-Pro'), local('Source Sans Pro'),
         url(/assets/fonts/SourceSansPro-Regular.woff2) format('woff2'),
         url(/assets/fonts/SourceSansPro-Regular.ttf) format('truetype');
}

* { box-sizing: border-box; }

html { max-width: 100vw; margin: 0; padding: 0; }
body { display: block; max-width: 100vw; margin: 0;
       background: #F5F5F5; color: #000;
       font-family: sourceSansPro, Arial, Helvetica, Times; font-size: 1.2em; line-height: 1.6em; }

a { text-decoration: inherit; color: inherit; }

/* Images etc. */
img        { border-width: 0; }
figure     { margin: 0; padding: 0; }

/* Headlines */

h3 { font-size: 1.25em; }

/* Tables */
table    { border-collapse: collapse; }
th, td   { padding: .35em .5em; text-align: left; }
tbody tr       { transition: background .4s; }
tbody tr:hover { background: #F2F2F2;}

dl dt { font-weight: bold; }

hr { height: 0px; background: inherit; border-width: 0; border-bottom: 1px dotted #AAA; }

input, button, select { background: inherit; color: inherit; }

.invisible { display: none !important; }

body > main,
body > section { display: block; padding: 2.5em 2em; border-bottom: 1px solid #EEE; }
body > section:empty { display: none; }

body > section:first-of-type { padding-top: 1.5em; }

section.centered { text-align: center; }

@media screen and (min-width: 75em) {
    body > #mainNav,
    body > main,
    body > section { padding: 2.5em 10em; }
    header     { padding: 0 10em; }
}
@media screen and (min-width: 105em) {
    header         { padding: 0 calc(50vw - 28em); }
    body > #mainNav { display: block; padding: 0 calc(50vw - 28em); }
    body > main,
    body > section { display: block; padding: 2.5em calc(50vw - 28em); }
}

/* Navigation */

#mainNav     { background: #FFF; color: #424242; box-shadow: 0 4px 2px -2px #D6D6D6; }
#mainNav > * { position: relative; display: inline-block; flex: 1; font-size: 1rem; padding: .7em 0; }

@media screen and (min-width: 65em) {

    #mainNav > div { transition: transform .4s; }
    #mainNav > .selected { transform: translateY(.5em); background: #FFF; box-shadow: 0 4px 2px -2px #D6D6D6; }

    #mainNav > div > div { display: none; position: absolute; right: 0; top: 100%; width: 300px;
                             background: #333; text-align: left; }
    #mainNav > div > a         { padding: .95em 1em; transition: background .4s, color .4s; }
    #mainNav > div:focus > a,
    #mainNav > div:hover > a   { color: #AAA; }
    #mainNav > div > a:focus + div,
    #mainNav > div:hover > div { display: block; animation: fade-in .4s; }
    #mainNav > div > a:focus + div > a,
    #mainNav > div:hover > div > a       { display: block; padding: .5em 1em; cursor: pointer;
                                             transition: background .4s, color .4s; }
    #mainNav > div > a:focus + div > a:focus,
    #mainNav > div:hover > div > a:hover { background: rgba(255, 255, 255, .2); color: #FFF; }
}

@media screen and (max-width: 65em) {
    header .branding { padding: .7rem; }
    #mainNav:before { content: " \2630 "; display: inline-block; position: absolute; right: 3rem; top: 0;
                        padding: .8rem 0; font-size: 1.5em; text-align: right; }
    #mainNav > *    { display: none; }

    #mainNav:hover:before { display: none; }
    #mainNav:hover { position: absolute; left: 0; top: 0; display: flex;
                        width: 100%; min-height: 90vh; padding: 2em 1em .5em 1em; background: #FFF; color: #000;
                        border-bottom: 1px solid #D6D6D6; box-shadow: 2px 2px 4px #D6D6D6;
                        z-index: 3; animation: fade-in .4s; }

    #mainNav:hover > *    { display: block; flex: 1; min-width: 40vw; padding: 1em; font-size: 1em; }
    #mainNav:hover > div a { display: block; padding: .2em 0; }

}

/*
 * Loading page
 */
main.loading { position: relative; min-height: 50vh; }
.loading:before {
    display: block; content: " ";
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(120deg); }
  30% { transform: rotate(180deg); }
  100% { transform: rotate(360deg); }
}

/*
 * Special list types
 */
.cardList      { display: flex; margin: 0 0; padding: 0 0; justify-content: flex-start; }
.card { display: inline-block; flex: 1; width: 200px; max-width: 200px;
    margin: .5em 1em .5em 0; padding: 0 0; border-radius: 4px;
    background: #FAFAFA;
    box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0,0,0,.12);
    cursor: pointer; transition: background .4s, box-shadow .4s; }

.card:focus,
.card:hover { background: #FFF;
    box-shadow: 0px 4px 2px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 2px 6px 0px rgba(0,0,0,.12); }

.card > img { display: block; width: inherit; border-top-left-radius: inherit; border-top-right-radius: inherit; }
.card > div { display: block; padding: .5em; }
.card h2 { margin: 0 0; padding: 0 0; font-size: 1.05em; }

/*
 * Main entry
 */
.entry-about { padding-bottom: 2em; border-bottom: 1px solid #D6D6D6; }
.entry-about img { display: block; max-width: 100%; border-radius: 4px; }

@media screen and (min-width: 75em) {
    .entry-about { display: table; width: 100%; }
    .entry-about > * { display: table-cell; padding: .5em; vertical-align: top; }
    .entry-about > *:first-child { padding-left: 0; }
    .entry-about > .entry-img-div { width: 200px; }
    .entry-about img { margin-top: .5em; }
    .entry-about > div { white-space: pre-wrap; }
}

/*
 * List with images on the left.
 */

.list-image-table           { display: table; width: 100%; }
.list-image-table > *       { display: table-row; transition: background .4s; }
.list-image-table > *:focus,
.list-image-table > *:hover { background: #D6D6D6; border-radius: 4px; }

.list-image-table > * > *   { display: table-cell;
    padding: .5em; vertical-align: middle;
    border-bottom: 1px solid #D6D6D6; }
.list-image-table-entry-hl > span { display: block; }
.list-image-table-entry-hl > span:first-child { font-weight: bold; }

.list-image-table > * > *:first-child  { border-bottom-width: 0; border-radius: 4px 0 0 4px;
    text-align: center; }
.list-image-table img       { max-width: 60px; max-height: 60px; object-fit: cover;
    margin: auto auto;
    border-radius: 4px; }
