@import url('https://fonts.googleapis.com/css?family=Ubuntu&subset=latin-ext');

html {
    height: 100%;

    --page-bg: #131518;
    --main-bg: #d6d9dd;
    --link-normal: #306ba5;
    --link-hover: #0b2c4d;
    --link-selected: #0a1a2a;
}
body {
    font-size: 18px;
    margin: 0;
    padding: 0;
    line-height: 1.33;
    background: var(--page-bg);
    color: black;
    font-family: Ubuntu, 'Source Sans Pro', Helvetica, sans-serif;
    background-image: url(../images/45-degree-fabric-dark.png);
}

a {
    color: var(--link-normal);
}
a:hover {
    color: white;
    text-shadow: 0 0 2px var(--link-selected);
}


/* Page chrome */

body > header {
    margin: 4em 2em 1em;
}
.adults-only-warning {
    font-size: 1.5em;
    float: right;
    margin: 2.5rem 1em 0 0;  /* 2.5rem top margin aligns with bottom of h1 */
    line-height: 1;
    color: #c00;
    font-weight: bold;
    text-shadow: 0 1px 1px #400;
}
body > header h1 {
    font-weight: bold;
    font-size: 4em;
    line-height: 1;
    margin: 0;
    color: var(--main-bg);
    text-shadow: 0 1px 2px black;
}
body > header h1 a {
    color: inherit;
    text-decoration: none;
}
body > header > nav {
    font-size: 1.33em;
    margin: 1rem 0;
    background: black;
    border: 1px solid black;
    border-radius: 0.25rem;
}
body > header > nav > ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}
body > header > nav > ul > li {
    flex: 1 0 auto;
    margin: 1px;
    padding: 0;
    list-style: none;
    text-align: center;
}
body > header > nav > ul > li.main-nav-tags-list {
    flex: 0 auto;
}
body > header > nav > ul > li > a {
    display: block;
    padding: 0.25em 0.5em;
    border-radius: 0.25em;
    color: white;
    text-decoration: none;
}
body > header > nav > ul > li.active > a {
    background: var(--link-selected);
}
body > header > nav > ul > li > a:hover {
    background: var(--link-hover);
}

main {
    margin: 1em 2em;
    background-color: var(--main-bg);
    box-shadow: 0 1px 2px black;
    border-radius: 0.5em;
    /* This border exists mostly to stop top/bottom margins from collapsing outside of this tag */
    border: 1px solid white;
}
main header {
    display: flex;  /* to align title with tweet button */
    align-items: baseline;
    margin: 1em 0;
    border-bottom: 1px solid #999;
}
main header h1 {
    flex: 1 0 auto;
    font-size: 2.5em;
    margin: 0 0 0.25rem;
}
main header h1 a {
    text-decoration: none;
    color: inherit;
}
main header .twitter-share-button {
}
main section {
    margin: 1em;
}
main section > h2 {
    border-bottom: 1px dotted #999;
}

body > footer {
    margin: 1em 2em 8em;
    color: #ccc;
}
body > footer p {
    font-size: 0.75em;
    text-align: right;
    font-style: italic;
}
ul.footer-links {
    display: flex;
    justify-content: center;
    margin: 1em 0;
    padding: 0;
    background: black;
    border: 1px solid black;
    border-radius: 0.25em;
}
ul.footer-links li {
    list-style: none;
    margin: 1px;
}
ul.footer-links a {
    display: block;
    padding: 0.25em 1em;
    text-decoration: none;
}
ul.footer-links a:hover {
    background-color: var(--link-hover);
    color: white;
}

