@font-face {
    font-family: 'AnkaCoder-C75';
    src: url('../fonts/AnkaCoder-C75-r.ttf') format('truetype');
}

@-webkit-keyframes MOVE-BG-MAIN {
    from { background-position: 0 0 }
    to { background-position: 0 -2209px }
}

html {
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape while allowing user zoom */
}

body {
    background-image: url("../images/layout/bg_dither2.gif");
    background-repeat: repeat;
    background-color: #242424;
    background-attachment: fixed;
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    margin: 0;
    -webkit-animation-name: MOVE-BG-MAIN;
    -webkit-animation-duration: 100s;
    -webkit-animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;
}

/* header / grid */

body > header, section.grid {
    margin: 9px 18px 9px 9px;
}

body > header {

}

header svg {
    width: 230px;
    margin: 35px 27px 0;
    opacity: 0.3;
    display: none;
}

svg text {
    font-family: 'EB Garamond', serif;
    dominant-baseline: central;
    text-anchor: middle;
    fill: white;
}

section.grid {
    position: absolute;
    top: 52px;
    padding-left: 9px;
}

/* on larger screens, header shifts to a left column */

@media (min-width: 850px)
{
    section.grid {
        top: 51px;
        margin-left: 305px;
    }

    body > header {
        position: fixed;
    }

    header #title_container {
        clear: both;
        position: relative;
        top: 10px;
        left: 10px;
        margin-bottom: 45px;
        display: none;
    }

    header #title_bg {
        background-image: url("../images/layout/bg_article_opti.png");
        background-position: right -40px bottom -440px;
        background-repeat: repeat-y;
        position: absolute;
        height: 100%;
        width: 100%;
        top: 0;
        opacity: 0.3;
        z-index: -1;
    }

    header h1 {
        position: relative;
        left: -10px;
        top: -10px;
    }

    header svg {
        display: block;
    }
}

/* articles structure */

article {
    background: none;
    position: relative;
    padding: 1px 0 0 0;
    min-width: 270px;
    margin-bottom: 25px;
    -webkit-transform: translate3d(0,0,0);
}

article .article_bg {
    background-image: url("../images/layout/bg_article_opti.png");
    background-position: right -40px bottom -460px;
    background-repeat: repeat-y;
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    opacity: 0.3;
    z-index: -1;
}

article.medium .article_bg {
    background-position: right -40px bottom -440px;
}

article.short .article_bg {
    background-position: right -40px bottom -340px;
}

article.playing .article_bg {
    opacity: 0.6;
}

code, article > footer, article .credits {
    font-family: 'Overpass Mono', monospace;
    font-size: 10px;
}

article .credits {
    line-height: 1.5;
}

article .credits .artist_name {

}

article .credits .artist_roles {

}

/* on larger screens, articles get arranged into masonry */

@media (min-width: 1310px)
{
	article {
        float: left;
		width: 47.3%;
        margin-right: 22px;
	}
}

@media (min-width: 1860px)
{
	article {
		width: 31.7%;
	}
}

/* articles content */

article h2 {
    margin: 0 0 -10px;
    position: absolute;
    left: -10px;
    top: -10px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    z-index: 1;
}

article .content, article .image_container {
    padding: 10px;
}

article .image_container {
    padding-bottom: 0;
}

article.youtube .content,
article.mixcloud .content,
article.mix .content,
article .image_container {
    margin-top: 25px;
}

article .content iframe,
article .content div.mix {
    margin-bottom: 10px;
}

article .image_container img,
article .content iframe,
article .content div.mix
{
    width: 100%;
    background-image: url("../images/layout/bg_diagonal.png");
}

article .image_container img {
    height: auto;
}

article .content div.mix {
    height: 300px;
}

article > footer {
    float: none;
    background: rgba(255, 255, 255, .2);
    color: black;
    padding: 2px 5px;
    clear: both;
}

/* on larger screens, large image layout kicks in */

@media (min-width: 450px)
{
    article.large_image .image_container {
        padding: 0;
        margin: 0;
        margin-top: -1px;
        margin-bottom: -3px;
        opacity: 0.2;
    }

    article.large_image.short .image_container {
        opacity: 0.4;
    }

    article.large_image .content {
        margin-top: 0;
        padding-top: 10px;
        position: absolute;
        top: 25px;
    }
}

/* on larger screens, images and mixcloud iframe start floating left */

@media (min-width: 520px)
{
    article.classic .image_container,
    article iframe.mixcloud,
    article div.mix {
        float: left;
        width: auto;
        max-width: 191px;
        padding-right: 0;
        margin-right: 10px;
        margin-bottom: 10px;
    }

    article.classic.local .content {
        margin-top: 25px;
    }
}


/* video */

