
/* Minimal CSS Reset */

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



html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}


img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}


/* Light Mode - Softer White */
:root {
    --bg-color: #f7f7f7; /* Light gray instead of pure white */
    --text-color: #222222; /* Dark gray instead of black */
    --border-color: #555; /* Softer gray */
    --link-color: #00509e; /* Muted blue */
    --button-bg: #e0e0e0; /* Light gray */
    --button-hover: #d0d0d0; /* Slightly darker gray */
/* Background Colors */
    --bg-dark: #1d1b1b;   /* Deep black with a subtle warmth */
    --bg-light: #d4a373;  /* Muted peach, soft retro feel */

    /* Primary Colors */
    --primary: #ffcc00;   /* Bright yellow, classic pixel gold */
    --primary-dark: #d4a017; /* Slightly darker shade for depth */
    
    /* Accent Colors */
    --accent-blue: #4a90e2; /* Sky blue, reminiscent of retro UI */
    --accent-green: #50c878; /* Vibrant green, Game Boy vibes */
    --accent-red: #ff004d;  /* Bright red, classic arcade look */
    --accent-purple: #7e3f8f; /* Deep purple, for cool retro tones */

    /* Grayscale for Contrast */
    --gray-light: #e0e0e0; /* Light gray for UI elements */
    --gray-mid: #888888; /* Medium gray, subtle pixel shading */
    --gray-dark: #222222; /* Near black, deep contrast */

    --off-white-1: #F2F0EF;
    --off-white-2: #F5F5F5;
    --off-white-3: #F8F0E3;

    /* Text Colors */
    --text-light: #ffffff; /* Crisp white, high readability */
    --text-dark: #333333;  /* Deep gray, softer contrast */
    --font-size: 18px;
    --font-size: 1.05rem;
    /* this is the thing */
	--color-text: #000;
	--color-text-2: #9699a3;
	--color-text-3: #cfc9c2;
	--color-text-black: #000;
	--color-background-2: #fff;
	--color-background: rgb(244,244,239);
	/* --color-accent-cyan: #14d9f4; */
	/* --color-accent-cyan-2: #10adc3; */
	/* --color-accent-cyan-3: #0c8292; */
  --color-accent-cyan:   #109bb1;  /* darker than #14d9f4 */
  --color-accent-cyan-2: #0d7f91;  /* darker than #10adc3 */
  --color-accent-cyan-3: #0a5e68;  /* darker than #0c8292 */
  --color-accent-cyan-3: #084c54; /* darker than #0a5e68 */
	--color-accent-yellow: rgb(232,194,69);
	--color-accent-red: #f7768e;
	--color-accent-green: #9ece6a;
	--color-accent-lavender: #646cff;
	--color-white: #fff;
	--size-unit: 18px;
  --accent-font-family: 'Roboto', Inter, Avenir, Helvetica, Arial, Verdana, sans-serif;
  --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family-serif: Georgia, "Times New Roman", Times, serif;
  --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html {
  font-size: 16px;
}


body {
	color-scheme: light;

	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-text-size-adjust: 100%;
	background-color: var(--off-white-1);

	color: var(--text-color);

	font-family: var(--font-family-sans-serif);
	line-height: 24px;
	font-weight: 400;
  font-size: var(--font-size);
}

/* Typography baseline */
p,
ul,
ol,
pre,
table,
blockquote {
  margin-bottom: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-serif);
  font-weight: 500;
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }
h5, h6 { font-size: 1rem; }

ul,
ol {
  padding-left: 1.5rem;
}

