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

/* CSS Variables for Light Theme (default) */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #ffffff;
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --border-primary: #d0d7de;
    --border-secondary: #d8dee4;
    --link-color: #0969da;
    --code-bg: rgba(175, 184, 193, 0.2);
    --icon-color: %2357606a;
}

/* CSS Variables for Dark Theme */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0d1117;
        --bg-secondary: #161b22;
        --bg-tertiary: #0d1117;
        --text-primary: #c9d1d9;
        --text-secondary: #8b949e;
        --border-primary: #30363d;
        --border-secondary: #21262d;
        --link-color: #58a6ff;
        --code-bg: rgba(110, 118, 129, 0.4);
        --icon-color: %238b949e;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Profile Container */
.profile-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* Profile Header */
.profile-header {
    margin-bottom: 16px;
}

.profile-path {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 400;
}

/* Profile Content */
.profile-content {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 32px;
    margin-bottom: 24px;
}

.profile-content h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.25;
}

.profile-content p {
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

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

.profile-content a {
    color: var(--link-color);
    text-decoration: none;
}

.profile-content a:hover {
    text-decoration: underline;
}

/* Pinned Section */
.pinned-section {
    margin-top: 32px;
}

.pinned-title {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Pinned Grid */
.pinned-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Repo Card */
.repo-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s ease;
}

.repo-card:hover {
    border-color: var(--text-secondary);
}

.repo-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.repo-header::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-image: url('data:image/svg+xml;utf8,<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path fill="var(--icon-color)" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
}

.repo-icon {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.repo-name {
    color: var(--link-color);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.repo-name:hover {
    text-decoration: underline;
}

.repo-badge {
    font-size: 12px;
    padding: 2px 7px;
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.repo-description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

.repo-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.repo-language {
    display: flex;
    align-items: center;
    gap: 4px;
}

.language-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.repo-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.repo-stat svg {
    fill: var(--text-secondary);
}

/* Code Blocks */
.highlight {
    margin-bottom: 16px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.highlight pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: var(--bg-secondary);
}

.highlight code {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
    color: var(--text-primary);
    background-color: transparent;
    padding: 0;
}

code {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 85%;
    padding: 3px 5px;
    background-color: var(--code-bg);
    border-radius: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-container {
        padding: 16px;
    }

    .profile-content {
        padding: 16px;
    }

    .profile-content h1 {
        font-size: 24px;
    }

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

    .repo-card {
        padding: 12px;
    }
}
