/* SeeMSixty7 – Clean CAD Blog */
:root {
  --bg: #0f1419;
  --bg-elevated: #1a222c;
  --bg-card: #1e2732;
  --border: #2d3a47;
  --text: #e7ecf1;
  --text-muted: #8b9aab;
  --accent: #3b9eff;
  --accent-hover: #6bb6ff;
  --accent-soft: rgba(59, 158, 255, 0.12);
  --success: #3dd68c;
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  --radius: 10px;
  --max: 720px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 25, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}
.logo:hover { color: var(--text); }

.nav {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}
.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover, .nav a.active { color: var(--text); }

/* Main */
main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Hero */
.hero {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 540px;
}

/* Post grid / list */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: border-color 0.2s, transform 0.15s;
}
.post-card:hover {
  border-color: #3d4f63;
  transform: translateY(-1px);
}
.post-card a.title {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 0.4rem;
}
.post-card a.title:hover { color: var(--accent); }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}
.meta time { font-variant-numeric: tabular-nums; }

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Single post */
.article {
  max-width: var(--max);
  margin: 0 auto;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.article-header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.75;
}
.article-body p { margin-bottom: 1.25rem; }
.article-body h2, .article-body h3 {
  margin: 2rem 0 0.85rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.article-body h2 { font-size: 1.4rem; }
.article-body h3 { font-size: 1.2rem; color: var(--text); }
.article-body ul, .article-body ol {
  margin: 0 0 1.25rem 1.4rem;
}
.article-body li { margin-bottom: 0.4rem; }
.article-body img {
  margin: 1.5rem auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.article-body figure {
  margin: 1.75rem 0;
}
.article-body figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}
.article-body strong { color: #fff; font-weight: 650; }
.article-body code, .article-body pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.article-body code {
  background: var(--bg-elevated);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  color: var(--text-muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.back-link:hover { color: var(--accent); }

/* Series navigation (Scale Factors etc.) */
.series-nav {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}
.series-nav .series-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.series-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.series-nav li a {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.series-nav li a:hover { color: var(--accent); }
.series-nav li.current span {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Prev / Next post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.15s;
}
.post-nav a:hover {
  border-color: var(--accent);
  color: var(--text);
}
.post-nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.post-nav-title {
  font-size: 0.95rem;
  font-weight: 550;
  line-height: 1.35;
}
.post-nav-next {
  text-align: right;
  justify-self: end;
}
.post-nav-prev { justify-self: start; }

@media (max-width: 560px) {
  .post-nav {
    grid-template-columns: 1fr;
  }
  .post-nav-next { text-align: left; justify-self: stretch; }
}

/* About */
.about-content {
  max-width: var(--max);
}
.about-content p { margin-bottom: 1.15rem; color: var(--text-muted); }
.about-content h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.3rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Responsive */
@media (max-width: 640px) {
  .header-inner { padding: 0 1rem; }
  main { padding: 1.75rem 1rem 3rem; }
  .post-card { padding: 1.2rem 1.25rem; }
  .nav { gap: 1.1rem; }
  .nav a { font-size: 0.9rem; }
}