/* Media */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* Forms */
button,
input,
select,
textarea {
  font: inherit;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

main {
    /* max-width: 800px; */
    /* margin: 12px auto; */
    padding: 1rem;
    flex: 1;
}

.entries, .post-detail-wrapper, .pagination {
    max-width: 800px;
    margin: 12px auto;
    padding: 1rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination button {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    color: var(--text-color);
    background: var(--off-white-2);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.pagination a:hover,
.pagination button:hover {
    background: var(--gray-light);
    color: var(--color-accent-cyan-2);
}

.pagination span {
    font-size: 0.85rem;
    color: var(--gray-mid);
}

.main-content-wrapper {
    max-width: 800px;
    margin: 12px auto;
    padding: 1rem;
}

/* Homepage uses full width for 2-column grid */
.main-content-wrapper.homepage {
    max-width: 1200px;
}

.content-wrapper {
    margin-top: 96px;
}

/* Page headings - consistent with post titles */
.main-content-wrapper h1 {
    font-family: var(--font-family-serif);
    font-size: 2.75rem;
    font-weight: 500;
    margin-bottom: 2rem;
    margin-top: 0;
    line-height: 1.15;
}

.main-content-wrapper h2 {
    font-family: var(--font-family-serif);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    margin-top: 0;
    line-height: 1.2;
}

/* Entries wrapper also gets consistent heading styles */
.entries h1, .entries h2 {
    font-family: var(--font-family-serif);
    font-weight: 500;
    line-height: 1.2;
}

.entries h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.pinned-post {
  max-width: 800px;
  margin: 12px auto;
  background-color: var(--off-white-2);
  padding: 2rem;
  border: 1px solid var(--gray-mid);
  border-radius: 15px;
}

.pinned-post .post-content {
  font-size: calc(1.25 * var(--font-size));
}

.pinned-label {
  display: inline-block;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-dark);
  background-color: var(--gray-light);
  padding: 0.2em 0.6em;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.e-content {
  margin-top: 2rem;
}

/* Legacy p-name styles for post lists */
h2.p-name {
  margin-bottom: 0;
}
h2.p-name a {
  font-weight: 600;
}


/* Header */
header {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.75rem 1.5rem;
  justify-content: flex-start;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--gray-light);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  width: 100%;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Posts */
ul {
    padding: 0;
}

li {
    /*border-bottom: 1px solid var(--border-color);*/
    padding: 8px 0;
    margin-left:24px; 
}

/* Forms */
form {
    /* margin-bottom: 20px; */
}

/* Form field wrappers */
.fieldWrapper {
    margin-bottom: 1.25rem;
}

.fieldWrapper label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* Django form errors */
.errorlist {
    list-style: none;
    padding: 0.75rem 1rem;
    margin: 0 0 0.75rem 0;
    background: #fef2f2;
    border-left: 4px solid #b91c1c;
    border-radius: 0 6px 6px 0;
    color: #991b1b;
    font-size: 0.9rem;
}

.errorlist li {
    margin: 0;
    padding: 0;
}

textarea, input[type="text"], input[type="email"], input[type="password"], input[type="url"], select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border: 1px solid var(--gray-mid);
    border-radius: 8px;
    background-color: var(--color-white);
    color: var(--text-color);
    transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
    min-height: 150px;
    resize: vertical;
    font-family: var(--font-family-monospace);
    line-height: 1.6;
}

textarea:hover, input[type="text"]:hover, input[type="email"]:hover,
input[type="password"]:hover, input[type="url"]:hover, select:hover {
    border-color: var(--gray-dark);
}

textarea:focus, input[type="text"]:focus, input[type="email"]:focus,
input[type="password"]:focus, input[type="url"]:focus, select:focus {
    outline: none;
    border-color: var(--color-accent-cyan-2);
    box-shadow: 0 0 0 3px rgba(16, 155, 177, 0.1);
}

/* Checkbox styling */
input[type="checkbox"] {
    width: auto;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--color-accent-cyan-2);
}

/* Label for checkboxes should be inline */
.fieldWrapper:has(input[type="checkbox"]) label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.fieldWrapper:has(input[type="checkbox"]) input[type="checkbox"] {
    margin: 0;
}

/* Details/Summary styling for form sections */
details {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--off-white-2);
    border-radius: 8px;
    border: 1px solid var(--gray-light);
}

details summary {
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-color);
    padding: 0.5rem;
    margin: -1rem;
    margin-bottom: 0;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

