* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sf-font: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --inter-font: 'Inter', sans-serif;
}

body {
    font-family: var(--sf-font);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    border: none;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.theme-toggle svg {
    display: none;
}

.theme-toggle .sun-icon {
    display: block;
}

body.dark-mode .theme-toggle .sun-icon {
    display: none;
}

body.dark-mode .theme-toggle .moon-icon {
    display: block;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-screen p {
    font-family: var(--inter-font);
    font-size: 16px;
    color: var(--text-secondary);
}

.hero-section {
    padding: 100px 0 60px;
    text-align: center;
}

.profile-card {
    max-width: 600px;
    margin: 0 auto;
}

.avatar-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--avatar-shadow);
    background: var(--card-bg);
    border: 3px solid var(--border-color);
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-role {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

.user-bio {
    font-family: var(--inter-font);
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 24px;
    line-height: 1.7;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.stats-section {
    padding: 60px 0;
    background: var(--section-bg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.repos-section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
}

.repos-filter {
    display: flex;
    gap: 12px;
}

.filter-btn {
    padding: 8px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: var(--sf-font);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.repo-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.repo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.repo-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.repo-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    display: block;
}

.repo-name:hover {
    color: var(--primary-color);
}

.repo-description {
    font-family: var(--inter-font);
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.repo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.repo-language {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.repo-language-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.repo-stats {
    display: flex;
    gap: 20px;
}

.repo-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.repo-skeleton {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.resume-section {
    padding: 60px 0;
    background: var(--section-bg);
    text-align: center;
}

.resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-family: var(--sf-font);
    font-size: 16px;
    font-weight: 600;
    box-shadow: var(--primary-shadow);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.resume-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--primary-shadow-hover);
}

.contact-section {
    padding: 80px 0 60px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.contact-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
    text-decoration: none;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
}

.contact-card:hover {
    transform: translateX(5px);
    box-shadow: var(--card-shadow-hover);
}

.contact-card svg {
    flex-shrink: 0;
}

.contact-card span {
    font-family: var(--inter-font);
    font-size: 15px;
}

.footer {
    padding: 30px 0;
    background: var(--footer-bg);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-family: var(--inter-font);
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .repos-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 32px;
    }
    
    .user-role {
        font-size: 18px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .repos-filter {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .filter-btn {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .avatar-container {
        width: 120px;
        height: 120px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .section-header h2 {
        font-size: 26px;
    }
}