/* Reset */
a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}


/* Fonts */
@font-face {
    font-family: 'derek_hand_1regular';
    src: url('fonts/derek_hand_1-webfont.woff2') format('woff2'),
         url('fonts/derek_hand_1-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}


/* Global */
html{
	scroll-behavior: smooth;
}
body{
  font-family: 'derek_hand_1regular', 'Helvetica', sans-serif;
	line-height: 140%;
	color: #111;
}

h1{
	font-weight: bold;
}

a{
	color: black;
	text-decoration: none;
}
a:hover{
	text-decoration: underline;	
}


/* Main Header */
header.main{
	width: calc(100% - 80px);
	max-width: 1140px;
	margin: 0 auto;
	padding: 40px;
	display: flex;
	flex-flow: row;
	justify-content: space-between;
	align-items: center;
}

header.main h1{
	font-weight: bold;
	text-transform: uppercase;
	font-size: 18px;
}

header.main a.here{
	text-decoration: line-through;
}


/* Navigation */
header.main nav{
	display: flex;
	flex-flow: row;
	justify-content: center;
	align-items: center;
	gap: 10px;
}


/* Page */
main#page{
	view-transition-name: page;
	width: calc(100% - 80px);
	max-width: 1140px;
	margin: 0 auto;
	padding: 40px;
}

main#page h2{
	text-align: center;
	font-size: 28px;
	margin-bottom: 40px;

  animation-duration: .2s;
  animation-fill-mode: both;
  opacity: 0;
  animation-name: fadeInUp;
}


/* Comic Grid */
.comic-grid{
	display: flex;
	flex-flow: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 40px;
	margin-bottom: 40px;
}


.comic-grid-bg{
	background-color: #fff;
}

.comic-grid .comic{
	display: block;
	min-height: 240px;
	text-decoration: none;
	width: calc(30% - 20px);
	height: auto;
	cursor: zoom-in;

  animation-duration: .5s;
  animation-fill-mode: both;
  opacity: 0;
  animation-name: fadeInUp;

}

.comic-grid .comic.spacer{
	cursor: default;
	min-height: 0px;
}

.comic-grid .comic:first-child{
	animation-delay: .1s;
}
.comic-grid .comic:nth-child(2){
	animation-delay: .2s;	
}
.comic-grid .comic:nth-child(3){
	animation-delay: .3s;	
}
.comic-grid .comic:nth-child(4){
	animation-delay: .4s;	
}
.comic-grid .comic:nth-child(5){
	animation-delay: .5s;	
}
.comic-grid .comic:nth-child(6){
	animation-delay: .6s;	
}
.comic-grid .comic:nth-child(7){
	animation-delay: .7s;	
}
.comic-grid .comic:nth-child(8){
	animation-delay: .8s;	
}
.comic-grid .comic:nth-child(9){
	animation-delay: .9s;	
}

.comic-grid .comic img{
	width: 100%;
	height: auto;
	border-radius: 4px;
}
.comic-grid .comic:hover{
	opacity: .75;
}

.pswp__counter{
	color: #111 !important;
	text-shadow: none !important;
}

.pswp__icn{
  fill: #111 !important;
  color:  #fff !important;
}

.pswp__bg{
	background-color: #fff !important;		
}

/* Page Content */
#page-content{
	max-width: 720px;
	margin: 0 auto;
}

#page-content p{
  animation-duration: .5s;
  animation-fill-mode: both;
  opacity: 0;
  animation-name: fadeInUp;

	font-size: 22px;
	line-height: 150%;
	margin-bottom: 20px;
}


/* Page Issue */
main#page.issue .comic{
	cursor: zoom-in;
}

main#page.issue .comic img{
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 20px;
}

main#page.issue .comic.active{
	position: absolute;
	display: flex;
	top: 0; right: 0; bottom: 0; left: 0;
	z-index: 9999;
	background-color: #fff;
	cursor: zoom-out;
}
main#page.issue .comic.active img{
	height: 100%;
	width: auto;
	margin: 0 auto;
}

main#page.issue .script{
	text-align: center;
	margin-bottom: 20px;
	font-size: 18px;
}

nav.pagination{
	display: flex;
	margin: 0 auto;
	justify-content: center;
	align-items: center;
	column-gap: 10px;
}

nav.pagination a{
	display: block;
	width: 36px;
	height: 36px;
	transition: all .2s ease;
}

nav.pagination a:hover{
	opacity: .4;
}

nav.pagination a:active{
	transform: scale(.90);
}

.hidden{
	display: none;
	visibility: hidden;
}


/* Footer */
footer{
 text-align: center;
 font-size: 12px;
 margin-bottom: 40px;
 padding: 20px;
}



/* Responsive Breakpoints */ 
@media only screen and (max-width: 960px) {
	.comic-grid .comic{
		width: calc(50% - 20px);
	}

}

@media only screen and (max-width: 640px) {
	header.main{
		padding: 20px;
		flex-flow: column;
		text-align: center;
		gap: 10px;
	}
	main#page{
		padding: 20px;
	}
	.comic-grid{
		display: grid;
		grid-template-columns: 1fr;
	}
	.comic-grid .comic{
		width: 100%;
	}
}


/* Dark Mode */
@media (prefers-color-scheme: dark) {
  body {
  	background-color: #111;
  	color: #fff;
  }
  a{
		color: #fff;
	}
	.pswp__bg{
  	background-color: #111 !important;		
	}
	.pswp__counter{
		color: #fff !important;
	}

	.pswp__icn{
	  fill: #fff !important;
	  color:  #111 !important;
	}
}


/* Page Transitions */
@keyframes fadeInUp {
    from {
        transform: translate3d(0,40px,0)
    }

    to {
        transform: translate3d(0,0,0);
        opacity: 1
    }
}

@-webkit-keyframes fadeInUp {
    from {
        transform: translate3d(0,40px,0)
    }

    to {
        transform: translate3d(0,0,0);
        opacity: 1
    }
}