:root {
  --bg-paper: #f8f7f2;
  --bg-card: #ffffff;
  --bg-card-alt: #fdfdfc;
  --grid-line: rgba(72, 85, 105, 0.08);
  --ballpoint: #1e3a8a;
  --ballpoint-light: #2563eb;
  --highlighter: #fef08a;
  --highlighter-border: #fde047;
  --tape-color: rgba(254, 240, 138, 0.78);
  --tape-border: rgba(234, 179, 8, 0.3);
  --graphite: #1e293b;
  --graphite-muted: #64748b;
  --border-line: #e2e8f0;
  --border-dashed: #cbd5e1;
  --terminal-bg: #0f172a;
  --terminal-text: #f1f5f9;
  --status-live-bg: #dcfce7;
  --status-live-text: #166534;
  --status-lab-bg: #e0f2fe;
  --status-lab-text: #075985;
  --shadow-paper: 0 4px 12px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-paper-hover: 0 10px 25px rgba(15, 23, 42, 0.08), 0 3px 6px rgba(15, 23, 42, 0.04);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-paper);
  background-image: 
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--graphite);
  line-height: 1.6;
  min-height: 100vh;
  padding: 0 1.25rem 3rem;
}

.container {
  max-width: 880px;
  margin: 0 auto;
}

/* Header */
.site-header {
  padding: 2.5rem 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-line);
  margin-bottom: 2.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--graphite);
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-family: "Courier Prime", ui-monospace, monospace;
}

.brand-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--highlighter);
  border: 1px solid var(--highlighter-border);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transform: rotate(-1.5deg);
  display: inline-block;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--graphite-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Hero Section */
.hero {
  margin-bottom: 3rem;
}

.hero-tag {
  font-family: "Courier Prime", ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--ballpoint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-heading {
  font-size: 2.25rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-heading .underline {
  border-bottom: 3px solid var(--ballpoint);
  padding-bottom: 2px;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--graphite-muted);
  max-width: 680px;
}

/* Section Title */
.section-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--graphite-muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--border-line);
}

/* Featured Card */
.featured-wrapper {
  position: relative;
  margin-bottom: 3.5rem;
}

.tape {
  position: absolute;
  top: -12px;
  right: 30px;
  width: 90px;
  height: 24px;
  background-color: var(--tape-color);
  border: 1px dashed var(--tape-border);
  transform: rotate(2deg);
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow-paper);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.featured-card:hover {
  box-shadow: var(--shadow-paper-hover);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.project-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.badge-live {
  background-color: var(--status-live-bg);
  color: var(--status-live-text);
  border: 1px solid #bbf7d0;
}

.badge-lab {
  background-color: var(--status-lab-bg);
  color: var(--status-lab-text);
  border: 1px solid #bae6fd;
}

.project-tagline {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ballpoint);
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--graphite);
  margin-bottom: 1.5rem;
}

/* Terminal Snippet Box */
.terminal-box {
  background-color: var(--terminal-bg);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: "Courier Prime", ui-monospace, monospace;
}

.terminal-cmd {
  color: var(--terminal-text);
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: nowrap;
}

.terminal-cmd .prefix {
  color: #38bdf8;
  user-select: none;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-line);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-pill {
  font-size: 0.75rem;
  background-color: #f1f5f9;
  color: var(--graphite-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: "Courier Prime", ui-monospace, monospace;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ballpoint);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.cta-link:hover {
  border-bottom-color: var(--ballpoint);
}

/* Lab Grid */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.lab-card {
  background: var(--bg-card-alt);
  border: 1px dashed var(--border-dashed);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.15s ease;
}

.lab-card:hover {
  border-color: var(--ballpoint-light);
}

.lab-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.lab-desc {
  font-size: 0.875rem;
  color: var(--graphite-muted);
  margin-bottom: 1rem;
}

/* Maker Section */
.maker-box {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 8px;
  padding: 1.75rem;
  margin-bottom: 3.5rem;
}

.maker-header {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.maker-text {
  font-size: 0.95rem;
  color: var(--graphite);
  margin-bottom: 1.25rem;
}

.maker-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.maker-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ballpoint);
  text-decoration: none;
}

.maker-link:hover {
  text-decoration: underline;
}

/* Legal Pages */
.legal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: var(--shadow-paper);
  margin-bottom: 3.5rem;
}

.legal-section {
  margin-top: 1.75rem;
}

.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--graphite);
}

.legal-section p {
  font-size: 0.95rem;
  color: var(--graphite);
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.legal-section ul {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--graphite);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-section li {
  margin-bottom: 0.35rem;
}

/* Footer */
.site-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--graphite-muted);
  border-top: 1px solid var(--border-line);
  padding-top: 2rem;
}

.footer-links {
  margin-bottom: 0.5rem;
}

.footer-link {
  color: var(--graphite-muted);
  text-decoration: none;
  font-weight: 500;
}

.footer-link:hover {
  color: var(--ballpoint);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .hero-heading {
    font-size: 1.75rem;
  }
  .featured-card, .legal-content {
    padding: 1.25rem;
  }
  .tape {
    right: 15px;
    width: 70px;
  }
}
