/*
Theme Name: Fogbound
Theme URI: https://fogbound.net
Author: SjG
Description: Fogbound personal blog theme, modernized for WordPress 6.x
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fogbound
*/

/* =============================================================
   Reset / Base
   ============================================================= */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	color: black;
	background-color: #eee;
	font-family: helvetica, arial, sans-serif;
	font-size: 100%;
	line-height: 1.6875;
	-webkit-text-size-adjust: 100%;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

body {
	margin: 0;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* =============================================================
   Skip link (accessibility)
   ============================================================= */

.skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.skip-link:focus {
	position: fixed;
	top: 0;
	left: 0;
	width: auto;
	height: auto;
	padding: 0.5em 1em;
	background: #000;
	color: #fff;
	font-size: 1rem;
	z-index: 9999;
	outline: 3px solid #fff;
}

/* =============================================================
   Links
   ============================================================= */

a {
	color: black;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25ch;
}

a:hover,
a:focus {
	color: #708090;
	text-decoration-style: dashed;
}

a:active {
	color: #708090;
	text-decoration: none;
}

/* =============================================================
   Layout — CSS Grid (replaces Gridiculous float grid)
   ============================================================= */

.site-wrapper {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: auto 1fr auto;
	min-height: 100vh;
	max-width: 100%;
}

.site-header {
	min-height: 120px;
	background: #000 url("images/header.jpg") no-repeat center 50%;
	font-size: 3em;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 1em;
}

.site-body {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
}

.site-footer {
	text-align: center;
	border-top: 1px solid #708090;
	padding: 0.75em 1em;
}

/* Tablet+ (≥640px): sidebar layout */
@media (min-width: 640px) {
	.site-body {
		grid-template-columns: minmax(160px, 16%) 1fr minmax(140px, 16%);
	}
}

/* =============================================================
   Sidebar — left
   ============================================================= */

.sidebar-left {
	padding: 10px 15px;
	border-right: 1px solid #ddd;
}

.sidebar-left ul,
.sidebar-right ul {
	padding: 0 5px;
	margin: 0;
	line-height: 1.2em;
	list-style: none;
}

.sidebar-left ul li,
.sidebar-right ul li {
	padding: 0 5px;
}

/* =============================================================
   Main content
   ============================================================= */

.site-content {
	border-left: 1px solid #708090;
	background-color: #fff;
	padding: 1em 2em;
}

.post {
	padding-bottom: 2em;
}

.storycontent {
	line-height: 1.5;
}

.site-content h2,
.site-content h3 {
	margin: 0;
}

.post-title {
	font-style: italic;
}

div.meta {
	font-style: italic;
}

div.meta ul {
	font-size: 75%;
	padding: 0 0.5em;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0 1em;
	margin: 0;
}

div.meta .author {
	font-size: 85%;
}

ul.post-categories {
	margin: 0;
	font-style: normal;
	list-style: none;
	padding: 0;
}

ul.post-categories li {
	margin: 0;
}

.sep {
	background-color: #eee;
	text-align: center;
	margin-bottom: 2em;
}

/* =============================================================
   Sidebar — right
   ============================================================= */

.sidebar-right {
	padding: 10px 15px;
	border-left: 1px solid #ddd;
}

.sidebar-right label {
	display: block;
	margin-bottom: 0.25em;
}

.search-form {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
}

.search-form input[type="text"] {
	padding: 0.3em 0.5em;
	font-size: 0.9em;
	width: 100%;
	border: 1px solid #aaa;
}

.search-form input[type="submit"] {
	padding: 0.3em 0.75em;
	cursor: pointer;
}

/* =============================================================
   Tables
   ============================================================= */

table.fogbound-table {
	width: 50%;
	border-collapse: collapse;
	border: 1px solid black;
}

table.fogbound-table td {
	border: 1px solid gray;
	text-align: center;
}

/* =============================================================
   Block Editor compatibility
   ============================================================= */

.wp-block-navigation .wp-block-navigation-item a:hover,
.wp-block-navigation .wp-block-navigation-item a:focus {
	text-decoration: underline;
	text-decoration-style: solid;
}

.wp-block-search__button,
.wp-block-file .wp-block-file__button {
	background-color: var(--wp--preset--color--primary, #000);
	border-radius: 0;
	border: none;
	color: var(--wp--preset--color--background, #fff);
	font-size: var(--wp--preset--font-size--medium, 1rem);
	padding: calc(0.667em + 2px) calc(1.333em + 2px);
}

.wp-block-search__button:hover,
.wp-block-file .wp-block-file__button:hover,
.wp-block-button__link:hover {
	opacity: 0.9;
}

/* Gallery blocks 
figure.wp-block-gallery.has-nested-images {
	display: flex;
	flex-wrap: wrap;
}

.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image),
.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image) {
	margin: 0.25em;
}

figure.wp-block-gallery.has-nested-images:where(.is-layout-flex) {
	gap: 0.25em;
}

.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image) {
    width: calc(33.333% - 0.5em) !important;
    max-width: calc(33.333% - 0.5em) !important;
    flex: 0 0 calc(33.333% - 0.5em) !important;
}
*/
