

/* @group Global */

html {
	text-rendering: optimizeLegibility;
}

body {
	margin: 0;
	padding-right: 0;
	
	background: hsl(228, 16%, 96%); /*blue*/
	color: hsl(208, 25%, 18%);
	
	vertical-align: baseline;
	
	-webkit-hyphens: auto;
	-webkit-hyphenate-limit-before: 3;
	-webkit-hyphenate-limit-after: 4;
	text-align: justify;
	
	font-family: "Avenir Next", "Lucida Grande", "Lucida Sans", "Arial";
}

/* @group Headings */

h1, h2 {
	line-height:1.1em;
	margin-top:32px;
	margin-bottom:12px;
	text-align: left;
}

h1 {
	font-size: 34px;
}

h1:first-child {
	margin-top:0;
}

h3, h4, h5, h6 {
	margin-top:12px;
	margin-bottom:6px;
	text-align: left;
}

h5, h6 {
	font-size:0.9em;
	line-height:1.0em;
	margin-bottom:0;
}

h1, h2, h3, h4 {
	-webkit-hyphens: none;
}

/* @end */

/* @group Text */

p {
	margin:0 0 24px 0;
	font-family: "-apple-system-font"
}

sup {
	vertical-align: baseline;
	line-height: 0;
	position: relative;
	top: -8px;
}

em {
	padding: 0 2px;
}

strong {
	font-weight: 500;
}

article a {
	text-decoration: none;
	color: hsl(208, 66%, 56%);
}

a:hover {
	text-decoration: underline;
}

.math {
	background-color: #fcfcfc;
	border-radius: 3px;
	padding: 1px 3px;
	-webkit-hyphens: none;
	font-family: "Lucida Grande", "Avenir", "Arial";
}

pre > .math {
	padding: 7px 10px;
	margin: 10px 15px;
	font-size: 15px;
	display: block;
}

.comment {
	color: #4aa5e3;
}

/* @end */

/* @end */

/* @group Post summary */

.post-summary {
	background: hsl(238, 16%, 99%);
	box-shadow: 0 0px 4px rgba(0,0,0,0.75);
	min-width: 245px;
	max-width: 400px;
	width: calc(90% - 80px);
	
	display: inline-block;
	padding: 20px;
	vertical-align:top;
	position: relative;
	margin: auto auto 40px 0;
	
	border: 10px solid hsl(208, 8%, 75%);
}

#more-posts .post-link:last-child .post-summary {
	margin-bottom: 100px;
}

#newest-post .post-summary,
#more-posts .post-link:nth-child(4n+4) .post-summary {
	border-color: #feba00;
}

#more-posts .post-link:nth-child(4n+1) .post-summary {
	border-color: #40a4e5;
}

.post-summary h1 {
	width: 100%;
	line-height: 100%;
	font-size: 24px;
	text-align: left;
	font-weight: 700;
	color: #2f3741;
	margin-bottom: 25px;
}

.post-summary p {
	max-height: 140px;
	overflow: hidden;
}

.post-link {
	text-decoration: none;
	color: #2f3741;
	display: inline-block;
}

#newest-post {
	margin-top: 90px;
}

@media screen and (max-width: 1200px) {
	#newest-post {
		margin-top: 170px;
	}
}

@media screen and (max-width: 480px) {
	#newest-post {
		margin-top: 80px;
	}
}

#newest-post h1 {
	font-size: 34px;
	letter-spacing: 100%;
	font-weight: 800;
	margin-bottom: 50px;
	width: calc(100% - 80px);
	display: inline-block;
	margin-top: 0;
}

#newest-post .post-summary {
	font-size: 18px;
	padding: 30px;
}

#newest-post, 
#more-posts {
	text-align: center;
}

#more-posts {
	/*padding: 5px;*/
	margin-top: 40px;
}

#newest-post .post-summary {
	/*width: 100%;*/
	max-width: 700px;
	margin: auto;
}

.post-summary time {
	float: right;
	font-size: 24px;
	font-weight: 400;
	line-height: 120%;
	text-align: right;
	display: inline-block;
}

/* @group Shadow for the post summaries on the root page */

.center-shadow
{
	position:relative;
}
.center-shadow:after
{
	content:"";
	position:absolute;
	z-index:-1;
	box-shadow:0 8px 10px rgba(0,0,15,1.0);
	top:50%;
	bottom:0;
	left:10px;
	right:10px;
	border-radius:50% / 15px;
}

/* @end */

/* @end */


/* @group Print */

/*
TODO:
 [ ] Less fancy print style for posts
*/

/* @end */

