/* === s1ngh.ca — static, minimal, light === */

:root {
  --bg: #fafaf8;
  --text: #1f1f1f;
  --text-muted: #6b6b6b;
  --accent: #3b3b3b;
  --hairline: #e8e8e4;
  --link: #2c5aa0;
  --link-hover: #1a3a6a;
  --radius: 6px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
}

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

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 350;
  line-height: 1.75;
  min-height: 100vh;
}

/* === Layout === */

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Header === */

.site-header {
  padding: 5rem 0 2rem;
}

.site-title {
  font-size: 1.05rem;
  font-weight: 450;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-title:hover {
  opacity: 0.7;
}

.site-nav {
  margin-top: 0.6rem;
  display: flex;
  gap: 1.4rem;
}

.site-nav a {
  font-size: 0.88rem;
  font-weight: 350;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
}

/* === Main Content === */

main {
  padding-bottom: 5rem;
}

/* === Intro === */

.intro {
  margin-bottom: 4rem;
}

.intro h2 {
  font-size: 1.5rem;
  font-weight: 380;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.intro p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 0.8rem;
}

.intro .locations {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* === Section Headings === */

.section-heading {
  font-size: 0.78rem;
  font-weight: 450;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hairline);
}

/* === Post List === */

.post-list {
  list-style: none;
}

.post-item {
  margin-bottom: 1.6rem;
}

.post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 350;
  margin-bottom: 0.15rem;
}

.post-title {
  font-size: 1.05rem;
  font-weight: 420;
  line-height: 1.4;
}

.post-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}

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

.post-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.6;
}

/* === Blog Post === */

.post-header {
  margin-bottom: 2.5rem;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.post-header h1 {
  font-size: 1.8rem;
  font-weight: 380;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.post-body {
  font-size: 1rem;
  line-height: 1.85;
}

.post-body p {
  margin-bottom: 1.3rem;
}

.post-body h1,
.post-body h2 {
  font-size: 1.2rem;
  font-weight: 420;
  margin: 2.5rem 0 0.8rem;
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-size: 1.05rem;
  font-weight: 420;
  margin: 2rem 0 0.6rem;
}

.post-body a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid rgba(44, 90, 160, 0.25);
}

.post-body a:hover {
  border-bottom-color: var(--link);
}

.post-body ul,
.post-body ol {
  margin: 0.8rem 0 1.3rem 1.5rem;
}

.post-body li {
  margin-bottom: 0.4rem;
}

.post-body blockquote {
  border-left: 2px solid var(--hairline);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #f0f0ed;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

.post-body pre {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: #f4f4f1;
  padding: 1.2rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.3rem 0;
  line-height: 1.6;
}

.post-body pre code {
  background: transparent;
  padding: 0;
}

.post-body pre code.hljs {
  background: transparent;
  padding: 0;
}

.post-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.3rem 0;
  font-size: 0.9rem;
}

.post-body th,
.post-body td {
  border: 1px solid var(--hairline);
  padding: 0.5em 0.75em;
  text-align: left;
  vertical-align: top;
}

.post-body th {
  font-weight: 420;
  background: #f4f4f1;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 2.5rem 0;
}

.post-body img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.post-body .notice {
  border-left: 2px solid var(--hairline);
  background: #f4f4f1;
  border-radius: var(--radius);
  padding: 0.8em 1.1em;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.post-body .notice--info {
  border-left-color: var(--link);
}

.post-body .notice--warning {
  border-left-color: #b8860b;
}

.post-body .notice--danger {
  border-left-color: #b03a2e;
}

/* === Footer === */

.site-footer {
  margin-top: 4rem;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--hairline);
  text-align: center;
}

.site-footer .github-link {
  color: var(--text-muted);
  display: inline-flex;
  transition: color 0.15s;
}

.site-footer .github-link:hover {
  color: var(--text);
}

/* === Links === */

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

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

/* === Back Link === */

.back-link {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.back-link::before {
  content: "← ";
}

.back-link:hover {
  color: var(--text);
}

/* === Responsive === */

@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .container {
    padding: 0 1.2rem;
  }

  .site-header {
    padding: 3rem 0 1.5rem;
  }

  .post-header h1 {
    font-size: 1.5rem;
  }
}
