@import url("https://fonts.googleapis.com/css2?family=Red+Hat+Mono:wght@300;400;700&family=Vollkorn:wght@400;700;900&display=swap");

/* Default variables (optional fallback, but classes will override) */
:root {
    --bg: rgb(250, 249, 247);
    --text: #4a4a4a;
    --hover: #333;
    --border-color: #ccc;
}

/* Light mode variables */
.light-mode {
    --bg: rgb(250, 249, 247);
    --text: #4a4a4a;
    --hover: #333;
}

/* Dark mode variables */
.dark-mode {
    --bg: #121212;
    --text: #e0e0e0;
    --hover: #bbb;
    --border-color: #444;
}

body {
    font-family: "Red Hat Mono", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    padding: 4rem 0;
    margin: 0;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.2s forwards;
    transition:
        background-color 0.3s,
        color 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

h1,
h2,
h3 {
    font-family: "Vollkorn", Georgia, "Times New Roman", Times, serif;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    letter-spacing: 0.02em;
}

h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 2.5rem 0 0.5rem;
}

h3 {
    font-size: 1.2rem;
    font-weight: 550; /* Changed from 300 */
    margin: 1rem 0 0.5rem; /* Maybe slightly less top margin than h2? */
}

p {
    font-size: 1rem;
    margin: 0 0 1rem;
    max-width: 500px;
}

.container {
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.thankyou {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70vh;
}

.section a {
    color: var(--text);
    text-decoration: none;
}

.section a:hover {
    color: var(--hover);
    text-decoration: underline;
}

.top-right {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-right span {
    font-size: 0.8rem;
}

.top-right a,
.top-right .icon-button {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: color 0.3s ease;
}

.top-right a:hover,
.top-right .icon-button:hover {
    color: var(--hover);
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: inherit;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.icon-button:hover {
    color: var(--hover);
}

footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text);
    opacity: 0.7;
    padding: 2rem 0 1rem;
    font-family: "Red Hat Mono", "Helvetica Neue", Arial, sans-serif;
}

/* Contact Page Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    font-family: "Red Hat Mono", "Helvetica Neue", Arial, sans-serif;
}

input,
textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: "Red Hat Mono", "Helvetica Neue", Arial, sans-serif;
    border: 1px solid var(--border-color);
}

.dark-mode input,
.dark-mode textarea {
    background-color: #222; /* Example */
    color: var(--text);
    border: 1px solid var(--border-color);
}

textarea {
    min-height: 150px;
}

button {
    background-color: var(--text);
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    font-family: "Red Hat Mono", "Helvetica Neue", Arial, sans-serif;
    align-self: center;
}

button:hover {
    background-color: var(--hover);
}

/* For the dark mode toggle, keep the background equal to the page background on hover */
.icon-button.dark-toggle:hover {
    background-color: var(--bg) !important;
    color: var(--hover);
}

.container p a {
    /* Target links within paragraphs in the main container */
    color: var(--text); /* Or a specific link color */
    text-decoration: underline;
    transition: color 0.3s ease;
}
.container p a:hover {
    color: var(--hover);
    text-decoration: none; /* Optional: remove underline on hover */
}

/* Additional styling for filter groups, buttons, and excerpts */
.filter-group {
    margin-bottom: 1.5rem;
}
.filter-group h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.filter-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--text);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition:
        background-color 0.3s,
        color 0.3s;
    font-size: 0.9rem;
}
.filter-button:hover {
    background-color: var(--hover);
    color: white;
}

.filter-button.active {
    background-color: var(--hover);
    color: white;
}

.excerpt {
    margin-bottom: 2rem;
    padding: 1.5rem 1rem;
    position: relative;
}

.excerpt::after {
    content: "";
    display: block;
    width: 25%;
    height: 1px;
    background-color: var(--border-color);
    margin-top: 4.5rem;
}

.excerpt h2,
.excerpt h3,
.excerpt p {
    margin: 0.5rem 0 1.1rem;
}
