:root {
    /* Base Colors - Darker, Deeper */
    --bg-primary: #05090e;
    /* Almost black */
    --bg-secondary: #0d1117;
    --bg-glass: rgba(22, 27, 34, 0.7);

    /* Text */
    --text-primary: #e6edf3;
    --text-secondary: #7d8590;
    --text-accent: #2f81f7;

    /* Borders & Accents */
    --border-color: #30363d;
    --border-glow: rgba(56, 139, 253, 0.4);

    /* Brand Colors */
    --accent-blue: #2f81f7;
    --accent-green: #238636;
    --accent-pink: #db61a2;
    --accent-yellow: #e3b341;
    --accent-orange: #f0883e;

    /* Functional */
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-code: 'Fira Code', monospace;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Ambient Glow */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 15% 50%, rgba(47, 129, 247, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(219, 97, 162, 0.08) 0%, transparent 25%);
    pointer-events: none;
    z-index: -1;
}

a {
    text-decoration: none;
    transition: 0.2s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER --- */
.gh-header {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(13, 17, 23, 0) 100%);
    padding-top: 60px;
    padding-bottom: 20px;
    position: relative;
}

.profile-section {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 40px;
}

/* Avatar with Ring */
.avatar-wrapper {
    position: relative;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 4px var(--border-color);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar-wrapper:hover .avatar {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px var(--accent-blue);
}

.status-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background-color: var(--accent-green);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

/* User Info & Bio */
.user-info h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.handle {
    font-size: 20px;
    font-weight: 300;
    color: var(--text-secondary);
}

.bio-wrapper {
    font-family: var(--font-code);
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 800px;
}

.prompt {
    color: var(--accent-pink);
}

.bio {
    min-height: 24px;
}

/* Stats Grid */
.stats-grid {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(48, 54, 61, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.2s;
}

.stat-item:hover {
    background: rgba(48, 54, 61, 0.6);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.stat-item i {
    color: var(--text-secondary);
    font-size: 18px;
}

.stat-item b {
    color: var(--text-primary);
    display: block;
    line-height: 1;
}

.stat-item span {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Header Actions */
.header-actions {
    margin-left: auto;
}

.gh-buttons-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #238636;
    color: white;
}

.glow-effect {
    box-shadow: 0 0 15px rgba(35, 134, 54, 0.4);
    transition: 0.3s;
}

.glow-effect:hover {
    box-shadow: 0 0 25px rgba(35, 134, 54, 0.6);
    transform: scale(1.02);
}

/* Contribution Strip Visual */
.contribution-strip {
    display: flex;
    gap: 3px;
    justify-content: center;
    margin-top: 40px;
    opacity: 0.6;
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.contrib-box {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.contrib-box.low {
    background-color: #0e4429;
}

.contrib-box.med {
    background-color: #006d32;
}

.contrib-box.high {
    background-color: #39d353;
    box-shadow: 0 0 5px #39d353;
}

/* --- NAV & SEARCH --- */
.sticky-nav-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 9, 14, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.gh-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.gh-nav ul {
    display: flex;
    gap: 30px;
}

.gh-nav li {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    padding: 18px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gh-nav li:hover {
    color: var(--text-primary);
}

.gh-nav li.active {
    color: var(--text-primary);
    font-weight: 600;
}

.gh-nav li.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-orange);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 -2px 10px var(--accent-orange);
}

/* Search Bar */
.search-container {
    position: relative;
    width: 300px;
}

.search-container input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px 6px 35px;
    color: var(--text-primary);
    font-size: 14px;
    transition: 0.2s;
    font-family: var(--font-main);
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent-blue);
    width: 100%;
    /* Could expand here */
    box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.1);
}

.search-container .fa-magnifying-glass {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
}

.cmd-key {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-code);
}

/* --- PROJECTS GRID --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding-bottom: 60px;
}

.project-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    position: relative;
    transition: all 0.1s ease-out;
    /* Fast transition for tilt */
    transform-style: preserve-3d;
    overflow: hidden;
}

/* Glowing Border Logic */
.project-card::before {
    content: "";
    position: absolute;
    top: var(--y);
    left: var(--x);
    transform: translate(-50%, -50%);
    width: 0px;
    height: 0px;
    background: radial-gradient(circle, rgba(47, 129, 247, 0.4) 0%, transparent 70%);
    box-shadow: 0 0 80px 40px rgba(47, 129, 247, 0.15);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    border-color: var(--text-secondary);
    box-shadow: var(--card-shadow);
}

.card-content {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 2;
    position: relative;
    background: var(--bg-secondary);
    /* Cover the glow behind */
    border-radius: 7px;
    /* Tiny inset to show border behind */
    margin: 1px;
    height: calc(100% - 2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

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

.card-icon {
    color: var(--text-secondary);
}

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

.badge {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
    line-height: 1.5;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.lang-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.lang-color.js {
    background-color: var(--accent-yellow);
    box-shadow: 0 0 5px var(--accent-yellow);
}

.lang-color.html {
    background-color: var(--accent-orange);
}

.lang-color.css {
    background-color: #563d7c;
}

.btn-icon {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 6px;
    border-radius: 4px;
}

.btn-icon:hover {
    color: var(--accent-blue);
    background: rgba(47, 129, 247, 0.1);
}

/* --- ANIMATIONS --- */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(35, 134, 54, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(35, 134, 54, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(35, 134, 54, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* --- FOOTER --- */
.gh-footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    background: var(--bg-secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 20px;
}

.footer-links {
    font-size: 12px;
    color: var(--text-secondary);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .gh-header .container {
        flex-direction: column;
    }

    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .bio-wrapper {
        justify-content: center;
    }

    .header-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 20px;
    }

    .gh-nav {
        height: auto;
        flex-direction: column;
        gap: 10px;
        padding: 10px 0;
    }

    .search-container {
        width: 100%;
    }

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