@charset "UTF-8";

/**************/
/* Base style */
/**************/

html {
    --glow-color: rgba(255, 239, 0, 0.8);
    --text-color: #111;
    --small-color: #5a5a5a;
    --note-color: #048c00;
    --background-color: #ffffff;
    --link-color: #0000f0;
    --link-interact-color: #000080;
    --code-background-color: #f3f3f3;
    --code-border-color: #606060;

    font-size: 21px;
    font-family: serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

a:link,
a:visited {
    color: var(--link-color);
    text-decoration: underline;
}

a:hover,
a:active {
    color: var(--link-interact-color);
}

a:hover {
    text-decoration: underline solid;
}

body {
    /* Center primary content */
    width: 87.5%;
    margin-left: auto;
    margin-right: auto;
    max-width: 750px;
    text-align: justify;

    /* Create space after hazard banner */
    padding-top: 50px;
}

.post-title {
    margin-bottom: 0em;
    font-size: 2em;
    border-bottom: none !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-align: left;
    text-rendering: optimizeLegibility;
    font-weight: normal;
}

article h1 {
    border-bottom: 1px solid;
}

hr {
    height: 1px;
    border: 0px;
    border-top: 1px solid var(--text-color);
    margin: 1em 0;
    padding: 0;
}

img {
    max-width: 100%;
    width: 70%;
    margin: auto;
    display: block;
}

.small-figure {
    max-width: 400px;
}

small {
    color: var(--small-color);
}

/* Archive links */
.archive-link {
    display: inline-block;
    margin-left: 5px;
    position: relative;
    text-decoration: none !important;
}

.archive-link::after {
    content: "💾";
    font-size: 0.9em;
}

/* Hazard banner */

.hazard-banner {
    height: 50px;
    width: 100%;
    background: repeating-linear-gradient(45deg, #ffd700 0px, #ffd700 20px, #000000 20px, #000000 40px);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hazard-text {
    text-align: center;
    background-color: #fff;
    color: #000;
    padding: 5px 10px;
    width: 100%;
    font-size: 13px;
}

/* Footer stuff */

footer {
    --1: 1px;
    --2: 1.3px;
    --3: 1.8px;
    --4: 2.5px;
    --5: 3.3px;
    --6: 4.5px;
    --7: 6px;
    --8: 8.2px;
    --9: 11px;
    --10: 14.9px;
    --11: 20.1px;
    --12: 27px;
    --13: 40.4px;
    --14: 54.6px;
    --15: 150px;
}

.black-box {
    width: 100%;
    background-color: var(--text-color);
}

.white-box {
    width: 100%;
    background-color: var(--background-color);
}

@media (max-width: 600px) {
    img {
        max-width: 100%;
    }

    body {
        text-align: left;
    }
}

/***************/
/* Dated table */
/***************/

/* Styles for HTML tables with a relatively narrow first column of dates
   and a second column of arbitrary information. */

.dated-table {
    width: 100%;
    text-align: left;
    border-collapse: separate;
    border-spacing: 0;
    container-type: inline-size; /* Enable container queries */
}

.dated-table tr {
    display: flex;
    flex-wrap: nowrap; /* Prevent individual wrapping */
    align-items: flex-start;
    margin-bottom: 1em;
}

.dated-table td:first-child {
    flex: 0 0 auto;
    padding-right: 15px;
    min-width: 140px;
}

.dated-table td:last-child {
    flex: 1 1 auto;
    min-width: 0; /* Allow text to shrink */
}

/* Container query -- when table gets too narrow, switch all entries to stacked layout */
@container (max-width: 600px) {
    .dated-table tr {
        flex-direction: column;
    }

    .dated-table td:first-child {
        padding-right: 0;
        min-width: unset;
    }
}

/* Fallback for browsers that don't support container queries */
@media screen and (max-width: 600px) {
    .dated-table tr {
        flex-direction: column;
    }

    .dated-table td:first-child {
        padding-right: 0;
        padding-bottom: 5px;
        min-width: unset;
    }
}

@media (max-width: 600px) {
    table {
        border-top: 1px solid var(--text-color);
    }

    .dated-table tr {
        border-bottom: 1px solid var(--text-color);
        padding-top: 0.5em;
        padding-bottom: 0.5em;
        margin-bottom: 0em;
    }
}

/************/
/* Masthead */
/************/

.masthead {
    margin-top: 30px;
    max-width: 240px;
}

/*****************/
/* About section */
/*****************/

.index-about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0px;
    text-align: left;
}

.index-about-text {
    flex: 3 1 80%;
}

.index-about-links {
    flex: 1 1 20%;
}

/********/
/* Code */
/********/

/* Code blocks. */
pre {
    background-color: var(--code-background-color);
    border-color: var(--code-border-color);
    overflow: scroll;
    padding: 0.5em;
    border-style: solid;
    border-width: 0.12em 0em;
    line-height: 0.85em;
}

code {
    font-size: 15px;
}

/* Inline code. */
code:not(pre code) {
    background-color: var(--code-background-color);
    border-radius: 3px;
    text-decoration: none;
    padding: 0.5px 3px;
}
