:root { color-scheme: light dark; }

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font: 16px/1.6 system-ui, sans-serif;
  display: flex;
  flex-direction: column;
}

h1.site-title {
  margin-bottom: 0;
}

.content {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;

  flex: 1;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* --- Intro / header block --- */

.intro {
  margin-bottom: 3rem;
}

.tagline {
  opacity: 0.65;
  margin: 0.5rem 0 1rem;
}

ul.socials {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  gap: 8px;
}

.socials a {
  display: inline-flex;
  opacity: 0.65;
  transition: opacity 0.15s ease;
}

.socials a:hover {
  opacity: 1;
}

/* --- Content sections (projects / posts) --- */

section {
  margin-bottom: 2.5rem;
}

section h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  margin-bottom:0;
}

section h2 + span {
  font-size: .75rem;
}

.content-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.content-list li {
  padding: 1rem 0;
  border-bottom: 1px solid currentColor;
  border-bottom-color: color-mix(in srgb, currentColor 15%, transparent);
}

.content-list li:last-child {
  border-bottom: none;
}

.content-list a {
  font-weight: 600;
  text-decoration: none;
}

.content-list a:hover {
  text-decoration: underline;
}

.content-list p {
  margin: 0.4rem 0 0;
  opacity: 0.7;
  font-size: 0.95rem;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.date {
  opacity: 0.5;
  font-size: 0.85rem;
}

/* --- Article page --- */

.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  opacity: 0.6;
  text-decoration: none;
  font-size: 0.9rem;
}

.back:hover {
  opacity: 1;
  text-decoration: underline;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

.article-header h1 {
  margin: 0 0 0.5rem;
}

.article-header .date {
  opacity: 0.5;
  font-size: 0.9rem;
  margin: 0;
}

/* Prose styling for rendered content (markdown/HTML output) */

.prose {
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1.2rem;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
}

.prose h3 {
  margin-top: 2rem;
  font-size: 1.15rem;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  text-underline-offset: 2px;
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.9em;
  background: color-mix(in srgb, currentColor 8%, transparent);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.prose pre {
  background: color-mix(in srgb, currentColor 6%, transparent);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose blockquote {
  border-left: 3px solid color-mix(in srgb, currentColor 20%, transparent);
  padding-left: 1rem;
  opacity: 0.8;
  font-style: italic;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.4rem;
}