@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --ink: #1a1a1a;
  --ink-soft: #3d3d3d;
  --ink-muted: #6b6b6b;
  --ink-faint: #9b9b9b;
  --paper: #fafaf8;
  --paper-warm: #f4f3ef;
  --paper-border: #e8e7e3;
  --accent: #2d6a4f;
  --accent-light: #e8f5ef;
  --accent-hover: #1e4d38;
  --red: #c0392b;
  --serif: 'Libre Baskerville', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --max-w: 680px;
  --max-w-wide: 1100px;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

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

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

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--sans); border: none; background: none; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: var(--sans); }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--paper-border); border-radius: 3px; }

/* ─── NAV ─── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--paper-border);
}
.nav-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--ink); background: var(--paper-warm); }
.nav-link.active { color: var(--ink); }
.btn-nav {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 20px;
  transition: all 0.15s;
}
.btn-nav-outline {
  border: 1px solid var(--paper-border);
  color: var(--ink-soft);
}
.btn-nav-outline:hover { border-color: var(--ink-muted); color: var(--ink); }
.btn-nav-solid {
  background: var(--ink);
  color: var(--paper);
}
.btn-nav-solid:hover { background: var(--ink-soft); }
.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s;
}
.nav-avatar:hover { opacity: 0.8; }
.nav-user-menu {
  position: relative;
}
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: white;
  border: 1px solid var(--paper-border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 6px;
  display: none;
}
.nav-dropdown.open { display: block; }
.nav-dropdown a, .nav-dropdown button {
  display: block; width: 100%;
  text-align: left;
  font-size: 0.875rem;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.1s, color 0.1s;
}
.nav-dropdown a:hover, .nav-dropdown button:hover {
  background: var(--paper-warm); color: var(--ink);
}
.nav-dropdown hr { border: none; border-top: 1px solid var(--paper-border); margin: 6px 0; }
.nav-dropdown .sign-out { color: var(--red); }
.nav-dropdown .sign-out:hover { background: #fdf0ef; }

/* ─── HERO ─── */
.hero {
  border-bottom: 1px solid var(--paper-border);
  padding: 80px 24px 72px;
  text-align: center;
}
.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 620px;
  margin: 0 auto 20px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 460px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.15s;
  font-size: 0.9rem;
  padding: 10px 22px;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--ink-soft); }
.btn-secondary {
  background: white;
  color: var(--ink-soft);
  border: 1px solid var(--paper-border);
}
.btn-secondary:hover { border-color: var(--ink-muted); color: var(--ink); }
.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover { background: var(--accent-hover); }
.btn-sm { font-size: 0.8rem; padding: 7px 14px; }
.btn-lg { font-size: 1rem; padding: 13px 28px; }

/* ─── FEED ─── */
.feed-section {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) {
  .feed-section { grid-template-columns: 1fr; gap: 40px; }
  .sidebar { order: -1; }
}
.feed-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}
.feed-title { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; }
.feed-tabs { display: flex; gap: 4px; }
.feed-tab {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  color: var(--ink-muted);
  transition: all 0.15s;
  cursor: pointer;
}
.feed-tab:hover { color: var(--ink); background: var(--paper-warm); }
.feed-tab.active { background: var(--ink); color: white; }

/* ─── POST CARD ─── */
.post-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--paper-border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  animation: fadeUp 0.3s ease both;
}
.post-card:first-child { padding-top: 0; }
.post-card:last-child { border-bottom: none; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.post-card-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.post-card-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.post-card-author {
  font-size: 0.8rem; font-weight: 600; color: var(--ink-soft);
}
.post-card-dot { font-size: 0.7rem; color: var(--ink-faint); }
.post-card-date { font-size: 0.8rem; color: var(--ink-faint); }
.post-card-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
  cursor: pointer;
  transition: color 0.15s;
}
.post-card-title:hover { color: var(--accent); }
.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-footer {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px;
}
.post-card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  background: var(--paper-warm);
  color: var(--ink-muted);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.post-card-tag:hover { background: var(--accent-light); color: var(--accent); }
.post-card-read { font-size: 0.78rem; color: var(--ink-faint); }
.post-card-image {
  width: 120px; height: 80px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
}
.post-card-image-placeholder {
  width: 120px; height: 80px;
  background: var(--paper-warm);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--paper-border);
  font-size: 1.5rem;
}

