/* Bulma theme customizations */

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

.titlebox {
    text-align: right;
}

td.label {
    background-color: inherit;
}

.footnote-reference {
    vertical-align: super;
    font-size: xx-small;
}

.caption {
    text-align: center;
    padding-top: 1rem;
}

div.figure > img,
div.figure > a > img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

blockquote {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.25;
    padding: 1.25rem;
    border-left: 5px solid hsl(0, 0%, 86%);
    background-color: hsl(0, 0%, 96%);
}

ul.bricks > li {
    display: inline;
    background-color: hsl(204, 86%, 93%);
    padding: 0.5rem;
    border-radius: 4px;
    line-height: 3;
    white-space: nowrap;
    margin: 0.25rem;
}

pre, pre code {
    white-space: pre;
    word-wrap: normal;
    overflow: auto;
}

/* Navbar customizations */
#blog-title {
    font-weight: bold;
    margin-left: 0.5rem;
}

/* Screen reader only utility (Bulma's .is-sr-only) */
.is-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;
}

/* Footer styling */
.footer {
    background-color: hsl(0, 0%, 96%);
    padding: 3rem 1.5rem;
    margin-top: 3rem;
}

/* Entry title */
.entry-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Entry content spacing */
.entry-content {
    margin-top: 1.5rem;
}

/* Responsive images in content */
.content img {
    max-width: 100%;
    height: auto;
}

/* Headings in content - ensure proper hierarchy */
.content h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.content h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.content h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Lists in content */
.content ul {
    list-style: disc outside;
    margin-left: 2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.content ol {
    list-style: decimal outside;
    margin-left: 2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.content li {
    margin-top: 0.25rem;
}

/* Nested lists */
.content ul ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.content ol ol,
.content ol ul,
.content ul ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Code block styling */
.content pre {
    background-color: hsl(0, 0%, 96%);
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
}

/* Table styling */
.content table {
    width: 100%;
}

/* Post metadata */
.metadata {
    color: hsl(0, 0%, 48%);
    font-size: 0.875rem;
}

.metadata p {
    display: inline;
}

.metadata p:before,
.postlist .listdate:after {
    content: " — ";
}

.metadata p:first-of-type:before {
    content: "";
}

.byline a:not(:last-child):after {
    content: ",";
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: hsl(0, 0%, 96%);
    border-radius: 4px;
    color: hsl(0, 0%, 29%);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
}

.tag:hover {
    background-color: hsl(0, 0%, 86%);
    text-decoration: none;
}

/* Table of contents (generated by reStructuredText) */
.contents {
    background-color: hsl(0, 0%, 98%);
    border: 1px solid hsl(0, 0%, 86%);
    border-radius: 4px;
    padding: 1.5rem;
}

.contents ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.contents ul ul {
    list-style: circle;
    margin-left: 1.5rem;
}

.contents ul ul ul {
    list-style: square;
}

.contents .topic-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.float-md-right {
    float: right;
    max-width: 40%;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

@media screen and (max-width: 768px) {
    .float-md-right {
        float: none;
        max-width: 100%;
        margin-left: 0;
    }
}

/* Alert classes (for compatibility with reStructuredText) */
.alert {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-primary {
    color: hsl(217, 71%, 45%);
    background-color: hsl(204, 86%, 93%);
    border-color: hsl(204, 86%, 80%);
}
