* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Screen reader only - visually hidden but accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    background-color: #4b4b4b;
    color: #000000;
    font-family: Georgia, serif;
    font-size: 20px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1 {
    display: block;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-weight: normal;
    color: #4B4B4B;
    margin: 0;
    font-size: 3em;
}

h2 {
    display: block;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-weight: normal;
    color: #4B4B4B;
    margin: 0;
    font-size: 2.25em;
}

h3 {
    display: block;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-weight: normal;
    color: #4B4B4B;
    margin: 0;
    font-size: 1.74em;
}

h4 {
    display: block;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-weight: normal;
    color: #4B4B4B;
    margin: 0;
    font-size: 1.125em;
}

h5 {
    display: block;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-weight: normal;
    color: #4B4B4B;
    margin: 0;
    font-size: 1em;
}

h6 {
    display: block;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-weight: normal;
    color: #4B4B4B;
    margin: 0;
    font-size: 1em;
}

a {
    transition: color ease 0.3s;
}

a:link {
    color: #a36a00;
}

a:visited {
    color: #7c5200;
}

a:link:hover,
a:visited:hover {
    color: #00bbf2;
}

blockquote {
    border-left: 3px solid #00bbf2;
    color: #4b4b4b;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: 1.125em;
    font-style: italic;
    margin: 0.25em 0;
    line-height: 1.45;
    padding: 0 40px;
    position: relative;
}

blockquote p {
    margin: 0;
    padding: 0.35em 0;
}

blockquote cite {
    color: #4b4b4b;
    display: block;
    font-size: 0.75em;
    font-style: normal;
    margin-top: 5px;
}

blockquote cite:before {
    content: "\2014 \2009";
}

code {
    background: #bfc6c5;
    border-radius: 2px;
    color: #4b4b4b;
    font-family: Consolas, monospace;
    font-size: 0.75em;
    padding: 1px 3px;
    white-space: pre;
}

pre code {
    background: inherit;
}

.header-area {
    background-image: url('images/headerbanner_dark_quarter.png');
    background-repeat: no-repeat;
    background-position: center;
    height: 62px;
    margin: 10px auto;
    width: 260px;
}

.header-area-title {
    display: none;
}

.navigation-area {
    margin: 10px 20px;
}

.menu {
    display: inline-block;
    padding: 0;
    margin: 0;
}

.menu-item {
    display: inline-block;
}

.menu-item-content {
    display: inline-flex;
    align-items: center;
    background-color: inherit;
    color: #fabb45;
    margin: 0;
    padding: 0 8px 0 8px;
    height: 27px;
    text-decoration: none;
    transition: color ease 0.3s;
    transition: background ease 0.3s;
}

.menu-item-content:link,
.menu-item-content:visited {
    color: #fabb45;
}

.menu-item-content:visited:hover,
.menu-item-content:link:hover {
    color: #bfc6c5;
    background: #00bbf2;
}

.CurrentButton,
.CurrentButton:link,
.CurrentButton:visited {
    color: #00bbf2;
}

.header-bar {
    background-color: #ffffff;
    border-color: #00bbf2;
    border-width: 2px;
    border-radius: 6px;
    border-style: solid;
    box-sizing: border-box;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    margin: -20px -20px 10px -20px;
    padding-left: 5px;
}

.header-bar-parent {
    padding: 10px;
    position: relative;
}

/* Accessible colors for menu items on white background */
.header-bar .menu-item-content {
    color: #a36a00;
}

.header-bar .menu-item-content:link,
.header-bar .menu-item-content:visited {
    color: #a36a00;
}

.header-bar .menu-item-content:visited:hover,
.header-bar .menu-item-content:link:hover {
    color: #bfc6c5;
    background: #0080a6;
}

.header-bar .CurrentButton,
.header-bar .CurrentButton:link,
.header-bar .CurrentButton:visited {
    color: #0080a6;
}

.content-area {
    box-sizing: border-box;
    padding: 0 10px;
}

.content-box {
    background-color: #ffffff;
    border-color: #000000;
    border-radius: 18px;
    border-style: solid;
    border-width: 1px;
    padding: 10px 20px 20px 20px;
    margin-bottom: 10px;
}

main {
    margin-bottom: 1rem;
}

article h1 {
    color: #4B4B4B;
    margin-bottom: 1rem;
}

.post-meta {
    display: inline-block;
    margin: 0 0 5px 0;
    font-size: 0.8em;
    color: #0080a6;
}

.post-meta a {
    color: #0080a6;
    text-decoration: none;
}

.post-meta a:hover {
    color: #4B4B4B;
    text-decoration: underline;
}

.post-meta time {
    margin-right: 1rem;
}

.tags {
    display: inline-block;
}

.tags::before {
    content: "Tags: ";
}

.post-content {
    font-size: 1rem;
    overflow-wrap: break-word;
}

.post-content img {
    width: auto;
    max-width: 100%;
}

.post-content h2 {
    color: #4B4B4B;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    color: #4B4B4B;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content code {
    background-color: #bfc6c5;
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
    font-family: Consolas, monospace;
}

