/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background: #000000;
    color: #ffffff;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #666666;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 1000;
    transition: color 0.2s ease;
}

.theme-toggle:hover {
    text-decoration: underline;
}

body.dark-mode .theme-toggle {
    color: #999999;
}

/* Container Layout - Centered with slight asymmetry */
.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 320px;
    padding: 40px 40px 40px 0;
    flex-shrink: 0;
}

.photo-container {
    position: relative;
    margin-bottom: 30px;
}

.profile-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.photo-credit {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    font-size: 12px;
    text-align: center;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

body.dark-mode .photo-credit {
    background: rgba(0, 0, 0, 0.95);
    color: #ffffff;
}

.photo-container:hover .photo-credit {
    transform: translateY(0);
    opacity: 1;
}

.name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.tagline {
    font-size: 14px;
    color: #4a4a4a;
    margin-bottom: 30px;
}

body.dark-mode .tagline {
    color: #b0b0b0;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link {
    color: #1a4d8f;
    text-decoration: none;
    font-size: 14px;
    transition: none;
}

.link:hover {
    text-decoration: underline;
}

body.dark-mode .link {
    color: #00ff00;
}

/* Main Content */
.content {
    flex: 1;
    max-width: 750px;
    padding: 40px 0 40px 60px;
    font-size: 16px;
}

/* Markdown Styling */
.content p {
    margin-bottom: 1em;
}

/* Headings with visible # */
.md-heading {
    font-size: 20px;
    font-weight: bold;
    margin: 1.5em 0 0.5em 0;
}

.md-hash {
    color: #999999;
    margin-right: 0.3em;
}

body.dark-mode .md-hash {
    color: #666666;
}

/* Italics with visible * */
.md-italic {
    font-style: italic;
}

.md-asterisk {
    color: #999999;
}

body.dark-mode .md-asterisk {
    color: #666666;
}

/* Bold with visible ** */
.md-bold {
    font-weight: bold;
}

.md-double-asterisk {
    color: #999999;
}

body.dark-mode .md-double-asterisk {
    color: #666666;
}

/* Code with visible ` */
.md-code {
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    background: #f5f5f5;
    padding: 2px 4px;
}

body.dark-mode .md-code {
    background: #1a1a1a;
}

.md-backtick {
    color: #999999;
}

body.dark-mode .md-backtick {
    color: #666666;
}

/* Lists - remove default bullets/numbers */
.md-list {
    margin: 1em 0;
    padding-left: 0;
    list-style: none;
}

.md-list-item {
    margin-bottom: 0.5em;
    padding-left: 2em;
    position: relative;
}

.md-bullet {
    color: #d97706;
    position: absolute;
    left: 0.5em;
}

.md-number {
    color: #d97706;
    position: absolute;
    left: 0;
}

/* Nested lists */
.md-list .md-list {
    margin: 0.3em 0;
}

.md-list .md-list .md-list-item {
    padding-left: 1.5em;
}

/* Blockquotes */
.md-blockquote {
    margin: 1em 0;
    padding-left: 0;
}

.md-quote-marker {
    color: #166534;
    margin-right: 0.5em;
}

.md-quote-text {
    color: #4a4a4a;
}

body.dark-mode .md-quote-text {
    color: #b0b0b0;
}

/* Links - styled normally */
.content a {
    color: #1a4d8f;
    text-decoration: none;
    transition: none;
}

.content a:hover {
    text-decoration: underline;
}

body.dark-mode .content a {
    color: #00ff00;
}

/* Images - styled normally */
.content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
}

/* Code Blocks with Syntax Highlighting */
.md-codeblock {
    margin: 1em 0;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

.md-codeblock-line {
    position: relative;
    padding-left: 0;
}

.md-codeblock-indent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #cccccc;
    opacity: 0.3;
}

body.dark-mode .md-codeblock-indent {
    background: #555555;
}

.codehilite .c1 { color: #0000ff; } /* Blue */
.codehilite .s2 { color: #ff00ff; } /* Magenta */
.codehilite .mi { color: #ff00ff; } /* Magenta */
.codehilite .k { color: #af5f00; } /* Brown/Orange */
.codehilite .fm { color: #000000; } /* Black (default text) */
.codehilite .nc { color: #000000; }
.codehilite .o { color: #000000; }
.codehilite .n { color: #000000; }
/*.codehilite .n { color: #ff00ff; } /* Constant */
.codehilite .nb { color: #af5f00; }

body.dark-mode .c1 { color: #80a0ff; } /* Light blue */
body.dark-mode .s2 { color: #ffa0ff; } /* Light magenta */
body.dark-mode .mi { color: #ffa0ff; }
body.dark-mode .k { color: #ffaf5f; } /* Light brown/orange */
body.dark-mode .fm { color: #ffffff; }
body.dark-mode .nc { color: #ffffff; }
body.dark-mode .o { color: #ffffff; }
body.dark-mode .n { color: #ffffff; }
/*body.dark-mode .syn-c { color: #ffa0ff; }*/
body.dark-mode .nb { color: #ffaf5f; }

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 0 20px;
    }
    
    .sidebar {
        width: 100%;
        padding: 30px 0;
    }
    
    .content {
        padding: 30px 0;
    }
}
