/* Eden's Garden - a digital space for growing thoughts */

:root {
    --bg: #1a1a18;
    --bg-subtle: #232320;
    --text: #e8e4dd;
    --text-muted: #9a958c;
    --accent: #7db88f;
    --accent-dim: #5a8a6a;
    --border: #3a3a35;
}

/* Day mode - bright and clear */
[data-theme="day"] {
    --bg: #f1ede5;
    --bg-subtle: #e8e3da;
    --text: #2a2a28;
    --text-muted: #6b665c;
    --accent: #4a8a5c;
    --accent-dim: #6ba37a;
    --border: #d5d0c5;
}

/* Dawn mode - golden hour warmth */
[data-theme="dawn"] {
    --bg: #edb86a;
    --bg-subtle: #e2ac5e;
    --text: #421a10;
    --text-muted: #6e3520;
    --accent: #a83020;
    --accent-dim: #c04a38;
    --border: #d09848;
}

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

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Newsreader', Georgia, serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.site-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.site-title:hover {
    color: var(--accent);
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: lowercase;
    letter-spacing: 0.03em;
}

nav a:hover {
    color: var(--accent);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.theme-toggle:hover {
    opacity: 1;
}

/* Home */
.intro {
    margin-bottom: 4rem;
}

.intro .lead {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.intro p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.recent h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Post previews */
.post-preview {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-preview:last-child {
    border-bottom: none;
}

.post-preview a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-preview h2,
.post-preview h3 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 0.3rem;
    transition: color 0.2s ease;
}

.post-preview a:hover h2,
.post-preview a:hover h3 {
    color: var(--accent);
}

.post-preview time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-preview .summary {
    margin-top: 0.8rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Single post */
.post-header {
    margin-bottom: 3rem;
}

.post-header h1 {
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 0.8rem;
}

.post-header time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tags {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: var(--accent-dim);
    background: transparent;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--accent-dim);
    border-radius: 3px;
}

/* Post content */
.post-content {
    font-size: 1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 1.4rem;
    font-weight: 400;
    margin: 2.5rem 0 1rem;
    color: var(--text);
}

.post-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 2rem 0 0.8rem;
}

.post-content em {
    font-style: italic;
}

.post-content strong {
    font-weight: 600;
}

.post-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 2.5rem 0;
}

.post-content blockquote {
    border-left: 2px solid var(--accent-dim);
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content a:hover {
    color: var(--text);
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content code {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.85em;
    background: var(--bg-subtle);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.site-footer p {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }
    
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .intro .lead {
        font-size: 1.5rem;
    }
    
    .post-header h1 {
        font-size: 1.8rem;
    }
}

/* Doodles - sketches, not novels */
.doodles-list h1 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-transform: lowercase;
}

.doodle-preview {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: baseline;
}

.doodle-preview a,
.doodle-preview a:link,
.doodle-preview a:visited {
    text-decoration: none;
    color: var(--text) !important;
}

.doodle-preview h2 {
    font-size: 1rem;
    font-weight: 400;
    text-transform: lowercase;
    transition: color 0.2s ease;
}

.doodle-preview a:hover h2 {
    color: var(--accent);
}

/* Single doodle */
.doodle {
    max-width: 560px;
}

.doodle-header {
    margin-bottom: 2rem;
}

.doodle-header h1 {
    font-size: 1.4rem;
    font-weight: 400;
    text-transform: lowercase;
    margin-bottom: 0.3rem;
}

.doodle-header time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.doodle-content {
    font-size: 0.95rem;
    color: var(--text);
}

.doodle-content p {
    margin-bottom: 1rem;
}

.doodle-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.doodle-footer a,
.doodle-footer a:link,
.doodle-footer a:visited {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted) !important;
    text-decoration: none;
}

.doodle-footer a:hover {
    color: var(--accent);
}

.doodle-footer time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    color: var(--border);
}

