/* Shared typography and sizing: matches the homepage. */
*,
*::before,
*::after {
    box-sizing: border-box;
}
a:link{
    text-decoration-line: none;
}
h1 {
    font-family: "Garamond", "Times New Roman", serif;
    font-size: 40px;
}
h2 {
    font-family: "Garamond", "Times New Roman", serif;
    font-size: 30px;
}
h3 {
    font-family: "Garamond", "Times New Roman", serif;
    font-size: 30px;
    margin-bottom: 5px;
}
p{
    font-family: "Helvetica", sans-serif;
    font-size: 20px;
    margin-top: 0px;
}
ul {
    font-family: "Helvetica", sans-serif;
    font-size: 20px;
    margin-top: 0px;
    line-height: 1.1;
}
ul li {
    margin-bottom: 20px;
}
body{
	margin: 0;
}

/*** COLORS ***/
:root {
    --background: #FAF8F3;
    --header-background: #E3EEEB;
    --card-background: #FFFFFF;

    --ink: #000;
    --muted: #52645E;
    --accent: #235F53;
    --accent-hover: #163F37;
    --rule: #CBD8D2;
}
body {
    background: var(--background);
    color: var(--ink);
}

.grid-header,
.grid-footer {
    background: var(--header-background);
}

.grid-middle {
    background: var(--background);
}

a,
.footer-link {
    color: var(--accent);
}

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

.entry {
    background: var(--card-background);
    border: 1px solid var(--rule);
}

 
/* Full-width sections with shared responsive side padding. */
.grid-container {
    --page-padding: clamp(1rem, 8vw, 10rem);
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "grid-header"
        "grid-middle"
        "grid-footer";
}

.grid-container > * {
    min-width: 0;
    padding-inline: var(--page-padding);
}

/* Match the homepage's 350px + 350px columns and 1.5rem gap. */
.grid-header {
    grid-area: grid-header;
    display: grid;
    grid-template-columns: minmax(0, calc(700px + 1.5rem));
    grid-template-areas: "navbar";
    justify-content: center;
    align-items: center;
    padding-bottom: 1em;
    text-align: center;
    line-height: 1.5;
}

.grid-middle {
    grid-area: grid-middle;
    padding-bottom: 2em;
    line-height: 1.15;
    text-align: left;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .grid-header {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Navigation */

.navbar {
    grid-area: navbar;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0 0.5rem;
    flex-wrap: wrap;
}
.navbar h1 {
	margin: 0;
	padding:0;
}
/* Arrange the navigation buttons. */
.navbar nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar nav li {
    margin: 0;
    padding: 0;
}

/* Default button appearance */
.navbar nav a {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--accent, #235F53);
    border-radius: 999px;

    font: 600 1rem/1.4 system-ui, sans-serif;
    color: var(--accent, #235F53);
    text-decoration: none;
}

/* Hovered button */
.navbar nav a:hover {
    background: var(--accent-hover, #163F37);
    border-color: var(--accent-hover, #163F37);
    color: white;
}

/* Current page */
.navbar nav a[aria-current] {
    background: var(--accent, #235F53);
    color: white;
}

/* Visible keyboard focus */
.navbar nav a:focus-visible {
    outline: 3px solid var(--accent, #235F53);
    outline-offset: 3px;
}


/* Footer */

.grid-footer {
    grid-area: grid-footer;
    text-align: center;
	padding-top: 2em;
}
.grid-footer p {
	font-family: "Garamond", "Times New Roman", serif;
}	
.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    color: black;
}

.footer-link img {
    display: block;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.footer-link:hover {
    text-decoration: underline;
}
.instagram-icon img {
    filter: brightness(100) invert(1);
}


/* Blog cards and post content */

/* Arrange cards in columns when space permits. */
section[aria-label="Blog posts"] {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

/* Individual cards */
/* Cards without a thumbnail use the full width for text. */
.entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    min-width: 0;
    padding: 1.25rem;
    background: var(--card-background);
    border: 1px solid var(--rule);
    border-radius: 6px;
    overflow-wrap: anywhere;
}

/* Reserve a left column only when a thumbnail is present.
   Its width scales with the card, up to 120px. */
.entry.entry-with-thumbnail {
    grid-template-columns: min(30%, 120px) minmax(0, 1fr);
    gap: 1rem;
}

/* Keep thumbnails square and crop without distortion. */
.entry-thumbnail {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
}

/* Allow the text column to shrink and wrap properly. */
.entry-content {
    min-width: 0;
}

/* Reduce padding and spacing on small screens.
   The thumbnail remains to the left of the text. */
@media (max-width: 700px) {
    .entry {
        padding: 1rem;
    }

    .entry.entry-with-thumbnail {
        gap: 0.75rem;
    }
}
.entry time {
    display: block;
    margin: 0.75rem 0 0;
    color: var(--muted, #435c59);
}

.entry h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 400;
}

.entry h2 a {
    color: var(--ink, #252b2b);
    text-decoration: none;
}

.entry h2 a:hover {
    text-decoration: underline;
}

.entry p {
    margin: 0;
    color: var(--muted, #435c59);
    font-size: 1rem;
    line-height: 1.5;
}

/** BLOG POSTS - INDIVIDUAL POST - SELECTED !== NULL */



/* ========================================
   INTRODUCTION AND POST HEADERS
   ======================================== */

.intro,
.post-header {
    padding: 4rem 0 2.5rem;
}


/* ========================================
   DATES AND SMALL LABELS
   Fallback colors apply when custom properties
   such as --muted have not been defined.
   ======================================== */

.eyebrow,
time {
    font: 0.8rem/1.5 system-ui, sans-serif;
    color: var(--muted, #435c59);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.intro > p:last-child {
    color: var(--muted, #435c59);
}


/* ========================================
   POST BODY
   Limit line length and wrap long text.
   min-width: 0 permits shrinking when this
   element is a grid or flex item.
   ======================================== */

.prose {
    min-width: 0;
    max-width: 72ch;
    overflow-wrap: anywhere;
}

.prose h2 {
    margin-top: 2.5rem;
}

.prose img {
    max-width: 100%;
    height: auto;
}

.prose blockquote {
    margin: 1.5rem 0;
    border-left: 3px solid var(--accent, #245c50);
    padding-left: 1.5rem;
    color: var(--muted, #435c59);
}


/* ========================================
   CODE
   Keep wide code blocks scrollable.
   Set explicit text and background colors.
   ======================================== */

.prose pre {
    max-width: 100%;
    overflow: auto;
    padding: 1rem;
    background: #eeefea;
    color: #252b2b;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Slightly reduce inline code. */
.prose code {
    font-size: 0.9em;
}

/* Use the preformatted block's font size
   without applying a second reduction. */
.prose pre code {
    font-size: inherit;
}


/* ========================================
   TABLES
   Allow wide tables to scroll within the post.
   ======================================== */

.prose table {
    display: block;
    max-width: 100%;
    overflow: auto;
    border-collapse: collapse;
}

.prose th,
.prose td {
    border: 1px solid var(--rule, #7baaaa);
    padding: 0.4rem 0.75rem;
}


/* ========================================
   BACK LINK
   ======================================== */

.back {
    margin-top: 3rem;
}


/* ========================================
   SMALL SCREENS
   Reduce large vertical gaps and quotation
   indentation when space is limited.
   ======================================== */

@media (max-width: 700px) {
    .intro,
    .post-header {
        padding: 2rem 0 1.5rem;
    }

    .prose blockquote {
        padding-left: 1rem;
    }
}
