/* ============================================
   SYSTEMS ENGINEERING NORTH STAR - SITE
   Orange Accent with Wavelet Branding
   ============================================ */

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

:root {
    /* Orange Accent (Primary) */
    --accent-orange: #d35400;
    --accent-orange-dark: #b84300;
    --accent-orange-light: #e67e22;
    
    /* Wavelet Navy (Structure) */
    --bg-navy: #0a1929;
    --bg-navy-light: #1a2942;
    
    /* Neutral/Educational */
    --bg-white: #ffffff;
    --bg-light: #fafafa;
    --bg-warm: #f7f5f2;
    --bg-dark: #2a2a2a;
    --bg-darker: #0a1929;
    
    --text-primary: #1b1b1b;
    --text-secondary: #4a4a4a;
    --text-muted: #8a8a8a;
    
    --border-light: #e8e8e8;
    --border-medium: #d0d0d0;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    background: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 17px;
}

/* ============================================
   NAVIGATION WITH LOGO
   ============================================ */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-darker);
    border-bottom: 3px solid var(--accent-orange);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    padding: 1rem 0;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--bg-white);
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.nav-brand a:hover {
    opacity: 0.9;
}

.nav-logo {
    height: 35px;
    width: auto;
}

.nav-title span {
    color: var(--accent-orange);
}

/* Hamburger Menu Toggle Button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--bg-white);
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.nav-toggle:hover {
    color: var(--accent-orange);
}

.nav-toggle.active {
    color: var(--accent-orange);
}

/* Overlay for mobile menu */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.show {
    display: block;
    opacity: 1;
}

/* Desktop Navigation */
.nav-links {
    display: flex;
    gap: 0;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 1.5rem 1.25rem;
    color: var(--bg-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.nav-links a:hover {
    color: var(--accent-orange);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: var(--accent-orange);
    border-bottom-color: var(--accent-orange);
}

/* ============================================
   PAGE LAYOUT
   ============================================ */
.page-hero {
    padding: 6rem 2rem 4rem;
    background: var(--bg-warm);
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.page-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.page-hero p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

.page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.content-section {
    margin-bottom: 6rem;
}

.content-section:last-child {
    margin-bottom: 0;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1.25rem;
}

h4 {
    font-size: 1.3rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   TEACHING ELEMENTS
   ============================================ */
.teaching-box {
    background: rgba(211, 84, 0, 0.05);
    border-left: 6px solid var(--accent-orange);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    font-size: 1.0625rem;
    line-height: 1.7;
}

.teaching-box strong {
    color: var(--accent-orange-dark);
    font-weight: 700;
}

.callout-box {
    background: var(--bg-white);
    border: 2px solid var(--accent-orange);
    border-left-width: 6px;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.callout-box strong {
    color: var(--accent-orange);
}

.critical-note {
    background: rgba(211, 84, 0, 0.1);
    border: 2px solid var(--accent-orange);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.critical-note strong {
    color: var(--accent-orange-dark);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ============================================
   CARDS & GRIDS
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
}

.card {
    background: var(--bg-warm);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--accent-orange);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.card ul {
    list-style: none;
    margin-top: 1.25rem;
}

.card li {
    padding: 0.5rem 0 0.5rem 1.75rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.card li::before {
    content: '→';
    position: absolute;
    left: 0.25rem;
    color: var(--accent-orange);
    font-weight: 700;
}

/* ============================================
   TABLES
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.data-table th {
    background: var(--bg-dark);
    color: var(--bg-white);
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table th.highlight {
    background: var(--accent-orange);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--bg-warm);
}

/* ============================================
   CODE & EXAMPLES
   ============================================ */
.example-box {
    background: var(--bg-warm);
    border-left: 6px solid var(--accent-orange);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.example-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-orange-dark);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.example-bad {
    color: #991b1b;
    text-decoration: line-through;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.example-good {
    color: #065f46;
    font-weight: 600;
}

code {
    background: var(--bg-warm);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent-orange-dark);
}

/* ============================================
   LISTS
   ============================================ */
.checklist {
    list-style: none;
    margin: 1.5rem 0;
}

.checklist li {
    padding: 0.6rem 0 0.6rem 2rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.checklist li::before {
    content: '→';
    position: absolute;
    left: 0.5rem;
    color: var(--accent-orange);
    font-weight: 700;
    font-size: 1.2rem;
}

/* ============================================
   FOOTER - WAVELET BRANDED
   ============================================ */
.site-footer {
    background: var(--bg-darker);
    padding: 4rem 2rem 2rem;
    border-top: 3px solid var(--accent-orange);
    margin-top: 6rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

/* Wavelet Logo */
.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 50px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.footer-logo img:hover {
    opacity: 1;
}

/* Footer Text */
.footer-text {
    color: var(--text-muted);
}

.footer-text p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.footer-text strong {
    color: var(--accent-orange);
    font-size: 1.1rem;
}

.footer-text a {
    color: var(--bg-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-text a:hover {
    color: var(--accent-orange);
    text-decoration: underline;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* Footer Links */
.footer-links {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--bg-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-orange);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .nav-links a {
        padding: 1.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 2.5rem;
    }
    
    .page-hero p {
        font-size: 1.1rem;
    }
    
    /* Mobile Navigation */
    .nav-container {
        padding: 1rem 2rem;
        flex-wrap: nowrap;
    }
    
    .nav-brand {
        flex: 1;
    }
    
    .nav-brand a {
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    
    .nav-logo {
        height: 28px;
    }
    
    /* Show hamburger button on mobile */
    .nav-toggle {
        display: block;
    }
    
    /* Hide nav links by default on mobile */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        max-width: 80vw;
        background: var(--bg-darker);
        flex-direction: column;
        padding: 5rem 0 2rem;
        margin: 0;
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }
    
    /* Slide in from right when active */
    .nav-links.show {
        right: 0;
    }
    
    .nav-links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-links a {
        padding: 1.25rem 2rem;
        text-align: left;
        border-bottom: none !important;
        font-size: 1rem;
    }
    
    .nav-links a.active {
        background: rgba(211, 84, 0, 0.2);
        border-left: 4px solid var(--accent-orange);
    }
    
    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    /* Fallback for no-JS: Show link to nav.html */
    .no-js .nav-toggle {
        display: block;
    }
    
    .no-js .nav-links {
        display: none;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .page-content {
        padding: 3rem 1.5rem;
    }
    
    .teaching-box,
    .callout-box,
    .critical-note {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    /* Footer Responsive */
    .site-footer {
        padding: 3rem 1.5rem 1.5rem;
    }
    
    .footer-logo img {
        height: 40px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}