/* ================== CSS ================== */
/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================== Variables ================== */
:root {
  --bg: #ffffff;
  --text: #000000;
  --link: #000000;
  --accent: #000000;
  --emoji-bg: #ffffff;
}

[data-theme="dark"] {
  --bg: #191919;       /* softer dark background */
  --text: #f5f5f5;     /* off-white text for comfort */
  --link: #ffffff;     /* light links */
  --accent: #ffffff;
  --emoji-bg: #ffffff; /* white emoji background */
}

/* ================== Body ================== */
body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, sans-serif;
    margin: 2rem;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

/* ================== Header ================== */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

header h2 {
    font-size: 1.2rem;
    color: #555;
}

header hr {
    width: 100%;
    max-width: 800px;  /* matches your main content width */
    margin: 2rem auto; /* centers it */
    border: none;
    border-top: 1px solid var(--text); /* subtle line using current text color */

}

/* ================== Site Nav ================== */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem; /* spacing between items */
    flex-wrap: wrap;
}

.site-nav a,
#theme-toggle {
    all: unset;               /* remove default button styles */
    cursor: pointer;
    color: var(--link);
    font-weight: 500;
    transition: color 0.3s, opacity 0.3s;
}

.site-nav a:hover,
#theme-toggle:hover {
    opacity: 0.7;
}

/* ================== Main ================== */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0rem 1rem;
}
h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

img {
    display: block;
    margin: 2rem auto;
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}




/* Align lists with content */
main ul,
main ol {
    padding-left: 1.2rem;           /* indent for bullets/numbers */
    margin: 1rem 0;                 /* vertical spacing */
    list-style-position: inside;    /* bullets/numbers align with text */
}

/* Optional: nicer bullet style for ul */
main ul {
    list-style-type: disc;          /* default: disc, you can change */
}

/* Optional: nicer number style for ol */
main ol {
    list-style-type: decimal;
}

/* ================== Links ================== */
a {
    color: var(--link);
    text-decoration: none;
}

a:visited {
    color: var(--link); /* prevents the default purple color */
}

a:hover,
a:active {
    opacity: 0.7;
    color: var(--accent); /* optional: slight highlight on hover */
}



/* ================== Footer ================== */
footer {
    margin-top: 4rem;
    text-align: center;
    color: #555;
    font-size: 0.9rem;
}

footer a {
    display: inline-block;
    width: 40px;
    height: 40px;
    transition: transform 0.6s ease;
}

footer a:hover {
    transform: rotate(360deg);
}

footer svg {
    width: 50%;
    height: 100%;
    fill: var(--link);
    transition: fill 0.3s;
}



/* ========== Intro ========== */
.intro {
  text-align: center;
  margin-bottom: 3rem;
}

.intro p {
  color: #777;
  max-width: 600px;
  margin: 0.5rem auto 0;
}

/* ========== Section Grid ========== */
.sections h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.section-card {
  display: block;
  background: var(--bg);
  color: var(--text);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.section-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.section-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.section-card p {
  font-size: 0.95rem;
  color: #666;
}







/* ====== Post Index Page ====== */
.post-index {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.post-index h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.post-index p {
  color: #777;
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* ====== Post List ====== */
/* ====== Post List ====== */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 0.75rem;
  transition: border-color 0.3s ease;
}

[data-theme="dark"] .post-list li {
  border-color: rgba(255,255,255,0.1);
}

.post-list a {
  text-decoration: none;
  color: var(--link);
  font-size: 1.1rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.post-list a:hover {
  opacity: 0.7;
}

.post-list .date {
  font-size: 0.9rem;
  color: #888;
  font-family: monospace;
  flex-shrink: 0;
  margin-left: 1rem;
}

/* Optional underline hover */
.post-list a::after {
  content: "";
  display: block;
  height: 2px;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.post-list a:hover::after {
  width: 100%;
}

