:root {
    --color-page-bg: #d8c7b3;
    --color-parchment-letter: #f5efdd;
    --color-parchment-letter-border: #e0d7c1;
    --color-ink-main: #3a3027;
    --color-ink-secondary: #5c5148;
    --color-ink-letter: #4a3f35;
    --color-accent-hover: #8b4513;

    --font-serif-display: 'Lora', serif;
    --font-script: 'Caveat', cursive;

    --animation-duration-slow: 1.5s;
    --animation-duration-subtle-float: 20s;
}

/* Basic Reset & Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-serif-display);
    background-color: var(--color-page-bg);
    color: var(--color-ink-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Header and Navigation */
.site-header {
    width: 100%;
    padding: 30px 0; /* Increased padding for more breathing room */
    text-align: center;
    animation: fadeIn var(--animation-duration-slow) ease-in-out;
}

.main-nav {
    display: inline-block;
}

.nav-link {
    font-family: var(--font-serif-display);
    text-decoration: none;
    color: var(--color-ink-main);
    margin: 0 18px; /* Slightly more spacing */
    font-size: 0.95rem; /* Slightly larger for clarity */
    font-weight: 500; /* Medium weight for Lora */
    text-transform: uppercase;
    letter-spacing: 0.12em; /* Increased for a more classic, spaced feel */
    transition: color 0.3s ease;
    padding-bottom: 5px;
    opacity: 0.9; /* Slightly softer appearance */
}

.nav-link.active,
.nav-link:hover {
    color: var(--color-ink-main); /* Make hover distinct, perhaps stronger */
    opacity: 1;
}

/* Main Content Area */
.home-main-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    padding: 20px;
    animation: fadeIn var(--animation-duration-slow) ease-in-out 0.2s backwards;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 650px; /* Slightly wider for larger titles */
}

.main-title {
    font-family: var(--font-serif-display);
    font-size: clamp(3.2rem, 10vw, 6.5rem); /* Slightly increased base and max size */
    font-weight: 600; /* Lora SemiBold - more presence than bold, less heavy */
    color: var(--color-ink-main);
    margin-bottom: 0.25em; /* Adjusted spacing */
    line-height: 1.05; /* Tighter line height for large display text */
    letter-spacing: -0.01em; /* Slight tightening for large serif */
}

.tagline {
    font-family: var(--font-serif-display);
    font-size: clamp(1.15rem, 3vw, 1.85rem); /* Slightly increased */
    color: var(--color-ink-secondary); /* Softer color to recede slightly */
    margin-bottom: 2em; /* More space before button */
    font-weight: 400; /* Lora Regular */
    line-height: 1.45; /* More open for readability */
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.02em; /* Slight spacing for clarity */
}

.cta-button {
    font-family: var(--font-serif-display);
    display: inline-block;
    padding: 14px 35px; /* Larger padding */
    border: 2px solid var(--color-ink-main);
    color: var(--color-ink-main);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em; /* Good spacing */
    font-size: 0.95rem; /* Consistent with nav links */
    font-weight: 500; /* Lora Medium */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    margin-top: 10px; /* Ensure some space from tagline */
}

.cta-button:hover {
    background-color: var(--color-ink-main);
    color: var(--color-page-bg);
    transform: translateY(-2px);
}

/* Floating Letters Container & Individual Letters */
.floating-letters-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.floating-letter {
    position: absolute;
    background-color: var(--color-parchment-letter);
    color: var(--color-ink-letter);
    font-family: var(--font-script); /* Caveat */
    padding: 12px 18px; /* Slightly more padding */
    border: 1px solid var(--color-parchment-letter-border);
    box-shadow: 3px 3px 10px rgba(40, 30, 20, 0.18); /* Slightly darker, warmer shadow */
    border-radius: 2px;
    line-height: 1.45; /* Slightly more open for script */
    animation: subtleFloat var(--animation-duration-subtle-float) ease-in-out infinite alternate,
               fadeIn var(--animation-duration-slow) ease-in-out;
    opacity: 0.9; /* Slightly increased opacity for better readability */
}

.floating-letter p {
    font-size: clamp(0.75rem, 1.6vw, 1rem); /* Slightly larger script font */
    margin: 0;
    font-weight: 500; /* Caveat medium can look good */
}

/* Positions and rotations for letters (same as before, adjust if needed) */
.letter-1 { top: 10%; left: 12%; width: 160px; transform: rotate(-12deg); animation-delay: -1s, 0.1s; }
.letter-2 { top: 28%; left: 28%; width: 150px; transform: rotate(6deg); animation-delay: -3s, 0.2s; }
.letter-3 { top: 8%; right: 10%; width: 180px; transform: rotate(10deg); animation-delay: -5s, 0.3s; }
.letter-4 { top: 25%; right: 25%; width: 160px; transform: rotate(-7deg); animation-delay: -2s, 0.4s; }
.letter-5 { top: 50%; left: 8%; width: 170px; transform: translateY(-50%) rotate(-10deg); animation-delay: -7s, 0.5s; }
.letter-6 { top: 55%; right: 6%; width: 180px; transform: translateY(-50%) rotate(15deg); animation-delay: -4s, 0.6s; }
.letter-7 { bottom: 15%; left: 18%; width: 170px; transform: rotate(8deg); animation-delay: -9s, 0.7s; }
.letter-8 { bottom: 10%; left: 35%; width: 160px; transform: rotate(-4deg); animation-delay: -6s, 0.8s; }
.letter-9 { bottom: 12%; right: 12%; width: 150px; transform: rotate(-15deg); animation-delay: -11s, 0.9s; }
.letter-10 { bottom: 22%; right: 28%; width: 160px; transform: rotate(5deg); animation-delay: -8s, 1s; }


