*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: Verdana, "Lucida Grande", Lucida, sans-serif;
    font-size: 1em;
    margin: 0;
}

h1 a, h2 a, h3 a, h4 a { text-decoration: none; }
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover { text-decoration: underline; }
h4 { margin-bottom: -0.5em; }
#page {
    max-width: 940px;
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
}

#content {
    flex: 1;
    min-width: 0;
    padding: 0 10px;
}

#sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 0 10px;
  font-size: 80%;
}

#content h1 {
    text-align: center;
}

.blogpost { 
  font-size: 100%;
}

.blogpost h2 {
    margin: 0;
    padding-top: 0.2em;
    font-size: 170%;
}
.postheader {
    padding-bottom: 0.2em;
}
.postfooter, .postheader {
    font-size: 75%;
}

.blogpost .postbody {
    margin-bottom: 0.1em;
}
div.blogpost {
    padding-bottom: 0.1em;
    margin-bottom: 0.5em;
}

.blogpost .postbody pre {
    margin-left: 1em;
    margin-right: 1em;
    padding: 0.3em;
    border-left: 0.5em solid;
}

.blogpost img { 
  border: 1px solid;
  padding: 3px;
}

.postfooter {
    text-align: right;
    clear: both;
    border-top: 1px solid;
}

ul.attachedtaglist {
  list-style: none;
  display: inline;
  margin-left: 0;
  padding-left: 0;
}
ul.attachedtaglist li {
  display: inline;
  margin-right: 0.5em;
}

div.comments {
    margin-top: 1em;
    font-size: 90%;
}
.comment-gravatar { 
    float: left;
    margin-top: 0.5em;
    margin-right: 1em;
    margin-bottom: 0.5em;
    display: block;
}
.comment-author { font-weight: bold; }
.comment-author a { text-decoration: none; }
.comment-time { text-decoration: none; font-size: 80%; }
.commentbody {
    margin-bottom: 0.5em;
    overflow: auto;
}
.comment { 
    border-bottom: dotted 1px;
    margin-bottom: 0.5em;
}

.comments th {
    text-align: left;
    font-weight: normal;
}
.comments form input, .comments form textarea { border: 1px solid; }
.formhelp { font-size: 90%; }

#blogtitle { 
    margin:0; padding: 0;
    position:relative;
    width:964px; height:340px;
    overflow:hidden;
    text-align: center;
    margin-bottom: 0.5em;
    margin-left: auto; margin-right: auto;
}

#blogtitle span { 
    display:block;
    position:absolute; left:0; top:0; z-index:1;
    width:964px; height:340px;
    margin:0; padding:0;
    background:url("/img/blogoncebitmyheader.jpg") top left no-repeat;
}

#footer {
  width: 100%;
  margin: 1em auto;
  text-align: center;
  font-size: x-small;
}




#sidebar h2 {
  font-size: 150%;
  font-weight: normal;
  text-align: left;
  padding: 0;
  font-variant: small-caps;
}

/* Footer width handled in main #footer rule above */

#sidebar ul { 
  padding-left: 0;
  margin-left: 1.5em;
  list-style-type: square;
}
#sidebar ul.tagcloud,
#sidebar ul.filterlist { 
  list-style: none;
  display: inline; 
  margin-left: 0em;
  padding-left: 0em;}

ul.tagcloud li, ul.filterlist li { 
  display: inline;  
}
ul.filterlist li:after { 
  content: ", "
}
ul.filterlist li.last:after { 
  content: ". "
}
ul.tagcloud li a { text-decoration: none; }
ul.tagcloud li a:hover { text-decoration: underline; }

.commentadmintoggle { display: block; float: right; }
div.commentadmin {
  padding-left: 0.5em;
  border: 1px solid;
}
/*div.commentadmin ul { 
  list-style: none;
  margin: 0;
  padding-left: 0;
}
div.commentadmin ul li { 
  display: inline;
}
div.commentadmin ul li:before {
  content: "\0020 \0020 \0020 \00BB \0020 ";
}*/
div.commentadmin form { 
  display: inline;
}
ol.commentlist { 
  list-style: none;
  margin-left: 0;
  padding-left: 0em;
}
table.commentlist { 
  font-size: 80%;
}
span.warning { 
  font-weight: bold;
}