/* ─── SIDEBAR ─── */
.sidebar { position: sticky; top: 80px; }
.sidebar-section { margin-bottom: 40px; }
.sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.sidebar-author {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
  cursor: pointer;
}
.sidebar-author:last-child { margin-bottom: 0; }
.sidebar-author-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-author-name { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.sidebar-author-bio { font-size: 0.78rem; color: var(--ink-faint); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  background: var(--paper-warm);
  color: var(--ink-soft);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ─── MODAL / OVERLAY ─── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.overlay.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 40px;
  animation: slideUp 0.25s ease;
  position: relative;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint);
  font-size: 1.1rem;
  transition: all 0.15s;
  cursor: pointer;
}
.modal-close:hover { background: var(--paper-warm); color: var(--ink); }
.modal-logo { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.modal-logo span { color: var(--accent); }
.modal-tagline { font-size: 0.875rem; color: var(--ink-muted); margin-bottom: 32px; }
.modal-tabs { display: flex; gap: 0; margin-bottom: 28px; border-bottom: 1px solid var(--paper-border); }
.modal-tab {
  font-size: 0.875rem; font-weight: 500;
  padding: 10px 0; margin-right: 24px;
  color: var(--ink-faint);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  cursor: pointer;
}
.modal-tab.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ─── FORM ELEMENTS ─── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.8rem; font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--paper-border);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--ink);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.1);
}
.form-input::placeholder { color: var(--ink-faint); }
.form-hint { font-size: 0.75rem; color: var(--ink-faint); margin-top: 4px; }
.form-error {
  font-size: 0.78rem; color: var(--red);
  margin-top: 4px; display: none;
}
.form-error.show { display: block; }
.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 0.95rem; }

/* ─── EDITOR PAGE ─── */
.editor-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.editor-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--paper-border);
}
.editor-topbar-left { display: flex; align-items: center; gap: 12px; }
.editor-status {
  font-size: 0.78rem; color: var(--ink-faint); font-style: italic;
}
.editor-actions { display: flex; gap: 10px; align-items: center; }

.title-input {
  width: 100%;
  border: none; outline: none;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: transparent;
  line-height: 1.2;
  margin-bottom: 12px;
  padding: 0;
  resize: none;
}
.title-input::placeholder { color: var(--paper-border); }

.subtitle-input {
  width: 100%;
  border: none; outline: none;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink-muted);
  background: transparent;
  line-height: 1.5;
  margin-bottom: 24px;
  padding: 0;
  resize: none;
}
.subtitle-input::placeholder { color: var(--paper-border); }

/* Cover image upload */
.cover-upload-area {
  border: 2px dashed var(--paper-border);
  border-radius: 6px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 28px;
  position: relative;
}
.cover-upload-area:hover { border-color: var(--accent); background: var(--accent-light); }
.cover-upload-area.has-image { border-style: solid; padding: 0; overflow: hidden; }
.cover-upload-area.has-image img { width: 100%; height: 240px; object-fit: cover; }
.cover-upload-label { font-size: 0.85rem; color: var(--ink-faint); margin-top: 8px; }
.cover-upload-icon { font-size: 1.5rem; margin-bottom: 8px; }
.cover-remove {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.6); color: white;
  border-radius: 4px; padding: 4px 10px;
  font-size: 0.75rem; font-weight: 500;
  cursor: pointer; transition: background 0.15s;
}
.cover-remove:hover { background: rgba(0,0,0,0.8); }

/* Toolbar */
.editor-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--paper-border);
  border-radius: 6px;
  margin-bottom: 16px;
  position: sticky; top: 68px; z-index: 50;
}
.toolbar-btn {
  width: 32px; height: 32px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  font-size: 0.85rem; font-weight: 700;
  transition: all 0.1s;
  cursor: pointer;
  user-select: none;
}
.toolbar-btn:hover { background: var(--paper-warm); color: var(--ink); }
.toolbar-btn.active { background: var(--ink); color: white; }
.toolbar-sep {
  width: 1px; height: 20px;
  background: var(--paper-border);
  margin: 0 4px;
}
.toolbar-label {
  font-size: 0.72rem; font-weight: 600;
  color: var(--ink-faint); padding: 0 4px;
}

