/*
 _    _  ___  __    __  __  __  __  ___    ____  __     ____  _  _  ___    ___  ___   __   __  _  _    ____  ___   __     ___   __   ___  ____ 
( \/\/ )(  _)(  )  / _)/  \(  \/  )(  _)  (_  _)/  \   (_  _)( )( )(  _)  (  ,\(  _) (  ) / _)( )( )  (_  _)(  _) (  )   (  ,\ /  \ / __)(_  _)
 \    /  ) _) )(__( (_( () ))    (  ) _)    )( ( () )    )(   )__(  ) _)   ) _/ ) _) /__\( (_  )__(     )(   ) _) /__\    ) _/( () )\__ \  )(  
  \/\/  (___)(____)\__)\__/(_/\/\_)(___)   (__) \__/    (__) (_)(_)(___)  (_)  (___)(_)(_)\__)(_)(_)   (__) (___)(_)(_)  (_)   \__/ (___/ (__) 
 
ASCII art generated by: https://patorjk.com/software/taag/

*/

/*
I built this website starting from Matthew James Taylor's responsive "Holy Grail" layout.
It's a great starting point if you're looking for one for your website.
https://matthewjamestaylor.com/holy-grail-layout

If you'd like something with a bit more built in to start, check out Sadgrl's Layout Builder.
https://sadgrlonline.github.io/archived-sadgrl.online/projects/layout-builder/                                                                                            
* /


/*
 * ===============
 * THEME VARIABLES
 * ===============
*/

/* using root to define certain variables so I can easily reuse them in the stylesheet and change them all in one spot */
:root {
	/* Font colors */
	--text-color: #824670;

	/* Border & sidebar box styling */
	--box-bg: #FFFDD0;
	--box-border-color: #230c0f;
	--box-border-width: 1.5px;
	--box-border-radius: 8px;

	/* Page spacing */
	--page-padding: 16px;
	--section-gap: 16px;

	/* Highlight text colors */
	--hl-yellow: #FFF2B3;
	--hl-pink: #FFC6D9;
	--hl-lav: #D9C6FF;
	--hl-sky: #BFE6FF;
	--hl-peach: #FFD6B8;
	--hl-green: #CFF7C6;
	
	--hl-coral: #FFC4B8;
	--hl-sand: #FFE9B8;
	--hl-bluegray: #CFE5FF;
	--hl-rose: #FFD1E1;
	--hl-skygray: #D4E8FF;
	--hl-mallow: #E9D5FF;
}

/*
 * =====
 * FONTS
 * =====
*/

/* self-hosting this font to avoid sending people to Google's servers, used Google Webfonts helper for code: https://gwfh.mranftl.com/fonts */
@font-face {
	font-display: swap;
	font-family: 'Fira Code';
	font-style: normal;
	font-weight: 500;
	src: url('../fonts/fira-code-v27-latin-regular.woff2') format('woff2');
}

/*	
@font-face {
	font-display: swap;
	font-family: 'Inconsolata';
	font-style: normal;
	font-weight: 400;
	src: url('../fonts/inconsolata-v37-latin-regular.woff2') format('woff2');
}
*/

/*
 * ================
 * LOOK OF THE SITE
 * ================
*/

body {
	background-image: url(../images/backgrounds/gray-daisies-taylors-tiny-backgrounds.gif); /* wallpaper */
	font-family: "monospace", monospace;
	margin: 0;
	color: var(--text-color);
}

.header {
	text-align: center;
	font-family: "Fira Code", monospace;

	padding-top: 27px;
}

/* main centered container */
.page {
	max-width: 900px;
	margin: 0 auto;
	padding: var(--page-padding);
}

/* box elements in my sidebars */
.box {
	width: 100%;
	background: var(--box-bg);
	box-sizing: border-box;
	
	display: block;
	margin: 0 0 1rem;
	padding: .5rem;

	max-width: 100%;
	border-style: solid;
	border-width: var(--box-border-width);
	border-radius: var(--box-border-radius);
	border-color: var(--box-border-color);
}

/* can use to center text */
.center-text {
	text-align: center;
	word-wrap: break-word;
}

/* can use to right justify text */
.right-justify-text {
	text-align: right;
	word-wrap: break-word;
}

/* can use to center images */
.center-img {
	text-align: center;
}

/* can use to justify an image to the right */
.img-right {
	text-align: right;
}

/* can use to display images on the same row */
.img-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
}

/* can use to display multiple images on the same row, more vertically aligned */
.img-row2 {
  display: flex;
  justify-content: space-around;
  align-items: center;
  min-height: 1px;
  flex-wrap: wrap;
}

.img-row2 img {
  display: block;
}


/* can use to display multiple images on the same row */
.img-row3 {
	display: flex;
	justify-content: space-around;
	align-items: center;
	flex-wrap: wrap;
}

/* bullet point style */
ul.a {list-style-type: circle;}

/* an attempt at obfuscation: https://css-tricks.com/how-to-safely-share-your-email-address-on-a-website/ */
span.maillink {
  display: none;
}

/*
 * ========================
 * RESPONSIVE IMAGE GALLERY
 * ========================
 * from: www.w3schools.com/Css/css_image_gallery.asp
*/

{
	box-sizing: border-box;
}