nav.paginator {
  display: flex;
  justify-content: space-between;
}
nav.paginator a {
  font-size: smaller;
}
nav.paginator .nextpage {
  margin-left: auto;
}

.feed-list {
  list-style-image: url("/img/feed-icon-14x14.png");
}

.comment { 
  font-size: 90%;
}

figure.mms, img.mms {
    float: right;
}
.mms img, .img.mms {
  width: 350px;
}

.center, .centered {
  display: block;
  margin-left: auto;
  margin-right: auto;
  clear: both;
}

.left {
  display: block;
  float: left;
}

.right {
  display: block;
  float: right;
}

.picture {
  text-align: center;
  font-style: italic;
  font-size: 75%;
  padding: 3px;
}

.picture img {
  display:block;
  vertical-align: middle;
}

form p { 
  margin: 0.2em 0 0 0;
}
p.ashf { display: none; }

blockquote { 
  font-style: italic;
  border-left: 0.3em solid;
  padding-left: 0.5em; margin-left: 1em;
}

ul.expandable li {
  list-style-type: none;
}

ul.expandable > li {
  margin-left: -1em;
}

.archivelist a { text-decoration: none; }
.archivelist a:hover { text-decoration: underline; }

.archivelist details {
  margin-left: 0;
}

.archivelist summary {
  cursor: pointer;
  list-style: inside;
}

.archivelist summary a {
  margin-left: 0.3em;
}

.archivelist details ul {
  margin: 0 0 0.5em 1.5em;
  padding-left: 0;
}

.clearer { clear: both; }

.summarized .postheader h2 { display: inline; }
.summarized .postheader div.byline { display: inline; }
.summarized .postbody { font-size: smaller; }
.summarized .postbody .thumbnail { float: left; margin-right: 0.5em; }
.summarized .postfooter { text-align: left; }

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

/* Responsive embeds (YouTube, etc.) */
iframe, object, embed {
    max-width: 100%;
}
.postbody iframe,
.postbody object,
.postbody embed {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
}

/* Hamburger menu - hidden on desktop */
.sidebar-toggle {
    display: none;
}

.hamburger {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 99999;
    cursor: pointer;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background: #333;
    transition: 0.3s;
}

/* Mobile styles */
@media (max-width: 768px) {
    #page {
        flex-direction: column;
    }

    #content {
        width: 100%;
    }

    /* Hamburger visible on mobile */
    .hamburger {
        display: block;
        background: rgba(51, 51, 51, 0.8);
    }
    .hamburger span {
        background: #fff;
    }

    /* Sidebar hidden by default on mobile */
    #sidebar {
        position: fixed;
        top: 0;
        right: -280px;
        width: 260px;
        height: 100vh;
        background: #fff;
        padding: 60px 15px 15px;
        overflow-y: auto;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 999;
    }

    /* Show sidebar when checkbox is checked */
    body:has(.sidebar-toggle:checked) #sidebar {
        right: 0;
    }

    /* Animate hamburger to X when open */
    .sidebar-toggle:checked + .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .sidebar-toggle:checked + .hamburger span:nth-child(2) {
        opacity: 0;
    }
    .sidebar-toggle:checked + .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Stack floated images */
    figure.mms, img.mms {
        float: none;
        width: 100%;
        max-width: 350px;
        margin: 1em auto;
        display: block;
    }
    .mms img {
        width: 100%;
        max-width: 350px;
    }

    /* Header adjustments */
    #heading {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }
    #blogtitle {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
    #blogtitle a {
        display: block;
        font-size: 0;
        line-height: 0;
    }
    #blogtitle span {
        position: relative;
        display: block;
        width: 100%;
        height: 0;
        padding-bottom: 35.27%;
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
    }
}
