/* --- Global Styles & Reset --- */
:root {
    --bg-color: #fcfcfc;
    --text-color: #333333;
    --accent-color: #0056b3;
    --link-hover: #003d82;
    --section-bg: #ffffff;
    --border-color: #eaeaea;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Typography --- */
h1, h2, h3 {
    color: #111;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
    margin-top: 2rem;
}

h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 1rem;
}

p, ul {
    margin-bottom: 1.5rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* --- Navigation Bar --- */
nav {
    margin-top: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0;
}

nav a {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* --- Sections & Layout --- */
section {
    background-color: var(--section-bg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

ul {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* --- Footer --- */
footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid var(--border-color);
}

/* --- Animations --- */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px); /* Starts slightly lower down */
    }
    to {
        opacity: 1;
        transform: translateY(0);    /* Ends in its normal position */
    }
}

/* Apply the animation to your header and main content */
header, main {
    /* The element starts completely transparent so it doesn't flash before animating */
    opacity: 0; 
    /* name | duration | timing-function | fill-mode */
    animation: fadeInSlideUp 0.8s ease-out forwards;
}

/* Optional: Stagger the main content to load a fraction of a second after the header */
main {
    animation-delay: 0.2s;
}

/* --- Social Links List --- */
.social-links-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 10px;
}

.social-links-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Space between the icon and the text */
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.social-links-list i {
    font-size: 1.5rem; /* Makes the icon slightly larger than the text */
    color: var(--text-color);
    transition: color 0.2s ease-in-out;
}

/* Hover effects */
.social-links-list a:hover {
    color: var(--accent-color);
    transform: translateX(5px); /* Slides the whole line slightly to the right */
}

.social-links-list a:hover i {
    color: var(--accent-color);
}


.back-button {
    display: inline-flex;
    align-items: center;
    margin-bottom: 2rem; /* Reduced this from 2rem */
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}

.back-button:hover {
    color: var(--link-hover);
    text-decoration: none;
    transform: translateX(-5px); /* Creates a smooth slide-left effect on hover */
}

.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0;
}

.katex-display > .katex {
    white-space: nowrap;
}