/* Hayes Jupe's Blog – static archive.
   Look and feel follows the original "Hayes Jupe" WordPress theme (Costin Nadolu). */

@font-face {
  font-family: "Fredoka";
  src: url("fredoka-latin-400-normal.woff2") format("woff2"),
       url("fredoka-latin-400-normal.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("fredoka-latin-500-normal.woff2") format("woff2"),
       url("fredoka-latin-500-normal.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --orange: #e37331;
  --orange-dark: #c25a1c;
  --charcoal: #505050;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --meta-bg: #eeeeee;
  --rule: #dddddd;
  --code-bg: #f6f5f3;
  --head-font: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  --body-font: Arial, Helvetica, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.6 var(--body-font);
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--charcoal); outline-offset: 2px; }

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

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--charcoal); color: #fff; padding: 8px 14px; z-index: 10;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background-color: #fcfcfc;
  background-image: url("header-pattern.svg");
  background-position: center top;
  background-repeat: no-repeat;
}
.site-header .wrap { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding-top: 6px; padding-bottom: 8px; }
.archive-note { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: #333; }
.site-header .logo { display: inline-block; line-height: 0; }
.site-header .logo img { height: 138px; width: auto; max-width: 100%; display: block; }

/* ---------- Main menu ---------- */
.main-nav { background: var(--charcoal); }
.main-nav ul { list-style: none; margin: 0 auto; padding: 0 20px; max-width: 1240px; display: flex; flex-wrap: wrap; }
.main-nav li { border-right: 1px solid var(--orange); }
.main-nav li:first-child { border-left: 1px solid var(--orange); }
.main-nav a {
  display: block; padding: 3px 11px 4px;
  font: 500 18px/1.4 var(--head-font);
  color: #fff;
}
.main-nav a:hover { background: #666; text-decoration: none; }
.main-nav li.current a { background: var(--orange); }

/* ---------- Layout ---------- */
.layout { display: flex; gap: 0; align-items: flex-start; margin-top: 30px; margin-bottom: 40px; }
#primary { flex: 1 1 0; min-width: 0; padding-right: 28px; border-right: 1px solid var(--orange); }
#sidebar { flex: 0 0 330px; padding-left: 28px; }

/* ---------- Post / page headings ---------- */
.entry-title, .archive-title {
  margin: 0;
  background: var(--orange);
  color: #fff;
  font: 500 26px/1.2 var(--head-font);
  padding: 4px 10px 5px;
  overflow-wrap: anywhere;
}
.entry-title a { color: #fff; }
.entry-title a:hover { text-decoration: none; opacity: .9; }

.entry-meta {
  background: var(--meta-bg);
  font-size: 12.5px;
  padding: 3px 10px;
  color: #222;
}
.entry-meta a { color: var(--orange-dark); }

.entry-content { padding: 10px 0 8px; overflow-wrap: break-word; }
.entry-content > :first-child { margin-top: 12px; }
.entry-content p { margin: 0 0 1em; }
.entry-content h2 { font: 400 30px/1.25 var(--body-font); margin: 1.1em 0 .45em; }
.entry-content h3 { font: 400 23px/1.3 var(--body-font); margin: 1.1em 0 .4em; }
.entry-content h4 { font: 700 17px/1.35 var(--body-font); margin: 1em 0 .35em; }
.entry-content h5, .entry-content h6 { font: 700 15px/1.4 var(--body-font); margin: 1em 0 .3em; }
.entry-content ul, .entry-content ol { margin: 0 0 1em; padding-left: 2em; }
.entry-content li { margin: .2em 0; }
.entry-content li > ul, .entry-content li > ol { margin: .2em 0; }
.entry-content hr { border: 0; border-top: 1px solid var(--rule); margin: 1.4em 0; }
.entry-content blockquote {
  margin: 1em 0; padding: .3em 1em;
  border-left: 4px solid var(--orange); background: #faf7f4; color: #333;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content pre, .entry-content code, .entry-content kbd, .entry-content samp {
  font: 13px/1.5 Consolas, "Liberation Mono", Menlo, "Courier New", monospace;
}
.entry-content pre {
  background: var(--code-bg); border: 1px solid var(--rule); border-left: 4px solid var(--orange);
  padding: 10px 14px; overflow-x: auto; margin: 0 0 1em; white-space: pre; tab-size: 4;
}
.entry-content code { background: var(--code-bg); padding: 1px 4px; border-radius: 2px; }
.entry-content pre code { background: none; padding: 0; }

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

/* Images and captions */
.entry-content img { border: 0; }
.entry-content .alignleft, .entry-content img.alignleft { float: left; margin: 4px 18px 10px 0; }
.entry-content .alignright, .entry-content img.alignright { float: right; margin: 4px 0 10px 18px; }
.entry-content .aligncenter, .entry-content img.aligncenter { display: block; margin: 8px auto 12px; }
.entry-content figure { margin: 0 0 1em; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .wp-caption img { display: block; }
.entry-content figcaption { font-size: 12.5px; color: #555; padding: 4px 2px; }
.entry-content::after { content: ""; display: table; clear: both; }

/* Collapsible sections (from [expand]) */
.entry-content details { border: 1px solid var(--rule); margin: 0 0 1em; }
.entry-content details > summary {
  cursor: pointer; padding: 6px 12px; background: var(--meta-bg);
  font: 500 17px/1.4 var(--head-font); color: var(--charcoal);
}
.entry-content details[open] > summary { border-bottom: 1px solid var(--rule); }
.entry-content details > :not(summary) { margin-left: 12px; margin-right: 12px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; max-width: 100%; }
.entry-content table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.entry-content th, .entry-content td { border: 1px solid var(--rule); padding: 5px 9px; text-align: left; vertical-align: top; }
.entry-content th, .entry-content thead td { background: var(--charcoal); color: #fff; font-weight: 700; }
.entry-content tbody tr:nth-child(even) td { background: #f7f7f7; }
.table-title { font: 500 19px/1.3 var(--head-font); color: var(--charcoal); margin: 1.2em 0 .35em; }

.video-embed { position: relative; padding-bottom: 56.25%; height: 0; margin: 0 0 1em; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.entry-footer { font-size: 12.5px; color: #444; border-top: 1px solid var(--rule); padding: 8px 0 0; margin-top: 8px; }

/* ---------- Listings ---------- */
.post-summary { margin: 0 0 30px; }
.post-summary .entry-title { font-size: 24px; }
.post-summary .summary { margin: 10px 0 0; }
.post-summary .read-more { font-weight: 700; font-size: 13.5px; }
.archive-title { margin-bottom: 22px; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin: 10px 0 0; font: 500 18px/1.3 var(--head-font); }
.pager a { display: inline-block; background: var(--charcoal); color: #fff; padding: 5px 14px; }
.pager a:hover { background: var(--orange); text-decoration: none; }

/* ---------- Comments ---------- */
.comments { margin-top: 26px; }
.comments h2 {
  margin: 0 0 12px; background: var(--charcoal); color: #fff;
  font: 500 19px/1.3 var(--head-font); padding: 3px 9px;
}
.comment { border-bottom: 1px solid var(--rule); padding: 10px 0 4px; }
.comment-head { font-size: 12.5px; color: #555; }
.comment-head strong { color: #111; font-size: 14px; }
.comment-body { font-size: 14px; }
.comment-body p { margin: .4em 0 .7em; }
.comment.depth-1 { margin-left: 28px; }
.comment.depth-2 { margin-left: 56px; }
.comment.depth-3 { margin-left: 84px; }

/* ---------- Sidebar ---------- */
.widget { margin: 0 0 28px; }
.widget-title {
  margin: 0 0 12px; background: var(--charcoal); color: #fff;
  font: 500 19px/1.3 var(--head-font); padding: 2px 8px;
}
.widget ul { margin: 0; padding-left: 2.1em; font-size: 12.5px; line-height: 1.4; }
.widget li { margin: 0 0 6px; }
.widget li .post-date { display: block; color: #222; }
.widget .cat-count { color: #555; }

.search-form input[type="search"] {
  width: 100%; max-width: 100%;
  font: 13px var(--body-font); padding: 6px 7px;
  border: 1px solid #bbb; border-radius: 3px; background: #fff;
}
.search-form .visually-hidden, .visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #ddd; font-size: 12.5px; padding: 14px 0; }
.site-footer a { color: #fff; text-decoration: underline; }

/* ---------- Sitemap page ---------- */
.sitemap h2 { font: 500 26px/1.2 var(--head-font); color: var(--charcoal); margin: 1.2em 0 .4em; padding-bottom: 3px; border-bottom: 2px solid var(--orange); }
.sitemap ul { list-style: none; padding: 0; margin: 0; }
.sitemap li { padding: 2px 0; display: flex; gap: 12px; }
.sitemap li time { flex: 0 0 92px; color: #666; font-size: 12.5px; padding-top: 2px; }

/* ---------- Search page (Pagefind) ---------- */
#search {
  --pagefind-ui-scale: .95;
  --pagefind-ui-primary: #e37331;
  --pagefind-ui-text: #1a1a1a;
  --pagefind-ui-background: #ffffff;
  --pagefind-ui-border: #cccccc;
  --pagefind-ui-tag: #eeeeee;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 3px;
  --pagefind-ui-font: Arial, Helvetica, sans-serif;
  margin-top: 16px;
}
#search .pagefind-ui__result-link { color: var(--orange-dark); }
#search .pagefind-ui__result-title { font-family: var(--head-font); font-weight: 400; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  #primary { padding-right: 0; border-right: 0; width: 100%; }
  #sidebar { flex: 1 1 auto; padding-left: 0; width: 100%; margin-top: 30px; border-top: 1px solid var(--orange); padding-top: 24px; }
  .site-header .logo img { height: 96px; }
  .entry-title, .archive-title { font-size: 23px; }
  .entry-content h2 { font-size: 25px; }
}
@media (max-width: 520px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 12px; }
  .main-nav ul { padding: 0 12px; }
  .entry-content .alignleft, .entry-content .alignright { float: none; display: block; margin: 8px auto; }
  .sitemap li { flex-direction: column; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print {
  .site-header, .main-nav, #sidebar, .site-footer, .pager { display: none; }
  #primary { border: 0; padding: 0; }
}