article {
	text-align: justify;
	margin: 0 auto;
	max-width: 610px;
	min-width: 296px;
	width: 95%;
	position: relative;
	
	line-height: 170%;
	font-size: 17px;
	
	margin-bottom: 85px;
}

/* Cover everything and hide the overflowing orange and blue rectengles*/
#main {
	margin: 0;
	overflow: hidden;
}

#container {
	min-height:100%;
	position: relative;
	margin: 0;
	padding: 0;
}

/* @group Post header */

/* Header for posts with a rectangle and shapes for  */


#top-blue-rect {
	background: #4aa5e3;
	width: 2750px;
	height: 500px;
	right: 0px;
	top: -500px;
}
 
#top-orange-rect {
	color: #303841;
 	width: 700px;
 	height: 2700px;
	background: #ffb900;
	right: -700px;
	top: 0px;
	position: absolute;
	z-index: -1;
}

/* Post date label */
#top-orange-rect p {
	font-weight: 100;
	font-size: 32px;
	padding: 20px;
	line-height: 1.3;
}

.title-header {
	width: 100%;
	margin-bottom: calc(25% + 20px);
}

#rotated-header {
	transform-origin: 100% 0%;
	-webkit-transform-origin: 100% 0%;
	-moz-transform-origin: 100% 0%;

	transform: rotate(-16.4deg);
 	-moz-transform: rotate(-16.4deg);
	-ms-transform: rotate(-16.4deg);
	-webkit-transform: rotate(-16.4deg);
	-o-transform: rotate(-16.4deg); 

	top: 3.25vmin;
	right: calc(13.5% + 15px);
	right: -moz-calc(13.5% + 15px);
	right: -webkit-calc(13.5% + 15px);

	position: relative;
	z-index: -1;
}

#rotated-header > h1 {
	position: relative;
/* 	right: 20px; */
	top: 0;
	
 	color: #303841;
	text-align: left;
	font-weight: 900;
	font-size: 80px;
	
	text-align: right;
	display: block;
	
	letter-spacing: 0.9;
	padding-right: 16px;
	padding-top: 12px;
}

@media screen and (max-width: 597px) {
	#rotated-header > h1 {
		font-size: 13.4vw;
		padding-top: 1.75vw;
		padding-right: 2.25vw;
	}
	#top-orange-rect p {
		font-weight: 100;
		font-size: 5.3vw;
		padding: 2.5vw;
		line-height: 1.3;
	}
}

/* @group Post header blue & orange rectangles */

#top-blue-rect,
#top-orange-rect,
#bottom-orange-rect {
	position: absolute;
	display: inline-block;
}

.post-footer {
	bottom: 0px;
	right: calc(-100% + 300px);
 	right: -moz-calc(-100% + 300px); 
 	right: -webkit-calc(-100% + 300px); 
	
	position: relative;
	overflow: hidden;
	display: inline;
}

#cc-svg {
	position: absolute;
	right: 15px;
	bottom: 15px;
}

#bottom-orange-rect {
	
	width: 285px;
	height: 100px;
	
	transform-origin: 0% 0%;
	
	transform: rotate(-16.4deg);
	-moz-transform: rotate(-16.4deg);
	-ms-transform: rotate(-16.4deg);
	-webkit-transform: rotate(-16.4deg);
	-o-transform: rotate(-16.4deg);
	overflow: visible;
	background: #ffb900;
	padding: 3px 15px;
	font-size: 20px;
	font-weight: 400;
	text-align: right;
}

#bottom-orange-rect a:link,
#bottom-orange-rect a:active,
#bottom-orange-rect a:visited,
#bottom-orange-rect a:hover {
	text-decoration: none;
	color: hsl(208, 25%, 18%);
}

.twitter {
	vertical-align: top;
	display: block;
}

.twitter svg {
	margin-left: 5px;
transform: translateY(4px);
}


/* @end */

/* @group Logo */

.head-logo {
	width: 23vw;
	max-width: 150px;
	top: 20px;
}

#DR-logo {
	position: absolute;
	left: 20px;
	z-index: 10;
}

@media screen and (max-width: 597px) {
	.head-logo {
		top: 4vw;
	}
	#DR-logo {
		left: 4vw;
	}
}

#book-logo {
	position: absolute;
	left: calc(28%);
/* 	left: -moz-calc(28%); */
/* 	left: -webkit-calc(28%); */
	margin-left: 10px;
	z-index: 10;
}

#rss-link {
	position: absolute;
	left: 20px;
	bottom: 20px;
	height: 55px;
}

/* Setting the color of the logo */
#D, #R {
	fill: #40a4e5;
}

.post-logo #D,
.post-logo #R {
	fill: #f3f3f7;
}

/* @end */

/* @end */

/* @group Figures */

