/* ============================================================
   Inkwell.ae — Main Stylesheet
   Editorial / Literary Aesthetic
   ============================================================ */

:root {
  --ink:         #0f0e0c;
  --ink-soft:    #2c2b28;
  --ink-muted:   #6b6860;
  --ink-faint:   #b0aca4;
  --paper:       #faf9f6;
  --paper-warm:  #f5f0e8;
  --paper-deep:  #ede8df;
  --accent:      #c8522a;
  --accent-light:#f0e8e3;
  --accent-dark: #9e3d1c;
  --gold:        #c9a227;
  --border:      #e8e3db;
  --border-dark: #ccc7be;

  --ff-serif:  'Source Serif 4', Georgia, serif;
  --ff-display:'Playfair Display', Georgia, serif;
  --ff-sans:   'DM Sans', -apple-system, sans-serif;

  --radius:    6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 4px rgba(15,14,12,.08);
  --shadow:    0 4px 20px rgba(15,14,12,.12);
  --shadow-lg: 0 12px 48px rgba(15,14,12,.18);

  --header-h:  64px;
  --max-w:     1200px;
  --content-w: 720px;
}

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

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

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

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

/* ── Flash ──────────────────────────────────────────────── */
.flash {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  padding: .75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .9rem; font-weight: 500;
  animation: slideDown .3s ease;
}
.flash--success { background: #1e7e5e; color: #fff; }
.flash--error   { background: #c0392b; color: #fff; }
.flash--info    { background: var(--ink); color: var(--paper); }
.flash-close { background: none; border: none; color: inherit; font-size: 1rem; opacity: .7; }
.flash-close:hover { opacity: 1; }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,249,246,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-h);
  display: flex; align-items: center; gap: 1.5rem;
}

.site-logo {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--ff-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
}
.logo-ae { color: var(--accent); }

.header-nav {
  display: flex; align-items: center; gap: .5rem;
  margin-left: auto;
}

.nav-link {
  padding: .45rem .85rem;
  font-size: .9rem;
  color: var(--ink-soft);
  border-radius: var(--radius);
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--ink); background: var(--paper-deep); }

.nav-write {
  display: flex; align-items: center; gap: .4rem;
  color: var(--ink-muted);
}
.nav-write:hover { color: var(--ink); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .65rem 1.4rem;
  font-size: .9rem; font-weight: 500;
  border-radius: 2rem;
  border: none; cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--ink); color: var(--paper);
}
.btn-primary:hover { background: var(--ink-soft); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn-outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--border-dark);
}
.btn-outline:hover { border-color: var(--ink); background: var(--paper-warm); }

.btn-accent {
  background: var(--accent); color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); }

.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-lg { padding: .85rem 1.8rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── User Menu ───────────────────────────────────────────── */
.user-menu-wrap { position: relative; }
.user-avatar-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  border-radius: 50%; overflow: hidden;
}
.header-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; display: block;
  border: 2px solid var(--border);
  transition: border-color .2s;
}
.user-avatar-btn:hover .header-avatar { border-color: var(--ink); }

.user-dropdown {
  position: absolute; right: 0; top: calc(100% + .5rem);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  display: none;
  overflow: hidden;
  z-index: 200;
}
.user-dropdown.open { display: block; animation: fadeIn .15s ease; }
.dropdown-header { padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.dropdown-header strong { display: block; font-size: .95rem; }
.dropdown-sub { font-size: .8rem; color: var(--ink-muted); }
.user-dropdown a {
  display: block; padding: .6rem 1rem;
  font-size: .9rem; color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.user-dropdown a:hover { background: var(--paper-warm); color: var(--ink); }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); }

/* ── Mobile Menu ─────────────────────────────────────────── */
.mobile-menu-btn {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: .5rem; margin-left: auto;
}
.mobile-menu-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: .3s;
}
.mobile-nav {
  display: none; flex-direction: column;
  border-top: 1px solid var(--border);
  background: var(--paper);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: .9rem 1.5rem;
  font-size: .95rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
}
.mobile-nav a:hover { color: var(--ink); background: var(--paper-warm); }

