/* General styles */
body {
    font-family: "Space Grotesk", "Georgia", serif; /* Use Space Grotesk as primary font */
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #fff;
}

/* Header styling */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
    padding: 20px 0; /* Increased padding for more spacing */
    border-bottom: 1px solid transparent; /* Placeholder for the thin line */
    transition: transform 0.3s ease-out; /* Add this line for smooth animation */
}

.header-hidden {
    transform: translateY(-100%);
}

header::after {
    content: '';
    display: block;
    width: 60%; /* Adjust width to control the line's length */
    height: 2px; /* Thinner line */
    background-color: #1877F2; /* Blue color for the line */
    margin: 20px auto 0; /* Center the line and add spacing above */
}

header nav {
    display: flex;
    justify-content: center;
    gap: 40px; /* Increased gap between navigation items */
}

header a {
    text-decoration: none;
    font-size: 18px; /* Slightly larger font size */
    color: black;
    font-weight: 500;
    display: flex; /* Enable flex for icon/text alignment */
    align-items: center;
    justify-content: center;
}

.nav-icon {
    display: none;
}

.nav-text {
    display: inline;
}

header a:hover,
header a.active {
    color: #1877F2; /* Blue for active or hovered links */
}

header a.active .nav-icon,
header a:hover .nav-icon {
    /* Filter to turn black into #1877F2 (Blue) */
    filter: invert(31%) sepia(95%) saturate(2185%) hue-rotate(202deg) brightness(100%) contrast(93%);
}

@media (max-width: 600px) {
  header nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    justify-content: center;   /* Center the nav items */
    gap: 24px; /* Slightly smaller gap for mobile */
    padding-bottom: 4px;
    padding-left: 16px;   /* Add this line */
    padding-right: 16px;  /* Add this line */
    scrollbar-width: none; /* Hide scrollbar on Firefox */
  }
  header nav::-webkit-scrollbar {
    display: none; /* Hide scrollbar on Chrome/Safari */
  }
  header a {
    flex: 0 0 auto;
    font-size: 16px;
    padding: 0.25rem 0;
  }
  
  header a.active {
    flex-direction: row-reverse;
    gap: 8px;
  }
  
  /* Default state for nav-text on mobile (hidden but animatable) */
  .nav-text {
    visibility: hidden;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.5s ease, visibility 0s 0.5s; /* Removed opacity from transition */
  }
  
  /* Active state for nav-text on mobile (visible and animatable) */
  header a.active .nav-text {
    visibility: visible;
    opacity: 1;
    max-width: 100px; /* A reasonable max-width, adjust as needed */
    transition: max-width 0.5s ease, visibility 0s; /* Removed opacity from transition */
  }
  
  .nav-icon {
    display: block;
    width: 24px;
    height: 24px;
  }
}

/* Main content styling */
main {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto; /* Center the content */
}

/* Essay container */
#essays-list-section {
    margin-top: 20px;
}
/* Essay container */
#essays-container {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between essays */
}

/* Container for each essay */
.essay-item {
    display: flex;
    align-items: flex-start; /* Align items at the top */
    gap: 15px; /* Space between date and content */
}

/* Style for the date */
.essay-date {
    flex-shrink: 0;
    width: 90px; /* Fixed width for consistent alignment */
    padding-top: 5px; /* Aligns date with the title */
    font-size: 12px;
    font-weight: 300; /* Light weight for the date */
    color: #1877F2; /* Blue color for the date */
    text-transform: uppercase; /* Use short month names */
    text-align: right; /* Align the text to the right */
    line-height: 1.4; /* Proper vertical spacing */
    white-space: nowrap; /* Prevent wrapping */
}

/* Container for title and snippet */
.essay-content {
    display: flex;
    flex-direction: column; /* Stack title and snippet */
    flex-grow: 1; /* Take up the remaining space */
    margin-bottom: 20px;
}

/* Style for the title */
.essay-title {
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    color: black;
    margin-bottom: 0px; /* Space below the title */
}

/* Style for the snippet */
.essay-snippet {
    font-size: 14px;
    color: #555; /* Softer color for the snippet */
    line-height: 1.6; /* Better readability */
    margin-top: 5px; /* Space below the title */
}


