/* RESET & BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #03050e;
    color: #e6e6e6;
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding: 40px 20px;
}

/* LAYOUT CONTAINER */
article {
    max-width: 680px;
    margin: 0 auto;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* BACK LINK */
.back-link {
    display: inline-block;
    margin-bottom: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.back-link:hover {
    color: #fff;
}

/* POST HEADER */
.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #1e293b;
}

.post-title {
    font-family: 'Georgia', serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.post-subtitle {
    font-family: 'Georgia', serif;
    font-size: 1.25rem;
    color: #94a3b8;
    font-weight: 400;
    line-height: 1.4;
    margin-top: 0.5rem;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Georgia', serif;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

h2 {
    font-size: 2rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

/* PARAGRAPHS & CONTENT */
p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #e2e8f0;
    margin-bottom: 1.5em;
}

/* LINKS */
a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* LISTS */
ul,
ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
    color: #e2e8f0;
}

li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}

/* BLOCKQUOTES */
blockquote {
    border-left: 3px solid #334155;
    padding-left: 1.5em;
    margin: 1.5em 0;
    color: #94a3b8;
    font-style: italic;
}

/* CODE */
code {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Consolas', 'Monaco', monospace;
}

pre {
    background-color: #1e293b;
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1.5em;
}

pre code {
    background: none;
    padding: 0;
}

/* IMAGES */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2em 0;
}

figure {
    margin: 2em 0;
}

/* DIVIDERS */
hr {
    border: none;
    border-top: 1px solid #1e293b;
    margin: 2em 0;
}

/* TABLES */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    color: #e2e8f0;
}

th,
td {
    padding: 0.75em;
    text-align: left;
    border-bottom: 1px solid #1e293b;
}

th {
    font-weight: 700;
    color: #ffffff;
    background-color: #0f172a;
}

/* STRONG/BOLD */
strong {
    color: #ffffff;
    font-weight: 700;
}

/* EMPHASIS */
em {
    color: #cbd5e1;
}

/* LATEX BLOCKS */
.latex-rendered {
    margin: 1.5em 0;
    overflow-x: auto;
    padding: 1em 0;
}

.katex-display {
    margin: 0;
}

.katex {
    font-size: 1.1em;
}

/* INDEX PAGE STYLES */
header {
    border-bottom: 2px solid #1e293b;
    margin-bottom: 40px;
    padding-bottom: 20px;
}

.subtitle {
    color: #94a3b8;
    font-size: 1.1em;
    font-family: 'Georgia', serif;
}

/* SEARCH */
.search-container {
    margin-bottom: 30px;
}

#search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 5px;
    color: #e6e6e6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#search-input:focus {
    outline: none;
    border-color: #60a5fa;
}

#search-input::placeholder {
    color: #64748b;
}

#search-results {
    margin-top: 20px;
}

.search-result-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #1e293b;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-excerpt {
    color: #94a3b8;
    font-size: 0.9em;
    line-height: 1.5;
    margin-top: 6px;
}

.no-results {
    color: #64748b;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.stats {
    background: #0f172a;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 5px;
    text-align: center;
    color: #94a3b8;
    border: 1px solid #1e293b;
}

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

.post-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #1e293b;
}

.post-item:last-child {
    border-bottom: none;
}

.post-date {
    color: #64748b;
    font-size: 0.75rem;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Index page specific - smaller title */
.post-list .post-title {
    font-size: 1.1em;
    margin-bottom: 4px;
    margin-top: 0;
    font-family: 'Georgia', serif;
}

.post-list .post-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.post-list .post-title a:hover {
    color: #60a5fa;
}

/* Index page specific - smaller subtitle */
.post-list .post-subtitle {
    color: #94a3b8;
    font-style: italic;
    line-height: 1.4;
    font-size: 0.95em;
}

footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    text-align: center;
    color: #64748b;
    font-size: 0.9em;
}
