:root {
    /* Lazy Days palette */
    /* #97B3AE, #D2E0D3, #F0DDD6, #F2C3B9, #D6CBBF, #F0EEEA */
    --bg: #D6CBBF;
    /* brown/taupe background */
    --text: #1f3d2e;
    /* deep green text */
    --accent: #D2E0D3;
    /* sage green primary */
    --ring: #97B3AE;
    /* muted teal outline */
    --border: #D6CBBF;
    /* warm taupe border */
    --peach: #F0DDD6;
    /* pink highlight */
    --salmon: #F2C3B9;
    /* pink highlight */
    --paper: #EDE8E0;
    /* darker beige for cards */
}

/* Alternative greenish palettes for the theme toggle */
.theme-seafoam {
    --bg1: #e6fff4;
    --bg2: #e9fbff;
    --bg3: #f3fff9;
    --text: #124d42;
    --accent: #b9fbc0;
    --ring: #7bd389;
}

.theme-olive {
    --bg1: #eef5e6;
    --bg2: #f2f7ea;
    --bg3: #f7fbef;
    --text: #2d3b2f;
    --accent: #cde6b8;
    --ring: #94d08a;
}

html,
body {
    height: 100%;
}

html {
    background: var(--bg);
    background-color: var(--bg);
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    font-family: Tahoma, Geneva, sans-serif;
    color: var(--text);
    background: var(--bg);
    background-color: var(--bg);
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

/* 3D canvas as background */
#bg3d {
    position: fixed;
    inset: 0;
    z-index: 0;
    /* ensure above page background */
    pointer-events: none;
}

/* subtle frost for readability */
.frost {
    display: none;
    /* ensure solid background shows */
}

.container {
    max-width: 700px;
    margin-inline: auto;
    padding: 20px;
    position: relative;
    /* ensure content sits above canvas */
    z-index: 1;
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    nav {
        display: flex;
        gap: 12px;
    }

    nav a {
        margin-left: 0;
    }
}

nav a {
    text-decoration: none;
    color: var(--text);
    opacity: .8;
    margin-left: 14px
}

nav a:hover {
    opacity: 1
}

.site-title {
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
    color: var(--text)
}

.btn {
    border: none;
    border-radius: 16px;
    padding: 10px 16px;
    cursor: pointer;
    background: var(--accent);
    color: var(--text);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
    outline: 2px solid var(--ring);
    font-weight: 700;
}

.btn-secondary {
    background: var(--peach);
    outline: 2px solid var(--ring);
}

.cta-row {
    margin-top: 16px
}

/* Typography: consistent, blog-style scale */
h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.05;
    margin: 20px 0 10px
}

h2 {
    font-size: clamp(1.6rem, 3.2vw, 2.0rem);
    line-height: 1.15;
    margin: 0 0 12px;
    color: var(--text);
}

p,
li {
    font-size: 1rem;
    line-height: 1.7;
}

.lead {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    opacity: .95;
    max-width: 62ch;
}

.row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Vertical blog list */
.post-list {
    display: grid;
    gap: 16px;
}

.post-item .post-meta {
    font-size: .85rem;
    opacity: .75;
    margin-bottom: 6px;
    text-align: left;
}

.post-item .read-more {
    margin-top: 8px;
    display: inline-block;
    text-decoration: none;
    color: var(--text);
    opacity: .9;
}

.post-item .read-more:hover {
    opacity: 1;
}

/* Flatten link appearance on cards */
.post-item {
    text-decoration: none;
    color: var(--text);
}

.post-item:visited {
    color: var(--text);
    background: rgba(237, 232, 224, 0.85) !important;
    background-color: rgba(237, 232, 224, 0.85) !important;
}

.post-item:hover {
    text-decoration: none;
}

.post-item .card-title {
    color: var(--text);
}

@media(min-width:720px) {
    .row {
        grid-template-columns: repeat(2, 1fr)
    }
}

.card,
a.card,
.card.post-item,
.post-item.card {
    background: rgba(237, 232, 224, 0.85) !important;
    background-color: rgba(237, 232, 224, 0.85) !important;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--accent);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    transition: none;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.card:hover {
    transform: none
}

.card-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 6px
}

.tag {
    display: inline-block;
    font-size: .8rem;
    margin-bottom: 6px;
    background: var(--accent);
    color: var(--text);
    padding: 2px 8px;
    border-radius: 6px;
}

.section {
    padding: 34px 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.contact-form {
    display: grid;
    gap: 10px;
    max-width: 680px
}

.contact-form .card {
    outline-offset: 2px;
    padding: 12px
}

.contact-form .btn {
    justify-self: start
}

footer {
    opacity: .85;
    padding: 40px 0;
    font-size: .95rem
}

/* Prose styles for markdown content */
.prose {
    line-height: 1.75;
    max-width: 100%;
    width: 100%;
}

.prose h1,
.prose h2,
.prose h3 {
    margin: 0 0 12px;
}

.prose h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    color: var(--text);
}

.prose h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: var(--text);
}

.prose h3 {
    font-size: clamp(1.2rem, 2.4vw, 1.4rem)
}

.prose p {
    margin: 0 0 12px
}

.prose ul {
    padding-left: 20px;
    margin: 0 0 12px
}

.prose li {
    margin: 4px 0
}

.prose code {
    background: var(--accent);
    padding: 0 4px;
    border-radius: 4px;
}

.prose pre {
    background: var(--accent);
    padding: 12px;
    border-radius: 10px;
    overflow: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.prose pre code {
    background: transparent;
    padding: 0;
}

/* Post/Experience view: smaller, uniform text; title only slightly larger */
#postView,
#experienceView {
    max-width: 100%;
    width: 100%;
}

#postView .prose,
#experienceView .prose {
    font-size: .95rem;
    line-height: 1.7;
    max-width: 100%;
    width: 100%;
}

#postView .prose h1,
#experienceView .prose h1 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

#postView .prose h2,
#postView .prose h3,
#postView .prose h4,
#postView .prose h5,
#postView .prose h6,
#experienceView .prose h2,
#experienceView .prose h3,
#experienceView .prose h4,
#experienceView .prose h5,
#experienceView .prose h6 {
    font-size: .95rem;
    margin-bottom: 8px;
}

#postView .prose p,
#postView .prose li,
#experienceView .prose p,
#experienceView .prose li {
    font-size: .95rem;
}

/* Back link styling */
.post-nav {
    margin-bottom: 10px;
}

.back-link {
    text-decoration: none;
    color: var(--text);
    opacity: .85;
}

.back-link:hover {
    opacity: 1;
}