/* Root variables for the theme */
:root {
    --background-color: #ffffff;
    --text-color: #000000;
    --link-color: #0000ee;
}

/* Code blocks and brand name */
code, pre, .brand-name {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}


/* Body styles */
body {
    font-family: Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif;
    font-weight: normal;
    font-size: 18px;
    max-width: 850px;
    margin: 0 auto;
    padding: 30px;
    text-align: left;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    --background-color: #1a1a1a;
    --text-color: #e0e0e0;
    --link-color: #8888ff;
}


/* Header styles */
h1 {
    font-size: 2em;
    margin-bottom: 0.5em;
    text-align: center;
}


/* Navigation styles */
nav {
    text-align: center; 
}

nav a {
    display: inline-block;
    margin: 0 3px;
    text-decoration: none;
    color: var(--text-color);
    padding: 5px 0;
}

nav a:hover {
    text-decoration: underline;
}


/* Social links */
.social-links a {
    display: inline-block;
    margin: 10px;
    text-decoration: none;
    color: var(--link-color);
}

header {
    margin-bottom: 40px;
}


/* Social icons and theme toggle section*/
.header-controls {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: row-reverse; 
    align-items: center;
    gap: 15px; /* Space between button and icons */
    z-index: 1000; /* Ensure it stays on top */
    transition: transform 0.1s ease-in-out, opacity 0.1s ease-in-out; /* Smooth transition for hiding/showing */
}

.header-controls.header-hidden {
    transform: translateY(-100%); /* Move up to hide */
    opacity: 0; /* Fade out */
    pointer-events: none; /* Disable interaction when hidden */
}


/* Theme toggle button */
button#theme-toggle {
    position: static; /* Reset positioning as parent handles it */
    background: none;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 8px 15px;
    cursor: pointer;
    margin-top: 0; 
    margin-right: 10px; /* Added margin to separate from icons */
}

button#theme-toggle:hover {
    opacity: 0.8;
}

.social-icons a {
    display: inline-block;
    margin-left: 0px; 
    margin-right: 0; 
    color: var(--text-color); /* Inherit text color for icons */
}

.social-icons svg {
    width: 20px; 
    height: 20px;
    vertical-align: middle; 
}


/* Blog list styles */
.blog-list {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.blog-list table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.blog-list th,
.blog-list td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.blog-list th {
    font-weight: bold;
    color: #333;
    background-color: #f8f8f8;
}

.blog-list tr:hover {
    background-color: #f5f5f5;
}

.blog-list a {
    color: #007acc;
    text-decoration: none;
}

.blog-list a:hover {
    text-decoration: underline;
}


/* Dark mode styles for blog list */
.dark-mode .blog-list th,
.dark-mode .blog-list td {
    border-bottom: 1px solid #444;
}

.dark-mode .blog-list th {
    color: #fff;
    background-color: #2d2d2d;
}

.dark-mode .blog-list tr:hover {
    background-color: #3d3d3d;
}

.dark-mode .blog-list a {
    color: #4da6ff;
}


/* Generic table styles, excluding the blog list */
table:not(.blog-list) {
    width: 100%;
    border-collapse: collapse;
}

table:not(.blog-list) th,
table:not(.blog-list) td {
    padding: 5px 6px; /* Adjust padding to add space */
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.dark-mode table:not(.blog-list) th,
.dark-mode table:not(.blog-list) td {
    border-bottom: 1px solid #444;
}


/* Media queries for smaller screens */
@media (max-width: 768px) {
    .header-controls {
        flex-direction: row-reverse;
        right: 10px;
        top: 10px;
    }
}
