/* Maxi's Journal — Stylesheet */

:root {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --text: #c8c8c8;
  --text-muted: #6b6b6b;
  --accent: #9e9e9e;
  --border: #2a2a2a;
  --link: #b8b8b8;
  --link-hover: #e0e0e0;
  --code-bg: #1e1e1e;
  --time-color: #5a5a5a;
}

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

body {
  font-family: "Georgia", "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: 1.6rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  color: var(--link-hover);
}

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

header h1 a:hover {
  color: #fff;
}

.banner-wrap {
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-radius: 4px;
}

.banner-wrap img.banner {
  display: block;
  width: 100%;
  height: auto;
}

img.profile {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  float: right;
  border: 2px solid var(--border);
  margin-left: 1rem;
}

@media (max-width: 500px) {
  img.profile {
    float: none;
    display: block;
    margin: 0 0 1rem 0;
  }
}

.tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-style: italic;
}

.intro {
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 2.5rem;
  line-height: 1.8;
  font-style: italic;
}

/* Index post previews */
article.preview {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

article.preview:last-child {
  border-bottom: none;
}

article.preview h2 {
  font-size: 1.2rem;
  font-weight: normal;
  margin-bottom: 0.2rem;
}

article.preview h2 a {
  color: var(--link-hover);
  text-decoration: none;
}

article.preview h2 a:hover {
  color: #fff;
  text-decoration: underline;
}

article.preview p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Single post page */
article h1 {
  font-size: 1.6rem;
  font-weight: normal;
  color: var(--link-hover);
  margin-bottom: 0.2rem;
  letter-spacing: 0.01em;
}

article time {
  display: block;
  color: var(--time-color);
  font-size: 0.85rem;
  margin-bottom: 2rem;
  font-family: "SF Mono", "Fira Code", monospace;
}

article h2 {
  font-size: 1.2rem;
  font-weight: normal;
  margin: 2rem 0 0.8rem;
  color: var(--accent);
}

article h3 {
  font-size: 1.05rem;
  font-weight: normal;
  margin: 1.5rem 0 0.5rem;
  color: var(--accent);
}

article p {
  margin-bottom: 1.2rem;
}

article ul, article ol {
  margin: 0 0 1.2rem 1.5rem;
}

article li {
  margin-bottom: 0.3rem;
}

article blockquote {
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--accent);
  font-style: italic;
}

article code {
  font-family: "SF Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.9rem;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

article pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  margin: 1.2rem 0;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.6;
}

article pre code {
  background: none;
  padding: 0;
}

article a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

article a:hover {
  color: #fff;
}

article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

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

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

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* Milestones */
ol.milestones {
  list-style: none;
  margin: 0;
}

ol.milestones li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

ol.milestones li:last-child {
  border-bottom: none;
}

ol.milestones time {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.8rem;
  color: var(--time-color);
  display: inline-block;
  width: 7rem;
}

/* Images */
article img {
  max-width: 100%;
  border-radius: 4px;
  margin: 1rem 0;
}

/* Mobile */
@media (max-width: 500px) {
  body {
    padding: 1.5rem 1rem 3rem;
  }
  header h1 {
    font-size: 1.3rem;
  }
  article h1 {
    font-size: 1.3rem;
  }
  .post-nav {
    flex-direction: column;
    gap: 0.5rem;
  }
}
