@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Dark Mode (Default) */
    --bg-color: #111111;
    --text-main: #ededed;
    --text-muted: #999999;
    --accent-color: #ffffff;
    --hover-bg: #1a1a1a;
    --font-main: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1200px;
    --sidebar-width: 300px;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --text-main: #111111;
    --text-muted: #555555;
    --accent-color: #000000;
    --hover-bg: #f5f5f5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, fill 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

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

/* Layout */
.layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 60px;
    min-height: 100vh;
}

/* Sidebar (Left) */
.sidebar {
    width: var(--sidebar-width);
    padding-top: 80px;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 40px;
}

.profile-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.profile-header .role {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.profile-header .bio {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 280px;
}

.nav-links {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-item {
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s, transform 0.2s;
}

.nav-item:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.nav-item.active {
    color: var(--accent-color);
    font-weight: 500;
}

.nav-line {
    width: 30px;
    height: 1px;
    background-color: var(--text-muted);
    transition: width 0.2s, background-color 0.2s;
}

.nav-item:hover .nav-line,
.nav-item.active .nav-line {
    width: 50px;
    background-color: var(--accent-color);
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
    transition: fill 0.2s;
}

.social-icon:hover {
    fill: var(--accent-color);
}

/* Main Content (Right) */
.main-content {
    margin-left: calc(var(--sidebar-width) + 60px);
    padding-top: 80px;
    padding-bottom: 80px;
    flex: 1;
    max-width: 700px;
}

.section {
    margin-bottom: 100px;
    scroll-margin-top: 100px;
}

.section-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 2rem;
    display: none;
    /* Hidden on desktop as nav indicates section */
}

/* Cards/Items */
.item-card {
    margin-bottom: 2rem;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        backdrop-filter 0.3s ease,
        -webkit-backdrop-filter 0.3s ease;
}

.item-card:hover,
[data-theme="dark"] .item-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

/* Light theme */
[data-theme="light"] .item-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
}

.item-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.item-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-main);
}

.item-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-size: 0.8rem;
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
}

/* Links in cards */
.item-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .layout {
        flex-direction: column;
        gap: 40px;
        padding: 20px;
    }

    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        padding-top: 40px;
        padding-bottom: 0;
    }

    .main-content {
        margin-left: 0;
        padding-top: 0;
    }

    .nav-links {
        display: none;
        /* Hide nav on mobile for simplicity or make it sticky */
    }

    .section-title {
        display: block;
        /* Show section titles on mobile */
        position: sticky;
        top: 0;
        background-color: var(--bg-color);
        padding: 10px 0;
        z-index: 10;
    }

    .footer-actions {
        margin-top: 20px;
    }
}

/* GitHub Calendar Styling */
.calendar {
    border: none !important;
    font-family: var(--font-main) !important;
    width: 100%;
    min-height: 130px;
}

.js-calendar-graph-svg text.month {
    font-size: 10px;
    fill: var(--text-muted) !important;
}

.js-calendar-graph-svg text.wday {
    font-size: 9px;
    fill: var(--text-muted) !important;
}

.contrib-legend .legend li {
    display: inline-block;
    width: 10px;
    height: 10px;
}

/* Theme overrides for calendar */
:root {
    --calendar-bg: #161b22;
    --calendar-text: #c9d1d9;
    --calendar-level-0: #161b22;
    --calendar-level-1: #0e4429;
    --calendar-level-2: #006d32;
    --calendar-level-3: #26a641;
    --calendar-level-4: #39d353;
}

[data-theme="light"] {
    --calendar-bg: #ffffff;
    --calendar-text: #24292f;
    --calendar-level-0: #ebedf0;
    --calendar-level-1: #9be9a8;
    --calendar-level-2: #40c463;
    --calendar-level-3: #30a14e;
    --calendar-level-4: #216e39;
}

.calendar .width-full>.float-left {
    display: none;
    /* Hide the 'Learn how we count contributions' text */
}

.calendar .width-full>.float-right {
    color: var(--text-muted);
    font-size: 12px;
}

rect.ContributionCalendar-day[data-level="0"] {
    fill: var(--hover-bg);
}

rect.ContributionCalendar-day[data-level="1"] {
    fill: var(--calendar-level-1);
}

rect.ContributionCalendar-day[data-level="2"] {
    fill: var(--calendar-level-2);
}

rect.ContributionCalendar-day[data-level="3"] {
    fill: var(--calendar-level-3);
}

rect.ContributionCalendar-day[data-level="4"] {
    fill: var(--calendar-level-4);
}

.calendar-graph text {
    fill: var(--text-muted);
}