/* Footer */
.site-footer-bottom {
    width: 100%;
    padding: 25px 0; /* More padding */
    text-align: center;
    font-size: 0.8rem; /* Slightly larger for better readability */
    color: var(--color-ink-secondary);
    opacity: 0.75; /* Slightly more visible */
    animation: fadeIn var(--animation-duration-slow) ease-in-out 0.5s backwards;
    letter-spacing: 0.01em;
}




/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-title.visually-hidden { /* If you keep a real H1 for SEO */
    position: absolute; clip: rect(0 0 0 0); width: 1px; height: 1px; margin: -1px;
}
#title-animation-svg {
    width: 80%;
    max-width: 600px; /* Adjust as needed */
    height: auto;
    display: block;
    margin: 0 auto 0.25em; /* Top margin 0, bottom margin like H1 */
    overflow: visible; /* Important for quill */
}

/* .svg-text-lora is defined within the SVG's <style> tag for font access */
/* GSAP will handle stroke-dasharray/offset for these text elements */

#quillSvg {
    opacity: 0; /* Start hidden */
    transform-origin: 0px 0px; /* Assumes nib is at local 0,0 */
}

@keyframes subtleFloat {
    0%   { transform: translate(0px, 0px) rotate(var(--initial-rotate, 0deg)); }
    25%  { transform: translate(2px, -4px) rotate(calc(var(--initial-rotate, 0deg) + 0.5deg)); }
    50%  { transform: translate(-1px, 3px) rotate(calc(var(--initial-rotate, 0deg) - 0.3deg)); }
    75%  { transform: translate(3px, -2px) rotate(calc(var(--initial-rotate, 0deg) + 0.2deg)); }
    100% { transform: translate(0px, 0px) rotate(var(--initial-rotate, 0deg)); }
}


.letter-1 { --initial-rotate: -12deg; }
.letter-2 { --initial-rotate: 6deg; }
.letter-3 { --initial-rotate: 10deg; }
.letter-4 { --initial-rotate: -7deg; }
.letter-5 { --initial-rotate: -10deg; }
.letter-6 { --initial-rotate: 15deg; }
.letter-7 { --initial-rotate: 8deg; }
.letter-8 { --initial-rotate: -4deg; }
.letter-9 { --initial-rotate: -15deg; }
.letter-10 { --initial-rotate: 5deg; }


/* Responsive adjustments */
@media (max-width: 768px) {
    .site-header { padding: 20px 0; }
    .nav-link {
        margin: 0 12px; /* Adjusted spacing */
        font-size: 0.9rem;
        letter-spacing: 0.1em;
    }

    .main-title {
        letter-spacing: 0em; /* Normal letter-spacing for smaller sizes */
        margin-bottom: 0.3em;
    }

    .tagline {
        margin-bottom: 1.8em;
        letter-spacing: 0.01em;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 0.9rem;
    }

    .floating-letter {
        padding: 10px 15px;
    }
    .floating-letter p { font-size: clamp(0.7rem, 1.5vw, 0.9rem); }

    .letter-1 { top: 5%; left: 5%; width: 120px; }
    .letter-2 { top: 15%; left: 40%; width: 110px; }
    .letter-3 { top: 3%; right: 3%; width: 130px; }
    .letter-4 { display: none; }
    .letter-5 { top: 50%; left: 3%; width: 130px; transform: translateY(-50%) rotate(-10deg); }
    .letter-6 { top: 52%; right: 2%; width: 140px; transform: translateY(-50%) rotate(15deg); }
    .letter-7 { bottom: 5%; left: 10%; width: 130px; }
    .letter-8 { display: none; }
    .letter-9 { bottom: 3%; right: 5%; width: 110px; }
    .letter-10 { display: none; }
}

@media (max-width: 480px) {
    .site-header { padding: 15px 0; }
    .nav-link { margin: 0 8px; font-size: 0.75rem; letter-spacing: 0.08em;}

    .hero-content { padding-top: 15px; padding-bottom: 15px;}
    .tagline { font-size: 1.05rem; line-height: 1.4; }
    .cta-button { padding: 10px 20px; font-size: 0.8rem; }


    .floating-letter p { font-size: 0.7rem; }
    .letter-1, .letter-3, .letter-5, .letter-6, .letter-7, .letter-9 {
        width: 90px; /* Smaller letters */
        padding: 8px 10px;
    }
    .letter-2, .letter-4, .letter-8, .letter-10 { display: none; }
    .site-footer-bottom { padding: 20px 0; font-size: 0.75rem;}
}

/*
==========================================================================
  ARCHIVES PAGE STYLES ("The Gallery of Souls")
==========================================================================
*/

.archives-main-content {
    width: 100%;
    max-width: 1200px; /* Limit overall width for better content flow */
    margin: 0 auto;
    padding: 30px 20px;
    animation: fadeIn var(--animation-duration-slow) ease-in-out;
}

.archives-introduction {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background-color: rgba(245, 239, 221, 0.3); /* Very subtle background for intro text block -- var(--color-parchment-letter) with alpha */
    border: 1px solid rgba(224, 215, 193, 0.5); /* var(--color-parchment-letter-border) with alpha */
    border-radius: 3px;
}

.archives-page-title {
    font-family: var(--font-serif-display);
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 600; /* Lora SemiBold */
    color: var(--color-ink-main);
    margin-bottom: 15px;
    line-height: 1.2;
}

