* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    color: #e6edf3;
    overflow-x: hidden;
    position: relative;
}

#grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, 40px);
    grid-template-rows: repeat(auto-fill, 40px);
    background: #0d1117;
}

.square {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(30, 58, 138, 0.15);
    transition: background-color 0.5s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 80px 20px 60px;
    margin-bottom: 60px;
}

.profile-section {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.avatar {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 3px solid #58a6ff;
    box-shadow: 0 0 30px rgba(88, 166, 255, 0.4);
    background: linear-gradient(135deg, #1e3a8a, #1e40af, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    color: #58a6ff;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.username {
    font-size: 3em;
    font-weight: 600;
    color: #e6edf3;
    margin-bottom: 10px;
}

.bio {
    font-size: 1.3em;
    color: #8b949e;
    margin-bottom: 20px;
    line-height: 1.5;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.profile-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8b949e;
}

.profile-stat strong {
    color: #e6edf3;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #30363d;
    color: #e6edf3;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.social-btn:hover {
    background: #30363d;
    border-color: #58a6ff;
}

.tabs {
    border-bottom: 1px solid #21262d;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
}

.tab {
    padding: 15px 10px;
    color: #8b949e;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-size: 14px;
}

.tab.active {
    color: #e6edf3;
    border-bottom-color: #f78166;
}

.section-title {
    font-size: 1.5em;
    color: #e6edf3;
    margin-bottom: 20px;
    font-weight: 600;
}

.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.repo-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 20px;
    transition: all 0.2s;
}

.repo-card:hover {
    border-color: #58a6ff;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.2);
}

.repo-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.repo-icon {
    color: #8b949e;
    font-size: 16px;
}

.repo-name {
    color: #58a6ff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.repo-name:hover {
    text-decoration: underline;
}

.repo-description {
    color: #8b949e;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.repo-footer {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #8b949e;
    align-items: center;
}

.repo-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.language-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.pinned-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 20px;
    font-size: 12px;
    color: #8b949e;
    margin-left: auto;
}

.ctf-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.platform-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 25px;
    text-align: center;
}

.platform-name {
    font-size: 1.3em;
    color: #58a6ff;
    margin-bottom: 15px;
    font-weight: 600;
}

.platform-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.platform-stat {
    text-align: center;
}

.stat-value {
    font-size: 2em;
    color: #58a6ff;
    font-weight: 700;
}

.stat-label {
    font-size: 0.85em;
    color: #8b949e;
    margin-top: 5px;
}

footer {
    border-top: 1px solid #21262d;
    padding: 30px 20px;
    text-align: center;
    color: #8b949e;
    font-size: 14px;
    margin-top: 60px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
    }

    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .avatar {
        width: 200px;
        height: 200px;
        font-size: 80px;
    }

    .username {
        font-size: 2em;
    }

    .repo-grid {
        grid-template-columns: 1fr;
    }

    .profile-stats {
        justify-content: center;
    }
}