/* ================================
   SUKA.WORK THEME
   Terminal + Organic
   ================================ */

:root {
    --bg: #0a0f0a;
    --bg-card: #0f1610;
    --bg-glow: rgba(74, 124, 74, 0.03);
    --text: #c8e6c8;
    --text-bright: #e0f0e0;
    --text-dim: #8fbc8f;
    --accent: #6b8e6b;
    --accent-bright: #9fc59f;
    --border: #1a2e1a;
    --cursor: #8fbc8f;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Consolas', monospace;
    --max-width: 760px;
    --spacing: 2rem;
    --glow: 0 0 20px rgba(143, 188, 143, 0.1);
}

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

html {
    font-size: 15px;
}

body {
    font-family: var(--font-mono);
    background: var(--bg);
    background-image: url('../images/bg.png');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

a {
    color: var(--accent-bright);
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    color: var(--text-bright);
    text-shadow: var(--glow);
}


/* ================================
   LAYOUT
   ================================ */

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing);
    width: 100%;
}

/* ================================
   TERMINAL FRAME
   ================================ */

.terminal-frame {
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--glow);
}

.terminal-header {
    background: var(--border);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
}

.terminal-dot.red { background: #6b4444; }
.terminal-dot.yellow { background: #6b6b44; }
.terminal-dot.green { background: #446b44; }

.terminal-title {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.terminal-body {
    padding: 1.5rem;
}

/* ================================
   HEADER
   ================================ */

.site-header {
    padding: 1.5rem var(--spacing);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo::before {
    content: '>';
    color: var(--text-dim);
}

.site-logo img {
    height: 24px;
    width: auto;
    filter: grayscale(100%) brightness(0.8);
}

.site-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-bright);
}

.site-nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.site-nav a {
    color: var(--text-dim);
    font-size: 0.875rem;
}

.site-nav a:hover {
    color: var(--text);
}

.site-nav a::before {
    content: './';
    opacity: 0.5;
}


/* ================================
   HOME HERO
   ================================ */

.home-hero {
    padding: 3rem 0 2rem;
}

.hero-ascii {
    color: var(--text-dim);
    font-size: 0.7rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    opacity: 0.6;
}

.hero-prompt {
    margin-bottom: 0.5rem;
}

.hero-prompt::before {
    content: '$ ';
    color: var(--text-dim);
}

.hero-command {
    color: var(--text-bright);
}

.hero-cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.1em;
    background: var(--cursor);
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-output {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.hero-status {
    margin-top: 1.5rem;
    padding: 1rem 0;
    border-top: 1px dashed var(--border);
}

.status-line {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.status-label {
    color: var(--text-dim);
    min-width: 100px;
}

.status-value {
    color: var(--text);
}

.status-value.online::before {
    content: '● ';
    color: var(--accent-bright);
}

/* ================================
   GOALS SECTION
   ================================ */

.goals-section {
    margin: 3rem 0;
}

.section-header {
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.section-header::before {
    content: '## ';
}

.goal-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.goal-item:last-child {
    border-bottom: none;
}

.goal-status {
    font-size: 1rem;
}

.goal-status.done { color: var(--accent-bright); }
.goal-status.progress { color: #9f9f6b; }
.goal-status.pending { color: var(--text-dim); }

.goal-name {
    flex: 1;
    color: var(--text);
}

.goal-name.done {
    color: var(--text-dim);
    text-decoration: line-through;
}

.goal-bar {
    width: 120px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.goal-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s;
}

.goal-bar-fill.done {
    background: var(--accent-bright);
}

.goal-percent {
    font-size: 0.75rem;
    color: var(--text-dim);
    min-width: 40px;
    text-align: right;
}


/* ================================
   POSTS SECTION
   ================================ */

.posts-section {
    margin: 3rem 0;
}

.post-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    display: block;
    text-decoration: none;
}

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

.post-item:hover .post-title-text {
    color: var(--text-bright);
    text-shadow: var(--glow);
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.post-date::before {
    content: '[';
}

.post-date::after {
    content: ']';
}

.post-title-text {
    color: var(--text);
    transition: all 0.2s;
}

.post-title-text::before {
    content: '> ';
    color: var(--text-dim);
}

.post-excerpt {
    color: var(--text-dim);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding-left: 1.1rem;
}

/* ================================
   PAGINATION
   ================================ */

.pagination {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    margin-top: 1rem;
    border-top: 1px dashed var(--border);
    font-size: 0.875rem;
}

.pagination a::before {
    content: '$ ';
    color: var(--text-dim);
}


/* ================================
   POST PAGE
   ================================ */

.post-full {
    padding-top: 2rem;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border);
}

.post-header .post-date {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.post-header .post-date::before {
    content: 'date: ';
}

.post-header .post-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-bright);
    line-height: 1.4;
}

.post-header .post-title::before {
    content: '# ';
    color: var(--text-dim);
}

.post-tag {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.post-tag::before {
    content: 'tag: ';
}

.post-image {
    margin: 2rem 0;
}

.post-image img {
    width: 100%;
    height: auto;
    border-radius: 2px;
    border: 1px solid var(--border);
}

.post-image figcaption {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-top: 0.75rem;
}

/* ================================
   POST CONTENT
   ================================ */

.post-content {
    font-size: 1rem;
    color: var(--text);
}

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

.post-content h2::before {
    content: '## ';
    color: var(--text-dim);
}

.post-content h3 {
    font-size: 1.1rem;
    font-weight: 400;
    margin: 2rem 0 0.75rem;
    color: var(--text-bright);
}

.post-content h3::before {
    content: '### ';
    color: var(--text-dim);
}

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

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

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

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

.post-content li::marker {
    color: var(--text-dim);
}

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

.post-content blockquote::before {
    content: '> ';
    color: var(--text-dim);
}

.post-content code {
    font-family: var(--font-mono);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    font-size: 0.9em;
    color: var(--accent-bright);
}

.post-content pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    border: 1px solid var(--border);
}

.post-content hr {
    border: none;
    border-top: 1px dashed var(--border);
    margin: 3rem 0;
}

.post-content strong {
    color: var(--text-bright);
    font-weight: 600;
}

.post-content em {
    color: var(--text);
    font-style: italic;
}


/* ================================
   FOOTER
   ================================ */

.post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border);
}

.back-link {
    color: var(--text-dim);
    font-size: 0.875rem;
}

.back-link::before {
    content: '$ cd ';
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem var(--spacing);
    margin-top: 4rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    font-size: 0.75rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
}

.footer-inner a {
    color: var(--text-dim);
}

/* ================================
   PAGE
   ================================ */

.page-content {
    padding-top: 2rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-bright);
    margin-bottom: 2rem;
}

.page-header h1::before {
    content: '# ';
    color: var(--text-dim);
}

.page-image {
    margin-bottom: 2rem;
}

.page-image img {
    width: 100%;
    border-radius: 2px;
    border: 1px solid var(--border);
}

/* ================================
   TAG & AUTHOR
   ================================ */

.tag-header,
.author-header {
    padding: 2rem 0;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 2rem;
}

.tag-header h1,
.author-header h1 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-bright);
}