figure {
	background: white;
	max-width: 550px;
	width: 95%;
	min-height: 100px;
	margin: 24px auto 55px;
	
	border: 1px solid #AAA;
	box-shadow: 0px 1px 2px rgba(0,0,55,0.5);
	position: relative;
	margin-bottom: 10px;
}

figure > .resetButton {
	position: absolute;
	background: #FAFAFA;
	color: #333;
	padding: 6px;
	padding-right: 20px;
	border-bottom: 1px solid #AAA;
	border-right: 1px solid #AAA;
	border-bottom-right-radius: 5px;
	letter-spacing: -10px;
	font-size: 26px;
	-webkit-animation: resetButtonAnimation 0.5s ease;
	-webkit-animation-fill-mode: backwards;
	box-shadow: 0px 1px 3px rgba(0,0,55,0.3);
}

figure img {
	margin: 10px;
	width: -webkit-calc(100% - 20px) !important;
	border: 1px solid #ddd;
}

/* Captions */
figcaption {
	text-align: center;
	counter-increment: figure;
	padding: 10px;
	margin-bottom: 25px;
}

figcaption:before {
	content: "Figure "counter(figure)". ";
	font-weight: 500;
}

/* @end */


/* @group Quotes */

blockquote {
/*    position: relative;*/
	margin: 15px 40px;
	padding: 4px;
	padding-left: 10px;
	background: -webkit-linear-gradient(left, #fcfcfc, #fcfcfc 35%, rgba(255,255,255, 0.0));	
	border-radius: 5px;
}

blockquote code {
	font-weight: bold;
	font-size: 16px !important;
/*	background-color: transparent !important;*/
}

blockquote p {
    margin-top: 4px;
	margin-bottom: 4px;
}

/* @end */

/* @group Code */

code, .math {
	-webkit-hyphens: none;
	word-wrap: break-word;
}

/* Inline code*/
p code, li code {
	font-size: 14px;
	background-color: #fcfcfc;
	border-radius: 3px;
	padding: 1px 3px;
}



/* Code block */
article pre > code {
	background-color: #fcfcfc;
	border-radius: 3px;
	border: 1px solid #cbcac2;
	display: block;
	padding: 5px 7px;
	line-height: 16px;
	font-size: 14px;
/*	white-space: pre-line;*/
	text-align: left;
/*	width: 605px;*/
	width: calc(100% - 5px);
	width: -moz-calc(100% - 5px);
	width: -webkit-calc(100% - 5px);
	position: relative;
	left: -5px;
}

pre > code .c1 {
	color: #4aa5e3;
}

/* @end */

hr {
	margin: 40px 5px;
	border: 0;
	height: 3px;
	background: -webkit-radial-gradient(center top, ellipse farthest-side, rgba(0,0,25,0.25) 0%,rgba(0,0,25,0) 100%);
}

img {
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 610px;
	display: block;
}

/* @group Tags */

.tag {
padding: 0 3px;
/*margin: 2px 8px;*/
/*color: hsl(208, 66%, 56%);*/
display: inline-block;
height: 22px;
/*background-color: hsl(208, 30%, 90%);*/
padding-left: 10px;
position: relative;
border-left: 1px solid hsl(208, 8%, 60%);
font-weight: 500;
font-size: 15px;
}

.tag:first-child {
	border: none;
}

.post-summary footer {
	text-align: left;
	padding-top: 6px;
	border-top: 1px solid hsl(208, 8%, 60%);
	color: #2f3741;
}

/* @end */

/* @group Footnotes */

.footnotes p {
	margin: 0 0 5px 0;
}

.footnotes li {
	margin-bottom: 24px;
}

/* @end */

.autoscaled-svg { 
	position:absolute; top:0; left:0;
	margin: 50px;
	height:calc(100% - 100px);
	height:-moz-calc(100% - 100px);
	height:-webkit-calc(100% - 100px); 
	width:calc(100% - 100px); 
	width:-moz-calc(100% - 100px); 
	width:-webkit-calc(100% - 100px);
}

@media screen and (max-width: 597px) {
	.autoscaled-svg { 
		margin: 5vw;
		height:calc(100% - 10vw);
		width:calc(100% - 10vw);  
	}
}

@media screen and (min-width: 1600px) {
	#top-blue-rect {
		background: #4aa5e3;
		width: 2750px;
		height: 1000px;
		right: 0px;
		top: -1000px;
	}
	 
	#top-orange-rect {
		color: #303841;
	 	width: 1700px;
	 	height: 3500px;
		background: #ffb900;
		right: -1700px;
		top: 0px;
	}
}


.pageNotFound {
	text-align: center;
padding-top: 15vmin;
	font-size: 15vw;
	height: 300px;
}