details summary:hover {
    background: var(--gray-light);
    color: var(--color-accent-cyan-2);
}

details[open] summary {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray-light);
    border-radius: 8px 8px 0 0;
}

/* Reply context styling on new post page */
.reply-context {
    background: var(--off-white-2);
    padding: 1.25rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--color-accent-cyan-2);
    border-radius: 0 8px 8px 0;
}

.reply-context strong {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
}

.reply-context blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--color-white);
    border-left: 3px solid var(--gray-mid);
    font-style: italic;
    color: var(--gray-dark);
}

.reply-context a {
    color: var(--color-accent-cyan-2);
    font-weight: 500;
}

/* Login page styling */
.main-content-wrapper form p {
    margin-bottom: 1.25rem;
}

.main-content-wrapper > p {
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.main-content-wrapper > p a {
    color: var(--color-accent-cyan-2);
    text-decoration: underline;
}

.main-content-wrapper > p a:hover {
    color: var(--color-accent-cyan);
}

/* Buttons */
button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    background: var(--color-accent-cyan-2);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

button:hover {
    background: var(--color-accent-cyan-3, #0891b2);
}

button:active {
    transform: scale(0.98);
}

/* Secondary/outline button variant */
button.secondary {
    background: transparent;
    border: 1px solid var(--gray-mid);
    color: var(--text-color);
}

button.secondary:hover {
    background: var(--off-white-2);
    border-color: var(--gray-dark);
}

/* Form button groups */
form button + button {
    margin-left: 0.75rem;
}

/* Dark Mode Toggle Button */
#theme-toggle {
    float: right;
    border: 1px solid var(--border-color);
    background: var(--button-bg);
    padding: 5px 10px;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    color: #000;
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    width: 50%;
    max-width: 600px;
}

.close {
    float: right;
    font-size: 28px;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    width: 60%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.media-scroll {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
}


/* Ensure images inside markdown content are responsive */
.post-content img {
    max-width: 100%; /* Never exceed the container width */
    height: auto;    /* Maintain aspect ratio */
    display: block;  /* Remove inline spacing issues */
    margin: 10px auto; /* Center images nicely */
}

/* === Post Content Styles (Markdown Rendered) === */
.post-content {
    line-height: 1.6;
    font-size: var(--font-size);
    max-width: 100%;
    word-wrap: break-word;
}

.post-content li {
  padding:0;
}

/* Headings */
.post-content h1, .post-content h2, .post-content h3, .post-content h4, 
.post-content h5,
.post-content h6 {
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
}

.form-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

/* Paragraphs */
.post-content p {
    line-height: 1.6; /* More breathing room between lines */
    /* margin-bottom: 8px; /* Ensure spacing between paragraphs */ */
    margin: 1.5rem 0;
}

/* Links */
.post-content a {
    text-decoration: none;
    font-weight: bold;
}

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

/* Images */
.post-content img {
    max-height: 480px;
    width: auto; /* Maintain aspect ratio */
    /*height: auto;*/
    display: block;
    margin: 10px auto;
    border-radius: 4px;
}

/* Lists */
.post-content ul, .post-content ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.post-content ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

/* Blockquotes */
.post-content blockquote {
    border-left: 4px solid var(--color-accent-cyan-2);
    padding: 10px;
    padding-left: 25px;
    font-style: italic;
    background-color: var(--gray-light);
    margin: 10px 0;
}

/* Transclusion - embedded post content */
.transclusion {
    border-left: 4px solid var(--color-accent-lavender);
    padding: 10px;
    padding-left: 25px;
    background-color: var(--off-white-2);
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.transclusion .transclusion-content {
    font-style: normal;
}

.transclusion-source {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-light);
    font-size: 0.85em;
    color: var(--gray-mid);
}

.transclusion-source a {
    color: var(--color-accent-cyan-2);
    font-weight: 500;
}

/* Code Blocks */
.post-content pre {
    background: #222;
    font-family: var(--font-family-monospace);
    color: #ddd;
    padding: 10px;
    overflow-x: auto;
    border-radius: 4px;
}

/* Inline Code */
.post-content code {
    font-family: var(--font-family-monospace);
    background: #222;
    color: #ddd;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.post-content th, .post-content td {
    border: 1px solid #ddd;
    padding: 8px;
}

.post-content th {
    background: #f5f5f5;
    font-weight: bold;
}

/* Horizontal Rule */
.post-content hr {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 20px 0;
}

/* === Post Entry Styling === */
.post-entry {
  padding: 12px; /* Slightly reduce padding for a tighter layout */
    margin-bottom: 15px; /* Reduce gap between posts */
    border-bottom: 1px solid var(--gray-light);
}

.post-entry:last-child {
    border-bottom: none; /* Remove border for last post */
}




/* Make timestamps subtle but readable */
.post-entry small a {
    color: #aaa;
    text-decoration: none;
}

.post-entry small a:hover {
    text-decoration: underline;
}
.timestamp {
    font-size: 0.85em; /* Make it smaller */
    color: #6c757d; /* Gray it out */
    margin-left: 5px;
}

/* === Header Styling === */
/* Ensures the menu aligns with the content width */
.menu {
    /* width: 100%; */
    justify-content: space-between;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Make sure the home link and menu items align with the content */
.home-link {
    flex-shrink: 0; /* Prevent resizing */
    font-size: var(--font-size);
    font-weight: bold;
    padding: 0; /* Remove extra padding */
    margin: 0; /* Remove extra margin */
}

/* Align menu items to the right while maintaining structure */
.menu-right {
    display: flex;
    gap: 0.75rem; /* Adjust spacing */
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end; /* Aligns items to the right */

    font-family: var(--font-family-serif);
}

.menu-right a {
  font-weight: 500;
}

/* Remove extra padding & margin from links */
.menu-item {
    padding: 0;
    padding: 0.35rem 0.35rem;
    margin: 0;
    text-decoration: none;
    font-size: 1.1rem;
    color: var(--text-color);
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.menu-item:hover {
  background: var(--off-white-2);
  color: var(--color-accent-cyan-2);
  text-decoration: none;
}


/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    margin-left: auto;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Responsive for Small Screens */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .menu-right {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
        background: var(--off-white-1);
        padding: 1rem 0;
        border-top: 1px solid var(--gray-light);
        margin-top: 0.75rem;
    }

    .menu-right.active {
        display: flex;
    }

    .menu-right .menu-item {
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 0;
        text-align: left;
    }

    .menu-right .menu-item:hover {
        background: var(--off-white-2);
    }

    .user-dropdown {
        width: 100%;
    }

    .user-dropdown .dropdown-toggle {
        width: 100%;
        padding: 0.75rem 1rem;
        text-align: left;
        border-radius: 0;
    }

    .user-dropdown .dropdown-menu {
        position: static;
        width: 100%;
        border: none;
        border-top: 1px solid var(--gray-light);
        border-radius: 0;
        background: var(--off-white-2);
        margin-top: 0;
    }

    .user-dropdown:hover .dropdown-menu,
    .user-dropdown:focus-within .dropdown-menu {
        display: none;
    }

    .user-dropdown.active .dropdown-menu {
        display: block;
    }

    header {
        flex-wrap: wrap;
    }
}

/* User dropdown menu */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--off-white-2);
    border: 1px solid var(--gray-mid);
    border-radius: 4px;
    min-width: 150px;
    z-index: 1000;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: var(--gray-light);
}

.user-dropdown:hover .dropdown-menu,
.user-dropdown:focus-within .dropdown-menu {
    display: block;
}

/* Footer social links */
.footer-social {
    margin-bottom: 1rem;
}

.footer-social a {
    margin: 0 0.5rem;
}


/* === Generic Action Button Styling === */
.btn-action {
    display: inline-block;
    background: var(--accent-green); /* Bright, attention-grabbing color */
    font-weight: bold;
    padding: 8px 16px;
    /*border-radius: 6px;*/
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-action:hover {
    background: var(--accent-green); /* Bright, attention-grabbing color */
    transform: scale(1.05); /* Subtle zoom effect */
}

.btn-action:active {
    transform: scale(0.98); /* Slight press effect */
}

.btn-primary {
    background-color: var(--color-accent-cyan-2);
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover {
    background-color: var(--color-accent-cyan-3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--gray-mid);
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn-secondary:hover {
    background-color: var(--off-white-2);
    border-color: var(--gray-dark);
}

.btn-secondary:active {
    transform: scale(0.98);
}
.site-footer {
    text-align: center;
    padding: 15px;
    font-size: 14px;
    margin-top: 30px;
}

.reply-button {
    display: inline-block;
    font-size: 12px;
    padding: 4px 8px;
    color: var(--color-accent-cyan-2);
    background: transparent;
    border: 1px solid var(--color-accent-cyan-2);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.reply-button:hover {
    background: var(--color-accent-cyan-2);
    color: white;
}

.replies-container {
    margin-top: 20px; /* Add space above replies */
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.reply {
    padding: 10px;
    margin: 10px 0;
    margin-bottom: 12px; /* Space between individual replies */
    border-left: 3px solid var(--color-accent-cyan-3); /* Subtle highlight on replies */
    /*background-color: #f8f9fa; /* Light background to separate replies */*/
    font-size: 14px;
}

.reply strong {
    font-size: 16px;
}

.reply small {
    color: #666;
}

.reply-count {
    font-size: 12px;
    color: #6c757d; /* Subtle gray */
    margin-left: 5px;
}

.reply-count {
    font-size: 12px;
    color: #007bff; /* Make it look clickable */
    text-decoration: none;
}

.reply-count:hover {
    text-decoration: underline;
}


a {
	font-weight: 500;
	color: var(--color-accent-cyan-2);
	text-decoration: inherit;
}
a:hover {
	color: var(--color-accent-cyan);
}
a:visited {
	color: var(--color-accent-cyan-3);
}
a:visited:hover {
	color: var(--color-accent-cyan-2);
}

.profile-section {
flex: 1;
  /* max-width: 800px; */
  display: flex;
  flex-direction: row;
  align-items: center;
  display: flex;
  gap: 1em .5em;
  flex-wrap: wrap;
  align-items: center;
  padding: 1em;
}

.profile-image {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	/* margin: 0 15px; */
	object-fit: contain;
	object-position: initial;
	filter: none;
	/* margin-bottom: 16px; */
}

.profile-name {
	text-align: center;
	/* margin: 0 15px; */
	font-weight: 700;
	font-size: 24px;
  font-family: var(--font-family-serif);
	line-height: 1.5em;
	text-overflow: ellipsis;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
  margin-right: auto;
}

.profile-description {
	padding: 0px;
	margin: 0px;
	margin-top: 4px;
	text-align: center;
	font-size: var(--font-size);
	font-weight: 500;
	line-height: 1.5em;
}

@media screen and (max-width: 800px) {
	#links a {
		width: 100%;
		padding: 16px 0;
	}
	main {
		padding: 64px 0;
	}
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes highlightFade {
  from {
    background-color: var(--color-accent-cyan-2);
  }
  to {
    background-color: transparent;
  }
}


.post-entry.new-post {
  animation: fadeInSlide 0.4s ease-out, highlightFade 1s ease-in;
  /* background-color: #fff8d3; /* light yellow */ */
  border-radius: 4px;
}

#gdpr-widget {
  position: fixed;
  bottom: 0;
  right: 25px;
  width: 100%;
  background: white;
  max-width: 500px;
  margin: 25px auto;
  margin: 25px auto;
  border: 1px solid #ccc;
  padding: 25px;
}

.hide {
  display: none;
}

/* Stub links - pages that don't exist yet */
.stub-link {
    color: #9b2d4a;
    text-decoration: underline;
    text-decoration-style: dashed;
}

.stub-link:hover {
    color: #9b2d4a;
    opacity: 0.8;
}

.stub-link:visited {
    color: #9b2d4a;
}

.stub-link:visited:hover {
    color: #9b2d4a;
    opacity: 0.8;
}

/* Override .post-content a:hover for stub links to keep dashed underline */
.post-content a.stub-link:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

/* Stub page message */
.stub-message {
    color: var(--color-text-3);
    font-style: italic;
    margin-bottom: 1.5rem;
}

/* Stub page button styling */
.stub-link.button,
a.button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: var(--color-accent-cyan-2);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.stub-link.button:hover,
a.button:hover {
    background: var(--color-accent-cyan-3);
    color: white;
}

.stub-link.button:active,
a.button:active {
    transform: scale(0.98);
}

/* Homepage Layout */
.homepage {
    padding-top: 2rem;
}

/* Hero Section */
.hero {
    font-family: var(--font-family-serif);
    text-align: left;
    margin-bottom: 3rem;
    padding: 3rem 0;
    max-width: 1200px;
}

.hero h1,
.hero-title {
    font-family: var(--font-family-serif);
    font-size: 4.5rem;
    font-weight: 400;
    margin-bottom: 4.5rem;
    line-height: 1.1;
}

.hero p {
    color: var(--gray-mid);
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.6;
}

.hero-tag {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--color-link);
    text-underline-offset: 0.15em;
}

.hero-tag:hover {
    color: var(--color-link);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero-sub {
        font-size: 1.1rem;
    }
}

/* Homepage 2-column grid layout */
.homepage-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .homepage-sections-grid {
        grid-template-columns: 1fr;
    }
}

/* Homepage Sections */
.homepage-section {
    margin-bottom: 3rem;
}

.homepage-section h2 {
    font-family: var(--font-family-serif);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray-light);
    padding-bottom: 0.5rem;
}

/* Section Grid (for Music, Sketches, Code) */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.section-card {
    display: block;
    padding: 1rem;
    background: var(--off-white-2);
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-title {
    display: block;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.card-date {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-mid);
}

/* Blogroll (list style) */
.blogroll {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.blogroll-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-light);
    text-decoration: none;
}

.blogroll-item:hover .card-title {
    color: var(--color-accent-cyan-2);
}

/* Section Link */
.section-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-accent-cyan-2);
}

