/* minimal css for my site cause things break when i get fancy */

/* variables - avoids repeating hex codes */
:root {
  --dark: #000; /* black */
  --light: #eee; /* off-white for contrast */
  --purple: #77f; /* accent color for links */
  --gray: #444; /* neutral gray for dividers & metadata */
}

/* global reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* border-box supremacy */
}

/* base styles */
body {
  font-family:
    "commit mono", Consolas, "Courier New", monospace; /* monospace or DIE */
  line-height: 1.6;
  background: var(--dark);
  color: var(--light);
  padding: 2rem;
  font-size: 1rem;
}

/* content container */
.container {
  max-width: 65ch; /* ideal for reading */
  margin: 0 auto;
}

/* headings & text spacing */
h1,
h2,
h3 {
  margin: 1.5rem 0 1rem;
}
p,
ul {
  margin-bottom: 1.5rem;
}

/* links */
a {
  color: var(--purple);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.2s ease-in-out;
}

a:hover {
  border-bottom-color: var(--purple);
}

/* horizontal dividers because whitespace is overrated */
hr.centered-divider {
  border: none;
  border-top: 1px solid var(--gray);
  margin: 2rem auto;
  width: 50%;
}

/* list styling */
ul {
  list-style-position: inside;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.75rem;
}

/* blog post layout */
.post-list {
  list-style: none;
  padding: 0;
}

.post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray);
}

/* metadata styling - subtle & non-intrusive */
.post-date {
  color: var(--gray);
  font-size: 0.9rem;
}

.post-title {
  margin-bottom: 0.5rem;
}

article .metadata {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  text-align: center;
}

/* welcome message */
.welcome {
  text-align: center;
}

/* comments section for social interaction (or chaos) */
.comments {
  margin: 2rem 0;
}

/* giscus iframe (prevents layout issues) */
.giscus {
  max-width: 100% !important;
}

/* mobile styles because phones exist */
@media (max-width: 600px) {
  body {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .container {
    max-width: 100%;
  }

  .post-item {
    flex-direction: column;
  }

  .post-date {
    margin-top: 0.25rem;
  }
}

/* custom font loading commit mono for that aesthetic */
@font-face {
  font-family: "commit mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src:
    url(/commitmono-regular.woff2) format("woff2"),
    url(/commitmono-regular.otf) format("opentype");
}

/* bold variant because emphasis exists */
@font-face {
  font-family: "commit mono";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src:
    url(/commitmono-bold.woff2) format("woff2"),
    url(/commitmono-bold.otf) format("opentype");
}

/* italic variant for added flair */
@font-face {
  font-family: "commit mono";
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src:
    url(/commitmono-regular-italic.woff2) format("woff2"),
    url(/commitmono-regular-italic.otf) format("opentype");
}

/* bold italic for when you really mean it */
@font-face {
  font-family: "commit mono";
  font-style: italic;
  font-display: swap;
  font-weight: 700;
  src:
    url(/commitmono-bold-italic.woff2) format("woff2"),
    url(/commitmono-bold-italic.otf) format("opentype");
}

/* ascii art styling (keeps pixelation intact) */
.ascii-art {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: never;
  text-align: center;
  line-height: 1.1;
  font-size: 1.1rem;
}

/* footer */
footer {
  display: flex;
  justify-content: space-between;
  width: 50%;
  margin: 0 auto;
  text-align: center;
}

/* that's the whole setup - simple, functional, and unbroken (hopefully) */