.video-container {
    position: relative;
    background-image: url("../images/layout/bg_diagonal.png");
    padding-bottom: 56.3%; /* 16:9 */
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* mix image */

article .content div.mix div {
    height: 100%;
    width: 100%;
    background-position: 50% 50%;
    background-size: cover;
}

/* titles */

h1 {
    margin: 0;
    line-height: 30px;
}

h1, h2, .button {
    font-family: 'AnkaCoder-C75', monospace;
    font-weight: normal;
    font-size: 30px;
    white-space: nowrap;
    text-shadow: 0px 1px #0ff, 1px 0px #f0f;
}

h1 span, h2 span.article_header {
    background: rgb(0, 0, 0);
    background: rgba(0, 0, 0, .7);
    color: white;
}

h2 span.jp {
    font-family: 'Noto Sans JP', monospace;
}

/* text */

p, blockquote, ul.buttons, div.video-container {
    margin: 0 0 12px 0;
}

.content p, .content blockquote {
    overflow: hidden; /* prevent text from sliding under floating img */
}

/* blockquotes */

blockquote {
    font-style: italic;
    font-family: serif;
    font-size: 14px;
    background-image: url("../images/layout/quote.svg");
    background-repeat: no-repeat;
    background-size: 25px;
    background-position: -2px -4px;
    padding: 7px 17px 0;
    line-height: 17px;
}

blockquote.big {
    font-size: 23px;
    background-position: -3px -7px;
    padding: 11px 29px 0;
    background-size: 40px 40px;
    line-height: 29px;
}

blockquote span {
    background-color: rgba(255, 255, 255, 0.36);
}

/* links */

a {
    color: black;
}

/* buttons */

ul.buttons {
    list-style-type: none;
    padding: 0;
    overflow: hidden;
}

ul.buttons li {
    margin-bottom: 4px;
}

ul.buttons.inline li {
    display: inline;
    margin: 0;
}

ul.buttons.stack {
    margin-bottom: 6px;
}

ul.buttons.stack li {
    line-height: 33px;
}

.button {
    background: rgb(0, 0, 0);
    background: rgba(0, 0, 0, .7);
    color: white;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    margin-right: 8px;
    margin-bottom: 12px;
}

a.button:active {
    background: rgb(255, 255, 255);
    background: rgba(255, 255, 255, .7);
    color: black;
}

@media (hover: hover) and (pointer: fine) {
    a.button:hover {
        background: rgb(255, 255, 255);
        background: rgba(255, 255, 255, .7);
        color: black;
    }

    a.button:active {
        background: rgb(0, 0, 0);
        background: rgba(0, 0, 0, .7);
        color: white;
    }
}


article .button.wait {
    background: rgba(0, 0, 0, .3);
}

article .button.wait {
    display: none;
}

article.waiting .button.wait {
    display: inline;
}

article .button.stop,
article.waiting .button.stop {
    display: none;
}

article.playing .button.stop {
    display: inline;
}

article .button.play {
    display: inline;
}

article.playing .button.play,
article.waiting .button.play,
article.mixcloud.ready .button.play {
    display: none;
}

/* smaller buttons and titles on larger screens */

@media (min-width: 1310px)
{
    h1, h2 {
        font-size: 25px;
        line-height: 30px;
    }

    article.youtube .content,
    article.mixcloud .content,
    article.mix .content,
    article.classic.local .content,
    article .image_container {
        margin-top: 20px;
    }

    article.large_image .content {
        top: 20px;
    }

    .button {
        font-size: 17px;
    }

    ul.buttons li {
        margin-bottom: 4px;
    }

    ul.buttons.stack li {
        line-height: 20px;
    }
}

/* button icons */

article .button.play::before {
    content: "\003E \FE0E \00A0";
}

.button.wait::before {
    content: "\022EF \FE0E \00A0";
}

.button.stop::before {
    content: "\0025A1 \FE0E \00A0";
}

.button.download::before {
    content: "\02193 \FE0E \00A0";
}

.button.link::before {
    content: "\02197 \FE0E \00A0";
}

.button.prev::before {
    content: "\00A0 \000AB \FE0E \00A0";
    /*content: "\00A0 \0226A \FE0E \00A0";*/
}

.button.prev::after {
    content: "\00A0";
}

.button.stop::before {
    content: "\00A0 \0025A1 \FE0E \00A0";
}

.button.stop::after {
    content: "\00A0";
}

.button.next::before {
    content: "\00A0";
}

.button.next::after {
    content: "\00A0 \000BB \FE0E \00A0";
    /*content: "\00A0 \0226B \FE0E \00A0";*/
}

/* media player */

#media_player {
    color: white;
    text-shadow: 0px 1px #0ff, 1px 0px #f0f;
}

#media_player[data-state="stopped"] {
    display: none;
}