/* Images within essays */
.essay-content img {
    max-width: 100%; /* Ensures the image doesn't exceed the container's width */
    max-height: 400px; /* Reduced max height for more compact layout */
    height: auto; /* Maintain aspect ratio */
    width: auto; /* Maintain aspect ratio */
    display: block; /* Prevents inline images from adding extra spacing */
    margin: 10px auto; /* Center the image and add spacing */
}


.essay-intro {
    margin-bottom: 48px;
    color: #333; /* Softer color for the intro paragraph */
}


/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        flex-direction: column; /* Stack the navigation vertically */
        align-items: center; /* Center-align items */
    }

    nav {
        margin-top: 10px;
        gap: 10px; /* Reduce spacing between links */
    }

    #essays-container {
        gap: 15px; /* Reduce spacing between essays */
    }

    .essay-title {
        font-size: 18px; /* Adjust title size */
    }

    .essay-snippet {
        font-size: 14px; /* Adjust snippet size */
    }
}

/* Quotes page styles */
/* Quotes container styles */
#quotes-container {
    display: flex;
    flex-direction: column;
    gap: 40px; /* Increased gap between quotes */
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Individual quote item */
.quote-item {
    display: flex;
    flex-direction: column;
    border-left: 2px solid #1877F2; /* Thinner blue line */
    padding: 10px 20px; /* Padding inside the quote item */
}

/* Quote text */
.quote-text {
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
    color: #333;
    margin: 0 0 10px 0; /* Space below the text */
    line-height: 1.5;
}

/* Author and icons container */
.quote-meta {
    display: flex;
    justify-content: space-between; /* Align author to left, icons to right */
    align-items: center; /* Vertically align items */
}

/* Quote author */
.quote-author {
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    color: #555;
    margin: 0;
}

/* Action buttons */
.quote-icons {
    display: flex;
    gap: 10px; /* Space between icons */
}

/* Social icons for quotes */
/* Social icons for quotes */
.quote-icons img {
    width: auto; /* Maintain aspect ratio */
    height: 16px; /* Set height to 16px */
    cursor: pointer;
    filter: grayscale(100%); /* Make the icons grey */
    transition: filter 0.3s ease, opacity 0.3s ease;
    opacity: 0.7; /* Set initial grey opacity */
}

.quote-icons img:hover {
    filter: grayscale(0%); /* Remove grey on hover */
    opacity: 1; /* Fully visible on hover */
}

.quote-copy,
.quote-share {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #555;
    transition: color 0.3s;
}

.quote-copy:hover,
.quote-share:hover {
    color: #1877F2;
}


/* Toast notification styles */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeInOut 2s forwards;
}

/* Fade-in and fade-out animation for the toast */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    10%, 90% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
}


/* General page layout */
#about-section {
    max-width: 800px;
    margin: 40px auto;
    margin-top: 20px;
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

#about-section p {
    margin-bottom: 20px;
}

#about-section a {
    color: #1877F2;
    text-decoration: none;
}

#about-section a:hover {
    text-decoration: underline;
}

/* Social icons container */
/* Social icons container */
#social-icons {
    display: flex;
    justify-content: center;
    gap: 15px; /* Slightly reduce the space between icons */
    margin-top: 40px;
}

/* Social icons */
#social-icons a img {
    width: 24px; /* Set a fixed width */
    height: auto; /* Maintain aspect ratio */
    filter: grayscale(100%);
    transition: filter 0.3s;
    vertical-align: middle; /* Ensure consistent vertical alignment */
}

#social-icons a img:hover {
    filter: grayscale(0%);
}


/* Style for essay content */
article {
    max-width: 800px;
    margin: 40px auto;
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

article h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.essay-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

/*.essay-content {*/
/*    margin-bottom: 40px;*/
/*}*/

.essay-actions {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Space between actions */
}

.essay-actions a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1877F2; /* Matches your link style */
    font-size: 16px;
    font-weight: 500;
}

.essay-actions .icon {
    width: 16px; /* Set consistent width */
    height: auto; /* Maintain aspect ratio */
    margin-right: 8px; /* Space between icon and text */
}