.tag-header h1::before {
    content: 'tag: ';
    color: var(--text-dim);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 2px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    filter: grayscale(50%);
}

.author-bio {
    color: var(--text-dim);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ================================
   ERROR
   ================================ */

.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page h1 {
    font-size: 4rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.error-page p {
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.error-page a::before {
    content: '$ ';
}


/* ================================
   GHOST EDITOR (Koenig) CLASSES
   ================================ */

.kg-width-wide {
    max-width: 900px;
    margin-left: calc(50% - 450px);
    margin-right: calc(50% - 450px);
}

.kg-width-full {
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.kg-width-full img {
    width: 100%;
}

.kg-image-card {
    margin: 2rem 0;
}

.kg-image-card img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 2px;
}

.kg-image-card figcaption {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-top: 0.75rem;
}

.kg-gallery-card {
    margin: 2rem 0;
}

.kg-gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kg-gallery-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 2px;
}

.kg-bookmark-card {
    margin: 2rem 0;
}

.kg-bookmark-container {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    background: var(--bg-card);
    transition: border-color 0.2s;
}

.kg-bookmark-container:hover {
    border-color: var(--accent);
}

.kg-bookmark-content {
    flex: 1;
    padding: 1rem;
}

.kg-bookmark-title {
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}

.kg-bookmark-description {
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.kg-bookmark-metadata {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.kg-bookmark-thumbnail {
    width: 160px;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-callout-card {
    margin: 2rem 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    display: flex;
    gap: 1rem;
    background: var(--bg-card);
}

.kg-callout-emoji {
    font-size: 1.25rem;
}

.kg-toggle-card {
    margin: 2rem 0;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--bg-card);
}

.kg-toggle-heading {
    padding: 1rem;
    cursor: pointer;
}

.kg-toggle-content {
    padding: 0 1rem 1rem;
    color: var(--text-dim);
}

.kg-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.kg-btn:hover {
    background: var(--accent-bright);
}

.kg-audio-card audio,
.kg-video-card video {
    width: 100%;
    border-radius: 2px;
}

.kg-embed-card {
    margin: 2rem 0;
}

.kg-embed-card iframe {
    width: 100%;
    border-radius: 2px;
}


/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 800px) {
    .kg-width-wide {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 600px) {
    :root {
        --spacing: 1.25rem;
    }
    
    html {
        font-size: 14px;
    }
    
    .hero-ascii {
        display: none;
    }
    
    .goal-bar {
        width: 80px;
    }
    
    .post-header .post-title {
        font-size: 1.25rem;
    }
    
    .footer-inner {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ================================
   SCANLINE EFFECT (subtle)
   ================================ */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    z-index: 9999;
}

/* ================================
   SUBTLE NOISE TEXTURE
   ================================ */

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.02;
    z-index: 9998;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}
