:root {
	--text: rgb(254, 255, 193);
	--border: #281d3c;
	--accent: #b4d110;
	--bg: #221f26;
	--box: #1d1b20;
	--gradientBottom: #706288;
	--gradientTop: #706288;
	--container: #514663;
	--link_grad: #827b97;
	--line: #877db6;
	--image_border: #614fb1;
	--button-bg: #706288;
    --button-text: rgb(255, 255, 255);
	--button-border: rgb(65, 0, 163);
	--code: #dee966;
	--code-background: #625274;
	--code-border: #614fb1;
	a:link { color: rgb(213, 212, 162); }
}

/* Dark Mode */
.dark-mode {
	--text: rgb(253, 254, 203);
	--border: #43048f;
	--accent: #c0d73a;
	--bg: #362d42;
	--box: #1d1b20;
	--gradientBottom: #14101b;
	--gradientTop: #14101b;
	--container: #11042a;
	--link_grad: #636832;
	--line: #542fb3;
	--image_border: #542fb3;
	--button-bg: rgba(143, 164, 0, 0.425);
    --button-text: white;
	--button-border: rgb(65, 0, 163);
	--code: #dee77d;
	--code-background: #1d1b1f;
	--code-border: #43048f;
	a:link { color: rgb(213, 212, 162); }
}

header {
	background: url('***dark mode banner image***');
}

* { 
	box-sizing: border-box;
}

@supports (height: 100dvh) {
	body {
	  min-height: 100dvh; /* Uses dynamic viewport height */
	}
}

#theme-toggle {
    display: block;
    margin: 10px auto; /* Centers horizontally */
	font-size: 1rem;
}

button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 1px solid var(--button-border);
    padding: 3px 5px;
	margin-top: 10px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.container {
	max-width: 75rem;
	margin: 5vw auto 12px auto;
	border: 6px ridge var(--border);
	outline: 3px solid var(--gradientTop);
	outline-offset: 4px;
	border-radius: 10px;
	display: flex;
	flex-wrap: wrap;
	padding: 5px;
	gap: 5px;
	overflow: visible;
	position: relative;
	background-color: var(--container);
}

/* these control the column widths */
.small { flex: 0 0 160px; }
.large { flex: 1 1 82%; }
.full { flex: 1 1 100%; }
.half { flex: 1 1 49%; }

.posts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
	border: none; /* Ensure no border is applied */
    outline: none; /* Prevent accidental outlines */
    box-shadow: none; /* Remove any shadow effects */
}

.column {
    flex: 1;
    min-width: 300px; /* Ensures responsiveness */
}

hr {
    margin: 2em 0;  /* 2em top & bottom, 0 left & right */
	height: 3px;        /* Line thickness */
	/* background-color: #97a100; */
	border-top: 3px solid var(--line);
	border-bottom: none;
}

/* Remove expand icons */
.image-link-expand {
    display: none !important;
}

/* For images without captions */
.captioned-image-container img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
	border: 4px solid var(--image_border);
	padding: 0px;
    margin-top: 25px; /* Adjust as needed */
    margin-bottom: 0px; /* 40px below the image if there's no caption */
}

.frontend-components-ImageGallery-module__image--g2yvp {
    border: 4px solid var(--image_border);
	padding: 0px;
}

/* For images with captions */
.captioned-image-container figure figcaption {
    margin-top: 10px;  /* 10px between the image and the caption */
    margin-bottom: 20px; /* 30px between the caption and the text */
    text-align: center;  /* Centers the caption text */
}

.captioned-image-container figure {
    margin-bottom: 30px; /* 30px between the caption and text (after figure) */
}

/* Adjusting only when the image has a caption */
.captioned-image-container figure:not(:has(figcaption)) img {
    margin-bottom: 20px;  /* Applies 40px margin when there is no caption */
}

.footnote-anchor {
    color: #a6e70f !important; /* Added !important to override other link styles */
    font-size: 0.8em; /* Adjust size as needed */
    vertical-align: super; /* Ensures the superscript effect */
	margin-left: 0.2em; /* Adds space before the reference */
    margin-right: 0.2em; /* Adds space after the reference */
}

.small img {
    max-width: 104%;
    height: auto;
    display: block;
    margin: 0px auto;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a img {
    width: 24px;
    height: 24px;
    transition: opacity 0.3s ease;
}

.social-icons a img:hover {
    opacity: 0.7;
}



html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: auto; /* Changed from hidden to auto */
}

body {
    font-family: 'MS PGothic', sans-serif;
    color: var(--text);
    background: #3f3554 url('/assets/bg8_3.webp') no-repeat center center fixed;
    background-size: cover;
    padding: 10px;
    min-height: 100vh;
    overflow-x: hidden; /* Keep this to prevent horizontal scrolling */
	font-size: 18px;
}

