/* Root Variables */
:root {
    --primary-bg: #fff;
    --primary-text: #353d49;
    --secondary-text: #252627;
    --link-color: #879094;
    --shadow-color: rgba(0, 0, 0, 0.15);
}

/* Font Faces */
@font-face {
    font-family: 'OpenSauceOne';
    src: url('/fonts/OpenSauceOne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'OpenSauceOne';
    src: url('/fonts/OpenSauceOne-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* Base Elements Styles */
html {
    background-color: var(--primary-bg);
}

body {
    font-family: 'OpenSauceOne', sans-serif;
    color: var(--secondary-text);
    min-height: 100vh;
    margin: 0 auto;
    line-height: 1.6;
}

a, a:visited {
    color: var(--link-color);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: var(--primary-text);
}

details {
    padding: 0.5rem 0;
}

ul {
    padding: 0;
}

img {
    max-width: 100%;
}

figure {
    display: flex;
    justify-content: center;
    align-items: center;
}

figcaption {
    text-align: center;
    font-size: 0.9rem;
}

/* Navigation Styles */
nav ul {
    display: flex;
    margin: 0.5rem 0;
    padding: 0;
}

nav ul li {
    display: inline;
    list-style: none;
    margin: 0.5rem;
}

nav a {
    text-decoration: none;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
}

header .logo img {
    height: 50px;
}

/* Hero Section Styles */
.hero {
    background-size: cover;
    min-height: 30vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero div {
    padding: 0 1rem;
}

.hero h1, .hero p, .hero .subtitle {
    margin: 0;
}

.hero h1 {
    font-size: 2rem;
    color: var(--primary-text);
}

/* Search Styles */

.hero .search form {
    padding: 2rem;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.form-inline input[type="text"] {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid var(--primary-bg); 
    border-radius: 4px;
    outline: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-inline input[type="text"]:focus {
    border-color: var(--shadow-color);
}

.form-inline button {
    min-height: 34px;
    padding: 8px 16px;
    background-color: var(--link-color);
    color: var(--primary-bg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-inline button:hover {
    background-color: var(--link-color);
}

ul.search-results {
    list-style-type: none;
}

ul.search-results li {
    padding: 0.5rem 1rem;
}

ul.search-results li a {
    font-weight: bold;
}

/* Blog Cards Styles */
.blog-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 3rem;
    padding: 20px;
}

.card {
    background-color: transparent;
    border-color: var(--secondary-text);
    border-style: solid;
    overflow: hidden;
    border-width: 0.5px;
}

.card h2 {
	margin-bottom: 5px;
}
.card h3 {
	margin-top: 0px;
}

.card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.card .text {
    padding: 0 1rem;
}

.card .text .small {
    font-size: 0.9rem;
}

.card .text .author {
    font-size: 0.9rem;
    font-style: italic;
    text-align: right;
}

.card a {
    color: var(--primary-text);
}

/* Post Styles */
.post {
    padding: 0 1rem;
}

.post ul {
    padding-left: 2rem;
}

.post .author {
	text-align: right;
	font-style: italic;
}

.aff {
    max-width: 80%;
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
    margin: 0 auto;
    padding-top: 4rem;
}

/* Footer Styles */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    color: var(--primary-text);
    font-size: 0.8rem;
}

footer div {
    min-width: 5rem;
}

footer .social-media a, footer .social-media a svg {
    color: var(--link-color);
    fill: currentColor;
}

footer .social-media a img {
    height: 20px;
}

footer .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer .logo img {
    height: 50px;
}

footer .logo p {
    margin: 5px 0 0;
    font-size: 0.8rem;
}

/* Pagination Styles */
.pagination {
    min-width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 1rem;
}

.pagination .pages {
    a {
        padding: 0 1rem;
    }
}

/* Markdown Styles */

.post h2 {
    margin-top: 3rem;
}

/* Responsive Styles */
@media (max-width: 600px) {
    footer {
        flex-direction: column;
        text-align: center;
    }

    .blog-cards {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) {
    .hero {
        min-height: 300px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    main {
        max-width: 1200px;
        margin: 3rem auto;
    }

    .post {
        padding: 0 5rem;
    }

    nav ul {
        padding: 0 !important;
    }

    nav ul li {
        margin-left: 1rem;
    }
}

/* Base style for code blocks */
pre {
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    border-radius: 8px;
    overflow-x: auto;
}

pre {
    padding: 1em;
    line-height: 1.4;
    margin-bottom: 20px;
}

code {
    padding: 0.2em 0.4em;
}

pre {
    transition: all 0.3s ease-in-out;
}
