/* ========== Global Styles ========== */
body {
  font-family: "Inter", Arial, Helvetica, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 1em;
  line-height: 1.4;
  background-color: #0b192c;
  color: #e0e0e0;
}

/* ========== Header Styles ========== */
header {
  border-bottom: 2px dotted #1e3e62;
  margin-bottom: 2.5em;
  padding-top: 1em;
  padding-bottom: 1.5em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 a {
  text-decoration: none;
  color: #ffa726;
}

nav a {
  text-decoration: none;
  padding-left: 2em;
  color: #e0e0e0;
}

nav a:hover {
  color: #ffa726;
}

a {
  color: #ffa726;
}

/* ========== Post Styles ========== */
.post {
  padding-bottom: 2em;
  margin-bottom: 2em;
  border-bottom: 2px dotted #1e3e62;
}

/* Post Header */
.post h1 {
  margin-top: 1em;
  font-size: 2rem;
  font-weight: bold;
  color: #ffa726;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid #0b192c;
}

.post h1 span {
  color: #cccccc;
  white-space: nowrap;
  font-size: 1rem;
}

.post h1 a {
  text-decoration: none;
  color: inherit;
}

.post h1 a:hover {
  text-decoration: underline;
}

/* Sub Header */
h2 {
  padding-top: 0.3em;
}

h2::before {
  content: "--> ";
}

/* Tertiary Header */
h3 {
  font-style: italic;
}

.post p {
  margin-bottom: 1em;
}

.post img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5em;
}

/* Highlight `` snippets without breaking prism */
.post code:not([class]) {
  padding: 0.1em 0.2em 0.1em 0.2em;
  border: 1px solid #ffa726;
  border-radius: 3px;
  background-color: black;
  border-color: #ffa726;
}

/* ========== Archive Page ========== */
#archive ol {
  list-style: none;
  padding: 0;
}

#archive li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #1e3e62;
}

#archive li a {
  color: #ffa726;
  text-decoration: none;
  flex-grow: 1;
}

#archive li:hover {
  background: rgba(255, 101, 0, 0.1);
}

#archive li a:hover {
  text-decoration: underline;
}

#archive li span {
  color: #e0e0e0;
  white-space: nowrap;
}

/* ========== Pagination Links ========== */
#pagination {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5em;
}

#pagination a {
  text-decoration: none;
  color: #ffa726;
}

#pagination a:hover {
  text-decoration: underline;
}

#pagination a:first-child:last-child {
  margin-left: auto;
}

/* ========== Footer ========== */
#copy {
  text-align: right;
}

/* ========== Code Highlighting (PrismJS Overrides) ========== */
pre {
  box-shadow: none;
  background-color: #0b192c !important;
  border: 1px solid #ffa726 !important;
}

/* ========== Cards ========== */
.container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1em;
}

.card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  text-decoration: none;
  font-weight: bold;
  padding: 1em;
  border-radius: 0.5em;
  width: 45%;
}

.card:hover {
  background: #61400f;
}

.card i {
  font-size: 1.5rem;
  color: #ffa726;
}

/* ========== Responsive Design ========== */
@media (max-width: 850px) {
  body {
    padding: 15px;
  }

  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  nav {
    justify-content: center;
    margin-top: 10px;
  }

  .post h1 {
    font-size: 1.6rem;
    flex-direction: column;
    text-align: center;
    align-items: flex-start;
  }

  #pagination {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 100%;
  }
}
