/* ==========================================================================
   Mas Putra — Minimalist Personal Blog & Second Brain
   Ultra-clean, quiet, distraction-free typography.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;
  --border: #e5e7eb;
  --accent: #0f172a;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Charter", "Bitstream Charter", "Sitka Text", "Cambria", Georgia, serif;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input {
  font-family: inherit;
}

/* Container */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.container-narrow {
  max-width: 680px;
}

/* Header */
.site-header {
  padding: 36px 0 24px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.brand-title {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.header-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--text-muted);
}

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

/* Main */
.main-content {
  padding-top: 16px;
  padding-bottom: 72px;
  flex: 1;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.filter-link {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 0;
  position: relative;
  transition: color 0.15s ease;
}

.filter-link:hover {
  color: var(--text);
}

.filter-link.active {
  color: var(--text);
  font-weight: 600;
}

.filter-link.active::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--text);
}

/* Entries List (Simple Chronological Stream) */
.entries-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 56px;
}

.entry-row {
  display: flex;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 15px;
  gap: 16px;
  transition: background-color 0.1s ease;
}

.entry-date {
  font-size: 13px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  width: 90px;
  flex-shrink: 0;
}

.entry-link {
  flex: 1;
  color: var(--text);
  font-weight: 500;
  line-height: 1.45;
}

.entry-row:hover .entry-link {
  text-decoration: underline;
  color: #000;
}

.entry-tag {
  font-size: 11px;
  color: var(--text-muted);
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Article / Letter Single View */
.meta-line {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  color: var(--text-dim);
}

.tag-letter {
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
}

.entry-heading {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 28px;
}

.entry-cover {
  margin: 20px 0 32px;
  border-radius: 6px;
  overflow: hidden;
}

.entry-cover img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
}

/* Referral */
.referral-simple {
  padding: 10px 14px;
  background: #f8fafc;
  border-left: 2px solid #64748b;
  font-size: 13px;
  color: #334155;
  margin-bottom: 28px;
}

.referral-simple a {
  font-weight: 600;
  text-decoration: underline;
}

/* Prose Typography */
.prose {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.8;
  color: #1f2937;
  margin-bottom: 40px;
}

.prose p {
  margin-bottom: 1.4em;
}

.prose h2 {
  font-family: var(--font-sans);
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

.prose ul, .prose ol {
  margin-left: 24px;
  margin-bottom: 1.4em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose blockquote {
  border-left: 2px solid #9ca3af;
  padding-left: 16px;
  font-style: italic;
  color: #4b5563;
  margin: 1.4em 0;
}

.prose img {
  border-radius: 4px;
  margin: 1.6em 0;
}

/* Signoff & Actions */
.entry-foot {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-bottom: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.signoff {
  font-size: 15px;
  color: var(--text-muted);
  font-style: italic;
}

.entry-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* Simple Newsletter */
.newsletter-simple {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.sub-lead {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.sub-form {
  display: flex;
  gap: 8px;
  max-width: 380px;
}

.sub-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
}

.sub-input:focus {
  border-color: var(--text);
}

.sub-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  background: #111827;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.sub-btn:hover {
  background: #000000;
}

.sub-feedback {
  margin-top: 8px;
  font-size: 12px;
  color: #059669;
}

/* Footer */
.site-footer {
  padding: 28px 0;
  border-top: 1px solid #f3f4f6;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--text);
}

/* Skeletons */
.entry-skeleton {
  height: 20px;
  background: #f3f4f6;
  border-radius: 4px;
  margin: 10px 0;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 0.3; }
  100% { opacity: 0.6; }
}

@media (max-width: 600px) {
  .entry-row {
    flex-direction: column;
    gap: 4px;
  }
  .entry-date {
    width: auto;
  }
  .entry-heading {
    font-size: 24px;
  }
}
