:root {
    --color-bg-canvas: #0d1117;
    --color-bg-subtle: #161b22;
    --color-border-default: #30363d;
    --color-border-muted: #21262d;
    --color-fg-default: #c9d1d9;
    --color-fg-muted: #8b949e;
    --color-accent-fg: #58a6ff;
    --color-accent-emphasis: #1f6feb;
    --color-profile-bg: #161b22;
    --color-profile-accent-bg: #1f6feb;
    --color-profile-accent-fg: #ffffff;
    --color-btn-primary-bg: #238636;
    --color-btn-primary-hover-bg: #2ea043;
    --color-btn-outline-border: #30363d;
    --color-header-bg: #161b22;
    --color-header-border: #30363d;
    --color-link-hover: #58a6ff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--color-bg-canvas);
    color: var(--color-fg-default);
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Main Content */
.main-content {
    display: flex;
    gap: 24px;
    padding-top: 24px;
}

.sidebar {
    width: 296px;
    flex-shrink: 0;
}

.content {
    flex: 1;
    min-width: 0;
}

/* Profile Card */
.profile-card {
    position: sticky;
    top: 16px;
}

.avatar {
    width: 296px;
    height: 296px;
    border-radius: 50%;
    border: 1px solid var(--color-border-default);
    object-fit: cover;
}

.name {
    font-size: 24px;
    font-weight: 700;
    margin-top: 16px;
    line-height: 1.2;
}

.username {
    font-size: 20px;
    font-weight: 300;
    color: var(--color-fg-muted);
    margin-top: 4px;
    line-height: 1.2;
}

.btn-primary {
    background-color: var(--color-btn-primary-bg);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    margin-top: 16px;
    transition: 0.2s;
}

.btn-primary:hover {
    background-color: var(--color-btn-primary-hover-bg);
}

.profile-stats {
    margin-top: 16px;
    font-size: 14px;
}

.profile-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-stats strong {
    color: var(--color-fg-default);
}

.color-fg-default {
    color: var(--color-fg-default);
}

/* Profile Details */
.profile-details {
    margin-top: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.detail-item svg {
    flex-shrink: 0;
}

.detail-item a {
    color: var(--color-accent-fg);
    text-decoration: none;
}

.detail-item a:hover {
    text-decoration: underline;
}

.icon {
    fill: var(--color-fg-muted);
}

/* Organizations */
.organizations {
    margin-top: 24px;
}

.organizations h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.org-icons {
    display: flex;
    gap: 8px;
}

.org-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--color-border-default);
}

/* Section Titles */
.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border-muted);
    padding-bottom: 8px;
}

.subsection-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Pinned Repos */
.pinned {
    margin-bottom: 32px;
}

.pinned-repos {
    display: flex;
    gap: 16px;
}

.repo-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--color-border-default);
    border-radius: 6px;
    background-color: var(--color-bg-canvas);
    text-decoration: none;
    transition: 0.2s;
    flex: 1;
}

.repo-card:hover {
    border-color: var(--color-fg-muted);
}

.repo-icon {
    color: var(--color-fg-muted);
    flex-shrink: 0;
}

.repo-icon svg {
    fill: var(--color-fg-muted);
}

.repo-name {
    color: var(--color-accent-fg);
    font-weight: 600;
    font-size: 14px;
}

.repo-description {
    margin-top: 4px;
    font-size: 12px;
    color: var(--color-fg-muted);
}

/* Contributions Section */
.contributions-section {
    margin-bottom: 32px;
}

.contributions-graph {
    padding: 16px 0;
}

/* Contribution Heatmap Table */
.heatmap-table {
    border-collapse: separate;
    border-spacing: 1px;
}

.heatmap-table td {
    padding: 0;
}

.heatmap-months td {
    font-size: 10px;
    color: var(--color-fg-muted);
    text-align: center;
    padding-bottom: 5px;
}

.heatmap-weekday {
    font-size: 10px;
    color: var(--color-fg-muted);
    text-align: right;
    padding-right: 8px;
    width: 30px;
}

.heatmap-cell {
    width: 15px !important;
    height: 15px !important;
    border-radius: 2px;
    background-color: #161b22;
}

.heatmap-cell.l0 { background-color: #161b22; }
.heatmap-cell.l1 { background-color: #0e4429; }
.heatmap-cell.l2 { background-color: #39d353; }

/* Contribution Activity - Instagram Grid */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 4px;
}

.activity-grid-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
}

.grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-align: center;
}

.activity-grid-item:hover .grid-overlay {
    opacity: 1;
}

.grid-date {
    color: #fff;
    font-size: 12px;
    margin-bottom: 8px;
}

.grid-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.grid-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

/* Footer */
.footer {
    margin-top: 48px;
    padding: 40px 0;
    border-top: 1px solid var(--color-border-muted);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--color-fg-muted);
}

.footer-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--color-accent-fg);
    text-decoration: none;
    font-size: 12px;
}

.footer-nav a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .profile-card {
        position: static;
    }

    .header-nav {
        display: none;
    }

    .activity-header {
        flex-direction: column;
    }

    .activity-image {
        width: 100%;
        height: auto;
    }

    .banner {
        display: none;
    }
}
