/* 
  bmccall17 portfolio 
  theme: dark (github-inspired)
  vibe: clean, polished, leaking into chaos
*/

:root {
    --bg: #0d1117;
    /* github dim */
    --bg-panel: #161b22;
    --text: #c9d1d9;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --border: #30363d;
    --glitch-color-1: #00ff41;
    --glitch-color-2: #ff00ff;

    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
    /* Prevent horizontal scroll from any stray elements */
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 296px 1fr;
    /* github sidebar ratio */
    gap: 24px;
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .avatar {
        width: 150px;
        height: 150px;
        font-size: 2.5rem;
        margin: 0 auto;
    }

    .profile-sidebar {
        align-items: center;
        text-align: center;
        position: static;
        padding: 20px 16px;
    }

    .names h1 {
        font-size: 20px;
    }

    .names p {
        font-size: 16px;
    }

    .socials {
        align-items: center;
        margin-top: 8px;
        word-break: break-all;
        /* Prevent long URLs from causing horizontal overflow */
    }

    .bio {
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    /* Any fixed-position element must not exceed viewport width */
    .main-content,
    .leak-section {
        max-width: 100%;
        overflow: hidden;
    }
}

/* sidebar */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.avatar {
    width: 296px;
    height: 296px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #0ff1a0, #8bd3ff);
    /* legacy brand colors */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 800;
    color: #0d1117;
    overflow: hidden;
}

.names h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    line-height: 1.25;
}

.names p {
    font-size: 20px;
    color: var(--text-muted);
    font-weight: 300;
    margin: 0;
}

.bio {
    font-size: 16px;
    margin-top: 16px;
}

.socials {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.socials a {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.socials a:hover {
    color: var(--accent);
}

/* main content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

/* projects grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.project-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.project-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.project-card p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 16px 0;
    flex-grow: 1;
}

.project-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* the leak (contribution graph style) */
.leak-section {
    margin-top: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.leak-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-graph {
    display: flex;
    gap: 3px;
    opacity: 0.6;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.calendar-graph::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.day {
    width: 10px;
    height: 10px;
    background-color: #161b22;
    border-radius: 2px;
}

.day.active {
    background-color: #0e4429;
}

.day.active-2 {
    background-color: #006d32;
}

.day.active-3 {
    background-color: #26a641;
}

.day.active-4 {
    background-color: #39d353;
}

/* THE GLITCH LINK */
.glitch-link {
    font-family: var(--font-mono);
    color: var(--glitch-color-1);
    text-decoration: none;
    position: relative;
    transition: all 0.2s;
}

.glitch-link:hover {
    text-shadow: 2px 0 var(--glitch-color-2), -2px 0 var(--accent);
    letter-spacing: 1px;
}

/* utility */
.btn-sm {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-panel);
    color: var(--text);
    cursor: pointer;
}

.btn-sm:hover {
    border-color: var(--text-muted);
}