:root {
    /* Forge palette - heat and metal */
    --heat-darkest: #1a0f0a;
    --heat-dark: #2d1810;
    --heat-mid: #4a2c1f;
    --heat-glow: #8b4513;
    --heat-bright: #d4632a;
    --heat-core: #ff6b35;
    --metal-dark: #1c1c1e;
    --metal-mid: #2c2c2e;
    --metal-light: #3a3a3c;
    --metal-bright: #8e8e93;
    --text-primary: #f5f5f7;
    --text-secondary: #98989d;
    --text-dim: #636366;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--heat-darkest);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background forge glow */
.forge-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(212, 99, 42, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
    position: relative;
}

.emblem {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.8; text-shadow: 0 0 20px rgba(255, 107, 53, 0.3); }
    50% { opacity: 1; text-shadow: 0 0 40px rgba(255, 107, 53, 0.6); }
}

.name {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 200;
    letter-spacing: 0.3em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 40px rgba(255, 107, 53, 0.3);
}

.tagline {
    font-size: 1.1rem;
    color: var(--heat-bright);
    font-weight: 300;
    letter-spacing: 0.15em;
    opacity: 0.9;
}

.forge-sigil {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--heat-bright), transparent);
    margin: 2rem auto 0;
    opacity: 0.6;
}

/* Panel Styling */
.panel {
    background: var(--metal-dark);
    border: 1px solid var(--metal-mid);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

.panel:hover {
    border-color: var(--heat-glow);
}

.panel h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

/* Status Panel */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.heat-indicator {
    color: var(--heat-core);
    animation: heat-flicker 3s ease-in-out infinite;
}

@keyframes heat-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.forge-ready {
    color: #34c759;
}

/* Work Panel */
.work-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.work-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--metal-mid);
    border-radius: 8px;
    border-left: 3px solid var(--metal-light);
    transition: all 0.3s ease;
}

.work-item.active {
    border-left-color: var(--heat-core);
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.1), transparent);
}

.work-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.4rem;
    flex-shrink: 0;
}

.work-status.burning {
    background: var(--heat-core);
    box-shadow: 0 0 10px var(--heat-core);
    animation: burn 2s ease-in-out infinite;
}

.work-status.cooling {
    background: var(--heat-glow);
    opacity: 0.6;
}

@keyframes burn {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.work-details h3 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.work-details p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Philosophy Panel */
.code-grid {
    display: grid;
    gap: 1rem;
}

.principle {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--metal-mid);
}

.principle:last-child {
    border-bottom: none;
}

.principle-num {
    font-size: 0.7rem;
    color: var(--heat-bright);
    font-weight: 600;
    min-width: 2rem;
    opacity: 0.8;
}

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

.principle strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Changelog Panel */
.version-badge {
    display: inline-block;
    background: var(--heat-glow);
    color: var(--text-primary);
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 600;
}

.changelog-entries {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.entry {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.entry time {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: 'SF Mono', Monaco, monospace;
    white-space: nowrap;
    min-width: 100px;
}

.entry-content {
    flex: 1;
    min-width: 250px;
}

.entry-content strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.entry-content ul {
    list-style: none;
    padding-left: 0;
}

.entry-content li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.entry-content li::before {
    content: '·';
    position: absolute;
    left: 0.25rem;
    color: var(--heat-bright);
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--metal-mid);
    text-align: center;
}

.forge-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.forge-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.forge-links a:hover {
    color: var(--heat-bright);
}

.forge-tag {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .name {
        letter-spacing: 0.2em;
    }
    
    .panel {
        padding: 1rem;
    }
    
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .entry {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Selection styling */
::selection {
    background: var(--heat-glow);
    color: var(--text-primary);
}
