:root {
	--primary: #C3512F;
	--primary-hover: rgba(220, 81, 47, 1);
	--primary-active: #883d1f;
	--background: #F8F8F7;
	--headings: #292524;
	--body: #3d3835;
	--secondary: #ABA39B;
	--input-bg: #FFFFFF;
	--input-border: #E6E6E6;
	--input-radius: .5rem;
	--border: #E6E6E6;
	--divider: #E6E6E6;
}

/* Global
-----------------------------------------*/
body { 
	background-color: var(--background);
	color: var(--body);
 }
@media screen and (max-width: 767px) {
  body { 
  	font-size: .92em;
   }	
}
/* Headings */
h1, h2, h3, h4, h5, h6 {
	color: var(--headings);
    text-transform: uppercase;
    letter-spacing: .2em;
    margin-bottom: .5em;
	font-weight: 600;
}
h1 {
    font-size: .85em;
}
article.post > header {
    margin-bottom: 3em;
}
article.post > header:last-child {
    margin-bottom: 0;
}
article.post:has(> header:only-child) {
    margin-bottom: 3em;
}
h2 {
    font-size: .75em;
}
h1 > a, h2 > a, h3 > a, h4 > a, h5 > a, h6 > a {
	color: var(--primary);
}
/* Links */
nav.main-nav a,
#footer a,
#post-nav a,
p a {
	color: var(--body);
    font-weight: 500;
    box-shadow: inset 0 -2px 0 rgba(255, 81, 47, .25);
    transition: all .35s;
    transition-timing-function: cubic-bezier(.7, 0, .3, 1);
	padding-inline: 2px;
}
nav.main-nav a:hover,
#footer a:hover,
#post-nav a:hover,
p a:hover {
	color: white;
    box-shadow: inset 0 -25px 0 var(--primary);
}
/* Meta*/
.dates {
	color: var(--secondary);
	font-weight: medium;
}
/* Inputs */
textarea,
input:not([type="submit"]) {
	min-height: 48px;
	border-radius: var(--input-radius);
	background-color: var(--input-bg);
	color: var(--body);
	border: 2px solid var(--input-border);
	padding: .5em 1em;
	font-size: 1em !important;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	box-sizing: border-box;
	font-family: inherit;
	margin-top: 1em;
	width: 100%;
	transition: all .2s ease;
	outline: none;
}
textarea:focus,
input:focus {
	border-color: var(--primary);
}
/* Override inline styles from search plugin */
input.field,
#input_search {
	background-color: var(--input-bg) !important;
	color: var(--body) !important;
	border: 2px solid var(--input-border) !important;
	border-radius: var(--input-radius) !important;
	font-size: 1em !important;
}
input.field:focus,
#input_search:focus {
	border-color: var(--primary) !important;
}
/* Buttons */
input[type="submit"],
button {
	cursor: pointer;
	background-color: var(--primary) !important;
	color: white !important;
	font-weight: 500;
	font-size: 1em !important;
	font-family: inherit;
	border: none !important;
	border-radius: 999px !important;
	padding: .75em 1.5em !important;
	min-height: auto !important;
	width: 100% !important;
	margin-top: 1em;
	transition: all .2s ease;
}
input[type="submit"]:hover,
button:hover {
	background-color: var(--primary-hover) !important;
}
input[type="submit"]:active,
button:active {
	background-color: var(--primary-active) !important;
}
input[type="submit"]:disabled,
button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}


/* Homepage items order
-----------------------------------------*/
body {
	flex-direction: column;
	display: flex;
}
#wrapper {
	width: 100%;
}
.main-nav { order: 1; }
.profile { order: 2; }
#wrapper { order: 3; }
#social-section { order: 4; margin-top: 4em; }
#custom-footer { order: 5; }
#footer { order: 6; }