/* Rich text area */
.editor-content {
  min-height: 400px;
  outline: none;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--ink);
}
.editor-content:empty::before {
  content: attr(data-placeholder);
  color: var(--paper-border);
  pointer-events: none;
}
.editor-content h2 { font-size: 1.6rem; font-weight: 700; margin: 32px 0 12px; letter-spacing: -0.02em; }
.editor-content h3 { font-size: 1.25rem; font-weight: 700; margin: 24px 0 10px; }
.editor-content p { margin-bottom: 20px; }
.editor-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 24px 0; padding: 4px 0 4px 20px;
  color: var(--ink-soft); font-style: italic;
}
.editor-content ul, .editor-content ol { margin: 16px 0 16px 24px; }
.editor-content li { margin-bottom: 6px; }
.editor-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.editor-content img { max-width: 100%; border-radius: 4px; margin: 20px 0; }
.editor-content hr { border: none; border-top: 1px solid var(--paper-border); margin: 32px 0; }
.editor-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  background: var(--paper-warm);
  padding: 2px 6px; border-radius: 3px;
}
.editor-content pre {
  background: var(--ink); color: var(--paper);
  padding: 20px; border-radius: 6px;
  overflow-x: auto; margin: 20px 0;
}
.editor-content pre code { background: none; padding: 0; color: inherit; }

/* Publish modal */
.publish-modal { max-width: 520px; }
.tag-input-wrap {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px;
  border: 1px solid var(--paper-border);
  border-radius: 4px;
  min-height: 44px;
  cursor: text;
}
.tag-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,106,79,0.1); }
.tag-badge {
  display: flex; align-items: center; gap: 4px;
  background: var(--paper-warm);
  padding: 3px 8px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 500; color: var(--ink-soft);
}
.tag-badge-remove {
  cursor: pointer; color: var(--ink-faint);
  transition: color 0.1s; line-height: 1;
}
.tag-badge-remove:hover { color: var(--red); }
.tag-text-input {
  border: none; outline: none;
  font-size: 0.85rem; color: var(--ink);
  background: transparent; flex: 1; min-width: 80px;
}

/* ─── POST / ARTICLE PAGE ─── */
.post-page { max-width: var(--max-w); margin: 0 auto; padding: 48px 24px 80px; }
.post-header { margin-bottom: 32px; }
.post-category {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px; cursor: pointer;
}
.post-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
.post-subtitle {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}
.post-byline {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--paper-border);
  border-bottom: 1px solid var(--paper-border);
  margin-bottom: 32px;
}
.post-byline-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent);
  color: white; font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.post-byline-info { flex: 1; }
.post-byline-name { font-size: 0.9rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.post-byline-name:hover { color: var(--accent); }
.post-byline-meta { font-size: 0.78rem; color: var(--ink-faint); margin-top: 2px; }
.post-actions { display: flex; gap: 8px; }
.post-action-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 500; color: var(--ink-muted);
  border: 1px solid var(--paper-border);
  transition: all 0.15s; cursor: pointer;
}
.post-action-btn:hover { border-color: var(--ink-muted); color: var(--ink); }
.post-action-btn.liked { border-color: var(--red); color: var(--red); background: #fdf0ef; }
.post-cover { width: 100%; border-radius: 6px; margin-bottom: 40px; max-height: 400px; object-fit: cover; }
.post-body {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--ink);
}
.post-body h2 { font-size: 1.6rem; font-weight: 700; margin: 40px 0 14px; letter-spacing: -0.02em; font-family: var(--serif); }
.post-body h3 { font-size: 1.25rem; font-weight: 700; margin: 28px 0 10px; font-family: var(--serif); }
.post-body p { margin-bottom: 22px; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 28px 0; padding: 4px 0 4px 24px;
  color: var(--ink-soft); font-style: italic; font-size: 1.1em;
}
.post-body ul, .post-body ol { margin: 16px 0 16px 28px; }
.post-body li { margin-bottom: 8px; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body img { max-width: 100%; border-radius: 4px; margin: 28px 0; }
.post-body hr { border: none; border-top: 1px solid var(--paper-border); margin: 40px 0; }
.post-body code {
  font-family: 'Courier New', monospace; font-size: 0.85em;
  background: var(--paper-warm); padding: 2px 6px; border-radius: 3px;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 32px; }
.post-author-box {
  background: var(--paper-warm);
  border-radius: 8px;
  padding: 24px;
  display: flex; gap: 16px; align-items: start;
  margin-top: 40px;
}
.post-author-box-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: white;
  font-size: 1.2rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
}
.post-author-box-name { font-weight: 700; color: var(--ink); font-size: 1rem; margin-bottom: 4px; cursor: pointer; }
.post-author-box-name:hover { color: var(--accent); }
.post-author-box-bio { font-size: 0.875rem; color: var(--ink-muted); line-height: 1.5; }