/* Icons (taken pretty much verbatim from notmyidea */
ul.footer-links li.social a {
    background-repeat: no-repeat;
    background-position: 1em 50%;
    padding-left: calc(20px + 1em);
}
.social a[href*='about.me'] {background-image: url('../images/icons/aboutme.png');}
.social a[href*='bitbucket.org'] {background-image: url('../images/icons/bitbucket.png');}
.social a[href*='delicious.com'] {background-image: url('../images/icons/delicious.png');}
.social a[href*='digg.com'] {background-image: url('../images/icons/digg.png');}
.social a[href*='facebook.com'] {background-image: url('../images/icons/facebook.png');}
.social a[href*='gitorious.org'] {background-image: url('../images/icons/gitorious.png');}
.social a[href*='github.com'],
.social a[href*='git.io'] {
    background-image: url('../images/icons/github.png');
    background-size: 16px 16px;
}
.social a[href*='gittip.com'] {background-image: url('../images/icons/gittip.png');}
.social a[href*='plus.google.com'] {background-image: url('../images/icons/google-plus.png');}
.social a[href*='groups.google.com'] {background-image: url('../images/icons/google-groups.png');}
.social a[href*='news.ycombinator.com'],
.social a[href*='hackernewsers.com'] {background-image: url('../images/icons/hackernews.png');}
.social a[href*='last.fm'], .social a[href*='lastfm.'] {background-image: url('../images/icons/lastfm.png');}
.social a[href*='linkedin.com'] {background-image: url('../images/icons/linkedin.png');}
.social a[href*='reddit.com'] {background-image: url('../images/icons/reddit.png');}
.social a[type$='atom+xml'], .social a[type$='rss+xml'] {background-image: url('../images/icons/rss.png');}
.social a[href*='slideshare.net'] {background-image: url('../images/icons/slideshare.png');}
.social a[href*='speakerdeck.com'] {background-image: url('../images/icons/speakerdeck.png');}
.social a[href*='stackoverflow.com'] {background-image: url('../images/icons/stackoverflow.png');}
.social a[href*='twitter.com'] {background-image: url('../images/icons/twitter.png');}
.social a[href*='vimeo.com'] {background-image: url('../images/icons/vimeo.png');}
.social a[href*='youtube.com'] {background-image: url('../images/icons/youtube.png');}

/* One artwork */

article {
    margin: 1em;
}

