/* Import Google fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono&family=Montserrat&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');



/* Reset default margin and padding */
body, h1, h2, h3, h4, h5, h6, p {
    margin: 0;
    padding: 0;
}

:root,
::backdrop {
    --bg: #f5f5f0; /* Light beige background */
    --accent-bg: #e0d9c8; /* Beige accent background */
    --text: #333333; /* Dark gray text color for readability */
    --text-light: #666666; /* Lighter gray text color for subtle contrast */
    --accent: #8b4513; /* Saddle brown accent color */
    --accent-hover: #5a2d0e; /* Darker shade for accent color on hover */
    --accent-text: #ffffff; /* White text color for accent elements */
    --code: #6a5acd; /* Color for inline code */
    --preformatted: #444444; /* Color for preformatted text */
    --marked: #8b4513; /* Saddle brown color for highlighted text */
    --disabled: #999999; /* Light gray color for disabled elements */
    --mono-font: 'Montserrat', monospace; /* Monospaced font */
    --sans-font: 'Open Sans', sans-serif; /* Sans-serif font */
}

/* Dark theme styles */
.dark-theme {
    --bg: #38374b; /* Dark slate blue background */
    --accent-bg: #282833; /* Darker slate blue accent background */
    --text: #f0f0f0; /* Light gray text color for readability */
    --text-light: #cccccc; /* Lighter gray text color for subtle contrast */
    --accent: #ff7f50; /* Coral accent color */
    --accent-hover: #f0f0f0; /* Darker shade for accent color on hover */
    --accent-text: var(--bg); /* Background color for accent text */
    --code: #6a5acd; /* Color for inline code */
    --preformatted: #ccc; /* Preformatted text color */
    --disabled: #777777; /* Medium gray color for disabled elements */
}


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


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