.dark-mode body {
    font-family: 'MS PGothic', sans-serif;
    color: var(--text);
    background: #3f3554 url('/assets/bg8_2.webp') no-repeat center center fixed;
    background-size: cover;
    padding: 10px;
    min-height: 100vh;
    overflow-x: hidden; /* Keep this to prevent horizontal scrolling */
	font-size: 18px;
}

pre {
	white-space: pre-wrap; /* Ensures text wraps instead of overflowing */
    word-wrap: break-word; /* Breaks long words to fit within the container */
    overflow-wrap: break-word; /* Additional compatibility for word breaking */
    max-width: 100%; /* Prevents exceeding the container width */
    background-color: var(--code-background); /* Light gray background */
    border: 1px solid var(--code-border); /* Subtle frame */
    padding: 10px; /* Adds spacing inside the box */
    border-radius: 5px; /* Slightly rounded corners */
    overflow-x: auto; /* Enables horizontal scrolling if needed */
    max-width: 100%; /* Ensures it fits within the container */
}

code {
    font-family: monospace; /* Ensures a code-friendly font */
    color: var(--code); /* Darker text for readability */
}


header {
	background-size: cover;
	background-position: center;
	width: 100%;
	height: 120px;
	border: 2px ridge var(--border);
	border-radius: 5px;
	position: relative;
	display: flex;
    align-items: center;
    padding: 10px;
    gap: 15px;
}
.header-image {
    width: 100px; /* Adjust size */
    height: 100px;
    object-fit: cover;
    border: 4px solid #333; /* Frame effect */
    border-radius: 10px; /* Optional rounded corners */
    margin-left: 2px; /* Moves image away from the left frame */
}

header span {
	font-size: 2.5rem;
	position: absolute;
	bottom: 0;
	right: 10px;
	margin: 10px;
	font-weight: bold;
}


nav {
	border: 2px ridge var(--border);
	border-radius: 5px;
	padding: 5px;
	background: linear-gradient(var(--gradientTop),var(--gradientBottom));
}
nav div {
	text-align: center;
	font-size: 1.25rem;
	margin: 5px 5px 10px 5px;
}
nav a {
	display: block;
	margin: 5px;
	background: linear-gradient(to right,var(--link_grad),var(--gradientBottom));
	border-radius: 5px;
	padding: 2px 7px;
	text-decoration: none;
}
nav a:link, nav a:visited { 
	color: var(--text);
}
nav a:hover, nav a:focus {
	background: linear-gradient(to right,var(--link_grad), var(--gradientBottom), var(--gradientTop));
}

/* optional button styling like in the preview */
div.small > img {
	display: block;
	margin: 5px auto;
	border:2px ridge var(--border);
	border-radius: 5px;
}

section {
	border: 2px ridge var(--border);
	border-radius: 5px;
	background: linear-gradient(var(--gradientTop),var(--gradientBottom));
	padding: 5px;
}


footer {
	text-align: center;
	margin-bottom: 5vw;
	font-size: 0.8rem;
}
footer a { 
	text-decoration: none;
}


h1, h2, h3, h4, h5, h6, p  { 
	margin: 5px;
	line-height: 1.2;
}
h1 { 
	font-size: 2rem;
	letter-spacing: 2px;
	font-weight: bold;
	text-align: center;
	/* border-bottom: 2px ridge var(--border); */
	padding-bottom: 5px;
}
h2 { 
	font-size: 1.4rem;
	font-weight: normal;
	text-align: center;
	margin-top: 10px;
    margin-bottom: 10px;
}
h3 { 
	font-size: 1.4rem;
	margin-top: 10px;
    margin-bottom: 10px;
}
h4 { 
	font-size: 1.3rem;
	padding-left: 12px;
	margin-top: 10px;
    margin-bottom: 10px;
}

p  { 
	margin: 5px;
	line-height: 1.2;
	margin-bottom: 1.2em;
}

/* prevents overflow on smaller screens */
img { max-width: 100%; }
pre { overflow-x: auto; }


a:hover, a:focus {
	font-style: italic;
}
a:visited {
	color: var(--accent);
}

.container::before {
    content: "";
    position: absolute;
    top: -60px;
    left: -178px;
    width: 300px;
    height: 100%;
    background: url('/assets/side6.png') no-repeat left bottom;
    background-size: contain;
	z-index: 1;
	transform: rotate(38deg);
    pointer-events: none;
    transform-origin: left bottom;
}

.container::after {
    content: "";
    position: absolute;
    top: -70px;
    right: 75px;
    width: 1500px;
    height: 500px; /* Set a fixed height */
    background: url('/assets/side0.png') no-repeat right top;
    background-size: contain;
    transform: scaleX(-1);
    z-index: 1;
    pointer-events: none;
    transform-origin: right top;
}
  
.decoration-3 {
	/* New decoration with different positioning */
	position: absolute;
	pointer-events: none;
	z-index: 1;
	background-size: contain;
	background-repeat: no-repeat;
	bottom: 0;
	right: 0;
	width: 710px;
	height: 892px;
	background-image: url('/assets/vest_bg2.png');
	/* Add any other transforms/positioning you need */
  }