/* Updated css/style.css */
:root {
    --primary-font: 'Source Sans Pro', sans-serif;
    --heading-font: 'DM Serif Display', serif;
    --text-color: #555;
    --heading-color: #000;
    --background-color: #ffffff;
    --border-color: #DEDEDE;
    --link-color: #333;
    --link-hover-color: #111;
    --content-max-width: 700px;
  }

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    font-family: var(--primary-font);
}

header h2, .posts h2 a, .posts h3, .posts h4, .posts h5, footer h3, .about-me-text h3 {
    font-family: var(--heading-font);
    color: var(--heading-color);
}

.posts p, .custom-list li, .custom-ordered-list li, .about-me-text p, .tags-list .tag {
    font-family: var(--primary-font);
    color: var(--text-color);
}

/* Header Styling */
header {
    text-align: center;
    padding-top: 1.5rem;
    padding-bottom: 1rem;
}

header h2 {
    color: var(--heading-color);
    font-weight: 600;
    font-size: clamp(2.2rem, 2.2rem + ((1vw - 0.2rem) * 3.273), 4rem);
}

.header-phrase {
    font-size: 1.2rem;
    color: var(--heading-color);
    display: block;
    text-align: center;
}

/* Classes */
.block-group {
    position: relative;
    box-sizing: border-box;
    padding-left: 2rem;
    padding-right: 2rem;
}

.block-columns {
    align-items: normal;
    column-gap: 2.5rem;
    row-gap: 2rem;
    display: flex;
    flex-wrap: nowrap;
}

.block-column {
    align-self: flex-start;
    flex-basis: 0px;
    flex-grow: 1;
    overflow-wrap: break-word;
    word-break: break-word;
}

@media (max-width: 768px) {
    .block-columns {
      flex-wrap: wrap;
      row-gap: 1.5rem;
    }
    .block-column {
       flex-basis: 45%;
    }
    .footer-align {
       margin-top: 1.2rem;
       padding-top: 1.2rem;
    }
  }
  @media (max-width: 480px) {
     .block-column {
        flex-basis: 100%;
     }
  }

.template-part {
    margin-block-end: 0;
    margin-block-start: 0.8rem;
}

/* Default styles for main navigation (Desktop) */
.main-nav {
    align-items: center;
    border-bottom-color: #000;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-top-color: #000;
    border-top-style: solid;
    border-top-width: 1px;
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
    column-gap: 2.5rem;
    row-gap: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

.main-nav a {
    color: var(--heading-color);
    text-decoration: none;
    font-size: 1.1rem;
    margin: 0 1rem;
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--link-hover-color);
}

/* --- Hamburger Menu Styles --- */

.hamburger-button {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    padding: 0.5rem;
    margin: -0.8rem;
    cursor: pointer;
    position: absolute;
    top: 0.5rem;
    left: 1.3rem;
    z-index: 1001;
    color: #000;
    line-height: 1;
}

@media (max-width: 768px) {

    .custom-image-wide {
        width: 100vw;
        max-width: 100vw;
        min-width: 0;
        margin-left: 0;
        left: auto;
        transform: none;
        border-radius: 0;
        box-shadow: none;
        display: block;
    }

    .hamburger-button {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 5.6rem;
        left: 0;
        right: 0;
        background-color: var(--background-color);
        border-top: 1px solid #000;
        border-bottom: 1px solid #000;
        z-index: 1000;
        padding-top: 1rem;
        padding-bottom: 1rem;
        width: 100%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .main-nav.menu-open {
        display: flex;
        flex-direction: column;
        align-items: center;
        row-gap: 10px;
    }

    .main-nav a {
        display: block;
        padding: 10px 0;
        font-size: 1rem;
        margin: 0; 
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
    }

    .main-nav a:last-child {
         border-bottom: none;
    }

}

/* Main Content Styling */
main {
    max-width: var(--content-max-width);
    margin: 3rem auto;
    padding: 1rem;
    overflow-x: visible;
}

/* Posts Styling */
.posts {
    padding-top: 1.4rem;
    padding-bottom: 1.4rem;
}

.posts article {
    margin-bottom: 3rem;
}

.posts h2 a {
    text-decoration: none;
    color: #000;
    transition: color 0.3s ease;
    font-size: 1.8rem;
}

.posts h2 a:hover {
    color: #666;
}

.posts h3 {
    text-decoration: none;
    color: #000;
    margin-top: 0.8rem;
}

.posts h4 {
    text-decoration: none;
    color: #000;
    margin-top: 0.6rem;
}

.posts h5 {
    text-decoration: none;
    color: #000;
    margin-top: 0.4rem;
}

.posts p {
    margin-top: 0.8rem;
    color: #555;
}

.posts a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
    font-weight: 600;
    border-radius: 3px;
    padding: 0 2px;
}
.posts a:hover {
    background-color: #e0e0e0;
    color: var(--link-hover-color);
    border-bottom: 1.5px solid #888;
}

