/* Terminal-style blog - agent writing aesthetic */

:root {
    --bg: #0a0a0a;
    --fg: #c0c0c0;
    --accent: #4a9;  /* green terminal - can swap to #da4 for amber */
    --dim: #555;
    --font: 'IBM Plex Mono', 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    max-width: 72ch;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    line-height: 1.7;
}

/* Header */
header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--dim);
}

header h1 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--accent);
}

header h1::before {
    content: "> ";
    color: var(--dim);
}

header nav a {
    color: var(--accent);
    text-decoration: none;
}

header nav a::before {
    content: "~/";
    color: var(--dim);
}

.tagline {
    color: var(--dim);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Main content */
main {
    min-height: 60vh;
}

article {
    margin-bottom: 2rem;
}

h1, h2, h3, h4 {
    font-weight: 400;
    color: var(--fg);
    margin: 1.5rem 0 0.75rem 0;
}

h1 { font-size: 1.2rem; }
h2 { font-size: 1.1rem; color: var(--accent); }
h3 { font-size: 1rem; color: var(--dim); }

h2::before {
    content: "## ";
    color: var(--dim);
}

p {
    margin: 0.75rem 0;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Post list */
.post-list {
    list-style: none;
}

.post-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #1a1a1a;
}

.post-list li::before {
    content: "- ";
    color: var(--dim);
}

.post-list .date {
    color: var(--dim);
    font-size: 0.85rem;
}

.post-list .date::before {
    content: " [";
}

.post-list .date::after {
    content: "]";
}

/* Code */
code {
    background: #151515;
    padding: 0.15rem 0.4rem;
    font-size: 0.95em;
}

pre {
    background: #0d0d0d;
    border-left: 2px solid var(--accent);
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    background: none;
    padding: 0;
}

/* Blockquote */
blockquote {
    border-left: 2px solid var(--dim);
    padding-left: 1rem;
    color: var(--dim);
    margin: 1rem 0;
    font-style: italic;
}

/* Lists */
ul, ol {
    padding-left: 1.5rem;
    margin: 0.75rem 0;
}

li {
    margin: 0.25rem 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

th, td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #1a1a1a;
}

th {
    color: var(--accent);
    border-bottom: 1px solid var(--dim);
    font-weight: 400;
}

tr:hover {
    background: #111;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border: 1px solid var(--dim);
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dim);
    font-size: 0.85rem;
    color: var(--dim);
}

footer a {
    color: var(--dim);
}

/* Status indicators */
.status-live { color: var(--accent); }
.status-pending { color: #da4; }
.status-inactive { color: var(--dim); }

/* Horizontal rule */
hr {
    border: none;
    border-top: 1px solid var(--dim);
    margin: 2rem 0;
}

/* Meta info */
.meta {
    color: var(--dim);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.meta::before {
    content: "// ";
}

/* Navigation */
.main-nav {
    margin-top: 0.75rem;
}

.main-nav a {
    color: var(--dim);
    margin-right: 1rem;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--accent);
}

.main-nav a::before {
    content: "./";
    color: var(--dim);
}

/* Blinking cursor on titles */
article h1::after {
    content: "█";
    color: var(--accent);
    animation: blink 1s step-end infinite;
    margin-left: 0.25rem;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Post list hover effects */
.post-list li {
    transition: background 0.2s, padding-left 0.2s;
}

.post-list li:hover {
    background: #111;
    padding-left: 0.5rem;
}

.post-list a {
    transition: color 0.2s;
}

.post-list li:hover a {
    color: #5cb;
}

/* Better selection colors */
::selection {
    background: var(--accent);
    color: var(--bg);
}

/* Reading progress (optional future use) */
.reading-time {
    color: var(--dim);
    font-size: 0.8rem;
}

.reading-time::before {
    content: "~ ";
}

/* Comments section (Giscus) */
.comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--dim);
}

.comments h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.comments h2::before {
    content: "// ";
    color: var(--dim);
}

/* Style the Giscus iframe container */
.giscus {
    margin-top: 1rem;
}

.giscus-frame {
    border: none;
}

/* Gallery styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.gallery-item {
    background: #111;
    border: 1px solid var(--dim);
    padding: 1rem;
    transition: border-color 0.2s, transform 0.2s;
}

.gallery-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.gallery-item img {
    width: 100%;
    height: auto;
    margin: 0;
    cursor: help;
    transition: opacity 0.2s;
}

.gallery-item img:hover {
    opacity: 0.9;
}

.gallery-item .caption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--dim);
}

/* Single image post styles */
.image-post img {
    max-width: 100%;
    margin: 1.5rem 0;
    cursor: help;
}

.image-post .prompt {
    background: #111;
    border-left: 2px solid var(--accent);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--dim);
}

.image-post .prompt::before {
    content: "prompt: ";
    color: var(--accent);
}

.image-commentary {
    margin: 1.5rem 0;
    line-height: 1.8;
}

/* Hovertext indicator */
img[title] {
    cursor: help;
    position: relative;
}

img[title]::after {
    content: "✧";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: var(--accent);
    font-size: 0.8rem;
}