.homepage-section .empty {
    color: var(--gray-mid);
    font-style: italic;
}

/* Sketch Cards with Images */
.sketch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.sketch-card {
    display: block;
    text-decoration: none;
    border-radius: 4px;
    overflow: hidden;
    background: var(--off-white-2);
    border: 1px solid var(--gray-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sketch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sketch-card-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.sketch-card-info {
    padding: 0.75rem;
}

.sketch-card-info .card-title {
    font-size: 0.9rem;
    line-height: 1.3;
}

.sketch-card-info .card-date {
    font-size: 0.75rem;
}

/* Fallback sketch card when no image */
.sketch-card.no-image {
    padding: 1rem;
}

.sketch-card.no-image .card-title {
    margin-bottom: 0.5rem;
}

/* =====================================================
   Post Detail Page Styles
   ===================================================== */

/* Post Title - Large serif like homepage hero but smaller */
.post-title, .main-content-wrapper h1.blog-title {
    font-family: var(--font-family-serif);
    font-size: 4.5rem;
    font-weight: 500;
    line-height: 1.15;
}
.post-title {
    margin-bottom: 1rem;
    margin-top: 0;
}

.blog-title {
    margin-bottom: 2.5rem;
}


.post-title a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.post-title a:hover {
    text-decoration: none;
    color: var(--color-accent-cyan-2);
}

/* Post Metadata */
.post-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--gray-mid);
    font-size: 0.95rem;
}

