:root {
  --bg: #f5f5f0;
  --bg-secondary: #eaeae5;
  --text: #1a1a1a;
  --text-muted: #555;
  --border: #ccc;
  --link: #1a5276;
  --link-hover: #0d2b3e;
  --tag-bg: #ddd;
  --tag-text: #333;
  --code-bg: #e8e8e3;
}

[data-theme="dark"] {
  --bg: #1a1a1a;
  --bg-secondary: #252525;
  --text: #d4d4d4;
  --text-muted: #888;
  --border: #444;
  --link: #7fb3d3;
  --link-hover: #a8d0e6;
  --tag-bg: #333;
  --tag-text: #bbb;
  --code-bg: #2a2a2a;
}

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

body {
  font-family: "IBM Plex Mono", monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.2s, color 0.2s;
}

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

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

header h1 a {
  color: var(--text);
  text-decoration: none;
}

#theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  border-radius: 2px;
}

#theme-toggle:hover {
  color: var(--text);
  border-color: var(--text);
}

/* Home page */
.intro {
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.part-group {
  margin-bottom: 2rem;
}

.part-group h2 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

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

.project-list li {
  padding: 0.4rem 0;
}

.project-list a {
  color: var(--link);
  text-decoration: none;
  font-size: 0.9rem;
}

.project-list a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Project pages */
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
}

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

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.project-part {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.project-section {
  margin-bottom: 2rem;
}

.project-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.project-section p,
.project-section li {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.75;
}

.project-section ul,
.project-section ol {
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
}

.project-section li {
  margin-bottom: 0.3rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.resources-list {
  list-style: none;
  padding-left: 0;
}

.resources-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

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

.resources-list a {
  color: var(--link);
  text-decoration: none;
  font-size: 0.85rem;
}

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

.resource-type {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.3rem;
}

code {
  background: var(--code-bg);
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  font-size: 0.82rem;
  font-family: inherit;
}

.pain-point {
  background: var(--bg-secondary);
  border-left: 2px solid var(--border);
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .container {
    padding: 1.5rem 1rem 3rem;
  }
}
