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

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #333;
  --text-tertiary: #666;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --border: #e5e7eb;
  --tag-bg: #f3f4f6;
  --max-width: 860px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.header .subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 640px;
}

.header-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.header-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.header-links a:hover { text-decoration: underline; }

/* Nav - detail pages */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.nav a:hover { color: var(--accent); }

/* Main */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

/* Project Cards - index page */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border-color: var(--accent);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
}

.badge {
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-ai { background: #dbeafe; color: #1e40af; }
.badge-tool { background: #d1fae5; color: #065f46; }
.badge-automation { background: #fef3c7; color: #92400e; }
.badge-dev { background: #ede9fe; color: #5b21b6; }
.badge-integration { background: #fce7f3; color: #9d174d; }

.card-oneliner {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 12px;
}

.card-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.card-highlight {
  font-size: 14px;
  color: var(--text-secondary);
}

.card-highlight strong {
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}

.card-arrow {
  font-size: 15px;
  color: var(--accent);
  font-weight: 500;
}

/* Detail page */
.detail-header {
  margin-bottom: 40px;
}

.detail-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.detail-meta {
  font-size: 16px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

/* Sections */
.section {
  margin-bottom: 40px;
}

.section h2 {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.section p {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 12px;
}

.section p:last-child { margin-bottom: 0; }

/* Decision list */
.decisions {
  list-style: none;
  padding: 0;
}

.decisions li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 12px;
}

.decision-q {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.decision-a {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Flow diagram */
.flow {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.flow-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.flow-diagram {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre;
}

/* Outcomes */
.outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.outcome {
  background: var(--accent-light);
  border-radius: 8px;
  padding: 16px 20px;
}

.outcome-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.outcome-label {
  font-size: 15px;
  color: var(--text-secondary);
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--tag-bg);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
}

/* Status note */
.status-note {
  margin-top: 16px;
  font-size: 15px;
  color: var(--text-tertiary);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pagination a {
  text-decoration: none;
  color: inherit;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
  flex: 1;
}

.pagination a:hover {
  border-color: var(--accent);
}

.pagination .prev { text-align: left; }
.pagination .next { text-align: right; }

.pagination .label {
  font-size: 13px;
  color: var(--text-tertiary);
  display: block;
  margin-bottom: 4px;
}

.pagination .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

/* Footer */
.footer {
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-links a {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 600px) {
  .header { padding: 32px 20px; }
  .header h1 { font-size: 26px; }
  .project-card { padding: 20px; }
  .outcomes { grid-template-columns: 1fr 1fr; }
  .flow-diagram { font-size: 13px; }
  .detail-header h1 { font-size: 24px; }
  body { font-size: 16px; }
}
