/*
Theme Name: Minimal Bright Blog (Strict Color-Contrast Enhanced) — Refined
*/

@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap");
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Serif&display=swap");

:root {
  --bg: #f7f7f7;
  --fg: #1e1e1e;
  --accent: #005acc;
  --link: #b34700;
  /*--link: #d45500;*/
  --link-hover: #00914d;
  --heading: #2b2075;
  --muted: #666666;
  --border: #dddddd;
  --mono: "IBM Plex Mono", monospace;
  --serif: "IBM Plex Serif", serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.8;
}

/* Layout containers */
header,
main,
footer {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 15px;
}

/* Header */
header {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}
header h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  color: #050505;
}
header h1 a {
  color: #050505;
  text-decoration: none;
}
.site-slogan {
  font-size: 0.95rem;
  color: #888;
  letter-spacing: 0.05em;
  margin: 0;
}

/* Navigation */
header nav {
  margin-top: 1em;
}

header nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap; /* allow wrapping on smaller screens */
  gap: 0.5em;
  justify-content: center;
}

header nav li {
  display: block;
}

header nav a {
  display: block;
  font-weight: 500;
  font-size: 1.2em;
  color: var(--accent);
  text-decoration: none;
  padding: 0.5em 0.8em;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
  text-align: center;
}

header nav a:hover {
  color: var(--link-hover);
}
/* Headings and text */
h1 {
  margin-top: 0;
  font-size: 2em;
  color: var(--heading);
}
h2 {
  margin-bottom: 0.3em;
  color: var(--accent);
}
p {
  margin: 1.4em 0;
  font-size: 1.25rem;
  line-height: 1.8;
  letter-spacing: 0.01em;
}
li p {
  margin: 0.5em 0;
  font-size: 1.2rem;
}
/* Excerpt-style text */
.excerpt {
  font-size: 0.95em;
  color: var(--muted);
}

/* Links */
a {
  color: var(--link);
  text-decoration: none;
  padding-bottom: 1px;
  transition:
    border-bottom-color 0.2s ease,
    color 0.2s ease;
}
a:hover {
  color: var(--link-hover);
  text-shadow: none;
  text-decoration: underline;
}

/* Images */
header img {
  max-width: 100%;
  display: block;
  margin: 2em auto;
  border: 1px solid var(--border);
  filter: grayscale(100%) contrast(90%);
}
.home .site-header img {
  filter: unset;
}
/* Comments section */
section.post-comments {
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid var(--border);
}
.comment-list {
  list-style: none;
  padding-left: 0;
}
.comment-list li {
  padding: 0.5em 0;
  border-bottom: 1px dashed var(--border);
  color: var(--fg);
}

/* Footer */
footer {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 3em;
}
footer p {
  font-size: 0.85em;
}

/* Comment Form Styling */
.comment-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  line-height: 1.6;
  padding: 0.8em;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: #fff;
  color: var(--fg);
  font-family: var(--serif);
  resize: vertical;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 90, 204, 0.15);
}

.comment-form input[type="submit"] {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.6em 1.2em;
  font-size: 1rem;
  font-family: var(--mono);
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.comment-form input[type="submit"]:hover {
  background-color: var(--link-hover);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  max-width: 100%;
  padding: 0.8em;
  font-size: 1.1rem;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: #fff;
  color: var(--fg);
  font-family: var(--serif);
  box-sizing: border-box;
  margin-bottom: 1em;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 90, 204, 0.15);
}
.comment-form-cookies-consent {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.5em;
}
.comment-form-cookies-consent input[type="checkbox"] {
  transform: scale(1.3); /* adjust the scale factor */
  margin-right: 0.5em;
  vertical-align: middle;
}
.comment-list li {
  padding: 0.5em;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1em;
}
.comment-list .comment-meta {
  color: var(--muted);
  margin-bottom: 0.5em;
}
.comment-list .comment-meta em {
  font-size: 0.9em;
}
.comment-list .comment-body {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--fg);
}
.comment-form-cookies-consent input[type="checkbox"] {
  margin-right: 0.4em;
}
.footnotes {
  font-size: 0.95em;
  color: #555;
  padding-left: 1.5em;
}
.footnotes li {
  margin-bottom: 0.5em;
}

main sup a {
  text-decoration: none;
  border-bottom: none;
  padding-bottom: 0;
}
/*
.fnret {
  border-bottom: none;
}
*/
.toc ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}
.toc {
  margin: 2em 0;
  padding: 0;
}
.toc li {
  margin: 0.2em 0;
}
.toc a {
  font-size: 1.25rem;
}

/* Indentation levels */
.toc-l2 {
  padding-left: 2em;
}
.toc-l3 {
  padding-left: 3em;
}
.toc-l4 {
  padding-left: 4em;
}
.toc-l5 {
  padding-left: 5em;
}
.toc-l6 {
  padding-left: 6em;
}

pre code {
  background-color: #f3f3f3 !important;
  padding: 0.5em;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.95rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  line-height: 1.4;
}

.code-lang-label {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.7rem;
  padding: 0.2em 0.5em;
  color: #555;
  font-family: var(--mono, monospace);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
  text-transform: lowercase;
  pointer-events: none;
}

table {
  display: block;
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  border-collapse: collapse;
  word-break: break-word;
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

table th,
table td {
  padding: 0.5em;
  text-align: left;
  border-bottom: 1px solid #ccc;
}

/* Listing of latest modified pages and posts */

.update-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}

.update-table td {
  padding: 0.7em 1em;
  vertical-align: top;
  border-bottom: 1px solid #ccc;
}

.type-cell {
  font-weight: bold;
  white-space: nowrap;
}

.type-post {
  color: #333; /* green for posts */
}

.type-page {
  color: #0077aa; /* blue for pages */
}

.content-cell a {
  text-decoration: none;
  color: #d45500; /* keep original orange for links */
}

.avatar {
  border: 1px solid #333;
  border-radius: 50%;
  margin-right: 10px;
}

.post-meta-date {
  color: #888;
  font-size: 0.9em;
  white-space: nowrap;
}

.post-timeline .post-date {
  font-size: 0.9em;
  color: var(--muted);
  margin-bottom: 0.5em;
}
.post-timeline .post-title {
  font-size: 1.2em;
  color: var(--heading);
  margin: 1em 0 0 0;
}

.main-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.cap {
  margin-top: -0.5em; /* Pull caption closer to image */
  font-size: 0.85em;
  text-align: center;
  font-style: italic;
}

.alert-box {
  font-size: 0.9em; /* smaller font */
  border: 1px solid; /* border on all sides */
  padding: 1em;
  margin: 1em 2em;
  border-radius: 4px;
}
.alert-box p {
  margin: 0; /* remove default margin */
  font-size: 1.1rem; /* smaller font */
  line-height: 1.4; /* tighter line height */
}
.alert-box.note {
  background: #f5f5f5;
  border-color: #0366d6;
}

.alert-box.warn {
  background: #fff5f5;
  border-color: #d73a49;
}

.alert-box.tip {
  background: #f0fff4;
  border-color: #28a745;
}

.alert-box.info {
  background: #f0f8ff;
  border-color: #17a2b8;
}