/* ─── PROFILE PAGE ─── */
.profile-page { max-width: var(--max-w-wide); margin: 0 auto; padding: 48px 24px 80px; }
.profile-header {
  display: flex; align-items: flex-start; gap: 28px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--paper-border);
  margin-bottom: 40px;
}
@media (max-width: 600px) { .profile-header { flex-direction: column; align-items: center; text-align: center; } }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--accent); color: white;
  font-size: 1.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer; position: relative;
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5); color: white;
  font-size: 0.7rem; font-weight: 600;
  display: none; align-items: center; justify-content: center;
  cursor: pointer;
}
.profile-avatar:hover .profile-avatar-edit { display: flex; }
.profile-info { flex: 1; }
.profile-name { font-family: var(--serif); font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.profile-handle { font-size: 0.875rem; color: var(--ink-faint); margin-bottom: 12px; }
.profile-bio { font-size: 0.95rem; color: var(--ink-muted); line-height: 1.6; max-width: 480px; margin-bottom: 16px; }
.profile-stats { display: flex; gap: 20px; }
.profile-stat { text-align: center; }
.profile-stat-num { font-weight: 700; font-size: 1.1rem; color: var(--ink); display: block; }
.profile-stat-label { font-size: 0.75rem; color: var(--ink-faint); }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.profile-post-card {
  border: 1px solid var(--paper-border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  background: white;
}
.profile-post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.profile-post-img { width: 100%; height: 160px; object-fit: cover; background: var(--paper-warm); }
.profile-post-img-placeholder {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, var(--paper-warm) 0%, var(--paper-border) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--paper-border);
}
.profile-post-body { padding: 18px; }
.profile-post-title { font-family: var(--serif); font-weight: 700; font-size: 1rem; line-height: 1.35; margin-bottom: 8px; color: var(--ink); }
.profile-post-excerpt { font-size: 0.82rem; color: var(--ink-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.profile-post-meta { font-size: 0.75rem; color: var(--ink-faint); display: flex; justify-content: space-between; align-items: center; }
.profile-post-actions { display: flex; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--paper-border); }

/* ─── TOAST ─── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 999;
}
.toast {
  background: var(--ink); color: white;
  padding: 12px 18px; border-radius: 6px;
  font-size: 0.875rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease;
  max-width: 320px;
}
.toast.success { background: var(--accent); }
.toast.error { background: var(--red); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ─── EMPTY STATES ─── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--ink-faint);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state-title { font-family: var(--serif); font-size: 1.3rem; color: var(--ink-muted); margin-bottom: 8px; }
.empty-state-desc { font-size: 0.9rem; line-height: 1.6; max-width: 320px; margin: 0 auto 20px; }

/* ─── LINK MODAL ─── */
.link-modal { max-width: 380px; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--paper-border);
  padding: 32px 24px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.8rem;
}
footer a { color: var(--ink-faint); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--accent); }

/* ─── UTILITIES ─── */
.hidden { display: none !important; }
.page { display: none; }
.page.active { display: block; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.divider { border: none; border-top: 1px solid var(--paper-border); margin: 24px 0; }

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .hero { padding: 56px 24px 48px; }
  .modal { padding: 28px 24px; }
  .editor-wrap { padding: 24px 16px 60px; }
  .post-page { padding: 32px 16px 60px; }
  .nav-inner { padding: 0 16px; }
  .feed-section { padding: 32px 16px 60px; }
  .post-card { grid-template-columns: 1fr; }
  .post-card-image, .post-card-image-placeholder { display: none; }
}
