html {
    font: 16px/1.5em source-sans-pro, sans-serif;
    background: #222;
    color: #BBB;
}
body {
    background: #1A1A1A;
    box-shadow: 0px 0px 5px 2px #2D80C1;
    margin: 0 auto;
}
body > header {
    position: relative;
}

a, a:link {
    color: #5986B2;
}
a:hover {
    color: #2D80C1;
}

h1 {
    color: #2D80C1;
    margin: 0;
    padding: 10px 30px 5px;
    min-height: 30px;
    border-bottom: 15px solid #2D80C1;
    background: radial-gradient(400px circle at 80px 30px, rgba(83, 85, 84, .5) 0, rgba(10, 4, 1, .5));
}

h2 {
    font-weight: normal;
    font-style: italic;
    margin: 1em 0 .5em;
}
h2 small {
    margin-left: 1em;
    font-size: .5em;
}

h3 {
    font-weight: normal;
    font-style: italic;
    margin: .3em 0 .5em;
}

article {
    margin-bottom: 1.5em;
}
p, ul {
    margin: 0 0 .3em;
}

#profile {
    display: none;
}

#about {
    line-height: 1.1em;
    margin-top: 5px;
    margin-left: .5em;
}
#about ul {
    margin: 0;
    padding: 0;
}
#about li {
    font-size: .9em;
    display: inline;
    padding: 0 .1em;
}

main {
    padding: 0 .5em 1em;
}

.hint {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
    text-align: center;
}

/* gallery */
.gallery {
    line-height: 1em;
    overflow: auto;
}
.gallery a {
    float: left;
    margin: 3px;
    width: 80px;
    height: 80px;
    border: 1px solid #CCC;
    overflow: hidden;
}
.gallery a img {
    width: 100%;
    height: 100%;
}
.gallery a:hover {
    border-color: #2D80C1;
    box-shadow: 0 0 1px 1px #2D80C1;
}

/* overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .8);
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease-in;
}
#overlay figure {
    position: fixed;
    margin: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    background: #1A1A1A;
    box-shadow: 0px 0px 5px 4px #2D80C1;
    border-radius: 5px;
    border: 4px solid #2D80C1;

    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease-in;
}
#overlay.invisible, #overlay figure.invisible {
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease-out, visibility 0s .5s;
}

#overlay img {
    display: block;
    margin: auto;
    transition: width .3s, height .3s;
    cursor: pointer;
}
#overlay figcaption {
    position: relative;
    padding: 2px .5em 4px;
}
#overlay figcaption h2, #overlay figcaption p {
    margin: 0;
}
#overlay figcaption time {
    font-size: 0.8em;
}

/* media queries */
@media (min-width: 340px) {
    main {
        padding: 0 1em 1em;
    }
    #about {
        margin-left: 1em;
    }
    #profile {
        float: right;
        display: block;
        margin-left: 10px;
        box-shadow: 0px 0px 2px 1px #2D80C1;
    }
}
@media (min-width: 520px) {
    #about {
        position: absolute;
        right: 130px;
        top: 5px;
        text-align: right;
    }
    .gallery a {
        width: 100px;
        height: 100px;
    }
    #overlay figure {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 400px;
    }
    #overlay figcaption time {
        position: absolute;
        right: .5em;
        top: 0;
    }
}
@media (min-width: 800px) {
    html {
        padding: 1em;
    }
    body {
        max-width: 800px;
    }
    .gallery a {
        width: 120px;
        height: 120px;
    }
}