.archives-intro-text {
    font-family: var(--font-serif-display);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--color-ink-secondary);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Filter Shelf and Tags */
.filter-shelf-container {
    margin-bottom: 40px;
    padding: 20px 15px;
    background-color: #c0a990; /* Placeholder for wood/metal - a darker, earthy tone */
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(40, 30, 20, 0.2), 0 1px 3px rgba(40,30,20,0.1);
}

.filter-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 15px;
}

.filter-tag {
    font-family: var(--font-script); /* Caveat for a handwritten feel */
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 500;
    color: var(--color-ink-letter);
    background-color: var(--color-parchment-letter);
    padding: 8px 18px;
    border: 1px solid var(--color-parchment-letter-border);
    border-radius: 20px; /* Pill shape */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    position: relative; /* For pseudo-element "string" if added */
}

.filter-tag:hover {
    background-color: #fffbf5; /* Lighter parchment */
    color: var(--color-ink-main);
    transform: translateY(-2px);
    box-shadow: 2px 3px 6px rgba(0,0,0,0.15);
}

.filter-tag.active {
    background-color: var(--color-ink-secondary);
    color: var(--color-parchment-letter);
    border-color: var(--color-ink-letter);
    font-weight: 700; /* Bolder for active state */
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.2);
}

/* Memory Grid */
.memory-grid-container {
    position: relative; /* For no-memories message positioning */
    min-height: 200px; /* Ensure some height even when empty before JS load */
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Memory Capsule */
.memory-capsule {
    background-color: #f8f0e7; /* Light parchment as base */
    border: 1px solid #e0d7c1; /* var(--color-parchment-letter-border) */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(54, 44, 38, 0.1), 0 2px 5px rgba(54, 44, 38, 0.08); /* Softer, more layered shadow */
    overflow: hidden; /* Ensure content stays within rounded corners */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0; /* Will be faded in by JS */
    transform: translateY(20px); /* Initial state for animation */
}

.memory-capsule.visible { /* Added by JS */
    opacity: 1;
    transform: translateY(0);
}


.memory-capsule:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(54, 44, 38, 0.15), 0 4px 10px rgba(54, 44, 38, 0.1);
}

.capsule-preview-image-wrapper {
    width: 100%;
    height: 200px; /* Fixed height for image container */
    overflow: hidden;
    background-color: #ece3d5; /* Fallback bg for image area */
    display: flex;
    align-items: center;
    justify-content: center;
}

.capsule-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover ensures image fills, might crop */
    transition: transform 0.4s ease;
}

/* Specific styling for image type capsule preview */
.memory-type-image .capsule-preview-image {
    filter: sepia(0.6) contrast(1.05) brightness(0.95);
    border-bottom: 1px solid #d4c7b8;
}

/* For letter/audio that use generic preview icons */
.memory-type-letter .capsule-preview-image,
.memory-type-audio .capsule-preview-image {
    object-fit: contain; /* Ensure whole icon is visible */
    padding: 20px; /* Space around the icon */
    filter: contrast(0.8) opacity(0.9);
}


.capsule-content {
    padding: 15px 20px;
    flex-grow: 1; /* Allows content to fill space if capsule height varies */
    display: flex;
    flex-direction: column;
}

.capsule-title {
    font-family: var(--font-serif-display);
    font-size: 1.25rem;
    font-weight: 600; /* Lora SemiBold */
    color: var(--color-ink-main);
    margin-bottom: 8px;
    line-height: 1.3;
}

.capsule-date {
    font-family: var(--font-serif-display);
    font-style: italic;
    font-size: 0.8rem;
    color: var(--color-ink-secondary);
    margin-bottom: 10px;
}

.capsule-tags {
    margin-top: auto; /* Pushes tags to the bottom if there's space */
    padding-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
}

.capsule-tag-item {
    font-family: var(--font-typewriter, 'Special Elite', monospace); /* Fallback added */
    font-size: 0.7rem;
    color: var(--color-accent-hover);
    background-color: rgba(211, 199, 164, 0.3); /* var(--color-sepia-dark) with alpha */
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid rgba(139, 69, 19, 0.2); /* var(--color-saddle) with alpha */
}

.no-memories-message {
    text-align: center;
    font-family: var(--font-serif-display);
    font-size: 1.1rem;
    color: var(--color-ink-secondary);
    padding: 40px 20px;
}

/* Modal Styles */
.archive-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex; /* Used for centering content-box */
    align-items: center;
    justify-content: center;
    /* display: none; will be controlled by JS */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.archive-modal.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(40, 30, 20, 0.88); /* Warm dark overlay */
    cursor: pointer;
}

.modal-content-box {
    position: relative;
    z-index: 1001;
    background-color: #fdf6e8; /* High-quality paper -- var(--color-parchment-light) */
    color: var(--color-ink-main);
    padding: 30px 35px;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.1); /* Stronger shadow for modal */
    width: 90%;
    max-width: 700px; /* Max width for readability */
    max-height: 85vh; /* Max height with some viewport margin */
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28); /* Bouncy open */
}

.archive-modal.show .modal-content-box {
    transform: scale(1) translateY(0);
}

.modal-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-family: var(--font-serif-display);
    font-size: 2rem;
    font-weight: 300; /* Lighter X */
    color: var(--color-ink-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close-button:hover {
    color: var(--color-ink-main);
    transform: scale(1.1);
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-parchment-letter-border);
}

.modal-memory-title {
    font-family: var(--font-serif-display);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    color: var(--color-ink-main);
    margin-bottom: 5px;
}