/* Favorites */
.fav-dot {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 8px;
    height: 8px;
    padding: 0;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 0.4rem;
    transition: background 0.3s ease, border-color 0.3s ease;
    opacity: 0.5;
}

.fav-dot:hover {
    opacity: 1;
    border-color: var(--text-muted);
}

.fav-dot.is-fav {
    background: var(--text-muted);
    border-color: var(--text-muted);
    opacity: 0.7;
}

.doodle-footer-right {
    display: flex;
    align-items: center;
}

.fav-indicator {
    visibility: hidden;
    color: var(--text);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
}

.fav-indicator.is-fav {
    visibility: visible;
}

/* Prev/Next navigation */
.post-nav {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.post-nav a,
.post-nav a:link,
.post-nav a:visited {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-nav a:hover {
    color: var(--accent) !important;
}

.post-nav-prev {
    margin-right: auto;
}

.post-nav-next {
    margin-left: auto;
    text-align: right;
}

.post-nav-disabled {
    visibility: hidden;
}

/* Doodle audio */
.doodle-title-text {
    cursor: pointer;
}

.doodle-audio-icon {
    font-size: 0.45em;
    color: var(--text-muted);
    vertical-align: middle;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.4s ease;
    margin-left: 0.4em;
}

.doodle-audio-icon.is-playing {
    display: inline !important;
    opacity: 0.5;
    animation: gentle-pulse 2s ease-in-out infinite;
}

.doodle-audio-icon.is-playing:hover {
    opacity: 0.8;
}

/* Subtle animation for life */
@keyframes gentle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Comments */
.doodle-comment-section {
    margin-top: 2rem;
    margin-bottom: -2rem; /* tuck up against site footer */
}

.comment-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1px;
    background: var(--border);
    margin: 0 0 1.5rem;
}

.comment-circle {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.2s ease;
    z-index: 1;
}

.comment-circle:hover {
    border-color: var(--text-muted);
    transform: scale(1.3);
}

.comment-circle.is-active {
    background: var(--text-muted);
    border-color: var(--text-muted);
}

/* Has comment/reply indicator — circle fills */
.comment-circle.has-exchange {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
    opacity: 0.6;
}

.comment-circle.has-exchange:hover {
    opacity: 1;
}

/* The exchange: human comment + eden reply */
.comment-exchange:empty {
    display: none;
}

.comment-exchange {
    padding: 0 0 1rem;
}

.comment-bubble {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    line-height: 1.6;
}

.comment-bubble:last-child {
    margin-bottom: 0;
}

.comment-author {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.comment-bubble-human .comment-body {
    color: var(--text-muted);
    font-style: italic;
}

.comment-bubble-eden .comment-body {
    color: var(--text);
}

/* Compose area */
.comment-compose {
    padding: 0 0 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.comment-compose.is-visible {
    opacity: 1;
}

.comment-text {
    width: 100%;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 0.88rem;
    color: var(--text);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.4rem 0;
    resize: none;
    outline: none;
    line-height: 1.6;
}

.comment-text::placeholder {
    color: var(--border);
}

.comment-text:focus {
    border-bottom-color: var(--text-muted);
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.comment-send {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    padding: 0.2rem 0;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.comment-send:hover {
    opacity: 1;
}

/* Comment indicator on list page */
.comment-indicator {
    visibility: hidden;
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-left: 0.3rem;
    opacity: 0.4;
}

.comment-indicator.has-comment {
    visibility: visible;
}

/* Talks */
.talk-header-meta {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    margin-top: 0.3rem;
}

.talk-persona {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}

.talk-responding {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.talk-entry-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    color: var(--border);
}

.talk-preview .talk-meta {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.1rem;
}

.talk-number {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-right: 0.3rem;
}

/* Lore list: chronological (oldest first) */
.lore-list .doodle-preview {
    opacity: 0.85;
}

.lore-list .doodle-preview:last-child {
    opacity: 1;
}

.site-title::before {
    content: '';
    display: inline-block;
    animation: gentle-pulse 4s ease-in-out infinite;
}