.essay-actions a:hover {
    text-decoration: underline;
}


/* Container for the toggle */
/* Position the toggle */
.toggle-container {
    position: fixed; /* Makes it stick to the viewport */
    bottom: 20px; /* Adjust the distance from the bottom of the viewport */
    right: 20px; /* Adjust the distance from the right of the viewport */
    z-index: 1000; /* Ensures it stays on top of other elements */
}


/* From Uiverse.io by Creatlydev */
.toggle {
    background-color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 0 50px 20px rgba(0, 0, 0, .1);
    line-height: 1;
}

.input {
    display: none;
}

.icon {
    grid-column: 1 / 1;
    grid-row: 2 / 6;
    transition: transform 500ms;
}

.icon--moon {
    transition-delay: 200ms;
}

.icon--sun {
    transform: scale(0);
}

#switch:checked + .icon--moon {
    transform: rotate(360deg) scale(0);
}

#switch:checked ~ .icon--sun {
    transition-delay: 200ms;
    transform: scale(1) rotate(360deg);
}






/*!* Add other styles for dark mode *!*/
/* Dark mode general styles */
body.dark-mode {
    background-color: #121212; /* Dark background */
    color: #e0e0e0; /* Light text */
    /*transition: background-color 0.3s ease, color 0.3s ease;*/
}

body.dark-mode header {
    background-color: #121212;
}

body.dark-mode header::after {
    background-color: #1877F2;
}

body.dark-mode header a {
    color: #e0e0e0;
}

body.dark-mode header a.active,
body.dark-mode header a:hover {
    color: #1877F2;
}

/* Essays list in dark mode */
/* Intro paragraph styles (Dark Mode) */
body.dark-mode .essay-intro {
    color: rgba(224, 224, 224, 0.8); /* Light text for intro */
}

body.dark-mode .essay-date {
    color: #1877F2; /* Bright blue for date */
}

body.dark-mode .essay-title {
    color: #e0e0e0; /* Light title text */
}

body.dark-mode .essay-snippet {
    color: #aaaaaa; /* Softer gray for snippet */
}


/* Toast notification in dark mode */
body.dark-mode .toast {
    background-color: #333;
    color: #e0e0e0;
}

/* Toggle button styles for dark mode */
body.dark-mode .toggle {
    background-color: #333;
    box-shadow: 0 0 50px 20px rgba(255, 255, 255, .1);
}


/* Dark mode for Essays page */
body.dark-mode #essays-container {
    background-color: #121212;
    color: #e0e0e0;
}


/* Quotes Page */
body.dark-mode .quote-item {
    border-left: 4px solid #1877F2;
    /*background-color: #1e1e1e; !* Subtle dark background *!*/
}

body.dark-mode .quote-text {
    color: #e0e0e0;
}

body.dark-mode .quote-author {
    color: #aaaaaa;
}

body.dark-mode .quote-icons img {
    filter: brightness(0.7);
}

body.dark-mode .quote-icons img:hover {
    filter: brightness(1);
}

/* About Page */
body.dark-mode #about-section {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode #about-section a {
    color: #1877F2; /* Use the same blue for consistency */
}


/* Default (Light Mode) Icon Styles */
#social-icons img {
    filter: none; /* Default icon appearance */
    /*transition: filter 0.3s ease, opacity 0.3s ease; !* Smooth transition *!*/
}

/* Dark Mode Icon Styles */
body.dark-mode #social-icons img {
    filter: invert(100%) sepia(0%) saturate(1996%) hue-rotate(109deg) brightness(108%) contrast(76%);; /* Dim and desaturate icons */
}

body.dark-mode .nav-icon {
    filter: invert(100%) sepia(0%) saturate(1996%) hue-rotate(109deg) brightness(108%) contrast(76%);
}

body.dark-mode .quote-icons img {
    filter: invert(100%) sepia(0%) saturate(1996%) hue-rotate(109deg) brightness(108%) contrast(76%);; /* Dim and desaturate icons */
}