div.gallery {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

div.gallery-item {
	margin: 5px;
	border: none;
	width: calc(33.33% - 20px); /* display 3 images across on a full size screen */
	display: flex;
	flex-direction: column;
}

div.gallery-item img {
	width: 100%;
	height: auto;
	display: block;
	max-width: 25vh;
	height: auto;
}

div.gallery-item div.desc {
	margin-top: auto; /* pushes desc to the bottom */
	padding: 15px;
	text-align: center;
}

@media only screen and (max-width: 768px) {
	div.gallery-item {
		width: calc(50% - 20px);
  }
}

@media only screen and (max-width: 480px) {
	div.gallery-item {
		width: calc(100% - 20px);
  }
}

/*
 * ======================
 * PASTEL TEXT HIGHLIGHTS
 * ======================
*/

.hl-pastel-yellow { background: var(--hl-yellow); }
.hl-pastel-pink   { background: var(--hl-pink); }
.hl-pastel-lav    { background: var(--hl-lav); }
.hl-pastel-sky    { background: var(--hl-sky); }
.hl-pastel-peach  { background: var(--hl-peach); }
.hl-pastel-green  { background: var(--hl-green); }

.hl-pastel-coral	{ background: var(--hl-coral); }
.hl-pastel-sand		{ background: var(--hl-sand); }
.hl-pastel-bluegray	{ background: var(--hl-bluegray); }
.hl-pastel-rose		{ background: var(--hl-rose); }
.hl-pastel-skygray		{ background: var(--hl-skygray); }
.hl-pastel-mallow		{ background: var(--hl-mallow); }

/* rules for my pastel peach highlighted header */
.header .hl-pastel-peach {
	display: inline-block;
	padding: 0em .3em;
	border-radius: 0.2em;
}

/* Makes highlight look consistent behind text */
.hl-pastel-yellow,
.hl-pastel-pink,
.hl-pastel-lav,
.hl-pastel-sky,
.hl-pastel-peach,
.hl-pastel-green,

.hl-pastel-coral,
.hl-pastel-sand,
.hl-pastel-bluegray,
.hl-pastel-rose,
.hl-pastel-skygray,
.hl-pastel-mallow {
	padding: 0 0.3em;
	border-radius: 0.2em;
}

/*
 * =====================================
 * HOLY GRAIL RESPONSIVE 3-COLUMN LAYOUT
 * =====================================
 * from https://matthewjamestaylor.com/holy-grail-layout
*/

/* grid container */
.holy-grail-grid {
	display:grid;
	grid-template-areas:
		'header'
		'main-content'
		'left-sidebar'
		'right-sidebar'
		'footer';
			
		gap: var(--section-gap);
}

/* general column padding */
.holy-grail-grid > * {
	padding: 0rem;
	overflow: hidden;
}

/* assign columns to grid areas */
.holy-grail-grid > .header {
	grid-area: header;
	background: transparent;	
}

/* look of main content */
.holy-grail-grid > .main-content {
	grid-area: main-content;
	background: var(--box-bg);

	border-style: solid;
	border-width: var(--box-border-width);
	border-color: var(--box-border-color);
	border-radius: var(--box-border-radius);
	
	max-width: 100%;
	margin: 0 0 1rem;
	padding: 0.5rem;
}

.holy-grail-grid > .left-sidebar {
	grid-area: left-sidebar;
	background:transparent;
}
	
.holy-grail-grid > .right-sidebar {
	grid-area: right-sidebar;
	background:transparent;
}

.holy-grail-grid > .footer {
	grid-area: footer;
	background: var(--box-bg);
	
	text-align: center;
	
	border-style: solid;
	border-width: var(--box-border-width);
	border-color: var(--box-border-color);
	border-radius: var(--box-border-radius);
	
	max-width: 100%;
	margin: 0 0 1rem;
	padding: 0.5rem;
}

/* layout of pages with no right sidebar, main content fills that space */
.holy-grail-grid.no-right-sidebar {
	grid-template-areas:
		'header'
		'main-content'
		'left-sidebar'
		'footer';
}

/* layout of blog pages, main content fills full space */
.holy-grail-grid.blog {
	grid-template-areas:
		'header'
		'main-content'
		'footer';
}

/* tablet breakpoint */
@media (min-width:768px) {
	.holy-grail-grid {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			'header header'
			'main-content main-content'
			'left-sidebar right-sidebar'
			'footer footer';
	}

	.holy-grail-grid.no-right-sidebar {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
		'header header'
		'main-content main-content'
		'left-sidebar left-sidebar'
		'footer footer';
	}

	.holy-grail-grid.blog {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
		'header header'
		'main-content main-content'
		'footer footer';
	}
}

/* desktop breakpoint */
@media (min-width:1024px) {
	.holy-grail-grid {
		grid-template-columns: repeat(4, 1fr);
		grid-template-areas:
			'header header header header'
			'left-sidebar main-content main-content right-sidebar'
			'footer footer footer footer';
	}
	
	.holy-grail-grid.no-right-sidebar {
		grid-template-columns: repeat(4, 1fr);
		grid-template-areas:
			'header header header header'
			'left-sidebar main-content main-content main-content'
			'footer footer footer footer';
	}

	.holy-grail-grid.blog {
		grid-template-columns: repeat(4, 1fr);
		grid-template-areas:
			'header header header header'
			'main-content main-content main-content main-content'
			'footer footer footer footer';
	}
}

/*
 * ======================
 * ACCESSIBILITY FEATURES
 * ======================
 * from https://angrybunnyman.com/accessibility-in-the-here-and-now/
*/

:focus {
	outline: none;
}

:focus-visible {
	outline: 3px solid var(--box-border-color);
	outline-offset: 3px;
	border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
}