.post-meta-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: auto;
}

.post-date {
    color: var(--gray-dark);
}

.post-meta-separator {
    color: var(--gray-mid);
}

.post-author {
    color: var(--text-color);
    font-weight: 500;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
}

.post-tag {
    font-size: 0.8rem;
    color: var(--gray-mid);
    text-decoration: none;
    background: var(--off-white-2);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.post-tag:hover {
    color: var(--color-accent-cyan-2);
    background: var(--gray-light);
}

/* Post Content Area - optimal reading width */
.post-detail-wrapper article .post-content {
    max-width: 70ch;
    margin-top: 2rem;
}

.post-detail-wrapper article .post-content p,
.post-detail-wrapper article .post-content li,
.post-detail-wrapper article .post-content td {
    font-size: 1.25rem;
    line-height: 1.75;
}

.post-detail-wrapper article .post-content h1,
.post-detail-wrapper article .post-content h2,
.post-detail-wrapper article .post-content h3,
.post-detail-wrapper article .post-content h4 {
    font-family: var(--font-family-serif);
    font-weight: 700;
    line-height: 1.2;
}

.post-detail-wrapper article .post-content h1 {
    font-size: 2.5rem;
    margin-top: 2.5rem;
}

.post-detail-wrapper article .post-content h2 {
    font-size: 2rem;
    margin-top: 2rem;
}

.post-detail-wrapper article .post-content h3 {
    font-size: 1.6rem;
    margin-top: 1.75rem;
}

.post-detail-wrapper article .post-content h4 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
}