body.dark-mode .essay-actions img {
    filter: invert(100%) sepia(0%) saturate(1996%) hue-rotate(109deg) brightness(108%) contrast(76%);; /* Dim and desaturate icons */
}


/* Dark mode for article content */

/*body.dark-mode article {*/
/*    background-color: #1e1e1e; !* Dark mode background *!*/
/*    color: #e0e0e0; !* Light text for readability *!*/
/*    box-shadow: none; !* Remove shadow in dark mode *!*/
/*}*/

body.dark-mode .essay-container {
    color: #e0e0e0; /* Light text for readability */
    box-shadow: none; /* Remove shadow in dark mode */
}


body.dark-mode article h1 {
    color: #f5f5f5; /* Light title color for dark mode */
}

body.dark-mode .essay-date {
    color: #1877F2; /* Bright purple for date in dark mode */
}

/* Dark mode for links inside the article */
body.dark-mode a {
    color: #1877F2; /* Links in purple */
}

/* Software page styles */
#software-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

#software-section p {
    margin-bottom: 20px; /* Space between paragraphs */
}

.software-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.software-icon img {
    width: 80px;
    height: 80px;
    border-radius: 22%;
}

.software-content {
    flex-grow: 1;
}

.software-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.software-description {
    font-size: 16px;
    line-height: 1.5;
    color: #555;
    margin: 0 0 10px 0;
}

.software-availability {
    font-size: 14px;
    color: #777;
}

.software-availability a {
    color: #1877F2;
    text-decoration: none;
}

.software-availability a:hover {
    text-decoration: underline;
}

/* Dark mode for software page */
body.dark-mode #software-section p {
    color: #ccc;
}

body.dark-mode .software-title {
    color: #f1f1f1;
}

body.dark-mode .software-description {
    color: #ccc;
}

body.dark-mode .software-availability {
    color: #aaa;
}

body.dark-mode .software-availability a {
    color: #1e90ff;
}

#social-icons img {
    width: 24px;
    height: 24px;
}

body.dark-mode a {
    color: #1e90ff; /* Light blue for links in dark mode */
}

/* Software Page Styles */
#software-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

#software-section .principles p {
    margin-bottom: 20px;
}

.software-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.software-icon img {
    width: 100px;
    height: 100px;
    border-radius: 22%;
}

.software-content {
    flex-grow: 1;
}

.software-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.software-description {
    font-size: 16px;
    line-height: 1.5;
    color: #555;
    margin: 0 0 10px 0;
}

.software-availability {
    font-size: 14px;
    color: #777;
}

.software-availability a {
    color: #1877F2;
    text-decoration: none;
}

.software-availability a:hover {
    text-decoration: underline;
}

body.dark-mode #software-section .principles p {
    color: #ccc;
}

body.dark-mode .software-title {
    color: #f1f1f1;
}

body.dark-mode .software-description {
    color: #ccc;
}

body.dark-mode .software-availability {
    color: #aaa;
}

body.dark-mode .software-availability a {
    color: #1e90ff;
}

/* Privacy Policy Page Styles */
#policy-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

#policy-section h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

#policy-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 10px;
}

#policy-section p, #policy-section ul {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

#policy-section ul {
    padding-left: 20px;
    list-style-position: inside;
}

#policy-section a {
    color: #1877F2;
    text-decoration: none;
}

#policy-section a:hover {
    text-decoration: underline;
}

body.dark-mode #policy-section h1,
body.dark-mode #policy-section h2,
body.dark-mode #policy-section p,
body.dark-mode #policy-section ul {
    color: #ccc;
}

body.dark-mode #policy-section a {
    color: #1e90ff;
}

/* TIME PAGE */
#activity-list-container {
    margin-top: 2rem;
}

#activity-list-container ul {
    list-style: none;
    padding: 0;
}

#activity-list-container li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

#activity-list-container .emoji {
    font-size: 1.5rem;
    margin-right: 1rem;
}

#activity-list-container .activity-name {
    font-weight: bold;
}

#activity-list-container .activity-hours {
    margin-left: auto;
    font-size: 1rem;
    color: #555;
}

body.dark-mode #activity-list-container .activity-hours {
    color: #aaa;
}