.modal-memory-date {
    font-family: var(--font-serif-display);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--color-ink-secondary);
    margin-bottom: 10px;
}

.modal-memory-description {
    font-family: var(--font-serif-display);
    font-size: 0.95rem;
    color: var(--color-ink-secondary);
    line-height: 1.5;
}

.modal-body-content {
    font-family: var(--font-typewriter, 'Special Elite', monospace);
    font-size: 1rem; /* Base for typewriter text */
    line-height: 1.7;
    color: var(--color-ink-main);
}

.modal-body-content img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    border: 1px solid var(--color-parchment-letter-border);
    margin: 10px 0;
}

.modal-body-content audio {
    width: 100%;
    margin-top: 15px;
    border: 1px solid var(--color-parchment-letter-border);
    border-radius: 25px; /* Pill shape for player */
    padding: 5px;
    background-color: #f0e6d0; /* Match tag bg for subtle coherence */
}

.modal-body-content audio::-webkit-media-controls-panel {
  background-color: #f0e6d0;
  border-radius: 25px;
}
.modal-body-content audio::-webkit-media-controls-play-button,
.modal-body-content audio::-webkit-media-controls-volume-slider {
  filter: saturate(0.8);
}


/* SR-only for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/*
==========================================================================
  END OF ARCHIVES PAGE STYLES
==========================================================================
*/

/* Responsive adjustments for Archives Page */
@media (max-width: 768px) {
    .archives-main-content {
        padding: 20px 15px;
    }
    .filter-shelf-container {
        padding: 15px 10px;
        margin-bottom: 30px;
    }
    .filter-tag {
        padding: 6px 15px;
        font-size: clamp(0.8rem, 2.5vw, 1rem);
    }
    .memory-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    .capsule-title {
        font-size: 1.1rem;
    }
    .capsule-preview-image-wrapper {
        height: 180px;
    }
    .modal-content-box {
        padding: 25px;
        max-height: 90vh; /* Allow more height on mobile */
    }
    .modal-memory-title {
        font-size: clamp(1.3rem, 5vw, 1.7rem);
    }
}

@media (max-width: 480px) {
    .archives-introduction {
        padding: 15px;
        margin-bottom: 25px;
    }
    .archives-page-title {
        font-size: clamp(1.8rem, 6vw, 2.2rem);
    }
    .archives-intro-text {
        font-size: 0.9rem;
    }
    .memory-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 25px;
    }
    .capsule-preview-image-wrapper {
        height: 200px; /* Can be taller for single column */
    }
    .modal-content-box {
        width: 95%;
        padding: 20px 15px;
    }
    .modal-memory-title {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
    }
    .modal-body-content {
        font-size: 0.9rem;
    }
    .modal-close-button {
        font-size: 1.8rem;
        top: 10px;
        right: 10px;
    }
}

/*
==========================================================================
  SUBMIT PAGE STYLES ("Whispering to Eternity")
==========================================================================
*/

.submit-page-body {
    /* Ledger background idea */
    background-image: url('assets/textures/aged_ledger_paper_texture_subtle.png'),
                      linear-gradient(to bottom, #f0eada 0%, #e8dbc6 100%); /* Fallback gradient */
    background-repeat: repeat; /* Texture repeat */
    background-size: auto, 100% 100%; /* Texture size, gradient size */
    background-attachment: fixed; /* Makes texture feel more static like a desk */
}

.submit-main-content {
    width: 100%;
    max-width: 900px; /* Slightly narrower for focused form */
    margin: 0 auto;
    padding: 30px 20px;
    animation: fadeIn var(--animation-duration-slow) ease-in-out;
}

.submit-introduction {
    text-align: center;
    margin-bottom: 30px; /* Less space as form is the focus */
    padding: 15px;
    border-radius: 3px;
}

.submit-page-title {
    font-family: var(--font-serif-display);
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    font-weight: 600;
    color: var(--color-ink-main);
    margin-bottom: 10px;
}

.submit-intro-text {
    font-family: var(--font-serif-display);
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    color: var(--color-ink-secondary);
    line-height: 1.5;
    max-width: 700px;
    margin: 0 auto;
}

.form-and-preview-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .form-and-preview-container {
        flex-direction: row;
        gap: 40px;
    }
    .form-ledger-area {
        flex: 1.2; /* Form takes slightly more space */
    }
    .preview-ledger-area {
        flex: 0.8;
    }
}


/* Form Area Styling - Integrating with Ledger */
.form-ledger-area, .preview-ledger-area {
    background-color: rgba(253, 246, 232, 0.6); /* var(--color-parchment-light) with more alpha */
    padding: 25px 30px;
    border: 1px solid rgba(212, 199, 184, 0.7); /* Softer border */
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(54, 44, 38, 0.08),
                inset 0 0 15px rgba(224, 215, 193, 0.3); /* Inset shadow for depth */
}


.memory-submission-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

@media (min-width: 600px) {
    .memory-submission-form .form-row {
        flex-direction: row;
        gap: 25px;
    }
    .memory-submission-form .form-row .form-group {
        flex: 1;
    }
}


.form-group {
    margin-bottom: 20px;
    position: relative; /* For potential absolute positioned elements within */
}
.form-group:last-child {
    margin-bottom: 0;
}


.form-label-script {
    font-family: var(--font-script); /* Caveat */
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: var(--color-ink-secondary);
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--font-typewriter, 'Special Elite', monospace);
    font-size: 1rem;
    color: var(--color-ink-main);
    background-color: transparent; /* Key for ledger feel */
    border: none; /* Remove default border */
    border-bottom: 1px solid rgba(139, 117, 100, 0.4); /* Faint ruled line */
    border-radius: 0; /* No rounding on lines */
    transition: border-color 0.3s ease;
    outline: none; /* Remove browser default focus outline */
    box-shadow: none; /* Remove any default shadows */
}

