/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    background: #ffffff;
    min-height: 100vh;
    font-size: 16px;
    font-weight: 400;
}

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

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 2rem;
    background: #ffffff;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-left: 200px;
    max-width: 1000px;
}

.title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.author {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 2.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Action buttons */
.action-buttons {
    position: fixed;
    top: 2rem;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 100;
}

.logo-container {
    margin-bottom: 1rem;
    text-align: center;
}

.logo {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-buttons {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    background: #ffffff;
    color: #4a5568;
}

.btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: #2d3748;
    color: #ffffff;
    border-color: #2d3748;
}

.btn-primary:hover {
    background: #1a202c;
    border-color: #1a202c;
    box-shadow: 0 4px 8px rgba(45, 55, 72, 0.2);
}

.btn-secondary {
    background: #4a5568;
    color: #ffffff;
    border-color: #4a5568;
}

.btn-secondary:hover {
    background: #2d3748;
    border-color: #2d3748;
    box-shadow: 0 4px 8px rgba(74, 85, 104, 0.2);
}

.btn-audio {
    background: #3182ce;
    color: #ffffff;
    border-color: #3182ce;
}

.btn-audio:hover {
    background: #2c5282;
    border-color: #2c5282;
    box-shadow: 0 4px 8px rgba(49, 130, 206, 0.2);
}

.btn-audio.playing {
    background: #e53e3e;
    border-color: #e53e3e;
}

.btn-audio.playing:hover {
    background: #c53030;
    border-color: #c53030;
}

/* Social links in sidebar */
.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #718096;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    width: 100%;
    justify-content: flex-start;
    box-sizing: border-box;
}

.social-link:hover {
    background: #f7fafc;
    color: #4a5568;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

/* Content styles */
.content {
    background: #ffffff;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-left: 200px;
    max-width: 1500px;
}

/* Artifact embed styles */
.artifact-embed {
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.artifact-embed iframe {
    border: none;
    border-radius: 8px;
}

.iframe-fallback {
    margin-top: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.iframe-fallback p {
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-size: 0.9rem;
}

.fallback-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3182ce;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.fallback-link:hover {
    background: #2c5282;
}

.observation {
    max-width: none;
}

.section {
    margin-bottom: 3.5rem;
}

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

.section h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 1px;
    background: #2d3748;
}

.section p {
    margin-bottom: 1.25rem;
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.7;
}

.section ul {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.section li {
    margin-bottom: 0.75rem;
    color: #4a5568;
    line-height: 1.6;
}

.section strong {
    color: #1a202c;
    font-weight: 600;
}

.formula {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 3px solid #2d3748;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #1a202c;
    margin: 1.5rem 0;
    text-align: center;
    font-weight: 500;
}

/* Toast notification */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #2d3748;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }
    
    .action-buttons {
        position: relative;
        top: auto;
        left: auto;
        flex-direction: row;
        justify-content: center;
        margin-bottom: 2rem;
        flex-wrap: wrap;
    }
    
    .logo-container {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .logo {
        max-width: 80px;
    }
    
    .social-buttons {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: none;
        flex-direction: row;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .header {
        padding: 2rem 1.5rem;
        margin-bottom: 3rem;
        margin-left: 0;
    }
    
    .title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .btn {
        width: auto;
        max-width: none;
        justify-content: center;
    }
    
    .content {
        padding: 2rem 1.5rem;
        margin-left: 0;
    }
    
    .section h2 {
        font-size: 1.3rem;
    }
    
    .toast {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem 0.75rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .social-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .social-link {
        width: auto;
        max-width: 200px;
    }
    
    .header {
        padding: 1.5rem 1rem;
    }
    
    .title {
        font-size: 1.9rem;
    }
    
    .content {
        padding: 1.5rem 1rem;
    }
    
    .author-links {
        flex-direction: column;
        align-items: center;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
.social-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading animation for buttons */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Professional focus states */
.btn:focus,
.social-link:focus {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}

/* Subtle animations */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}