textarea,
select,
input,
progress {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

html {
    font-family: var(--mono-font);
    scroll-behavior: smooth;
}

body {
    color: var(--text);
    background-color: var(--bg);
    grid-template-columns: 1fr min(45rem, 90%) 1fr;
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.5;
    display: grid;
}

body > * {
    grid-column: 2;
}

body > header {
    background-color: var(--accent-bg);
    border-bottom: 1px solid var(--border);
    text-align: center;
    grid-column: 1 / -1;
    padding: 0 .5rem 2rem;
}

body > header > :only-child {
    margin-block-start: 2rem;
}

body > header h1 {
    max-width: 1200px;
    margin: 1rem auto;
}

body > header p {
    max-width: 40rem;
    margin: 1rem auto;
}

main {
    padding-top: 1.5rem;
}

body > footer {
    color: var(--text-light);
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 2rem 1rem 1.5rem;
    font-size: .9rem;
}

h1 {
    font-size: 3rem;
}

h2 {
    margin-top: 3rem;
    font-size: 2.6rem;
}

h3 {
    margin-top: 3rem;
    font-size: 2rem;
}

h4 {
    font-size: 1.44rem;
}

h5 {
    font-size: 1.15rem;
}

h6 {
    font-size: .96rem;
}

p {
    margin: 1.5rem 0;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

h1,
h2,
h3 {
    line-height: 1.1;
    font-family: var(--sans-font);
}

@media only screen and (width <= 720px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2.1rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    h4 {
        font-size: 1.25rem;
    }
}

a,
a:visited {
    color: var(--accent-hover);
}

a:hover {
    text-decoration: none;
}

button,
.button,
a.button,
input[type=submit],
input[type=reset],
input[type=button],
label[type=button] {
    border: 1px solid var(--accent);
    background-color: var(--accent);
    color: var(--accent-text);
    padding: .5rem 1.2rem;
    line-height: normal;
    text-decoration: none;
}

.button[aria-disabled=true],
input:disabled,
textarea:disabled,
select:disabled,
button[disabled] {
    cursor: not-allowed;
    background-color: var(--disabled);
    border-color: var(--disabled);
    color: var(--text-light);
}

input[type=range] {
    padding: 0;
}

abbr[title] {
    cursor: help;
    text-decoration-line: underline;
    text-decoration-style: dotted;
}

button:enabled:hover,
.button:not([aria-disabled=true]):hover,
input[type=submit]:enabled:hover,
input[type=reset]:enabled:hover,
input[type=button]:enabled:hover,
label[type=button]:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    cursor: pointer;
}

.button:focus-visible,
button:focus-visible:where(:enabled),
input:enabled:focus-visible:where([type=submit],[type=reset],[type=button]) {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

header > nav {
    padding: 1rem 0 0;
    font-size: 1rem;
    line-height: 2;
}

header > nav ul,
header > nav ol {
    flex-flow: wrap;
    place-content: space-around center;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: flex;
}

header > nav ul li,
header > nav ol li {
    display: inline-block;
}

header > nav a,
header > nav a:visited {
    border: 1px solid var(--border);
    border-radius: var(--standard-border-radius);
    color: var(--text);
    margin: 0 .5rem 1rem;
    padding: .1rem 1rem;
    text-decoration: none;
    display: inline-block;
}

header > nav a:hover,
header > nav a.current,
header > nav a[aria-current=page] {
    border-color: var(--accent);
    color: var(--accent);
    cursor: pointer;
}

@media only screen and (width <= 720px) {
    header > nav a {
        border: none;
        padding: 0;
        line-height: 1;
        text-decoration: underline;
    }
}

aside,
details,
pre,
progress {
    background-color: var(--accent-bg);
    border: 1px solid var(--border);
    border-radius: var(--standard-border-radius);
    margin-bottom: 1rem;
}

aside {
    float: right;
    width: 30%;
    margin-inline-start: 15px;
    padding: 0 15px;
    font-size: 1rem;
}

[dir=rtl] aside {
    float: left;
}

@media only screen and (width <= 720px) {
    aside {
        float: none;
        width: 100%;
        margin-inline-start: 0;
    }
}

article,
fieldset,
dialog {
    border: 1px solid var(--border);
    border-radius: var(--standard-border-radius);
    margin-bottom: 1rem;
    padding: 1rem;
}

article h2:first-child,
section h2:first-child {
    margin-top: 1rem;
}

section {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 3rem 0;
    padding: 2rem 1rem;
}

section+section,
section:first-child {
    border-top: 0;
    padding-top: 0;
}

section:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

details {
    padding: .7rem 1rem;
}

summary {
    cursor: pointer;
    word-break: break-all;
    margin: -.7rem -1rem;
    padding: .7rem 1rem;
    font-weight: 700;
}

details[open]>summary+* {
    margin-top: 0;
}

details[open]>summary {
    margin-bottom: .5rem;
}

details[open]>:last-child {
    margin-bottom: 0;
}

table {
    border-collapse: collapse;
    margin: 1.5rem 0;
}

figure>table {
    width: max-content;
}

td,
th {
    border: 1px solid var(--border);
    text-align: start;
    padding: .5rem;
}

th {
    background-color: var(--accent-bg);
    font-weight: 700;
}

tr:nth-child(2n) {
    background-color: var(--accent-bg);
}

table caption {
    margin-bottom: .5rem;
    font-weight: 700;
}



/* Header styles */
.header {
    background-color: var(--accent-bg); /* Header background color */
    color: var(--accent-text);
    padding: 20px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px; 
}

.header-content h1 {
    margin: 0; /* Remove margin from the h1 element */
}

.header-buttons .btn {
    padding: 10px 10px;
    border: none;
    border-radius: 5px;
    background-color: var(--accent-hover); /* Change button background color */
    color: var(--accent-text);
    text-decoration: none;
}

.header-buttons .btn:hover {
    background-color: var(--accent-hover); /* Hover color for buttons */
}
/* Toggle button styles */
.btn-toggle {
    background-color: var(--accent-hover);
    border: none;
    cursor: pointer;
    border-radius: 5em;

}

.toggle-switch {
    width: 40px;
    height: 20px;
    background-color: var(--accent-bg);
    border-radius: 10px;
    position: relative;
    transition: background-color 0.3s ease;
}

.toggle-switch::before {
    content: "";
    width: 15px;
    height: 15px;
    background-color: #ff7f50;
    border-radius: 50%;
    position: absolute;
    top: 80%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.dark-theme .toggle-switch::before {
    transform: translate(calc(100% - 32px), -50%);
}

/* Custom styles for blog post titles */
.blog-post h3 a {
    color: var(--accent); /* Change title color */
    text-decoration: none; /* Remove default underline */
}

.blog-post h3 a:hover {
    text-decoration: underline; /* Add underline on hover */
}
.blog-post small{
    color: var(--text-light);
}
/* Custom styles for categories */
.blog-post small a {
    color: var(--accent-hover); /* Change category color */
    text-decoration: none; /* Remove default underline */
}

.blog-post small a:hover {
    text-decoration: underline; /* Add underline on hover */
}

.blog-post img {
    max-width: 100%;
    height: auto;
    padding: 40px;
}
/* Blog detail page specific styles */
.detail-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}


/* Blog post content container */
.post-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}

/* Post text */
.post-text {
    flex-grow: 1; /* Take up remaining space */
    margin-right: 20px; /* Add space between image and text */
}

/* Post image */
.post-image {
    max-width: 18rem; /* Adjust image width */
    height: auto;

}

.comment-form {
    margin-top: 20px;
}

.comment-section {
    margin-top: 40px;
}

.comment {
    margin-bottom: 20px;
}

.comment-author {
    font-weight: italic;
}

.comment-date {
    font-style: italic;
    color: #999;
}
/* Add styles for the subscription form */
.subscription-form-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    border-radius: 5px;
    background-color: var(--accent-bg);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.subscription-form-container h2 {
    text-align: center;
    color: var("--text");
}

.subscription-form-container p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.subscription-form-group {
    margin-bottom: 20px;
}

.subscription-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.subscription-form-group input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.subscription-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
}

.subscription-btn:hover {
    background-color: #0056b3;
}
.footer {
    background-color: var(--bg); /* Footer background color */
    color: var(--text);
    text-align: center;
    width: 100%;
    border-top:none;
    bottom: 0;
}