/* Nav container
-----------------------------------------*/
nav.main-nav {
	background-color: var(--background); 
	padding-top: 40px;
	text-align: center;
	margin-inline: auto;
	line-height: 2.75;
	padding-top: 40px;
	text-align: center;
}
@media screen and (max-width: 767px) {
  nav.main-nav {
  	line-height: 2.5;
	max-width: 25em;
  }
}


/* Nav links
-----------------------------------------*/
nav.main-nav a {
    font-size: 1em;
    margin: 0 .5em;
	color: var(--body);
}
nav.main-nav a:hover {
	color: white;
}
nav.main-nav a.active {
	color: var(--primary);
}
@media screen and (max-width: 767px) {
  nav.main-nav a:first-of-type {
	margin-left: 0;	
  }
  nav.main-nav a:last-of-type {
	margin-right: 0;	
  }
}
nav.main-nav a.normal {
    display: inline-block;
}
nav.main-nav a:has(i) {
	box-shadow: none !important;
    color: var(--primary);
	font-size: 1.2em;
	position: relative;
	top: 2px;
	left: 0;
	box-shadow: none;
}
nav.main-nav a:has(i):hover {
	color: var(--primary-hover);
}


/* Profile
-----------------------------------------*/
.profile #wrapper {
    padding: 4em 0 0;
}
.profile #avatar {
	width: 104px;
	height: 104px;
	border-radius: 999px;
    box-shadow: 0 0 0 3px var(--primary);
	border: 3px solid var(--background);
	filter: saturate(125%);
}


/* Margin tops for content main wrapper 
-----------------------------------------*/
#wrapper {
	margin-top: 3em;
}
.post {
    margin: 0;
}


/* Footer social media
-----------------------------------------*/
#custom-footer {
	padding-top: 4em;
}
.social-media {
    max-width: 600px;
    margin: auto;
    justify-content: center;
    gap: 1.5em;
    display: flex;
}
.social-media a {
	color: var(--primary);
    font-size: 24px;
}
@media (min-width: 769px) {
    .social-media a {
        font-size: 28px;
    }
}
.social-media a:hover {
	color: var(--primary-hover) !important;
}


/* Borders & Separators
-----------------------------------------*/
span.divider {
	background-color: var(--divider);
}
hr {
	border-color: var(--divider);
}
blockquote {
	border-left-color: var(--divider);
}
#header {
	border-bottom-color: var(--divider);
}
tr > td {
	border-top-color: var(--divider);
}
.post + .post,
article + article {
	border-top: 1px solid var(--divider);
}


/* Theme Toggle
-----------------------------------------*/
/* Desktop: inline in nav */
#theme-toggle {
	position: static;
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	margin-left: 0.5em;
	width: auto !important;
	min-height: auto !important;
	font-size: 1.2em !important;
	cursor: pointer;
	line-height: 1;
	opacity: 1;
	transition: opacity 0.2s ease-in-out;
	vertical-align: middle;
}
#theme-toggle:hover {
	background: none !important;
}
#theme-toggle.fading {
	opacity: 0;
}
/* Mobile: fixed position */
@media screen and (max-width: 767px) {
	#theme-toggle {
		position: fixed;
		top: 1rem;
		right: 1rem;
		font-size: 1.6em !important;
		z-index: 1000;
		margin-left: 0;
	}
}


/* Dark Mode
-----------------------------------------*/
[data-theme="dark"] {
	--primary: #C9634A;
	--primary-hover: #E07A5F;
	--primary-active: #C45A3F;
	--background: #1A1918;
	--headings: #F5F5F4;
	--body: #D6D3D1;
	--secondary: #78716C;
	--input-bg: #252322;
	--input-border: #4A4543;
	--border: #4A4543;
	--divider: #2E2C2A;
}

[data-theme="dark"] #footer a:hover,
[data-theme="dark"] #post-nav a:hover,
[data-theme="dark"] p a:hover {
	color: #FFFFFF;
}

[data-theme="dark"] nav.main-nav a:hover {
	color: #FFFFFF;
}

[data-theme="dark"] .social-media a:hover {
	color: #FFFFFF !important;
}