/* Post Footer */
.post-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-light);
}

/* Engagement counts */
.post-engagement {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--gray-mid);
    margin-right: 1rem;
}

/* Post Links Section (backlinks and forward links) */
.post-links-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--off-white-2);
    border-radius: 8px;
}

.post-backlinks,
.post-forward-links {
    min-width: 0;
}

.links-heading {
    font-family: var(--font-family-sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-mid);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-list li {
    margin: 0;
    padding: 0.4rem 0;
    margin-left: 0;
}

.links-list a {
    font-size: 0.95rem;
    font-weight: 400;
}

/* Replies Section */
.replies-section {
    margin-top: 3rem;
}

.replies-heading {
    font-family: var(--font-family-sans-serif);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Post Navigation */
.post-nav {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-light);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-nav a,
.post-nav button {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    color: var(--text-color);
    background: var(--off-white-2);
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}

.post-nav a:hover,
.post-nav button:hover {
    background: var(--gray-light);
    color: var(--color-accent-cyan-2);
}

.post-nav button:active {
    transform: scale(0.98);
}

/* Inline forms for buttons in nav */
.post-nav .inline-form {
    display: inline;
}

/* Unified nav button style for links and buttons */
.nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    color: var(--text-color);
    background: var(--off-white-2);
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}

.nav-btn:hover {
    background: var(--gray-light);
    color: var(--color-accent-cyan-2);
}

.nav-btn:active {
    transform: scale(0.98);
}

.nav-btn.danger {
    color: #b91c1c;
}

.nav-btn.danger:hover {
    background: #fef2f2;
    color: #991b1b;
}

/* Responsive adjustments for post detail */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .post-tags {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .post-links-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* =====================================================
   Blog Page Styles
   ===================================================== */

.blog-page {
    max-width: 800px;
}

.blog-entries {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.blog-entry {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-light);
}

.blog-entry.pinned {
    background: var(--off-white-2);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-bottom: none;
}

.blog-entry .pinned-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-mid);
    background: var(--gray-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.blog-entry-title {
    font-family: var(--font-family-serif);
    font-size: 1.75rem;
    font-weight: 500;
    margin: 0 0 0.75rem 0;
    line-height: 1.25;
}

.blog-entry-title a {
    color: inherit;
    text-decoration: none;
}

.blog-entry-title a:hover {
    color: var(--color-accent-cyan-2);
}

.blog-entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-mid);
    margin-bottom: 0.75rem;
}