/* ol */.artwork-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}
.artwork-grid > li {
    margin: 0;
    list-style-type: none;
}
.artwork-grid > li a {
    display: block;
    margin: 0.5em;
}
.artwork-grid > li a img {
    max-width: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.meta {
    margin: 1rem 0;
    padding: 0.25rem;
    border: 1px dotted #666;
    border-width: 1px 0;
    text-align: center;
    color: #666;
}
.meta-tags {
    display: inline-block;
}
.caption, .tag-description {
    font-size: 1.25em;
    margin: 1rem;
}
.tag-description {
    border-bottom: 2px solid #666;
}

.comments h2 {
    padding-top: 1rem;
    border-top: 3px double #666;
}


/* Thumbnail grid used on art indexes */

/* ol */.thumbnail-grid {
    display: grid;
    grid: auto-flow / repeat(auto-fill, minmax(calc(204px + 1em), auto));
    align-items: baseline;
    margin: 1em;
    padding: 0;
}
.thumbnail-grid > li {
    position: relative;
    list-style-type: none;
}
.thumbnail-grid > li > article {
    margin: 0;
}
.thumbnail-grid > li > article > a {
    display: block;
    min-width: 204px;
    padding: 0.5em;
    text-align: center;
    text-decoration: none;
    border-radius: 2px;

    transition: background-color linear 0.1s;
}
.thumbnail-grid > li > article > a img {
    display: block;
    margin: 0 auto 0.33em;
    padding: 2px;
    background: white;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
.thumbnail-grid > li.multiple > article > a::before {
    content: "+";
    display: block;
    position: absolute;
    top: 1em;
    right: 1em;
    height: 1em;
    width: 1em;
    padding: 0.25em;
    line-height: 1;
    border-radius: 2em;
    text-align: center;
    background: var(--link-hover);
    color: white;
    font-weight: bold;
}
.thumbnail-grid > li > article > a h2 {
    margin: 0.25em 0;
    font-size: 1.33em;
}
.thumbnail-grid > li time {
    display: block;
    font-size: 0.833em;
    color: #666;
}
.thumbnail-grid > li > article > a:hover {
    background-color: var(--link-hover);
    color: white;
}
.thumbnail-grid > li > article > a:hover img {
    background: var(--main-bg);
}
.thumbnail-grid > li > article > a:hover time {
    color: var(--main-bg);
}

/* Pagination */

.paginator {
    font-size: 1.25em;
    margin: 1rem;
    text-align: center;
}
.paginator a {
    display: inline-block;
    margin: 0 0.5em;
    width: 1.5em;
    line-height: 1.5;
    vertical-align: middle;
    border: 1px solid var(--link-normal);
    border-radius: 0.33em;
    font-weight: bold;
    background: var(--link-normal);
    color: white;
    text-decoration: none;
}
.paginator a:hover {
    color: var(--link-hover);
    background: white;
    text-shadow: none;
}

.flex-dummy {
    height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}
.flex-expander {
    flex: 99;
}

/* Splash page for NSFW */

body.splash {
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}
body.splash main {
    max-width: 75%;
    margin: 1em;
    text-align: center;
}
body.splash main p {
    margin: 1em;
}
body.splash main a {
    display: inline-block;
    margin: 0.5em;
    padding: 0.25em 0.5em;
    vertical-align: middle;
    border: 1px solid var(--link-normal);
    border-radius: 0.33em;
    background: var(--link-normal);
    color: white;
    text-decoration: none;
}
body.splash main a:hover {
    color: var(--link-hover);
    background: white;
    text-shadow: none;
}

/* Tag index */

a.tag-button {
    display: inline-block;
    padding: 0.25em 0.5em;
    vertical-align: middle;
    border: 1px solid var(--link-normal);
    border-radius: 0.33em;
    background: var(--link-normal);
    color: white;
    text-decoration: none;
}
a.tag-button:hover {
    color: var(--link-hover);
    background: white;
    text-shadow: none;
}

/* ul */.tag-info-grid {
    display: grid;
    grid: auto-flow / repeat(auto-fill, minmax(250px, auto));
    gap: 0.5em;
    margin: 0;
    padding: 0;
}
.tag-info-grid > li {
    margin: 0;
    padding: 0.5rem;
    list-style-type: none;
    text-align: center;
}
.tag-info-grid > li img {
    display: block;
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin: 0 auto;
    padding: 2px;
    background: white;
    box-shadow: 0 0 3px -1px var(--link-normal);
}
.tag-info-grid > li a:hover img {
    box-shadow: 0 0 2px 2px var(--link-normal);
}
.tag-info-grid > li > .-name {
    margin: 0.5rem 0;
}
.tag-info-grid > li > .-name > a {
    font-size: 1.25rem;
    vertical-align: baseline;
}
.tag-info-grid > li > .-blurb {
    color: #444;
}

ul.site-tags-list {
    padding: 0;
    list-style: none;
}
ul.site-tags-list > li {
    display: inline-block;
    margin: 0.5em 0;
    margin-right: 1em;
}

dl.site-tags-sublist {
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 12em 1fr;
    align-items: center;
    row-gap: 0.25em;
}
dl.site-tags-sublist > dt {
    grid-column: 1;
    text-align: right;
}


.tag-description-meta {
    display: grid;
    grid: auto-flow / min-content 1fr;
    gap: 0.25em 0.5em;
}
.tag-description-meta > img {
    grid-row: 1 / span 3;
    max-width: 5em;
    max-height: 5em;
    object-fit: fill;
    padding: 2px;
    transform: rotate(-3deg);
    background: white;
    box-shadow: 0 0 3px -1px var(--link-normal);
}
.tag-description-meta > .-name {
    font-size: 1.25em;
    font-weight: bold;
}
.tag-description-meta > .-pronouns {
}
.tag-description-meta > .-species {
}

/* ul */.tag-refs {
    display: flex;
    margin: 1em 0;
    padding: 0;
    gap: 0.5em;
    align-items: center;
}
.tag-refs::before {
    content: "References:";
    display: block;
}
.tag-refs > li {
    position: relative;
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.tag-refs > li > a {
    display: block;
    text-align: center;
    text-decoration: none;
    border-radius: 2px;

    transition: background-color linear 0.1s;
}
.tag-refs > li > a img {
    display: block;
    height: 100px;
    max-width: 150px;
    object-fit: cover;
    padding: 2px;
    background: white;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
.tag-refs > li.multiple > a::before {
    content: "+";
    display: block;
    position: absolute;
    font-size: 0.75em;
    top: 0.5em;
    right: 0.5em;
    height: 1em;
    width: 1em;
    padding: 0.25em;
    line-height: 1;
    border-radius: 2em;
    text-align: center;
    background: var(--link-hover);
    color: white;
    font-weight: bold;
}
.tag-refs > li > a h2 {
    margin: 0.25em 0;
    font-size: 1.33em;
}
.tag-refs > li time {
    display: block;
    font-size: 0.833em;
    color: #666;
}
.tag-refs > li > a:hover img {
    box-shadow: 0 0 0 2px inset var(--link-normal);
}

/* -------------------------------------------------------------------------- */
/* Responsiveness */

@media only screen and (max-width: 960px) {
    /* Shrink header */
    body > header {
	margin: 1em;
    }
    body > header > h1 {
	font-size: 2em;
    }
    .adults-only-warning {
	margin: 0;
    }


    .tag-info-grid {
	display: grid;
	grid: auto-flow / repeat(auto-fill, minmax(160px, auto));
    }
    .tag-info-grid > li img {
	width: 150px;
	height: 150px;
    }
    .tag-info-grid > li > .-name > a {
	font-size: 1rem;
    }
    .tag-info-grid > li > .-blurb {
	font-size: 0.9em;
    }

    /* De-column these */
    dl.site-tags-sublist {
	grid-template-columns: 1fr;
    }
    dl.site-tags-sublist > dt {
	margin-top: 0.5em;
	text-align: left;
    }
    dl.site-tags-sublist > dd {
	margin: 0;
    }
}

@media only screen and (max-width: 480px) {
    /* Drop the side margins entirely, so the blocks become stripes */
    /* Also reduce the top and bottom margins, and remove margin around main */
    body > header,
    body > header > nav {
	margin: 1em 0 0;
    }
    main {
	margin: 0;
	border-left: none;
	border-right: none;
    }
    body > footer,
    ul.footer-links {
	margin: 0 0 1em;
    }
    body > header > nav,
    main,
    ul.footer-links {
	border-radius: 0;
    }

    /* Shrink the title and nav text, and add a margin around the title */
    body > header > h1 {
	margin: 0 1rem;
	font-size: 2em;
    }
    body > header > nav {
	font-size: 1em;
    }

    /* unmargin the adults only warning */
    .adults-only-warning {
	float: none;
	text-align: right;
	margin: 1rem;
    }

    /* Allow link rows to wrap */
    /* TODO footer is kinda ugly */
    body > header > nav > ul,
    ul.footer-links {
	flex-wrap: wrap;
    }

    /* Add a margin around the footer text */
    body > footer > p {
	margin: 0.5rem;
    }

    /* Slightly reduce margins on body contents */
    .thumbnail-grid {
	margin: 0.5em;
    }

    /* Shrink page titles */
    main header h1 {
	font-size: 1.5em;
    }

    /* Expand splash page too */
    body.splash {
	font-size: 1.25em;
    }
    body.splash main {
	max-width: 100%;
    }
}

/* -------------------------------------------------------------------------- */
/* Switch colors for NSFW mode */
/* This is incredibly stupid but whatever */
/* FIXME when can i use css vars for this? */

html.nsfw {
    --page-bg: #181315;
    --main-bg: #ddd6d9;
    --link-normal: #a5306b;
    --link-hover: #4d0b2c;
    --link-selected: #2a0a1a;
}


/* -------------------------------------------------------------------------- */
/*
	Name: Smashing HTML5
	Date: July 2009
	Description: Sample layout for HTML5 and CSS3 goodness.
	Version: 1.0
	License: MIT <http://opensource.org/licenses/MIT>
	Licensed by: Smashing Media GmbH <http://www.smashingmagazine.com/>
	Original author: Enrique Ramírez <http://enrique-ramirez.com/>
*/
/* (has been modified!  also don't remember where it came from) */

/* Imports */
@import url("pygment.css");
@import url("typogrify.css");

/***** Global *****/
/* Headings */
h1 {font-size: 2em }
h2 {font-size: 1.571em}	/* 22px */
h3 {font-size: 1.429em}	/* 20px */
h4 {font-size: 1.286em}	/* 18px */
h5 {font-size: 1.143em}	/* 16px */
h6 {font-size: 1em}		/* 14px */

h1, h2, h3, h4, h5, h6 {
    margin: 1rem 0 0.5rem;
}

h3, h4, h5, h6 { margin-top: .8em; }
	
hr { border: 2px solid #EEEEEE; }

/* Paragraphs */
div.line-block,
p { margin-top: 1em;
    margin-bottom: 1em;}

strong, b {font-weight: bold;}
em, i {font-style: italic;}

/* Lists */
ul {
    list-style: outside disc;
    margin: 0 0 0 0.75em;
}

ol {
    list-style: outside decimal;
    margin: 0 0 0 0.75em;
}

li { margin-top: 0.5em;
     margin-bottom: 1em; }

.post-info {
    float:right;
    margin:10px;
    padding:5px;
}

.post-info p{
    margin-top: 1px;
    margin-bottom: 1px;
}

.readmore { float: right }

dl {margin: 0 0 1.5em 0;}
dt {font-weight: bold;}
dd {margin-left: 1.5em;}

pre{background-color:  rgb(238, 238, 238); padding: 10px; margin: 10px; overflow: auto;}

/* Quotes */
blockquote {
    margin: 20px;
    font-style: italic;
}
cite {}

q {}

div.note {
    float: right;
    margin: 5px;
    font-size: 85%;
    max-width: 300px;
}

/***** Layout *****/
img.right, figure.right {float: right; margin: 0 0 2em 2em;}
img.left, figure.left {float: left; margin: 0 2em 2em 0;}