.custom-list ul {
    padding-left: 1.4rem;
    margin-left: 1.4rem;
    margin-top: 0.8rem;
}

.custom-list li {
    color: #555;
    margin-top: 0.8rem;
}

.custom-list li strong {
    font-weight: 700;
}

.custom-ordered-list ol {
    padding-left: 1.4rem;
    margin-left: 1.4rem;
    margin-top: 0.8rem;
}

.custom-ordered-list ol ol {
    padding-left: 1.4rem;
}

.custom-ordered-list li {
    color: #555;
    margin-top: 0.8rem;
}

.custom-ordered-list ul {
    margin-left: 1.4rem;
}

.image-container {
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    display: flex;
    gap: 1.4rem;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
  }

.custom-image {
    width: 100%;
    max-width: 700px;
    margin: 1.4rem auto;
    display: block;
}

.custom-image-small {
    width: 40%;
    max-width: 700px;
    margin: 1.4rem auto;
    display: block;
}

.custom-image-wide {
    display: block;
    width: 100vw;
    max-width: 1200px;
    min-width: 700px;
    position: static;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    margin-left: 50%;
    margin-right: 0;
}

.custom-image-breakout {
    display: block;
    max-width: none;
    position: static;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    margin-left: 50%;
    margin-right: 0;
}

/* Table Styling */
main table,
.posts table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-family: var(--primary-font);
  color: var(--text-color);
}

main th,
.posts th,
main td,
.posts td {
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  text-align: center;
}

main thead th,
.posts thead th {
  background-color: #f9f9f9;
  font-family: var(--heading-font);
  color: var(--heading-color);
  font-weight: 600;
}

main tbody tr:nth-child(odd),
.posts tbody tr:nth-child(odd) {
  background-color: #fcfcfc;
}

main tbody tr:hover,
.posts tbody tr:hover {
  background-color: #f0f0f0;
  transition: background-color 0.2s ease;
}

/* Override styles for images within image-row */
.image-container .custom-image {
    width: auto;
    max-width: none;
    margin: 0;
    height: 300px;
}

.custom-code-block {
    margin-top: 0.8rem;
    max-width: 700px;
}

.read-more-link {
    font-size: 1.2rem;
    margin-top: 1.0rem;
    color: #000;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    cursor: pointer;
}

.read-more-link:hover {
    color: #666;
    text-decoration: none;
}

/* Categories Styling */
.categories {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.categories h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #000;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tags-list .tag {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background-color: #f0f0f0;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tags-list .tag:hover {
    background-color: var(--text-color);
    color: #fff;
}

/* Contact Styling */
.contact-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    margin-bottom: 10px;
}

.contact-link img {
    margin-right: 8px;
}

.contact-link b {
    margin-right: 4px;
}

/* Footer Styling */
footer {
    color: #000;
    position: relative;
    display: block;
    box-sizing: border-box;
}

footer h3 {
    color: #000;
    font-size:clamp(15.747px, 0.984rem + ((1vw - 3.2px) * 0.938), 24px);
    font-weight: 400;
}

footer p {
    color: #777;
    word-break: break-word;
}

.footer-align {
    border-top-color: var(--border-color);
    border-top-style: solid;
    border-top-width: 1px;
    margin-block-end: 0px;
    margin-block-start: 2.5rem;
    margin-top: 2.5rem;
    padding-bottom: 1.5rem;
    padding-top: 2.5rem;
    position: relative;
}

.footer-nav {
    align-items: flex-start;
    column-gap: 0.5rem;
    row-gap: 0.5rem;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    color: #000;
    overflow-wrap: break-word;
    position: relative
}

.footer-nav a {
    font-size:clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.227), 16px);
    color: #000;
    font-weight: 500;
    justify-content: normal;
    text-decoration: none;
}

.footer-nav a:hover {
    color: var(--link-hover-color);
}

/* About Me */
.about-me-block {
    display: flex;
    align-items: center;
    max-width: 700px;
    margin: 2rem auto;
    padding: 1rem;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

.about-me-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-right: 1.5rem;
}

.about-me-text h3 {
    margin: 0;
    font-size: 1.8rem;
}

.about-me-text p {
    margin-top: 0.5rem;
    color: var(--text-color);
    line-height: 1.6;
}

@media (max-width: 480px) {
    .custom-image-wide {
        width: 100vw;
        max-width: 100vw;
        min-width: 0;
        margin: 1.4rem auto;
        left: auto;
        transform: none;
        border-radius: 0;
        box-shadow: none;
        display: block;
    }
    .about-me-block {
      flex-direction: column;
      text-align: center;
    }
    .about-me-photo {
      margin-right: 0;
      margin-bottom: 1rem;
    }
  }

/* Language Switch Styling */
.language-switch {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    font-size: 0.8em;
    color: var(--text-color);
}

.language-switch a {
    margin-left: 5px;
    text-decoration: none;
    color: #555;
    transition: color 0.3s ease;
}

.language-switch a:hover {
    color: #333;
}