.form-input::placeholder, .form-textarea::placeholder {
    color: rgba(92, 81, 72, 0.5); /* var(--color-ink-secondary) with alpha */
    font-style: italic;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-bottom-color: var(--color-ink-main); /* Darker line on focus */
}

.form-select {
    appearance: none; /* Remove default arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235c5148' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 35px; /* Space for custom arrow */
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.file-upload-styled {
    position: relative;
    display: inline-block;
    cursor: pointer;
    padding: 10px 15px;
    border: 1px dashed rgba(139, 117, 100, 0.5);
    border-radius: 3px;
    background-color: rgba(245, 239, 221, 0.3);
    transition: background-color 0.2s ease;
    color: var(--color-ink-secondary);
    font-family: var(--font-serif-display);
}
.file-upload-styled:hover {
    background-color: rgba(245, 239, 221, 0.5);
    border-color: rgba(139, 117, 100, 0.8);
}
.file-upload-icon {
    font-size: 1.2rem;
    margin-right: 8px;
    vertical-align: middle;
}
.file-upload-text {
    vertical-align: middle;
}
.form-input-file { /* Hide actual file input, make styled div clickable */
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.file-name-display {
    display: block;
    margin-top: 8px;
    font-family: var(--font-typewriter, 'Special Elite', monospace);
    font-size: 0.85rem;
    color: var(--color-ink-secondary);
    font-style: italic;
}

/* Preview Area Styling */
.preview-ledger-area {
    /* Styles similar to form-ledger-area defined above */
}

.preview-title-script {
    font-family: var(--font-script);
    font-size: clamp(1.4rem, 3vw, 1.7rem);
    color: var(--color-ink-main);
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(139, 117, 100, 0.3);
    padding-bottom: 10px;
}

.preview-content {
    font-family: var(--font-typewriter, 'Special Elite', monospace);
    font-size: 0.95rem;
    color: var(--color-ink-main);
    line-height: 1.7;
}
.preview-entry-title {
    font-family: var(--font-serif-display);
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 5px;
}
.preview-entry-date {
    font-family: var(--font-serif-display);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--color-ink-secondary);
    margin-bottom: 15px;
}
.preview-entry-text {
    white-space: pre-wrap; /* Preserve line breaks from textarea */
    margin-bottom: 15px;
}
.preview-entry-image {
    max-width: 100%;
    max-height: 300px;
    border: 1px solid var(--color-parchment-letter-border);
    border-radius: 3px;
    margin-bottom: 15px;
    display: block; /* To respect margin */
}
.preview-entry-audio {
    width: 100%;
    margin-bottom: 15px;
}
.preview-entry-filename {
    font-style: italic;
    font-size: 0.8rem;
    color: var(--color-ink-secondary);
}


/* Submit Button - Wax Seal Style */
.form-submit-area {
    text-align: center;
    margin-top: 30px;
}

.submit-button.wax-seal-button {
    font-family: var(--font-serif-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: #fffbf5; /* Light parchment color for text */
    background-color: #a0522d; /* Saddle brown - base wax color */
    border: 2px solid #8b4513; /* Darker saddle brown border */
    padding: 12px 25px 12px 55px; /* More padding on left for graphic */
    border-radius: 30px 5px 5px 30px; /* Asymmetric for seal effect */
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 2px 2px 5px rgba(80,40,20,0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.submit-button.wax-seal-button .button-text {
    position: relative;
    z-index: 2;
}

.submit-button.wax-seal-button .wax-seal-graphic {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: #8b4513; /* Darker wax color */
    border-radius: 50%;
    z-index: 1;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.2), 0 0 0 2px #a0522d; /* Inset shadow and outer ring */
    display: flex;
    align-items: center;
    justify-content: center;
}
.submit-button.wax-seal-button .wax-seal-graphic::before { /* Impression mark */
    content: "A"; /* Atlas Initial - Or use SVG */
    font-family: var(--font-script);
    font-size: 1.5rem;
    color: #a0522d; /* Lighter color for impression */
    font-weight: bold;
    transform: rotate(-10deg);
}


.submit-button.wax-seal-button:hover {
    background-color: #8b4513;
    border-color: #7a3c10;
    box-shadow: 3px 3px 8px rgba(80,40,20,0.4);
    transform: translateY(-1px);
}
.submit-button.wax-seal-button:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 1px 1px 3px rgba(80,40,20,0.3);
}
/* Animation for wax seal press - to be triggered by JS */
.submit-button.wax-seal-button.pressing .wax-seal-graphic {
    animation: waxPress 0.5s ease-out forwards;
}
@keyframes waxPress {
    0% { transform: translateY(-50%) scale(1); opacity: 1; }
    50% { transform: translateY(-50%) scale(0.85); opacity: 0.8; }
    100% { transform: translateY(-50%) scale(1); opacity: 1; filter: brightness(0.9); }
}


/* Thank You Modal */
.submit-thank-you-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(40, 30, 20, 0.7); /* Similar to archives modal overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.submit-thank-you-modal.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease;
}

.modal-note-paper {
    background-color: var(--color-parchment-light);
    padding: 25px 30px;
    border: 1px solid var(--color-parchment-letter-border);
    border-radius: 3px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    text-align: center;
    width: 90%;
    max-width: 400px; /* Smaller, elegant note */
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.submit-thank-you-modal.show .modal-note-paper {
    transform: scale(1);
}

.modal-note-title {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--color-ink-main);
    margin-bottom: 15px;
}

.modal-note-text {
    font-family: var(--font-serif-display);
    font-size: 1rem;
    color: var(--color-ink-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
    min-height: 50px; /* Space for animated text */
}

.modal-note-text .char {
    opacity: 0;
    animation: fadeInChar 0.2s forwards;
}

@keyframes fadeInChar {
    to { opacity: 1; }
}

.modal-note-close-button {
    font-family: var(--font-serif-display);
    font-size: 0.9rem;
    color: var(--color-ink-main);
    background-color: transparent;
    border: 1px solid var(--color-ink-secondary);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-note-close-button:hover {
    background-color: var(--color-ink-secondary);
    color: var(--color-parchment-light);
}


/* Responsive Adjustments for Submit Page */
@media (max-width: 768px) {
    .form-ledger-area, .preview-ledger-area {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .submit-main-content { padding: 20px 15px; }
    .memory-submission-form .form-row { margin-bottom: 0; }
    .memory-submission-form .form-row .form-group { margin-bottom: 20px; }
    .form-label-script { font-size: 1.2rem; }
    .form-input, .form-select, .form-textarea { font-size: 0.95rem; }
    .preview-title-script { font-size: 1.5rem; }
    .submit-button.wax-seal-button { font-size: 1rem; padding: 10px 20px 10px 50px;}
    .submit-button.wax-seal-button .wax-seal-graphic { width: 35px; height: 35px; }
    .submit-button.wax-seal-button .wax-seal-graphic::before { font-size: 1.3rem; }

    .modal-note-paper { padding: 20px; }
    .modal-note-title { font-size: 1.6rem; }
    .modal-note-text { font-size: 0.95rem; }
}

/*
==========================================================================
  ABOUT US PAGE STYLES ("The Chronicle of Keepers")
==========================================================================
*/

.about-page-body {
    /* Consider a subtle texture like old maps or document fibers */
    background-image: url('assets/textures/subtle_document_fiber_texture.png'),
                      linear-gradient(to bottom, #e9e2d7 0%, #f0eada 100%); /* Fallback gradient */
    background-repeat: repeat, no-repeat;
    background-size: auto, 100% 100%;
    background-attachment: fixed;
}

.about-main-content {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 20px;
    animation: fadeIn var(--animation-duration-slow) ease-in-out;
}

.about-introduction {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.about-page-title {
    font-family: var(--font-serif-display);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 600;
    color: var(--color-ink-main);
    margin-bottom: 15px;
    line-height: 1.2;
}

.about-intro-text {
    font-family: var(--font-serif-display);
    font-size: clamp(1.05rem, 2.5vw, 1.2rem);
    color: var(--color-ink-secondary);
    line-height: 1.65;
    max-width: 750px;
    margin: 0 auto;
}

/* Ink Writing Animation Placeholder */
.ink-writing-animation-container {
    text-align: center;
    margin: 30px 0 50px;
    padding: 20px 0;
    border-top: 1px solid rgba(139, 117, 100, 0.2);
    border-bottom: 1px solid rgba(139, 117, 100, 0.2);
}

.ink-writing-text {
    font-family: var(--font-script); /* Caveat */
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--color-ink-main);
    opacity: 0.8;
    animation: simpleTextReveal 3s ease-in-out infinite alternate;
}
@keyframes simpleTextReveal {
    0% { opacity: 0.3; letter-spacing: 0.05em; }
    100% { opacity: 0.8; letter-spacing: 0.1em; }
}


/* Philosophy Section */
.about-philosophy {
    margin-bottom: 50px;
}

.about-section-title {
    font-family: var(--font-serif-display);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 500; /* Lora Medium */
    color: var(--color-ink-main);
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 117, 100, 0.3); /* Subtle separator */
    letter-spacing: 0.03em;
}

.philosophy-columns {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .philosophy-columns {
        flex-direction: row;
        gap: 40px;
    }
    .philosophy-column {
        flex: 1;
    }
}

.philosophy-column p {
    font-family: var(--font-serif-display);
    font-size: 1rem;
    color: var(--color-ink-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: justify; /* Editorial feel */
}

.about-pull-quote {
    font-family: var(--font-serif-display);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-ink-main);
    margin: 25px 10px;
    padding: 15px 20px;
    border-left: 3px solid var(--color-saddle, #8b4513);
    background-color: rgba(245, 239, 221, 0.2); /* var(--color-parchment-letter with alpha) */
    position: relative;
}

.about-pull-quote cite {
    display: block;
    text-align: right;
    font-size: 0.9rem;
    color: var(--color-ink-secondary);
    margin-top: 10px;
    font-style: normal;
}

/* Keepers Timeline Section */
.keepers-timeline {
    margin-top: 40px;
}

.timeline-list {
    list-style: none;
    padding: 0;
    position: relative;
    margin: 30px auto 0;
    max-width: 700px; /* Constrain timeline width for clarity */
}

/* Central line for the timeline */
.timeline-list::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 20px; /* Position of the line for left-aligned markers */
    width: 3px;
    background-color: rgba(139, 117, 100, 0.3); /* var(--color-ink-secondary with alpha) */
    border-radius: 2px;
}

@media (min-width: 600px) {
    .timeline-list::before {
        left: 50%; /* Center line for desktop */
        margin-left: -1.5px; /* Adjust for line width */
    }
}


.timeline-entry {
    position: relative;
    margin-bottom: 40px;
    padding-left: 55px; /* Space for marker + line */
    opacity: 0; /* For scroll-triggered animation */
    transform: translateX(-20px);
    animation: fadeInEntry 0.8s ease-out forwards; /* Basic fade in */
}
/* Staggered animation for entries (can be improved with JS intersection observer) */
.timeline-entry:nth-child(1) { animation-delay: 0.1s; }
.timeline-entry:nth-child(2) { animation-delay: 0.3s; }
.timeline-entry:nth-child(3) { animation-delay: 0.5s; }
.timeline-entry:nth-child(4) { animation-delay: 0.7s; }

@keyframes fadeInEntry {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-entry:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0; /* Aligns with the start of padding-left on .timeline-entry */
    top: 0; /* Aligns marker with top of timeline-content */
    width: 40px;
    height: 40px;
    background-color: var(--color-parchment-letter); /* Default background */
    border: 2px solid var(--color-ink-secondary); /* Default border */
    border-radius: 50%; /* Default round marker */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10; /* Above the timeline line */
    box-shadow: 0 0 0 3px var(--color-page-bg); /* Creates separation from the line, uses page background */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.timeline-marker.marker-seal {
    background-color: #a0522d; /* Saddle brown - wax color */
    border-color: #8b4513;
}
.timeline-marker.marker-seal::before {
    content: "A"; /* Atlas Initial - Or use SVG */
    font-family: var(--font-script);
    font-size: 1.6rem;
    color: #c9b29b; /* Lighter for impression */
    transform: rotate(-5deg) translateY(-1px);
}

.timeline-marker.marker-stamp {
    border-radius: 3px; /* Square-ish for stamp */
    background-color: #d1c0a8; /* Faded paper */
    border: 2px dashed var(--color-ink-secondary);
}
.timeline-marker.marker-stamp::before {
    content: 'LIB'; /* Short for Library */
    font-family: var(--font-typewriter, 'Special Elite', monospace);
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--color-ink-secondary);
}


.timeline-content {
    background-color: rgba(253, 246, 232, 0.5); /* var(--color-parchment-light with alpha) */
    padding: 15px 20px;
    border-radius: 4px;
    border: 1px solid rgba(224, 215, 193, 0.5); /* var(--color-parchment-letter-border with alpha) */
    box-shadow: 0 2px 5px rgba(54, 44, 38, 0.07);
    position: relative; /* For potential future ::before/::after decorations */
}

.timeline-year {
    font-family: var(--font-serif-display);
    font-size: 1.25rem;
    font-weight: 600; /* Lora SemiBold */
    color: var(--color-ink-main);
    margin-bottom: 8px;
    line-height: 1.3;
}

.timeline-description {
    font-family: var(--font-serif-display);
    font-size: 0.95rem;
    color: var(--color-ink-secondary);
    line-height: 1.6;
}


/* Responsive adjustments for About Page */
@media (max-width: 768px) {
    .about-main-content {
        padding: 20px 15px;
    }
    .about-section-title {
        font-size: clamp(1.4rem, 4vw, 1.8rem);
    }
    .about-pull-quote {
        font-size: 1rem;
        margin: 20px 0;
    }
}

/*
==========================================================================
  ABOUT US PAGE - TIMELINE: "The Unfolding Scroll of Memory"
==========================================================================
*/

.keepers-timeline { /* Container for the whole timeline section */
    margin-top: 40px;
    margin-bottom: 50px; /* Added some bottom margin */
}

.timeline-list {
    list-style: none;
    padding: 0;
    position: relative;
    margin: 40px auto 0; /* Increased top margin for separation from title */
    max-width: 750px; /* Slightly wider for potentially longer text */
}

/* Central line for the timeline */
.timeline-list::before {
    content: '';
    position: absolute;
    top: 15px; /* Adjusted to align better with markers */
    bottom: 15px;
    left: 19px; /* Position for left-aligned markers on mobile ( (40px marker width / 2) - (3px line width / 2) approx ) */
    width: 3px;
    background-color: rgba(139, 117, 100, 0.35); /* var(--color-ink-secondary with alpha), slightly darker */
    border-radius: 2px;
    z-index: 1; /* Ensure line is behind markers */
}

.timeline-entry {
    position: relative;
    margin-bottom: 45px; /* Increased spacing between entries */
    padding-left: 60px; /* More space for marker + line: marker (40px) + gap (20px) */
    opacity: 0; /* For scroll-triggered animation - initial state */
    transform: translateX(-20px); /* Initial state for animation */
    animation: fadeInEntry 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards; /* Default CSS animation if no JS scroll trigger */
}
/* Staggered animation for entries */
.timeline-entry:nth-child(1) { animation-delay: 0.1s; }
.timeline-entry:nth-child(2) { animation-delay: 0.3s; }
.timeline-entry:nth-child(3) { animation-delay: 0.5s; }
.timeline-entry:nth-child(4) { animation-delay: 0.7s; }
.timeline-entry:nth-child(5) { animation-delay: 0.9s; }
.timeline-entry:nth-child(6) { animation-delay: 1.1s; }


@keyframes fadeInEntry {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-entry:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0; /* Aligns with the start of padding-left on .timeline-entry */
    top: 0; /* Aligns marker with top of timeline-content */
    width: 40px;
    height: 40px;
    background-color: var(--color-parchment-letter); /* Default background */
    border: 2px solid var(--color-ink-secondary); /* Default border */
    border-radius: 50%; /* Default round marker */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10; /* Above the timeline line */
    box-shadow: 0 0 0 4px var(--color-page-bg); /* Creates separation from the line, uses page background */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.timeline-marker span {
    font-size: 1.5rem; /* Adjust size of emojis/icons */
    line-height: 1; /* Ensures icon is centered vertically */
    color: var(--color-ink-main); /* Default color for icons */
}

/* Specific Marker Styles for "The Unfolding Scroll of Memory" */
.timeline-marker.marker-style-droplet {
    background-color: #e0f2f7; /* Very pale blue */
    border-color: #7bbcd9;
}
.timeline-marker.marker-style-droplet span { color: #3c80a0; }

.timeline-marker.marker-style-storybook {
    background-color: #fffde7; /* Very pale yellow */
    border-color: #fbc02d;
}
.timeline-marker.marker-style-storybook span { color: #c49000; }

.timeline-marker.marker-style-flame {
    background-color: #ffebee; /* Very pale red */
    border-color: #f06292;
}
.timeline-marker.marker-style-flame span { color: #c2185b; }

.timeline-marker.marker-style-tree {
    background-color: #e8f5e9; /* Very pale green */
    border-color: #689f38;
}
.timeline-marker.marker-style-tree span { color: #33691e; }

.timeline-marker.marker-style-lantern {
    background-color: #fff3e0; /* Very pale orange/gold */
    border-color: #ffa726;
}
.timeline-marker.marker-style-lantern span { color: #ef6c00; }

.timeline-marker.marker-style-archive-seal {
    background-color: var(--color-saddle, #8b4513); /* Wax color from root */
    border-color: #703810; /* Darker wax border */
    border-radius: 50%; /* Ensure it's round for a seal */
}
.timeline-marker.marker-style-archive-seal span {
    font-family: var(--font-script); /* Caveat for the 'A' */
    font-weight: bold;
    font-size: 1.9rem; /* Larger for the 'A' */
    color: var(--color-parchment-letter, #f5efdd); /* Light color for 'A' on dark wax */
    transform: rotate(-8deg) translateY(1px); /* Slight tilt and position adjustment */
    line-height: 0.8; /* Adjust for Caveat font visual centering */
}


.timeline-content {
    background-color: rgba(253, 246, 232, 0.55); /* var(--color-parchment-light with alpha) */
    padding: 18px 22px; /* Adjusted padding */
    border-radius: 4px;
    border: 1px solid rgba(224, 215, 193, 0.6); /* var(--color-parchment-letter-border with alpha) */
    box-shadow: 0 3px 7px rgba(54, 44, 38, 0.08); /* Slightly enhanced shadow */
    position: relative; /* For potential future ::before/::after decorations */
}

.timeline-year {
    font-family: var(--font-serif-display);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 600; /* Lora SemiBold */
    color: var(--color-ink-main);
    margin-bottom: 10px; /* Increased space below title */
    line-height: 1.3;
}

.timeline-description {
    font-family: var(--font-serif-display);
    font-size: 0.95rem; /* Standard readable size */
    color: var(--color-ink-secondary);
    line-height: 1.65; /* Good for readability */
}

/* Desktop Timeline Layout (Alternating Sides) */
@media (min-width: 768px) { /* Changed breakpoint for alternating to wider screens */
    .timeline-list::before {
        left: 50%; /* Center line */
        margin-left: -1.5px; /* Adjust for line width */
        z-index: 1;
    }

    .timeline-entry {
        width: calc(50% - 40px); /* Account for gap (20px) and marker (40px)/2 for centering */
        padding-left: 0; /* Reset mobile padding */
        margin-bottom: 50px; /* Slightly more space on desktop */
    }
    .timeline-entry:nth-child(odd) { /* Entries on the LEFT */
        left: 0;
        padding-right: 40px; /* Space from center line */
        text-align: right;
    }
    .timeline-entry:nth-child(odd) .timeline-marker {
        /* Position marker on the RIGHT of the entry, visually centered on the timeline line */
        left: auto;
        right: -20px; /* ( (width of marker / 2) ) to center it on the line */
        transform: translateX(50%); /* Centers marker precisely on the line */
    }
    .timeline-entry:nth-child(odd) .timeline-content {
    }

    .timeline-entry:nth-child(even) { /* Entries on the RIGHT */
        left: calc(50% + 40px); /* Position to the right of center line */
        padding-left: 0px; /* Reset padding for right side */
        text-align: left;
    }
    .timeline-entry:nth-child(even) .timeline-marker {
        /* Position marker on the LEFT of the entry, visually centered on the timeline line */
        left: -20px;  /* ( (width of marker / 2) ) to center it on the line */
        right: auto;
        transform: translateX(-50%); /* Centers marker precisely on the line */
    }
}

/* Responsive Adjustments specific to Timeline for smaller screens if not covered by above mobile-first */
@media (max-width: 767px) { /* Ensure these apply for mobile if desktop styles are too specific */
    .timeline-list::before {
        left: 19px;
    }
    .timeline-entry,
    .timeline-entry:nth-child(odd),
    .timeline-entry:nth-child(even) {
        width: 100%; /* Full width on mobile */
        left: 0;
        padding-left: 60px; /* Consistent padding for marker from left edge */
        padding-right: 0;
        text-align: left; /* All text aligned left */
        transform: translateX(-10px); /* Adjusted for mobile animation entry */
    }
    .timeline-entry .timeline-marker,
    .timeline-entry:nth-child(odd) .timeline-marker,
    .timeline-entry:nth-child(even) .timeline-marker {
        left: 0; /* Marker always on the far left */
        right: auto;
        transform: translateX(0); /* Reset desktop transform */
    }
    .timeline-year { font-size: 1.15rem; }
    .timeline-description { font-size: 0.9rem; }
}
