/* Minimalist Base Variables */
:root {
  --bg: #ffffff;
  --text: #111111;
  --link: #0055cc;
  --meta: #777777;
}

/* Dark Mode Support (Nithin added this to his site in 2023) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #e0e0e0;
    --link: #66b3ff;
    --meta: #888888;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  max-width: 42rem; /* Keeps the line length perfect for reading */
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Typography */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }

/* Links - Classic underline style */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Navigation Container */
nav.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Pushes links left and icons right */
  margin-bottom: 4rem;
  font-size: 1.1rem;
}

nav .nav-links a {
  margin-right: 1.2rem;
  text-decoration: none;
}

nav .nav-links a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

nav .nav-links a.active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Icon Links Styling */
nav .nav-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

nav .nav-icons a {
  display: flex; /* Helps align the SVG perfectly */
  color: var(--text); /* Matches your light/dark mode text color */
}

nav .nav-icons svg {
  width: 22px;
  height: 22px;
  fill: currentColor; /* Inherits the color from the <a> tag */
  transition: opacity 0.2s ease;
}

nav .nav-icons a:hover {
  text-decoration: none; /* Prevents underlines on the icons */
}

nav .nav-icons a:hover svg {
  opacity: 0.6; /* Creates a nice fade effect on hover */
}

/* Clean up lists so they look like plain text logs */
ul.post-list {
  list-style-type: none;
  padding: 0;
}

ul.post-list li {
  margin-bottom: 0.8rem;
  display: flex;
  flex-direction: column;
}

/* The date next to posts */
.post-meta {
  color: var(--meta);
  font-size: 0.9rem;
  font-family: monospace; /* Gives it a slight "terminal" feel */
}
/* Styling for the Year Headers */
h3.year-heading {
  font-size: 1.2rem;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Flexbox layout to align the date and the content block */
ul.year-grouped li {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.6rem;
}

/* Fix the width of the date so titles align perfectly vertically */
.date-short {
  min-width: 65px;
  flex-shrink: 0;
  font-family: monospace;
  color: var(--meta);
}

/* Groups the title and tags together so they flow like a sentence */
.title-and-tags {
  display: inline;
}

/* Spaces the tags slightly away from the end of the title */
.tags-inline {
  margin-left: 0.5rem; 
  font-size: 0.85rem;
}

.tag-link {
  color: var(--meta);
  text-decoration: none;
  margin-right: 0.4rem;
}

.tag-link:hover {
  text-decoration: underline;
}