/* Maker Lab Hub — shared styles */
:root {
  --bg: #0c0e12;
  --bg-card: #141820;
  --border: #2a3140;
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #3dd68c;
  --accent-dim: rgba(61, 214, 140, 0.12);
  --orange: #f5a623;
  --blue: #4da6ff;
  --font-sans: "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", "IBM Plex Mono", monospace;
  --max: 960px;
  --radius: 12px;
}

*, *::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.75;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(12, 14, 18, 0.9);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.lead {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 640px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-right: 0.35rem;
}

.badge-done { background: var(--accent-dim); color: var(--accent); }
.badge-wip { background: rgba(245, 166, 35, 0.15); color: var(--orange); }
.badge-tag { background: rgba(77, 166, 255, 0.12); color: var(--blue); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
  display: block;
  color: inherit;
  text-decoration: none;
}

.project-card:hover {
  border-color: #3d4659;
  transform: translateY(-2px);
  text-decoration: none;
}

.project-card h2 {
  font-size: 1.05rem;
  margin: 0.5rem 0 0.35rem;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.tags { margin-top: 0.75rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--bg-card);
  font-weight: 600;
  width: 30%;
}

pre, code {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

pre {
  background: #0a0d11;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

p code, li code, td code {
  background: #0a0d11;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.timeline {
  list-style: none;
  border-left: 2px solid var(--border);
  margin-left: 0.5rem;
  padding-left: 1.25rem;
}

.timeline li {
  margin-bottom: 1rem;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -1.45rem;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.callout {
  background: var(--accent-dim);
  border: 1px solid rgba(61, 214, 140, 0.25);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

.callout-warn {
  background: rgba(245, 166, 35, 0.08);
  border-color: rgba(245, 166, 35, 0.3);
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-card);
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-dim);
  border-color: rgba(61, 214, 140, 0.35);
  color: var(--accent);
}

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

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

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 2rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-state.error {
  color: var(--orange);
  border-color: rgba(245, 166, 35, 0.35);
}

main ul {
  margin: 0 0 1rem 1.25rem;
}

main li {
  margin-bottom: 0.4rem;
}

@media (max-width: 600px) {
  .nav { flex-direction: column; align-items: flex-start; }
  th { width: 40%; }
}