.post-content pre {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

.post-content ul, .post-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.post-content blockquote {
    border-left: 3px solid #00bbf2;
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1rem;
    color: #4b4b4b;
}

.blog-intro {
    margin: 0;
}

.blog-intro p {
    font-size: 1.05em;
    line-height: 1.8;
    color: #4b4b4b;
    margin: 0;
}

.posts-list {
    list-style: none;
    padding: 0;
}

.post-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item h2 {
    margin-bottom: 0.5rem;
}

.post-item h2 a {
    color: #4B4B4B;
    text-decoration: none;
}

.post-item h2 a:hover {
    color: #00bbf2;
}

.post-item .post-excerpt {
    color: #666;
    margin-top: 0.5rem;
}

/* Featured Images */
.post-featured-image {
    width: 100%;
    margin-bottom: 1.5rem;
}

.post-featured-image img,
.featured-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Post thumbnail on index page */
.post-thumbnail {
    flex-shrink: 0;
    width: 200px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.post-item-content {
    flex: 1;
}

/* Mobile adjustments for post thumbnails */
@media screen and (max-width: 640px) {
    .post-item {
        flex-direction: column;
    }
    
    .post-thumbnail {
        width: 100%;
        max-height: 300px;
        object-fit: cover;
    }
}

.footer-area {
    color: #bfc6c5;
    font-size: 0.6em;
    text-align: center;
    margin: 20px 0;
}

@media screen and (max-width: 640px) {
    .content-area .content-box .post-content iframe {
        width: 100%;
    }
}

@media screen and (min-width: 450px) {
    .header-area {
        background-image: url('images/headerbanner_dark_half.png');
        height: 98px;
        margin: 10px auto;
        width: 409px;
    }
}

@media screen and (min-width: 950px) {
    body {
        background-color: #ffffff;
        background-image: url('images/DarkBackground.jpg');
        background-position: center top;
        background-repeat: repeat;
    }
    
    .page-area {
        background-clip: padding-box;
        background-color: rgba(0, 0, 0, 0.7);
        border-radius: 25px;
        box-shadow: 0 0 4px 4px rgba(0, 0, 0, 0.7);
        margin: 20px auto;
        max-width: 1600px;
        min-width: 300px;
    }
    
    .header-area {
        background-image: url('images/headerbanner_dark.png');
        height: 196px;
        margin: 10px auto;
        width: 818px;
    }
    
    .content-area {
        display: block;
        width: 100%;
    }
    
    .header-bar {
        border-width: 3px;
        border-radius: 6px;
        box-shadow: 3px 3px 2px 2px rgba(0, 0, 0, 0.3);
        height: 32px;
        margin: -15px -15px 10px -15px;
        padding-left: 36px;
    }
}

/* VibeBlog animated rainbow text */
.vibeblog-animated {
    font-size: 1.7em;
    font-weight: bold;
    display: inline-block;
}

.vibeblog-animated span {
    display: inline-block;
    animation: rainbow-cycle 6s ease-in-out infinite;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}

/* Staggered animation delays for out-of-sync effect */
/* nth-child(1) is the sr-only span, visible letters are nth-child(2) through nth-child(9) */
.vibeblog-animated span:nth-child(2) { animation-delay: 0s; }
.vibeblog-animated span:nth-child(3) { animation-delay: 0.2s; }
.vibeblog-animated span:nth-child(4) { animation-delay: 0.4s; }
.vibeblog-animated span:nth-child(5) { animation-delay: 0.6s; }
.vibeblog-animated span:nth-child(6) { animation-delay: 0.8s; }
.vibeblog-animated span:nth-child(7) { animation-delay: 1s; }
.vibeblog-animated span:nth-child(8) { animation-delay: 1.2s; }
.vibeblog-animated span:nth-child(9) { animation-delay: 1.4s; }

@keyframes rainbow-cycle {
    0% { color: #c98700; } /* Darker orange for contrast */
    14% { color: #a67300; } /* Even darker orange */
    28% { color: #b38100; } /* Medium dark orange */
    42% { color: #0080a6; } /* Dark blue - good contrast */
    56% { color: #006b8f; } /* Darker blue */
    70% { color: #0090b8; } /* Medium blue */
    84% { color: #3a3a3a; } /* Dark gray - good contrast */
    100% { color: #c98700; } /* Darker orange - loop back */
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: 1em;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pagination-page,
.pagination-prev,
.pagination-next {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    color: #a36a00;
    border: 1px solid #a36a00;
    transition: background ease 0.3s, color ease 0.3s;
}

.pagination-page:hover,
.pagination-prev:hover,
.pagination-next:hover {
    background-color: #0080a6;
    border-color: #0080a6;
    color: #ffffff;
}

.pagination-current {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background-color: #4b4b4b;
    color: #ffffff;
    border: 1px solid #4b4b4b;
    font-weight: bold;
}

.page-indicator {
    font-size: 0.95em;
    color: #4b4b4b;
    margin: 0 0 1rem 0;
    padding: 0.4rem 0.7rem;
    background-color: #f0f0f0;
    border-left: 4px solid #0080a6;
    border-radius: 0 4px 4px 0;
    display: inline-block;
}


@media (prefers-reduced-motion: reduce) {
    .vibeblog-animated span {
        animation: none;
        color: #4b4b4b;
    }
}

/* Search button in nav */
button.menu-item-content {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

/* Search Modal */
.search-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal[hidden] {
    display: none;
}

.search-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.search-modal-content {
    position: relative;
    z-index: 1001;
    background: #ffffff;
    border-radius: 12px;
    width: 92vw;
    max-width: 820px;
    height: 82vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.search-modal-close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #4b4b4b;
    z-index: 1;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}

.search-modal-close:hover {
    background: #f0f0f0;
}

.search-modal-close:focus {
    outline: 2px solid #0080a6;
    outline-offset: 2px;
}

.search-iframe {
    flex: 1;
    width: 100%;
    border: none;
    margin-top: 36px;
}
