* {
    font-family: 'Times New Roman', Times, serif;
}

body {
    background-image: url("/website/background-1.png");   
    background-repeat: no-repeat; 
    margin: 0px;
    padding: 0px;
    width: 100%;
    height: 100%;
    background-size: cover;
}

.page {
    margin: 2% 15%;
    min-width: 70%;
    background-color: whitesmoke;
    border: 1px solid black;
    border-radius: 2px;
    padding: 20px 30px;
}

h2 {
    text-align: center;
    font-size: 22pt;
}

h3 {
    font-size: 18pt;
}
h4 {
    font-size: 14pt;
}

h4.subtitle {
    font-size: 14pt;
    color: grey;
    font-style: italic;
}

p {
    font-size: 12pt;
}

ol {
    list-style: decimal;
}
pre {
    white-space: pre-wrap;       /* Since CSS 2.1 */
    white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
    white-space: -pre-wrap;      /* Opera 4-6 */
    white-space: -o-pre-wrap;    /* Opera 7 */
    word-wrap: break-word;       /* Internet Explorer 5.5+ */
}

.code,
code {
    background: rgba(135, 131, 120, 0.15);
    border-radius: 3px;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 85%;
    tab-size: 2;
    font-family: "SFMono-Regular", Menlo, Consolas, "PT Mono", "Liberation Mono", Courier, monospace !important;
    word-wrap: break-word;
}

.code {
    padding: 1.5em 1em;
}

.code-wrap {
    white-space: pre-wrap;
    word-break: break-all;
}

.code > code {
    background: none;
    padding: 0;
    font-size: 100%;
    color: inherit;
    word-wrap: normal;
}
.code { 
    font-family: "SFMono-Regular", Menlo, Consolas, "PT Mono", "Liberation Mono", Courier, monospace !important;
}

/* Improved image styling */
img {
    max-width: 100%;
    height: auto;
    margin: 1em auto;
    display: block;
}

img.matplot {
    max-width: min(800px, 100%);
    width: auto;
    height: auto;
    display: block;
    margin: 1.5em auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

img.medium {
    max-width: min(60%, 600px);
    display: block;
    margin: 1em auto;
}

img.large {
    max-width: min(80%, 800px);
    display: block;
    margin: 1em auto;
}

/* Ensure MathJax equations render properly */
.mjx-chtml {
    max-width: 100%;
    overflow-x: auto;
    margin: 1em 0;
    text-align: center;
}

/* Block equations */
.MathJax_Display {
    text-align: center;
    margin: 1em 0;
}

/* Inline equations */
.MathJax {
    display: inline;
    margin: 0;
}

.retro-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 3em;
    color: #6d00c1; /* Classic green */
    text-shadow: 4px 3px #867f89; /* Red shadow for 3D effect */
    padding: 20px;
    text-align: center;
    margin-bottom: 10px;
}

.retro-title:hover {
    animation: color-change 5s infinite;
}
@keyframes color-change {
    0% { color: #f524d3; text-shadow: 5px 3px #b6b6b6; }
    50% { color: #6d00c1; text-shadow: 4px 3px #867f89; }
    100% { color: #f524d3; text-shadow: 5px 3px #b6b6b6; }
}

/* New layout styles */
.subtitle-container {
    text-align: center;
    margin-bottom: 30px;
}

.tagline {
    font-size: 14pt;
    color: #555;
    font-style: italic;
    margin: 0;
    padding: 0;
}

.intro-section {
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

.intro-section p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.links-section {
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.links-section p {
    margin: 8px 0;
}

.links-section a {
    color: #6d00c1;
    text-decoration: none;
}

.links-section a:hover {
    text-decoration: underline;
}

.recent-post-section {
    margin-bottom: 40px;
}

.featured-post {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 25px;
    margin-top: 20px;
}

.featured-post h1 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 24pt;
    color: #333;
}

.featured-post .subtitle {
    margin-top: 0;
    margin-bottom: 15px;
}

.post-preview {
    font-size: 13pt;
    line-height: 1.5;
    color: #555;
    margin-bottom: 20px;
}

.read-more {
    display: inline-block;
    color: #6d00c1;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border: 1px solid #6d00c1;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.read-more:hover {
    background-color: #6d00c1;
    color: white;
}

.archive-section {
    margin-bottom: 30px;
}

.section-divider {
    border: none;
    height: 1px;
    background-color: #ccc;
    margin: 20px 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 25px;
}

.post-category {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
}

.post-category h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #6d00c1;
    padding-bottom: 8px;
}

.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-list li {
    margin-bottom: 8px;
    padding-left: 0;
}

.post-list a {
    color: #333;
    text-decoration: none;
    font-size: 11pt;
    line-height: 1.4;
    display: block;
    padding: 5px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.post-list a:hover {
    color: #6d00c1;
    border-bottom-color: #6d00c1;
    padding-left: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
    .page {
        margin: 1% 5%;
        padding: 15px 20px;
    }
    
    .retro-title {
        font-size: 2.2em;
        padding: 15px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-post {
        padding: 20px;
    }
}

#caption {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10pt;
    text-align: center;
    font-weight: bold;
}

#home {
    font-size: 14pt;
    text-align: center;
}

#enhance {
    color: red;
    text-align: center;
    font-style: italic;
}

/* Add the following styles at the end of your CSS file */

/* Ensure code blocks use a monospace font */
pre[class*="language-"], code[class*="language-"] {
    font-family: monospace !important;
    background: rgba(135, 131, 120, 0.15);
    border-radius: 3px;
    padding: 0.2em 0.4em;
    font-size: 85%;
    tab-size: 2;
    word-wrap: break-word;
}

pre[class*="language-"] {
    white-space: pre-wrap;
    margin: 2em auto;
    max-width: 80%;
    overflow: auto;
    border-radius: 5px;
}

code[class*="language-"] {
    background: none;
    padding: 0;
    font-size: 1em;
    color: #393A34;
}

/* GitHub Calendar Custom Styles */
.github-section {
    max-width: 740px;
    margin: 0 auto 30px;
    /* Use GitHub-like fonts */
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.github-section *, .github-section svg text {
    font-family: inherit;
}

/* Hide unwanted elements */
.github-section a[href*="count"],
.github-section .contrib-footer,
.github-section p:contains("Learn") {
    display: none !important;
}

/* Style the calendar container */
.github-section .calendar {
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 20px;
    background: #fff;
}

/* Ensure SVG scales nicely */
.github-section svg {
    width: 100% !important;
    height: auto !important;
    max-width: 676px;
    margin: 0 auto;
    display: block;
}

/* Rounded squares for contributions */
.github-section rect {
    rx: 3px;
    ry: 3px;
}

/* Loading text styling */
.github-section .loading {
    text-align: center;
    font-style: italic;
    color: #586069;
}