@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-primary: #080b12;
    --bg-secondary: #101620;
    --bg-tertiary: #171f2b;
    --bg-panel: #0c111b;
    --text-primary: #d9e2ef;
    --text-secondary: #8ea0b8;
    --text-muted: #64748b;
    --text-accent: #64b5ff;
    --text-green: #7ee787;
    --text-yellow: #f2cc60;
    --border-color: #223047;
    --border-strong: #31425d;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    background:
        radial-gradient(circle at top left, rgba(100, 181, 255, 0.12), transparent 28rem),
        linear-gradient(135deg, #070a10 0%, #0a1018 45%, #0a0d14 100%);
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1.65;
    margin: 0 auto;
    padding: clamp(0.75rem, 3vw, 2rem);
    width: 100%;
    max-width: 1060px;
    min-height: 100vh;
    overflow-x: hidden;
}

main,
header,
footer,
article,
.terminal-window,
.terminal-body,
.entry-content {
    max-width: 100%;
    min-width: 0;
}

p,
li,
h1,
h2,
h3,
h4,
a,
span {
    overflow-wrap: anywhere;
}

header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.prompt {
    color: var(--text-green);
    font-weight: 700;
}

.prompt::before {
    content: "galih@ceramah ";
}

.prompt-path {
    color: var(--text-accent);
}

.prompt-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

h1,
h2,
h3 {
    color: var(--text-green);
    letter-spacing: 0;
}

h1 {
    font-size: clamp(1.55rem, 4vw, 2.35rem);
    line-height: 1.25;
}

p {
    margin: 0 0 1.1rem;
}

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

a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 12px rgba(100, 181, 255, 0.45);
}

.terminal-window {
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: rgba(8, 11, 18, 0.88);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    overflow: hidden;
}

.terminal-titlebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(23, 31, 43, 0.98), rgba(12, 17, 27, 0.98));
}

.window-controls {
    display: flex;
    gap: 0.45rem;
}

.window-controls span {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
}

.window-controls span:nth-child(1) { background: #ff5f57; }
.window-controls span:nth-child(2) { background: #ffbd2e; }
.window-controls span:nth-child(3) { background: #28c840; }

.terminal-body {
    padding: clamp(1rem, 3.5vw, 2rem);
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--bg-panel);
    background-size: 100% 32px;
}

.index-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.75rem);
    margin: 0;
}

.subtitle,
.quote-meta,
.post-header-meta {
    color: var(--text-secondary);
}

.ascii-divider {
    color: var(--text-secondary);
    margin: 1rem 0;
    user-select: none;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.quote-list ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.quote-item {
    display: grid;
    gap: 0.25rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(34, 48, 71, 0.72);
}

.quote-item:hover {
    background: rgba(100, 181, 255, 0.035);
}

.quote-item a {
    color: var(--text-primary);
}

.quote-meta {
    font-size: 0.86rem;
}

article {
    background: linear-gradient(180deg, rgba(16, 22, 32, 0.96), rgba(10, 15, 24, 0.96));
    padding: clamp(1rem, 4vw, 2rem);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
}

.quote-block,
blockquote {
    border-left: 4px solid var(--text-yellow);
    margin: 1.25rem 0;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 0 6px 6px 0;
    font-size: 1.08rem;
}

.post-header-meta {
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.tag {
    display: inline-flex;
    color: var(--text-yellow);
    margin: 0.35rem 0.5rem 0 0;
    padding: 0.12rem 0.35rem;
    border: 1px solid rgba(242, 204, 96, 0.22);
    border-radius: 4px;
    background: rgba(242, 204, 96, 0.06);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.page-link {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: rgba(8, 11, 18, 0.62);
    color: var(--text-secondary);
}

.page-link:hover,
.page-link.current {
    border-color: var(--border-strong);
    color: var(--text-primary);
    background: rgba(100, 181, 255, 0.08);
    text-shadow: none;
}

.back-link {
    display: inline-block;
    color: var(--text-yellow);
}

.command-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    margin-bottom: 1rem;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--text-primary);
    margin-left: 5px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    article h1 {
        font-size: 1.35rem;
        line-height: 1.35;
    }
}
