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

:root {
  --text: #374151;
  --text-light: #6b7280;
  --text-heading: #1f2937;
  --bg: #fafafa;
  --bg-card: #ffffff;
  --border: #d1d5db;
  --border-light: #e5e7eb;
  --link: #475569;
  --link-hover: #1e293b;
}

html {
  font-size: 18px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

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

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

/* Site Header */
.site-header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.site-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-heading);
  letter-spacing: -0.025em;
}

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

.site-header h1 > a:hover {
  color: var(--link-hover);
}

.site-icon-wrap {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin-right: 1em;
}

.site-icon-wrap::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: url("/static/apple-touch-icon.png") center/contain no-repeat;
  filter: blur(8px);
  opacity: 0.4;
  z-index: -1;
}

.site-icon {
  display: block;
  height: 48px;
  width: 48px;
  mask-image: radial-gradient(circle, black 80%, transparent 95%);
}

.rss-link img {
  height: 0.75em;
  width: 0.75em;
  vertical-align: baseline;
}

/* Projects Section */
.main-section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.project-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  border-color: #9ca3af;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.project-icon-wrap {
  position: relative;
  flex-shrink: 0;
}

.project-icon-wrap::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: url("/static/printloop-icon.png") center/contain no-repeat;
  filter: blur(8px);
  opacity: 0.35;
  z-index: -1;
}

.project-icon {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.project-content {
  flex: 1;
  min-width: 0;
}

.project-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-heading);
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

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

.post-card {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
  border-color: #9ca3af;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.post-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.post-title {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-heading);
  margin-bottom: 0.35rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

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

.post-date {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.post-summary {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

.no-posts {
  color: var(--text-light);
  font-style: italic;
}

/* Navigation */
nav {
  margin-bottom: 2rem;
}

nav a {
  font-size: 0.9rem;
  color: var(--text-light);
}

nav a:hover {
  color: var(--text-heading);
}

.post-nav {
  margin-top: 2rem;
  text-align: center;
}

/* Article Content */
article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
}

article h1,
article h2,
article h3 {
  font-weight: 600;
  color: var(--text-heading);
}

article h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

article p {
  margin-bottom: 1rem;
  text-indent: 1.5em;
}

article h3 {
  font-size: 1.15rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}


article ul,
article ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

article li {
  margin-bottom: 0.5rem;
}

article blockquote {
  border-left: 3px solid var(--border-light);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-light);
  font-style: italic;
}

article code {
  font-family: "SF Mono", "Fira Code", Menlo, Monaco, monospace;
  font-size: 0.875em;
  background: var(--bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

article pre {
  position: relative;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
  overflow-x: auto;
  margin: 0.75rem 0;
}

article pre .copy-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

article pre:hover .copy-btn {
  opacity: 1;
}

article pre .copy-btn:hover {
  background: var(--bg);
}

article pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: 0.85rem;
  line-height: 1.6;
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 0;
}

article a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* Comments Section */
.comments {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.comments h2 {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
  html {
    font-size: 16px;
  }

  main {
    padding: 2rem 1rem;
  }

  .site-header {
    margin-bottom: 2rem;
  }

  article h1 {
    font-size: 1.5rem;
  }
}