/* styles.css */

/* Variables for colors and font stacks */
:root {
    --text-color: #333;
    --link-color: #0077cc;
    --muted-color: #777;
    --border-color: #ddd;
    --background-light: #f8f8f8;
}

/* Global Reset & Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

    color: var(--text-color);
    background: #fff;
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Header Styling */
.navbar {
    padding: 1.1rem 2rem;
}

.site-name {
    font-size: 1.2rem;
    line-height: 1.7rem;
    margin-bottom: 0.2rem;
}

.site-name a {
    text-decoration: none;
    color: var(--text-color);
}

.site-nav {
    font-size: 1rem;
    line-height: 1.7rem;
}

.site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-nav li {
    display: inline;
    margin-right: 1rem;
}

.site-nav a {
    text-decoration: none;
    color: var(--text-color);
}

/* Article Styling */
.article-container {
    width: 100%;
    max-width: 650px;
    margin: 2rem auto;
    padding: 0 1rem 4rem 0;
}

@media (max-width: 480px) {
    .article-container {
        padding: 0 1.5rem;
    }
}

h1 {
    font-family: "Noto Sans Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(3.6rem, 6vw, 4rem);
    font-weight: 300;
    line-height: clamp(4.6rem, 7vw, 5rem);
    margin-top: 6rem;
    margin-bottom: 3rem;
}

.date {
    text-align: left;
    font-size: 0.9rem;
    color: var(--muted-color);
    /* margin-top: 0rem; */
    /* margin-bottom: 0.4rem; */
}

.introduction {
    font-family: "Noto Sans Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(1.8rem, 4vw, 2rem);
    font-weight: 300;
    line-height: clamp(2.4rem, 5vw, 2.9rem);
    margin-bottom: 1.3rem;
    padding: 0;
}

h2 {
    font-family: "Noto Sans Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 2.3rem;
    font-weight: 300;
    line-height: 3.2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-family: "Noto Sans Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 2.6rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

blockquote {
    border-left: 6px solid #ccc;
    padding: 0.5rem 1rem;
    font-style: italic;
    color: #555;
    margin: 1rem 0;
}

pre {
    background: #e4e4e4;
    color: #000;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}

code {
    font-family: "JetBrains Mono", Menlo, Consolas, monospace;
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 4px;
}

/* Links */
a {
    text-decoration: underline;
    text-decoration-style: dashed;
    color: var(--link-color);
}

/* Inline Elements */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem 0;
}

/* Lists */
ul,
ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

ul li,
ol li {
    margin-bottom: 0.5rem;
}

/* Horizontal Rule */
hr {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

table,
th,
td {
    border: 1px solid var(--border-color);
}

th,
td {
    padding: 0.75rem;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

/* Footer */
.footer {
/* display: flex; */
  display: none;
  flex-wrap: wrap;
  justify-content: space-between;
  background: var(--background-light); /* or use #f8f8f8 */
  padding: 1rem;
  box-sizing: border-box;
  gap: 1rem;
}

@media (max-width: 768px) {
  .footer {
    flex-direction: column;
  }

  .footer-box {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

.footer-box {
  flex: 1 1 30%;
  min-width: 200px;
  padding: 1rem;
  box-sizing: border-box;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer li {
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
}

.footer a {
  text-decoration: none;
  color: #000;
}
.footer a:visited {
  color: #333333;
}
.footer a:hover {
  color: #d10022;
}
.footer a:active {
  color: #ff002a;
}
.footer a:focus {
  color: #d10022;
}

/* Expanding Text */
.expander {
    cursor: pointer;
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-style: dashed;
    border: none;
    background: none;
    font-size: 1rem;
    padding: 0;
}

.expanding-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}
