/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Topbar / Header */
.site-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

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

.brand-owner {
  color: var(--text-secondary);
  font-weight: 400;
}

.brand-slash {
  color: var(--text-muted);
}

.brand-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--status-live);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hero / Masthead Section */
.masthead {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.masthead-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: end;
}

@media (min-width: 900px) {
  .masthead-grid {
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
  }
}

.masthead-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.masthead-eyebrow::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  background-color: var(--accent);
}

.masthead-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.masthead-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 58ch;
  line-height: 1.6;
}

/* Technical Metadata / Spec Table in Hero */
.spec-ledger {
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.spec-cell {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-cell:nth-child(odd) {
  border-right: 1px solid var(--border-subtle);
}

.spec-cell:nth-last-child(-n+2) {
  border-bottom: none;
}

.spec-key {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.spec-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Toolbar & Navigation Bar */
.toolbar-section {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-primary);
  position: sticky;
  top: var(--header-height);
  z-index: 90;
}

.toolbar-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 960px) {
  .toolbar-layout {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Main Content Area */
.workspace-main {
  flex: 1;
  padding: 2.25rem 0 4rem;
}

.toolbar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Projects Grid & List View Modes */
.projects-container.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.25rem;
}

.projects-container.view-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-elevated);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
  }
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 640px) {
  .brand-status {
    display: none;
  }
  .masthead {
    padding: 2rem 0 1.75rem;
  }
  .toolbar-section {
    position: static;
  }
}
