/* CloudStreet CMS — public site styles.
   Visual identity transcribed faithfully from the legacy index.html. */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: white;
  padding: 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeIn 1s ease-in;
}

/* Public top nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.site-nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  opacity: 1;
}

.nav-search {
  margin-left: auto;
}

.nav-search input[type="search"] {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: white;
  font-size: 0.9rem;
  padding: 0.3rem 0.9rem;
  width: 200px;
  transition: background 0.2s ease, width 0.2s ease;
}

.nav-search input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.nav-search input[type="search"]:focus {
  background: rgba(255, 255, 255, 0.25);
  outline: none;
  width: 260px;
}

/* Search results page */
.search-no-results {
  text-align: center;
  opacity: 0.8;
  font-size: 1.1rem;
  margin-top: 2rem;
}

/* Homepage header */
header {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 1rem;
}

.info {
  font-size: 1.1rem;
}

.info a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  transition: border-color 0.3s ease;
}

.info a:hover {
  border-bottom-color: white;
}

/* Category sections and the book grid */
.category {
  margin-bottom: 2rem;
}

.category-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.repo-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  color: white;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.repo-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.repo-card.new {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

.repo-card.new:hover {
  background: rgba(255, 255, 255, 0.32);
}

.repo-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.new-badge {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 6px;
}

.repo-description {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.5;
  flex: 1;
}

.repo-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: auto;
}

.repo-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.star-icon {
  font-size: 0.9rem;
}

.repo-links {
  display: flex;
  gap: 0.75rem;
}

.repo-links a {
  flex: 1;
  text-align: center;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.repo-links a:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* Homepage about teaser */
.about-teaser {
  max-width: 760px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.about-teaser .read-more {
  display: inline-block;
  margin-top: 0.5rem;
  color: white;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

.about-teaser .read-more:hover {
  border-bottom-color: white;
}

/* About page body */
.about-body {
  max-width: 760px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.about-body h1,
.about-body h2,
.about-body h3 {
  margin: 1.5rem 0 0.75rem;
}

.about-body p,
.about-body ul,
.about-body ol,
.about-body blockquote {
  margin-bottom: 1rem;
}

.about-body ul,
.about-body ol {
  padding-left: 1.5rem;
}

.about-body blockquote {
  padding-left: 1rem;
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  opacity: 0.9;
}

.about-body a,
.about-teaser a {
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.about-body code,
.about-teaser code {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.about-body pre {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.about-body pre code {
  background: none;
  padding: 0;
}

.about-empty {
  opacity: 0.7;
  font-style: italic;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
}

.footer-text {
  max-width: 760px;
  margin: 0 auto 1rem;
  text-align: center;
  opacity: 0.85;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-note {
  text-align: center;
  opacity: 0.7;
  font-size: 0.85rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-note a {
  color: white;
  opacity: 0.85;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  .repos-grid { grid-template-columns: 1fr; }
}
