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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

p {
    margin: 1rem 0;
}

ul{
  margin: 1rem 0 1rem 1.5rem;
  padding-left: 1.25rem;
}

ol {
  margin: 1rem 0;
  padding-left: 1rem;
}

header {
    background: linear-gradient(135deg, #215732 0%, #6CB33F 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

header h3 {
    font-size: 2rem;
    font-weight: 700;
}

header p {
    font-size: 1.2rem;
    opacity: 0.95;
}

pre,
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Base fallback */
pre {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid #30363d;
}

/* Don't let inner code override */
pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Bash / shell */
div.language-bash pre,
div.language-shell pre,
.highlighter-rouge.language-bash pre,
.highlighter-rouge.language-shell pre {
  background: #dad9d9;
  color: #141414;
  border: 1px solid #acacac;
}

/* Python */
div.language-python pre,
div.language-py pre,
.highlighter-rouge.language-python pre,
.highlighter-rouge.language-py pre {
  background: #9aa598;
  border: 1px solid #4a5f52;
}


li pre,
li .highlight {
  margin: 1rem 0;
}


/* Layout: sidebar left, main content right */
.layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    background: linear-gradient(to right,
      #81a87c calc((100vw - 1200px) / 2 + 2rem), 
      #f5f5f5 calc((100vw - 1200px) / 2 + 2rem));
}

/** Sidebar */
.sidebar {
    width: calc((100vw - 1200px) / 2 + 2rem);
    min-width: 240px;
    flex-shrink: 0;
    background: transparent;
    color: #333;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 100vh;           /* Changed from min-height */
    overflow-y: auto;             /* Add this */
    padding-right: 0.5rem;        /* Add space for scrollbar */
}

.sidebar-inner {
    padding: 2em 1em 1em 1em;
}

.sidebar h2 { font-size: 1.2em; margin-bottom: 1em; }
.sidebar nav a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 0.3em 0.7em;
    border-radius: 4px;
    transition: background 0.2s;
}
.sidebar nav a:hover { background: #6CB33F; }


.sidebar summary {
    cursor: pointer;
    padding: 0.3em 0.7em;
    border-radius: 4px;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    color: #333;
}
.sidebar summary::-webkit-details-marker { display: none; }
.sidebar summary:hover { background: #c4dab7; }
.sidebar summary::after {
    content: '\25B8';
    transition: transform 0.2s;
    font-size: 0.8em;
}
.sidebar details[open] > summary::after {
    transform: rotate(90deg);
}
.sidebar details nav {
    padding-left: 1em;
    margin-top: 0.3em;
}

.page-content {
    flex: 1 1 0%;
    min-width: 0;
    padding: 2rem calc((100vw - 1200px) / 2 + 2rem) 2rem 2rem;
}

/* Navigation Menu */
.main-nav {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: #215732;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-menu a:hover {
    background-color: #e8f5e9;
    color: #1a4a1b;
}

.nav-menu a.active {
    background-color: #215732;
    color: white;
}

.hero {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 6px;
}

.hero h2 {
    font-size: 2rem;
    color: #215732;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2rem;
    color: #215732;
    margin: 3rem 0 2rem 0;
    text-align: center;
    font-weight: 600;
}

.important {
    color: #067706;
    font-weight: bold;
}

.site-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.site-heading__img {
    height: 1.2em;
    width: auto;
    display: inline-block;
}

.language {
    background: #e8f5e9;
    color: #215732;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

.topics {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.topic-tag {
    background: #f0f0f0;
    color: #555;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    margin: 1rem 0;
    font-size: 0.95rem;
}

table th {
    background-color: #3a6b41;
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    padding: 0.6rem 0.9rem;
    border: 1px solid #c8dcc9;
}

table td {
    padding: 0.5rem 0.9rem;
    border: 1px solid #dde8de;
    color: #333;
    vertical-align: top;
}

table tr:nth-child(even) td {
    background-color: #f5faf5;
}

footer {
    background: #2c5f2d;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

footer a {
    color: #97bc62;
    text-decoration: none;
}

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

.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #215732;
}

.stat-label {
    color: #666;
    font-size: 1rem;
}

@media (max-width: 1200px) {
    .sidebar {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: unset;
        position: static;
        align-self: auto;
    }

    .sidebar-inner {
        padding: 1.5rem 2rem;
    }

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

    header h1 {
        font-size: 2rem;
    }

    .stats {
        gap: 2rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .nav-menu a {
        text-align: center;
    }

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