/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #FAFAF8;
  color: #111;
  line-height: 1.6;
  font-size: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img, svg {
  display: block;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

p {
  line-height: 1.7;
}

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a8a40;
}

.subtitle {
  color: #666;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 84px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e8e8e4;
  display: flex;
  align-items: center;
}

.nav .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #111;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-brand-name {
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.nav-brand-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  color: #8a8a40;
  letter-spacing: 0.05em;
}

.nav-brand img {
  width: 64px;
  height: 64px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: #111;
}

.nav-badge {
  display: none;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #D7DC4B;
  color: #111;
  padding: 3px 8px;
  border-radius: 4px;
}

.collaborator .nav-badge {
  display: inline-block;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #111;
  border-radius: 2px;
  transition: background 0.15s;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  text-align: center;
  padding-top: 160px;
  padding-bottom: 80px;
}

.hero .label {
  margin-bottom: 16px;
}

.hero h1 {
  margin-bottom: 20px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero .subtitle {
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  margin-bottom: 48px;
}

.section-header .label {
  margin-bottom: 8px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header .subtitle {
  max-width: 560px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: #fff;
  border: 1px solid #e8e8e4;
  border-radius: 10px;
  padding: 24px;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card-hero {
  margin-bottom: 32px;
}

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

.card-header h3 {
  flex: 1;
}

.card-meta {
  font-size: 0.875rem;
  color: #888;
  margin-top: 8px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-platform {
  background: #4a4c20;
  color: #D7DC4B;
}

.badge-active {
  background: #D7DC4B;
  color: #111;
}

.badge-progress {
  background: #e8e4a0;
  color: #5a5a20;
}

.badge-design {
  background: #eee;
  color: #555;
}

.badge-concept {
  background: #f4f4f2;
  color: #777;
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge {
  display: none;
}

.collaborator .status-badge {
  display: inline-block;
}

/* ============================================================
   PRODUCT LIST
   ============================================================ */
.product-group {
  margin-bottom: 40px;
}

.product-group:last-child {
  margin-bottom: 0;
}

.product-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a8a40;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8e8e4;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card {
  background: #fff;
  border: 1px solid #e8e8e4;
  border-radius: 10px;
  padding: 20px 24px;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.product-card .card-header {
  margin-bottom: 8px;
}

.product-card p {
  font-size: 0.925rem;
  color: #555;
}

/* ============================================================
   EXPANDABLE
   ============================================================ */
.expandable {
  cursor: pointer;
}

.expandable-content {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e8e8e4;
}

.collaborator .expandable.expanded .expandable-content {
  display: block;
}

.expand-hint {
  display: none;
  font-size: 0.8rem;
  color: #8a8a40;
  margin-top: 12px;
  font-weight: 500;
}

.collaborator .expand-hint {
  display: block;
}

.collaborator .expandable.expanded .expand-hint {
  display: none;
}

.expandable-content h4 {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8a40;
  margin-bottom: 10px;
  margin-top: 20px;
}

.expandable-content h4:first-child {
  margin-top: 0;
}

.expandable-content p {
  font-size: 0.925rem;
  color: #555;
  margin-bottom: 8px;
}

.expandable-content ul {
  list-style: disc;
  padding-left: 20px;
}

.expandable-content ul li {
  font-size: 0.925rem;
  color: #555;
  margin-bottom: 4px;
}

.expandable-content pre {
  background: #f4f4f2;
  border: 1px solid #e8e8e4;
  border-radius: 6px;
  padding: 16px;
  font-size: 0.8rem;
  overflow-x: auto;
  line-height: 1.5;
  color: #333;
}

/* Detail content — always visible on collaborator page */
.detail-content {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0ec;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
}

.detail-content h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin: 16px 0 8px;
}

.detail-content h4:first-child {
  margin-top: 0;
}

.detail-content ul {
  list-style: disc;
  padding-left: 20px;
}

.detail-content ul li {
  font-size: 0.925rem;
  color: #555;
  margin-bottom: 4px;
}

.detail-content pre {
  background: #f4f4f2;
  border: 1px solid #e8e8e4;
  border-radius: 6px;
  padding: 16px;
  font-size: 0.8rem;
  overflow-x: auto;
  line-height: 1.5;
  color: #333;
}

/* ============================================================
   PROSE — full project pages
   ============================================================ */
.prose {
  font-size: 1rem;
  color: #333;
  line-height: 1.8;
}

.prose h1 {
  margin-bottom: 12px;
}

.prose h2 {
  margin-top: 48px;
  margin-bottom: 16px;
}

.prose h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.prose h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  margin-top: 24px;
  margin-bottom: 8px;
}

.prose p {
  margin-bottom: 16px;
}

.prose ul, .prose ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.prose pre {
  background: #f4f4f2;
  border: 1px solid #e8e8e4;
  border-radius: 8px;
  padding: 20px;
  font-size: 0.85rem;
  overflow-x: auto;
  line-height: 1.6;
  color: #333;
  margin: 20px 0;
}

.prose code {
  background: #f4f4f2;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

.prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.prose blockquote {
  border-left: 3px solid #D7DC4B;
  padding: 8px 20px;
  margin: 20px 0;
  color: #555;
  font-style: italic;
}

.prose hr {
  border: none;
  border-top: 1px solid #e8e8e4;
  margin: 32px 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

.prose th, .prose td {
  padding: 10px 14px;
  border: 1px solid #e8e8e4;
  text-align: left;
}

.prose th {
  background: #f4f4f2;
  font-weight: 600;
  font-size: 0.85rem;
}

.prose td {
  color: #555;
}

.prose a {
  color: #8a8a40;
  text-decoration: none;
  font-weight: 500;
}

.prose a:hover {
  color: #D7DC4B;
}

.detail-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #8a8a40;
  text-decoration: none;
}

.detail-link:hover {
  color: #D7DC4B;
}

.expandable-content .gh-link:hover {
  color: #D7DC4B;
}

/* ============================================================
   FEATURED CARD
   ============================================================ */
.featured-card {
  background: #fff;
  border: 1px solid #e8e8e4;
  border-radius: 12px;
  padding: 32px;
}

.featured-card .label {
  margin-bottom: 10px;
}

.featured-card h2 {
  margin-bottom: 16px;
}

.featured-card > p {
  color: #555;
  margin-bottom: 24px;
}

.feature-highlights {
  display: flex;
  flex-direction: row;
  gap: 24px;
  margin-bottom: 24px;
}

.feature-highlight {
  flex: 1;
  background: #FAFAF8;
  border: 1px solid #e8e8e4;
  border-radius: 8px;
  padding: 16px;
}

.feature-highlight h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #111;
}

.feature-highlight p {
  font-size: 0.825rem;
  color: #777;
  line-height: 1.5;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  width: 40px;
  height: 2px;
  background: #D7DC4B;
  margin: 0 auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #f4f4f2;
  text-align: center;
  padding: 48px 0;
  border-top: 1px solid #e8e8e4;
}

.footer h3 {
  margin-bottom: 12px;
}

.footer a {
  color: #8a8a40;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer a:hover {
  color: #111;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  margin-top: 20px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: #aaa;
}

.footer-links a {
  font-size: 0.875rem;
}

.footer-links span {
  font-size: 0.875rem;
  color: #ccc;
}

.footer-copyright {
  font-size: 0.8rem;
  color: #aaa;
}

/* ============================================================
   COLLABORATOR TOGGLE
   ============================================================ */
[data-collaborator] {
  display: none;
}

.collaborator [data-collaborator] {
  display: block;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1rem;
  }

  section {
    padding: 56px 0;
  }

  .hero {
    padding-top: 100px;
    padding-bottom: 56px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .feature-highlights {
    flex-direction: column;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e8e8e4;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 24px;
    width: 100%;
  }

  .nav-hamburger {
    display: flex;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}