.blog-entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-left: auto;
}

.blog-entry-tag {
    font-size: 0.8rem;
    color: var(--gray-mid);
    text-decoration: none;
    background: var(--off-white-2);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.blog-entry-tag:hover {
    color: var(--color-accent-cyan-2);
    background: var(--gray-light);
}

.blog-entry-excerpt {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

.blog-entry-excerpt a {
    color: var(--color-link);
}

.blog-nav {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-light);
}

.blog-nav a,
.blog-nav button {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    color: var(--text-color);
    background: var(--off-white-2);
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}

.blog-nav a:hover,
.blog-nav button:hover {
    background: var(--gray-light);
    color: var(--color-accent-cyan-2);
}

.blog-nav button:active {
    transform: scale(0.98);
}

/* Responsive adjustments for blog page */
@media (max-width: 768px) {
    .blog-title {
        font-size: 2.25rem;
    }

    .blog-entry-title {
        font-size: 1.4rem;
    }

    .blog-entry-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .blog-entry-tags {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* ========================================
   Landing Page Layout
   ======================================== */

.landing-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.landing-layout .e-content {
    font-size: 1.15rem;
    line-height: 1.7;
}

/* Override post-content constraints for landing pages */
.landing-layout article .post-content {
    max-width: none;
    margin-top: 0;
}

.landing-layout article .post-content p,
.landing-layout article .post-content li {
    font-size: 1.15rem;
}

.landing-layout article .post-content h1.hero-title {
    font-family: var(--font-family-serif);
    font-size: 4.5rem;
    font-weight: 400;
    margin-bottom: 4.5rem;
    line-height: 1.1;
}

.landing-layout article .post-content .page-hero p {
    font-size: 1.25rem;
    color: var(--gray-mid);
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
    margin-bottom: 1rem;
}

.landing-layout article .post-content .page-section {
    text-align: center;
}

.landing-layout article .post-content .page-section h2 {
    font-family: var(--font-family-serif);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.landing-layout article .post-content .page-section > ul {
    display: inline-block;
    text-align: left;
}

.landing-layout article .post-content .page-section > p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.landing-layout article .post-content .page-card {
    text-align: left;
}

.landing-layout article .post-content .page-card h3 {
    font-family: var(--font-family-serif);
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.landing-layout article .post-content .page-card p {
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
}

.landing-layout article .post-content a.page-cta,
.landing-layout article .post-content a.page-cta:visited {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-accent-cyan);
    color: white;
    border-radius: 25px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.landing-layout article .post-content a.page-cta:hover,
.landing-layout article .post-content a.page-cta:visited:hover {
    background: var(--color-accent-cyan-2);
    color: white;
    text-decoration: none;
}

.landing-nav {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* ========================================
   Reusable Section & Grid Classes
   (for use in post HTML content)
   ======================================== */

/* Full-width section with padding */
.page-section {
    padding: 3rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.page-section:last-child {
    border-bottom: none;
}

.page-section h2 {
    font-family: var(--font-family-serif);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.page-section p {
    margin-bottom: 1rem;
}

/* Hero section for landing pages */
.page-hero {
    padding: 0.5rem 0 4rem 0;
    text-align: center;
}

.page-hero h1 {
    font-family: var(--font-family-serif);
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1rem;
}


.page-hero p {
    font-size: 1.25rem;
    color: var(--gray-mid);
    max-width: 700px;
    margin: 0 auto;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Card component for grids */
.page-card {
    padding: 1.5rem;
    background: var(--off-white-2);
    border-radius: 8px;
}

.page-card h3 {
    font-family: var(--font-family-serif);
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.page-card p {
    color: var(--text-dark);
    line-height: 1.6;
}

/* CTA button */
.page-cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-accent-cyan);
    color: white;
    border-radius: 25px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.page-cta:hover {
    background: var(--color-accent-cyan-2);
}

/* Responsive grids */
@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .page-hero h1 {
        font-size: 2.25rem;
    }

    .page-section h2 {
        font-size: 1.6rem;
    }

    .landing-layout {
        padding: 0 1rem;
    }
}