/* ── Hero (Homepage) ─────────────────────────────────────── */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, #2c1810 0%, transparent 70%);
}
.hero-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem;
}
.hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700; line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: 1.2rem;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p {
  font-family: var(--ff-serif);
  font-size: 1.15rem; line-height: 1.7;
  color: #c9c4bb;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  color: rgba(250,249,246,.4); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  animation: bounce 2s ease infinite;
}
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(6px)} }

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.content-wrap { max-width: var(--content-w); margin: 0 auto; }

.page-body { padding: 3rem 0 5rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

/* ── Section headings ────────────────────────────────────── */
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--ink);
}
.section-title {
  font-family: var(--ff-display);
  font-size: 1.4rem; font-weight: 700;
}
.section-link { font-size: .85rem; color: var(--accent); }
.section-link:hover { text-decoration: underline; }

/* ── Post Cards ──────────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; gap: 0; }

.post-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.post-card:first-child { padding-top: 0; }
.post-card:last-child { border-bottom: none; }

.post-card-body { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }

.post-card-author {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--ink-muted);
}
.post-card-author img {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
}
.post-card-author strong { color: var(--ink-soft); font-weight: 500; }

.post-card h2 {
  font-family: var(--ff-display);
  font-size: 1.2rem; font-weight: 700;
  line-height: 1.25; letter-spacing: -.02em;
  color: var(--ink);
}
.post-card h2 a:hover { color: var(--accent); }

.post-card-sub {
  font-family: var(--ff-serif);
  font-size: .92rem; color: var(--ink-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.post-card-meta {
  display: flex; align-items: center; gap: .85rem;
  font-size: .78rem; color: var(--ink-faint); margin-top: .25rem;
}
.post-card-meta .tag-pill { color: var(--ink-muted); }
.post-card-meta .tag-pill:hover { color: var(--accent); }

.post-card-thumb {
  width: 120px; height: 80px; border-radius: var(--radius);
  overflow: hidden; flex-shrink: 0;
}
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-thumb-empty {
  width: 120px; height: 80px; border-radius: var(--radius);
  background: var(--paper-deep);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.post-card-thumb-empty span { font-size: 2rem; }

/* Featured card */
.post-card--featured {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  border: none; border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
.post-card--featured .feat-img {
  width: 100%; height: 260px; object-fit: cover;
}
.post-card--featured .feat-body { padding: 1.5rem; }
.post-card--featured h2 { font-size: 1.5rem; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.sidebar-section { margin-bottom: 2rem; }
.sidebar-title {
  font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 1rem;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-pill {
  display: inline-block;
  padding: .35rem .85rem;
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-radius: 2rem;
  font-size: .8rem; color: var(--ink-soft);
  transition: all .15s;
}
.tag-pill:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tag-pill--active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Who to follow */
.follow-list { display: flex; flex-direction: column; gap: .85rem; }
.follow-item {
  display: flex; align-items: center; gap: .75rem;
}
.follow-item img {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.follow-info { flex: 1; min-width: 0; }
.follow-name {
  font-size: .9rem; font-weight: 500; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.follow-name a:hover { color: var(--accent); }
.follow-bio { font-size: .78rem; color: var(--ink-muted); }
.btn-follow {
  background: none; border: 1.5px solid var(--border-dark);
  border-radius: 2rem; padding: .25rem .8rem;
  font-size: .78rem; font-weight: 600; color: var(--ink);
  cursor: pointer; white-space: nowrap; transition: all .15s;
}
.btn-follow:hover { border-color: var(--ink); background: var(--paper-warm); }
.btn-follow.following { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Newsletter */
.newsletter-box {
  background: var(--ink);
  color: var(--paper);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
}
.newsletter-box h3 {
  font-family: var(--ff-display);
  font-size: 1.1rem; margin-bottom: .5rem;
}
.newsletter-box p { font-size: .83rem; color: #c9c4bb; margin-bottom: 1rem; }
.newsletter-form { display: flex; flex-direction: column; gap: .5rem; }
.newsletter-form input {
  padding: .6rem .85rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: var(--paper); font-size: .85rem;
}
.newsletter-form input::placeholder { color: rgba(250,249,246,.4); }
.newsletter-form button {
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius);
  padding: .6rem; font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.newsletter-form button:hover { background: var(--accent-dark); }

/* ── Article / Post page ─────────────────────────────────── */
.article-header { max-width: var(--content-w); margin: 0 auto; padding: 3rem 1.5rem 0; }
.article-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.article-header h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  line-height: 1.15; letter-spacing: -.03em;
  margin-bottom: .75rem;
}
.article-header .subtitle {
  font-family: var(--ff-serif);
  font-size: 1.15rem; color: var(--ink-muted);
  line-height: 1.6; margin-bottom: 1.5rem;
}

.article-byline {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.article-byline img {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
}
.byline-info { flex: 1; }
.byline-author {
  font-weight: 600; font-size: .95rem;
}
.byline-author a:hover { color: var(--accent); }
.byline-meta {
  font-size: .8rem; color: var(--ink-muted); display: flex; gap: .75rem;
}
.byline-actions { display: flex; gap: .5rem; align-items: center; }

.article-cover {
  width: 100%; max-height: 500px; object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 0 auto 2.5rem;
  display: block;
}

.article-content {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  font-family: var(--ff-serif);
  font-size: 1.12rem; line-height: 1.85;
  color: var(--ink-soft);
}
.article-content p { margin-bottom: 1.5rem; }
.article-content h2 {
  font-family: var(--ff-display);
  font-size: 1.6rem; font-weight: 700;
  letter-spacing: -.02em; line-height: 1.2;
  color: var(--ink);
  margin: 2.5rem 0 1rem;
}
.article-content h3 {
  font-family: var(--ff-display);
  font-size: 1.25rem; font-weight: 600;
  color: var(--ink);
  margin: 2rem 0 .75rem;
}
.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: .5rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--ink-muted);
  font-size: 1.18rem;
}
.article-content ul, .article-content ol {
  padding-left: 1.5rem; margin-bottom: 1.5rem;
}
.article-content li { margin-bottom: .4rem; }
.article-content a { color: var(--accent); text-decoration: underline; }
.article-content img { border-radius: var(--radius); margin: 2rem auto; }
.article-content code {
  background: var(--paper-deep);
  padding: .15em .4em;
  border-radius: 3px;
  font-size: .88em;
  font-family: 'SF Mono', Consolas, monospace;
}
.article-content pre {
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 2rem 0;
}
.article-content pre code { background: none; padding: 0; font-size: .9rem; color: inherit; }
.article-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem auto; max-width: 120px; }
.article-content figure { margin: 2rem 0; }
.article-content figcaption { text-align: center; font-size: .85rem; color: var(--ink-muted); margin-top: .5rem; font-style: italic; }

/* Clap bar */
.clap-bar {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 3rem 0;
  max-width: var(--content-w);
  margin-left: auto; margin-right: auto;
}
.clap-btn {
  display: flex; align-items: center; gap: .4rem;
  background: none; border: 1.5px solid var(--border-dark);
  border-radius: 2rem; padding: .5rem 1rem;
  font-size: .9rem; font-weight: 600;
  color: var(--ink-muted); cursor: pointer;
  transition: all .2s;
}
.clap-btn:hover, .clap-btn.clapped {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-light);
}
.clap-btn svg { transition: transform .2s; }
.clap-btn:hover svg { transform: scale(1.2); }
.share-btn {
  background: none; border: none; cursor: pointer;
  font-size: .85rem; color: var(--ink-muted);
  display: flex; align-items: center; gap: .3rem;
  padding: .4rem .7rem; border-radius: var(--radius);
  transition: color .15s;
}
.share-btn:hover { color: var(--ink); }
.clap-bar-right { margin-left: auto; display: flex; gap: .5rem; }

/* Author box */
.author-box {
  max-width: var(--content-w);
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--paper-warm);
  border-radius: var(--radius-lg);
  display: flex; gap: 1.25rem;
}
.author-box img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.author-box-info h3 {
  font-weight: 600; margin-bottom: .25rem;
}
.author-box-info h3 a:hover { color: var(--accent); }
.author-box-info p { font-size: .88rem; color: var(--ink-muted); margin-bottom: .75rem; }

/* Comments */
.comments-section {
  max-width: var(--content-w);
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.comments-section h3 {
  font-family: var(--ff-display);
  font-size: 1.4rem; margin-bottom: 1.5rem;
}
.comment-form textarea {
  width: 100%; padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical; min-height: 100px;
  font-family: var(--ff-serif);
  font-size: .95rem; line-height: 1.6;
  background: var(--paper);
  transition: border-color .2s;
}
.comment-form textarea:focus { outline: none; border-color: var(--ink); }
.comment-list { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }
.comment-item {
  display: flex; gap: .85rem;
}
.comment-item img {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-meta { font-size: .8rem; margin-bottom: .35rem; }
.comment-author { font-weight: 600; color: var(--ink); }
.comment-time { color: var(--ink-faint); margin-left: .5rem; }
.comment-text { font-family: var(--ff-serif); font-size: .95rem; line-height: 1.6; }

/* ── Write / Editor ──────────────────────────────────────── */
.editor-page { max-width: 860px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }
.editor-toolbar {
  display: flex; align-items: center; gap: .35rem;
  padding: .5rem .75rem;
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.editor-toolbar button {
  background: none; border: none; padding: .35rem .5rem;
  border-radius: 4px; font-size: .85rem; cursor: pointer;
  color: var(--ink-soft); transition: background .15s;
}
.editor-toolbar button:hover { background: var(--paper-deep); color: var(--ink); }
.editor-toolbar .sep { width: 1px; height: 20px; background: var(--border); margin: 0 .25rem; }

.editor-title {
  width: 100%; border: none; outline: none;
  font-family: var(--ff-display);
  font-size: 2.2rem; font-weight: 700;
  letter-spacing: -.03em; line-height: 1.2;
  padding: .5rem 0; resize: none; overflow: hidden;
  background: transparent;
}
.editor-title::placeholder { color: var(--ink-faint); }

.editor-subtitle {
  width: 100%; border: none; outline: none;
  font-family: var(--ff-serif);
  font-size: 1.15rem; color: var(--ink-muted);
  padding: .25rem 0; margin-bottom: 1rem;
  resize: none; overflow: hidden; background: transparent;
}
.editor-subtitle::placeholder { color: var(--ink-faint); }

.editor-content {
  width: 100%; min-height: 500px;
  border: none; outline: none;
  font-family: var(--ff-serif);
  font-size: 1.1rem; line-height: 1.85;
  color: var(--ink-soft); resize: none;
  background: transparent; padding: 0;
}
.editor-content::placeholder { color: var(--ink-faint); }
.editor-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

.editor-meta {
  display: flex; flex-wrap: wrap; gap: 1rem;
  padding: 1.25rem;
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 1.5rem;
}
.editor-meta label { font-size: .8rem; font-weight: 600; color: var(--ink-muted); display: block; margin-bottom: .3rem; }
.editor-meta input, .editor-meta select, .editor-meta textarea {
  padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--paper); font-size: .88rem; width: 100%;
}
.editor-meta input:focus, .editor-meta select:focus { outline: none; border-color: var(--ink); }
.editor-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1rem; }

/* ── Auth pages ──────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.5rem;
  background: var(--paper-warm);
}
.auth-box {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-box h2 {
  font-family: var(--ff-display);
  font-size: 1.6rem; margin-bottom: .4rem; text-align: center;
}
.auth-box .auth-sub { text-align: center; color: var(--ink-muted); font-size: .9rem; margin-bottom: 2rem; }

.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .35rem; }
.form-group input {
  width: 100%; padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem; background: var(--paper);
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(15,14,12,.06);
}
.form-error { color: #c0392b; font-size: .8rem; margin-top: .3rem; }
.auth-switch { text-align: center; margin-top: 1.25rem; font-size: .88rem; color: var(--ink-muted); }
.auth-switch a { color: var(--accent); font-weight: 500; }

/* ── Dashboard ───────────────────────────────────────────── */
.dash-header {
  background: var(--ink); color: var(--paper);
  padding: 2.5rem 1.5rem;
}
.dash-header h1 { font-family: var(--ff-display); font-size: 1.8rem; margin-bottom: .25rem; }
.dash-header p { color: #c9c4bb; font-size: .9rem; }

.dash-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem; margin: 2rem 0;
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem; text-align: center;
}
.stat-num { font-family: var(--ff-display); font-size: 2rem; font-weight: 700; }
.stat-label { font-size: .78rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .05em; }

.dash-posts-table { width: 100%; border-collapse: collapse; }
.dash-posts-table th {
  text-align: left; font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-muted); padding: .6rem 1rem;
  border-bottom: 2px solid var(--border);
}
.dash-posts-table td {
  padding: .85rem 1rem; border-bottom: 1px solid var(--border);
  font-size: .88rem; vertical-align: middle;
}
.dash-posts-table tr:hover td { background: var(--paper-warm); }
.status-badge {
  display: inline-block; padding: .2rem .6rem;
  border-radius: 2rem; font-size: .72rem; font-weight: 600; text-transform: uppercase;
}
.status-badge--published { background: #d4f0e8; color: #1e7e5e; }
.status-badge--draft     { background: var(--paper-deep); color: var(--ink-muted); }

/* ── Profile ─────────────────────────────────────────────── */
.profile-cover {
  height: 180px; background: var(--ink);
  background: linear-gradient(135deg, #1a0f0a 0%, #2c1810 50%, #0f0e0c 100%);
}
.profile-header {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 1.5rem; position: relative;
}
.profile-avatar-wrap {
  margin-top: -48px; margin-bottom: 1rem;
}
.profile-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; border: 4px solid var(--paper);
  box-shadow: var(--shadow);
}
.profile-name { font-family: var(--ff-display); font-size: 1.8rem; font-weight: 700; }
.profile-bio { font-family: var(--ff-serif); color: var(--ink-muted); font-size: 1rem; margin: .5rem 0 1rem; }
.profile-stats { display: flex; gap: 1.5rem; font-size: .85rem; color: var(--ink-muted); }
.profile-stats strong { color: var(--ink); font-weight: 600; }

/* ── Explore ─────────────────────────────────────────────── */
.explore-hero {
  background: var(--paper-warm);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.explore-hero h1 { font-family: var(--ff-display); font-size: 2rem; margin-bottom: .5rem; }
.explore-hero p { color: var(--ink-muted); }

.tag-filter-bar {
  display: flex; gap: .5rem; overflow-x: auto;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tag-filter-bar::-webkit-scrollbar { display: none; }
.tag-filter-btn {
  white-space: nowrap; padding: .4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 2rem; font-size: .82rem;
  background: var(--paper); color: var(--ink-soft);
  cursor: pointer; transition: all .15s;
}
.tag-filter-btn:hover { border-color: var(--ink); }
.tag-filter-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex; gap: .4rem; justify-content: center;
  margin: 2.5rem 0;
}
.page-btn {
  min-width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .85rem; color: var(--ink-soft);
  transition: all .15s;
}
.page-btn:hover { border-color: var(--ink); color: var(--ink); }
.page-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 3.5rem 1.5rem 0;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; gap: 3rem; flex-wrap: wrap;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(250,249,246,.1);
}
.footer-brand { flex: 0 0 220px; }
.footer-logo { color: var(--paper) !important; margin-bottom: .75rem; }
.footer-tagline { font-size: .85rem; color: rgba(250,249,246,.5); font-style: italic; }
.footer-links {
  flex: 1; display: flex; gap: 2rem; flex-wrap: wrap;
}
.footer-col h4 {
  font-size: .75rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(250,249,246,.5);
  margin-bottom: .85rem;
}
.footer-col a {
  display: block; font-size: .85rem;
  color: rgba(250,249,246,.7); margin-bottom: .5rem;
  transition: color .15s;
}
.footer-col a:hover { color: var(--paper); }
.footer-bottom {
  max-width: var(--max-w); margin: 0 auto;
  padding: 1.25rem 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  font-size: .78rem; color: rgba(250,249,246,.35);
}

/* ── Utilities ───────────────────────────────────────────── */
.text-muted { color: var(--ink-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.verify-badge { color: var(--accent); font-size: .9em; }
.empty-state {
  text-align: center; padding: 4rem 1.5rem;
  color: var(--ink-muted); font-family: var(--ff-serif);
}
.empty-state h3 { font-family: var(--ff-display); font-size: 1.4rem; margin-bottom: .5rem; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .header-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .post-card { grid-template-columns: 1fr; }
  .post-card-thumb, .post-card-thumb-empty { display: none; }
  .footer-inner { flex-direction: column; gap: 2rem; }
  .footer-brand { flex: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .author-box { flex-direction: column; }
  .article-header { padding: 2rem 1rem 0; }
  .article-content { padding: 0 1rem; }
}
