/* CSS Custom Properties for Modern Theming */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --background: #ffffff;
    --surface: #f8fafc;
    --surface-elevated: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, #06b6d4 100%);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --border-radius: 12px;
    --border-radius-lg: 16px;
}

[data-theme="dark"] {
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-elevated: #334155;
    --border: #334155;
    --border-light: #475569;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--background);
    transition: var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: var(--transition);
}

[data-theme="dark"] .site-header {
    background: rgba(15, 23, 42, 0.95);
}

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

.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: var(--surface);
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    transform: rotate(180deg);
}

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

/* Article header */
.article-header {
    background: var(--surface-elevated);
    padding: 6rem 3rem 3rem;
    margin-top: 80px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.05;
    pointer-events: none;
}

.article-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.article-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-style: italic;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Article content */
.article-content {
    background: var(--surface-elevated);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.article-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-primary);
    margin: 3rem 0 1.5rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content ul, .article-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
}

.article-content li {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Profile cards */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.profile-card {
    background: var(--surface);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.profile-card:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    transform: translateY(-2px);
}

.profile-card:active {
    transform: translateY(-1px);
}

/* Enhanced hover effects for interactivity */
.profile-card:hover .profile-avatar {
    transform: scale(1.05);
}

.profile-card:hover .profile-title {
    color: var(--primary-hover);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    font-weight: bold;
    transition: var(--transition);
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: center;
}

.profile-title {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

.profile-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    text-align: center;
}

/* Highlights */
.highlights-section {
    background: var(--surface);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    margin: 2rem 0;
    border: 1px solid var(--border);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight-item {
    background: var(--background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.highlight-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.highlight-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    background: var(--gradient-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.highlight-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.highlight-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Tags */
.article-tags {
    background: var(--surface-elevated);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.tag:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Footer */
.site-footer {
    background: var(--text-primary);
    color: var(--background);
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
}

/* Ideation tracker */
.ideation-tracker {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 2rem 0;
    font-size: 0.95rem;
}

/* Skip link accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .article-header, .article-content, .article-tags {
        padding: 2rem 1.5rem;
        margin-left: 0;
        margin-right: 0;
    }
    
    .article-title {
        font-size: 2.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .highlights-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility and animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth entrance animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}