/**
 * CNL Site - Public Stylesheet
 * Location: /Library/WebServer/Documents/Canemah/assets/css/site.css
 * 
 * Extends the archive aesthetic for public pages
 */

/* ============================================================================
   Reset & Base
   ============================================================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background: #fafafa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================================
   Typography
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #1a1a1a;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

p {
    margin: 0 0 1em 0;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================================================
   Layout
   ============================================================================ */

.site-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1a1a1a;
    text-decoration: none;
}

.site-logo:hover {
    text-decoration: none;
    color: #2563eb;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: #666;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1a1a1a;
    border-bottom-color: #2563eb;
    text-decoration: none;
}

main {
    flex: 1;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.site-footer {
    margin-top: auto;
    padding: 2rem;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.footer-links {
    margin-top: 0.5rem !important;
}

.footer-links a {
    color: #666;
}

.footer-links a:hover {
    color: #2563eb;
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center 60%;
    display: flex;
    align-items: flex-end;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
}

.hero-content {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.hero h1 {
    color: #fff;
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin: 0;
    max-width: 600px;
    line-height: 1.5;
}

/* ============================================================================
   Section Headers
   ============================================================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.section-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.section-header a {
    font-size: 0.9rem;
}

/* ============================================================================
   Projects Grid
   ============================================================================ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.project-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.project-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.project-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.project-card h3 a {
    color: #1a1a1a;
    text-decoration: none;
}

.project-card h3 a:hover {
    color: #2563eb;
}

.status-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-live {
    background: #d1fae5;
    color: #065f46;
}

.status-demo {
    background: #dbeafe;
    color: #1e40af;
}

.status-development {
    background: #fef3c7;
    color: #92400e;
}

.status-archived {
    background: #f3f4f6;
    color: #6b7280;
}

.project-tagline {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 auto 0;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #888;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.project-card footer {
    margin-top: 1rem;
}

.project-card footer a {
    font-size: 0.85rem;
}

/* ============================================================================
   Home Page Columns
   ============================================================================ */

.home-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Recent Documents */
.recent-docs .doc-item {
    margin-bottom: 1rem;
}

.recent-docs .doc-id {
    font-family: "SF Mono", Monaco, monospace;
    font-size: 0.8rem;
    color: #666;
    background: #f5f5f5;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

.recent-docs h4 {
    margin: 0.25rem 0 0 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.recent-docs h4 a {
    color: #1a1a1a;
}

.recent-docs .doc-type {
    font-size: 0.8rem;
    color: #888;
}

/* About Blurb */
.about-blurb p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

/* ============================================================================
   Projects Index Page
   ============================================================================ */

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0 0 0.5rem 0;
}

.page-header p {
    color: #666;
    margin: 0;
}

.filters-bar {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.8rem;
    color: #666;
}

.filter-group select {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
}

.btn:hover {
    background: #e5e7eb;
    text-decoration: none;
}

/* ============================================================================
   Project Detail Page
   ============================================================================ */

.project-detail {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.project-detail header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.project-detail h1 {
    margin: 0 0 0.25rem 0;
    font-size: 1.75rem;
}

.project-detail .tagline {
    font-size: 1.1rem;
    color: #666;
    margin: 0 0 1rem 0;
}

.project-detail .meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.project-detail .description {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}

.project-detail .visit-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: #fff;
    border-radius: 4px;
    font-weight: 500;
}

.project-detail .visit-link:hover {
    background: #1d4ed8;
    text-decoration: none;
}

/* Documentation Section */
.documentation-section {
    margin-bottom: 2rem;
}

.documentation-section h2 {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.doc-group {
    margin-bottom: 1.5rem;
}

.doc-group h3 {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem 0;
}

.doc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doc-list li {
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.doc-list .doc-id {
    font-family: "SF Mono", Monaco, monospace;
    font-size: 0.8rem;
    color: #666;
}

.doc-list .doc-title {
    display: block;
    margin-top: 0.25rem;
    font-weight: 500;
}

.doc-list .doc-title a {
    color: #1a1a1a;
}

/* Repository Section */
.repository-section h2 {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.repo-item {
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.repo-item code {
    font-family: "SF Mono", Monaco, monospace;
    font-size: 0.85rem;
    background: #1f2937;
    color: #f9fafb;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

.repo-item .repo-notes {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

/* ============================================================================
   About Page
   ============================================================================ */

.about-content {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 2rem;
}

.about-content h1 {
    margin-top: 0;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.7;
    max-width: 700px;
}

/* ============================================================================
   Empty States
   ============================================================================ */

.empty-state {
    color: #888;
    font-style: italic;
    padding: 2rem;
    text-align: center;
}

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 768px) {
    .site-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero {
        height: 300px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .home-columns {
        grid-template-columns: 1fr;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
}