#media_player[data-state="playing"],
#media_player[data-state="paused"],
#media_player[data-state="buffering"] {
    display: block;
}

#media_player[data-state="playing"] #state span.state::before {
    content: "";
}

#media_player[data-state="paused"] #state span.state::before {
    content: "Paused: ";
}

#media_player[data-state="buffering"] #state span.state::before {
    content: "Buffering: ";
}

#media_player[data-state="stopped"] #state span.state::before {
    content: "";
}

#media_player #state,
#media_player .control_bar {
    font-family: 'Overpass Mono', monospace;
}

#media_player #state {
    margin: 18px 18px 0;
    font-size: 14px;
    white-space: nowrap;
}

#media_player #state h1 span {
    background-color: inherit;
}

#media_player #controls {
    margin: 0 6px;
}

#media_player #controls .control_bar {
    display: block;
    color: white;
    text-decoration: none;
    font-size: 10px;
    margin: 0 14px;
    padding-top: 18px;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */
    -webkit-user-select: none; /* disable selection/Copy of UIWebView */
}

#media_player #controls .control_bar#volume {
    display: none;
}

#media_player .control_bar .bar_total,
#media_player .control_bar .bar_current_value
{
    width: 0;
    height: 17px;
}

#media_player .control_bar .bar_total {
    width: 100%;
    background-image: url("../images/layout/bg_progressbar_total.png");
    margin-bottom: 4px;
}

#media_player .control_bar .bar_current_value {
    background-image: url("../images/layout/bg_progressbar_current.png");
}

#media_player #progress #time_left {
    float: right;
}

#media_player .button.prev {
    float: left;
}

#media_player .button.next {
    float: right;
}

#media_player .button.pause, #media_player .button.play {
    display: none;
}

#media_player[data-state="playing"] .button.pause,
#media_player[data-state="buffering"] .button.pause {
    display: block;
}

#media_player[data-state="paused"] .button.play {
    display: block;
}

#media_player .button.pause, #media_player .button.play {
    width: 50px;
    margin: 5px auto -4px;
}

#media_player .button svg .top {
    fill: white;
}

#media_player .button svg .shadow1 {
    fill: #00ffff;
}

#media_player .button svg .shadow2 {
    fill: #ff00ff;
}

#media_player .button svg .hoverSymbol {
    fill: none;
}

/* media player buttons */

#media_player .button {
    background: inherit;
}

#media_player .button:active {
    background: white;
}

#media_player .button.pause, #media_player .button.play {
    background: inherit;
}

#media_player .button:active svg .top {
    fill: #242424;
}

#media_player .button:active svg .hoverSymbol {
    fill: white;
}

@media (hover: hover) and (pointer: fine) {
    #media_player .button:hover {
        background: white;
    }

    #media_player .button:active {
        background: black;
    }

    #media_player .button.pause:hover, #media_player .button.play:hover {
        background: inherit;
    }

    #media_player .button:hover svg .top {
        fill: #242424;
    }

    #media_player .button:hover svg .hoverSymbol {
        fill: white;
    }

    #media_player .button.pause:active, #media_player .button.play:active {
        background: inherit;
    }

    #media_player .button:active svg .top {
        fill: white;
    }

    #media_player .button:active svg .hoverSymbol {
        fill: none;
    }
}

/* mobile style */

#media_player {
    position: fixed;
    bottom: 0;
    z-index: 1;
    background-color: #242424;
    width: 100%;
    background: url("../images/layout/bg_media_player.png");
    height: 162px;
    padding-top: 53px;
}

#media_player .button {
    display: block;
    margin: 10px 0 0;
}

#state h1 {
    margin: 5px 0 10px;
    text-align: left;
    /*animation: marquee 10s linear infinite;*/
}

#state a {
    text-decoration: none;
    color: inherit;
}

/* on larger screens, player floats left */

@media (min-width: 850px)
{
    #media_player {
        margin: 18px 36px 0;
        width: 230px;
        padding: 0;
        background-color: #666;
        text-shadow: none;
        background: none;
        top: 286px;
        opacity: 0.5;
    }

    #media_player #state {
        font-size: 10px;
        margin-right: 0;
        margin-left: 0;
        overflow: hidden;
    }

    #media_player #controls,
    #media_player #controls .control_bar {
        margin: 0;
    }

    #media_player #controls .control_bar {
        padding-top: 13px;
    }

    #media_player #controls .control_bar#volume {
        display: block;
    }

    #media_player .button {
        margin-top: 15px;
        font-size: 17px;
    }

    #media_player .button.prev::before {
        content: "\000AB \FE0E \00A0";
    }

    #media_player .button.next::after {
        content: "\00A0 \000BB \FE0E";
    }

    #media_player .button.pause, #media_player .button.play {
        width: 35px;
        margin: 10px auto -4px;
    }
}
