/* Minimalist website CSS */

/* --- Font Imports --- */
/* Google Fonts: Bitter (Headers), Source serif 4 (Body), Crimson Pro (Body) */
@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,100..900;1,100..900&family=Crimson+Pro:ital,wght@0,200..900;1,200..900&display=swap');
/* @import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..144,200..900;1,8..144,200..900&display=swap'); */

/* Local Font: Fira Code (kept for code blocks) */
@font-face { font-family: 'Fira Code'; src: url('../assets/fonts/Fira_Code_v6.2/woff2/FiraCode-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; }
@font-face { font-family: 'Fira Code'; src: url('../assets/fonts/Fira_Code_v6.2/woff2/FiraCode-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'Fira Code'; src: url('../assets/fonts/Fira_Code_v6.2/woff2/FiraCode-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'Fira Code'; src: url('../assets/fonts/Fira_Code_v6.2/woff2/FiraCode-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; }
@font-face { font-family: 'Fira Code'; src: url('../assets/fonts/Fira_Code_v6.2/woff2/FiraCode-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; }

/* JetBrains Mono for enhanced readability */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

/* Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
/* Work sans */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');

/* Roboto Mono */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,200;1,300&display=swap');

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

#green-txt {
    color: #40a02b;
}

#lavender-txt {
    color: #7287fd;
}

#teal-txt {
    color: #179299;
}

#sapphire-txt {
    color: #209fb5;
}

#purple-txt {
    color: #8839ef;
}

#discord-status {
    color: #00fcb5;
}

body {
    font-family: 'Roboto Mono', monospace; /* CHANGED: Main body font */
    font-weight: 300; /* 300 Light */
    line-height: 1.5;
    color: #c6d0f5;          
    background-color: #232634; 
    max-width: 90%;
    margin: 0 auto;
    padding: 20px;
    font-size: 14px; /* Serif fonts often need a slight size bump for readability */
}

/* --- Typography & Links --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Bitter', serif; /* CHANGED: Header font */
    color: #8839ef;
    font-weight: 600; /* Bitter looks great with a bit of weight */
}

h2 {
    font-style: italic; /* Bitter supports italics well */
    margin: 30px 0 20px;
}

a {
    color: #8839ef;
    text-decoration: none;
    transition: all 0.2s ease;
    text-decoration: underline;
}

a:hover, nav a:hover, section a:hover {
    color: #00fcb5;
    background-color: transparent;
    text-decoration: underline;
}

/* --- Header & Navigation --- */
header {
    margin-bottom: 40px;
    text-align: right;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

nav a {
    font-family: 'Bitter', serif; /* Optional: Use header font for nav */
    color: #2d1b4e;
    font-weight: 500;
}

/* --- Layout Components --- */
main { margin-bottom: 40px; }

.intro {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
}

.category { margin-bottom: 15px; }
.category p:first-child { font-weight: normal; }

/* --- Special Effects --- */
.ascii-art {
    text-align: center;
    margin: 40px 0;
}

.ascii-art pre {
    font-family: 'Fira Code', monospace; /* Keep Fira Code for ASCII art */
    line-height: 1.2;
    display: inline-block;
    text-align: left;
    margin-bottom: 10px;
    color: #5b21b6;
    font-size: 14px; /* Adjust if needed to fit */
}

.make-purple {
    background: linear-gradient(100deg, #8839ef, #7287fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700; /* Bolder to make gradient visible on serif */
}

.make-purple:hover {
    background: linear-gradient(90deg, #00fcb5, #7287fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.particle-toggle {
    text-align: left;
    margin: 20px 0;
}

.particle-toggle label { cursor: pointer; font-size: 0.9em; }
.particle-toggle input[type="checkbox"] { margin-right: 8px; cursor: pointer; }

/* --- Images --- */
.image-container { margin: 20px 0; text-align: center; }
.image-container img { max-width: 100%; height: auto; }

/* --- Writing Page Link Colors --- */
/* Target links inside paragraphs in the 'favorites' section of writing.html */
/* Cycle through 4 colors: Pink, Teal, Green, Purple */

.favorites p:nth-of-type(3n+1) a {
    color: #7287fd; /* lavender */
}

.favorites p:nth-of-type(3n+2) a {
    color: #209fb5; /* Teal */
}

.favorites p:nth-of-type(3n+3) a {
    color: #04a5e5; /* Green */
}

/* Ensure hover state overrides the cycle colors */
.favorites p a:hover {
    color: #8839ef;
    text-decoration: underline;
}


/* --- Box Grid --- */
.box-grid {
    display: flex;
    justify-content: center;
    align-items: center; /* Vertically center items */
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap; /* responsive wrap */
}


.box {
    border: 1px solid #00fcb5; /* Thin line border matching text color */
    padding: 20px;
    width: 31%; /* Adjustable width */
    height: 200px; /* Adjustable height */
    display: flex;
    flex-direction: column;
    justify-content: left;
    align-items: left;
    text-align: left;
    transition: all 0.3s ease;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.box:hover {
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
}

.long-box {
    border: 1px solid #00fc50; /* Thin line border matching text color */
    padding: 10px;
    width: 100%; 
    height: 40px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: left;
    transition: all 0.3s ease;
    overflow-wrap: break-word;
    /* word-wrap: break-word; */
}

.long-box:hover {
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
}


/* --- Markdown Content --- */
.markdown-content {
    max-width: 700px;
    margin: 0 auto;
    font-size: 16px;
    padding: 20px 0;
    line-height: 1.8; /* Slightly more breathing room for serif body */
    font-family: 'Inter', sans-serif;
}

.markdown-content h1 { font-size: 2.0em; margin-bottom: 30px; }
.markdown-content h2 { font-size: 1.6em; margin-top: 40px; margin-bottom: 20px; }
.markdown-content h3 { font-size: 1.3em; margin-top: 30px; margin-bottom: 15px; }
.markdown-content p { margin-bottom: 20px; }
.markdown-content ul, .markdown-content ol { margin-bottom: 20px; padding-left: 30px; }
.markdown-content li { margin-bottom: 8px; }

.markdown-content blockquote {
    border-left: 3px solid #7c3aed;
    padding-left: 20px;
    margin-left: 0;
    color: #5b21b6;
    font-style: italic;
    font-family: 'JetBrains Mono', monospace; /* Use Bitter for quotes */
    margin-bottom: 20px;
}

.markdown-content img { max-width: 100%; height: auto; margin: 20px 0; }

.markdown-content code {
    font-family: 'JetBrains Mono', monospace; /* Keep Fira Code for inline code */
    background-color: #ede9fe;
    padding: 2px 4px;
    border-radius: 3px;
    color: #5b21b6;
    font-size: 0.9em;
}

.markdown-content pre {
    background-color: #ede9fe;
    padding: 15px;
    border-radius: 3px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-family: 'Fira Code', monospace; /* Keep Fira Code for code blocks */
}

.markdown-content em, .markdown-content i { font-style: italic; }
.markdown-content strong, .markdown-content b { font-weight: bold; }

/* --- Footer --- */
footer {
    margin-top: 60px;
    text-align: center;
    font-size: 0.9em;
    color: #5b21b6;
    opacity: 0.7;
    font-family: 'Bitter', serif;
}

.post-navigation { margin-top: 40px; text-align: left; }
.footnotes { margin-top: 40px; padding-top: 20px; border-top: 1px solid #ede9fe; font-size: 0.9em; }
.post-metadata { font-style: italic; color: #5b21b6; opacity: 0.8; margin-bottom: 30px; font-size: 0.9em; }
