@import url("https://cdn.jsdelivr.net/gh/aaaakshat/cm-web-fonts@latest/fonts.css");

:root {
    --bg: #fdf6e3;
    --text: #5b2c8e;
    --accent: #7b1fa2;
    --link: #6a1b9a;
    --nav-bg: #f5e6d0;
    --nav-border: #d4c4a8;
}

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

html {
    font-size: 18px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: "Computer Modern Serif", "Latin Modern Roman", Georgia, serif;
    line-height: 1.6;
    padding: 2rem 1rem 5rem;
    max-width: 720px;
    margin: 0 auto;
}

.latex-body {
    padding-bottom: 2rem;
}

h1, h2, h3, h4 {
    color: var(--text);
    font-weight: normal;
}

h1 {
    font-size: 2rem;
    margin: 1.5rem 0 1rem;
    text-align: center;
}

h2, .section-title {
    font-size: 1.5rem;
    margin: 2rem 0 0.75rem;
    border-bottom: 1px solid var(--nav-border);
    padding-bottom: 0.25rem;
}

h3, .subsection-title {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
    font-style: italic;
}

p {
    margin: 0.75rem 0;
    text-align: justify;
    text-indent: 1.5em;
}

p:first-child {
    text-indent: 0;
}

a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

a:hover {
    border-bottom-color: var(--link);
}


.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.post-date {
    color: var(--accent);
    font-style: italic;
    font-size: 0.9rem;
}

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

.post-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.5rem 0;
    border-bottom: 1px dotted var(--nav-border);
}

.post-list time {
    font-size: 0.85rem;
    color: var(--accent);
    white-space: nowrap;
    margin-left: 1rem;
}

.course-list {
    list-style: none;
    padding: 0;
}

.course-list li {
    padding: 0.4rem 0;
    border-bottom: 1px dotted var(--nav-border);
}

.course-number {
    font-weight: bold;
    color: var(--accent);
    margin-right: 0.5rem;
}

.colorbox {
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}

.colorbox p {
    text-indent: 0;
    margin: 0;
}

.latex-block {
    text-align: center;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.post-figure {
    text-align: center;
    margin: 1.5rem auto;
}

.post-figure img {
    max-width: 100%;
    height: auto;
}

.tikz-container {
    text-align: center;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.tabs {
    display: flex;
    gap: 0;
    margin: 2rem 0 0;
    border-bottom: 1px solid var(--nav-border);
}

.tab {
    background: none;
    border: none;
    font-family: "Computer Modern Serif", Georgia, serif;
    font-size: 1rem;
    color: var(--text);
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.tab:hover {
    border-bottom-color: var(--nav-border);
}

.tab.active {
    border-bottom-color: var(--accent);
    color: var(--accent);
}

.tab-content {
    display: none;
    padding: 1.5rem 0;
}

.tab-content.active {
    display: block;
}

.reading-list {
    list-style: none;
    padding: 0;
}

.reading-list li {
    padding: 0.5rem 0;
    border-bottom: 1px dotted var(--nav-border);
}

.book {
    padding: 0.75rem 0;
    border-bottom: 1px dotted var(--nav-border);
}

.book .title {
    font-weight: bold;
    font-size: 1.05rem;
}

.book .author {
    color: var(--accent);
    font-style: italic;
    font-size: 0.95rem;
}

.book .date-read {
    font-size: 0.85rem;
    color: var(--accent);
}

.book .rating {
    font-size: 0.85rem;
    color: var(--text);
    margin-top: 0.15rem;
}

.quote {
    margin: 1.25rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 3px solid var(--accent);
}

.quote .text {
    font-style: italic;
    line-height: 1.6;
}

.quote .source {
    display: block;
    text-align: right;
    font-style: normal;
    color: var(--accent);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.quotes blockquote {
    margin: 1.25rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 3px solid var(--accent);
    font-style: italic;
}

.quotes cite {
    display: block;
    text-align: right;
    font-style: normal;
    color: var(--accent);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-top: 1px solid var(--nav-border);
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.75rem 1rem;
    font-family: "Computer Modern Serif", Georgia, serif;
    font-size: 0.95rem;
    z-index: 100;
}

.bottom-nav a {
    color: var(--text);
    text-decoration: none;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.bottom-nav a:hover {
    border-bottom-color: var(--accent);
}

/* Projects */
.project-list {
    list-style: none;
    padding: 0;
}

.project-item {
    padding: 1rem 0;
    border-bottom: 1px dotted var(--nav-border);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.project-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.project-desc {
    text-indent: 0;
    font-size: 0.95rem;
    margin: 0.4rem 0;
}

.progress-bar {
    height: 6px;
    background: var(--nav-border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s;
}

/* Course tooltips */
.course-tooltip {
    position: relative;
    cursor: help;
}

.course-tooltip .tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--nav-bg);
    color: var(--text);
    border: 1px solid var(--nav-border);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-style: italic;
    line-height: 1.4;
    width: 300px;
    z-index: 10;
    transition: opacity 0.2s;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.course-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* About footer */
.about-footer {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--nav-border);
}

/* Code blocks */
pre {
    background: #f5f0eb;
    border: 1px solid var(--nav-border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

pre code {
    font-family: "Computer Modern Typewriter", "Latin Modern Mono", monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    background: none;
    padding: 0;
    border-radius: 0;
}

/* Inline code and math */
code {
    font-family: "Computer Modern Typewriter", "Latin Modern Mono", monospace;
    font-size: 0.82rem;
    background: #e0f2e9;
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.katex {
    font-size: 0.92em;
}

@media (max-width: 600px) {
    html { font-size: 16px; }
    body { padding: 1rem 0.75rem 4.5rem; }
    .bottom-nav { gap: 1rem; font-size: 0.85rem; }
    .course-tooltip .tooltip-text { width: 220px; }
}
