/* ================================================================
   Syaahi Academic Press — Main Stylesheet
   DM Sans · Black & White · Light + Dark Modes
   ================================================================ */

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

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
  --font-sans:    'DM Sans', sans-serif;
  --font-serif:   'DM Serif Display', serif;
  --font-mono:    'DM Mono', monospace;

  /* Light mode */
  --bg:           #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-tertiary:  #efefef;
  --surface:      #ffffff;
  --border:       #e0e0e0;
  --border-strong:#b0b0b0;
  --text:         #0a0a0a;
  --text-secondary:#555555;
  --text-muted:   #888888;
  --accent:       #0a0a0a;
  --accent-hover: #333333;
  --link:         #0a0a0a;
  --link-hover:   #444444;

  /* UI */
  --radius-sm:    4px;
  --radius:       8px;
  --radius-lg:    14px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow:       0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.14);

  /* Header */
  --header-bg:    #0a0a0a;
  --header-text:  #ffffff;

  /* Transitions */
  --t: .2s ease;
}

[data-theme="dark"] {
  --bg:           #0c0c0c;
  --bg-secondary: #161616;
  --bg-tertiary:  #1e1e1e;
  --surface:      #141414;
  --border:       #2a2a2a;
  --border-strong:#404040;
  --text:         #f0f0f0;
  --text-secondary:#aaaaaa;
  --text-muted:   #666666;
  --accent:       #f0f0f0;
  --accent-hover: #cccccc;
  --link:         #e0e0e0;
  --link-hover:   #ffffff;

  --shadow-sm:    0 1px 3px rgba(0,0,0,.4);
  --shadow:       0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.6);

  --header-bg:    #080808;
  --header-text:  #f0f0f0;
}

/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--link); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--link-hover); }

img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font-sans); }

/* ── Typography ────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--text);
  font-weight: 400;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }

.text-sans { font-family: var(--font-sans); font-weight: 500; }
p { color: var(--text-secondary); }
strong { color: var(--text); font-weight: 600; }

/* ── Layout ────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.container-wide   { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

main { flex: 1; }

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 16px;
}

.site-logo {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
}

.logo-syaahi {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.logo-sub {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  color: rgba(255,255,255,.5);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  gap: 8px;
  transition: background var(--t);
}

.header-search:focus-within {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.25);
}

.header-search input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  width: 200px;
}

.header-search input::placeholder { color: rgba(255,255,255,.4); }

.btn-icon {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color var(--t), background var(--t);
}

.btn-icon:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ── Navigation ────────────────────────────────────────────────── */
.site-nav {
  background: var(--header-bg);
  border-top: 1px solid rgba(255,255,255,.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-link {
  color: rgba(255,255,255,.7);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  transition: color var(--t), border-color var(--t);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  border-bottom-color: #fff;
}

.nav-spacer { flex: 1; }

/* ── Theme Toggle ──────────────────────────────────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.7);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--t);
}

.theme-toggle:hover { border-color: rgba(255,255,255,.5); color: #fff; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { background: var(--text-secondary); color: var(--bg); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { background: var(--bg-secondary); color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; }

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--t), border-color var(--t);
}

.card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }

.card-body { padding: 20px; }
.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* ── Article Card ───────────────────────────────────────────────── */
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--t);
  position: relative;
}

.article-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.article-type {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.article-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-family: var(--font-serif);
  line-height: 1.3;
}

.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--text-secondary); }

.article-authors {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.article-abstract-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.article-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}

.article-footer-stat { display: flex; align-items: center; gap: 4px; }

/* ── Journal Card ───────────────────────────────────────────────── */
.journal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--t);
  display: flex;
  flex-direction: column;
}

.journal-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.journal-cover {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.journal-cover-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--text-muted);
}

.journal-card-body { padding: 16px; flex: 1; }
.journal-card-title { font-size: 0.95rem; font-family: var(--font-serif); margin-bottom: 4px; }
.journal-card-issn { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}

.badge-published  { background: #0a0a0a; color: #fff; }
.badge-accepted   { background: #1a1a1a; color: #fff; }
.badge-review     { background: var(--bg-tertiary); color: var(--text); }
.badge-submitted  { background: var(--bg-secondary); color: var(--text-secondary); }
.badge-revision   { background: var(--bg-tertiary); color: var(--text-muted); }
.badge-rejected   { background: #f0f0f0; color: #666; }
.badge-oa         { background: var(--text); color: var(--bg); }
.badge-upcoming   { background: var(--bg-tertiary); color: var(--text-secondary); }
.badge-default    { background: var(--bg-tertiary); color: var(--text-muted); }

[data-theme="dark"] .badge-published { background: #e0e0e0; color: #000; }
[data-theme="dark"] .badge-oa        { background: #e0e0e0; color: #000; }

/* ── Open Access Tag ────────────────────────────────────────────── */
.oa-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 2px 7px;
  border-radius: 3px;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  background: var(--header-bg);
  color: #fff;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 39px,
    rgba(255,255,255,.03) 39px,
    rgba(255,255,255,.03) 40px
  ),
  repeating-linear-gradient(
    90deg,
    transparent,
    transparent 79px,
    rgba(255,255,255,.02) 79px,
    rgba(255,255,255,.02) 80px
  );
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  font-weight: 600;
  margin-bottom: 12px;
  font-family: var(--font-sans);
}

.hero h1 {
  font-family: var(--font-serif);
  color: #fff;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,.65);
  max-width: 600px;
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-hero-primary {
  background: #fff;
  color: #000;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
}

.btn-hero-primary:hover { background: #eee; color: #000; }

.btn-hero-outline {
  background: transparent;
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.3);
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.btn-hero-outline:hover { border-color: rgba(255,255,255,.6); color: #fff; }

/* ── Section ────────────────────────────────────────────────────── */
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.section-lg { padding: 80px 0; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--text);
  padding-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.section-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

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

/* ── Grid Layouts ───────────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 20px;
}

/* Main + Sidebar */
.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.sidebar-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-block-title {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── Featured Article ───────────────────────────────────────────── */
.featured-article {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 280px;
}

.featured-article-img {
  background: var(--bg-tertiary);
  position: relative;
  overflow: hidden;
}

.featured-article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-article-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Journal Page ───────────────────────────────────────────────── */
.journal-header {
  background: var(--header-bg);
  color: #fff;
  padding: 48px 24px;
}

.journal-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: start;
}

.journal-cover-large {
  width: 140px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* ── Article Full ───────────────────────────────────────────────── */
.article-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
  margin-bottom: 32px;
}

.article-title { margin-bottom: 16px; }
.article-meta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.article-date { font-size: 0.82rem; color: var(--text-muted); }

.article-abstract {
  background: var(--bg-secondary);
  border-left: 3px solid var(--text);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

.article-abstract-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text);
}

.keywords-block { margin: 20px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.keyword-tag {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: all var(--t);
  text-decoration: none;
}

.keyword-tag:hover { background: var(--text); color: var(--bg); }

/* ── Forms ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color var(--t), box-shadow var(--t);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

[data-theme="dark"] .form-control:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,.06);
}

textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { appearance: none; cursor: pointer; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* ── Tabs ───────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
  margin-bottom: 28px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--t);
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--text); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 12px 0;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { color: var(--border-strong); }

/* ── Alerts ─────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.alert-success { border-color: #ccc; }
.alert-error   { border-color: #bbb; background: var(--bg-tertiary); }

/* ── Stats strip ────────────────────────────────────────────────── */
.stats-strip {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.stats-inner {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }
.stat-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
  font-weight: 500;
}

/* ── DOI / Metadata ─────────────────────────────────────────────── */
.doi-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

.meta-table { width: 100%; border-collapse: collapse; }
.meta-table td { padding: 6px 0; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.meta-table td:first-child { color: var(--text-muted); width: 140px; font-weight: 500; }

/* ── AI Badge ───────────────────────────────────────────────────── */
.ai-summary-block {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
}

.ai-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ai-label-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  background: var(--header-bg);
  color: rgba(255,255,255,.6);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 8px;
}

.footer-brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}

.footer-desc { font-size: 0.82rem; margin-top: 12px; line-height: 1.6; }

.footer-col h4 {
  color: rgba(255,255,255,.5);
  font-size: 0.7rem;
  font-family: var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul li a {
  font-size: 0.83rem;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color var(--t);
}
.footer-col ul li a:hover { color: rgba(255,255,255,.9); }

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 16px 24px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.77rem;
}

/* ── Submission Tracker ─────────────────────────────────────────── */
.tracker-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 24px 0;
  overflow-x: auto;
}

.tracker-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 80px;
  position: relative;
}

.tracker-step::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.tracker-step:last-child::before { display: none; }

.tracker-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--t);
}

.tracker-step.done .tracker-dot { background: var(--text); border-color: var(--text); color: var(--bg); }
.tracker-step.current .tracker-dot { border-color: var(--text); color: var(--text); }

.tracker-label { font-size: 0.68rem; color: var(--text-muted); text-align: center; white-space: nowrap; }
.tracker-step.done .tracker-label, .tracker-step.current .tracker-label { color: var(--text); }

/* ── AI Chat Widget ─────────────────────────────────────────────── */
.ai-chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all .2s;
}

.ai-chat-fab:hover { transform: scale(1.08); }

.ai-chat-panel {
  position: fixed;
  bottom: 92px;
  right: 28px;
  z-index: 900;
  width: 360px;
  max-height: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  display: none;
}

.ai-chat-panel.open { display: flex; }

.ai-chat-header {
  padding: 12px 16px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  line-height: 1.5;
}

.chat-msg-user { background: var(--text); color: var(--bg); align-self: flex-end; }
.chat-msg-ai { background: var(--bg-secondary); color: var(--text); align-self: flex-start; border: 1px solid var(--border); }

.ai-chat-input-row {
  display: flex;
  border-top: 1px solid var(--border);
  padding: 8px;
  gap: 8px;
}

.ai-chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

.ai-chat-input:focus { outline: none; border-color: var(--border-strong); }

/* ── Pagination ─────────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; margin-top: 32px; flex-wrap: wrap; }

.page-btn {
  padding: 7px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  transition: all var(--t);
  text-decoration: none;
  display: inline-flex;
}

.page-btn:hover { border-color: var(--border-strong); color: var(--text); }
.page-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ── Loading spinner ────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .layout-sidebar {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .featured-article {
    grid-template-columns: 1fr;
  }
  .journal-header-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-search { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-inner { gap: 32px; }
  .nav-link { padding: 8px 10px; font-size: 0.78rem; }
  .hero { padding: 48px 20px 40px; }
  .ai-chat-panel { width: calc(100vw - 32px); right: 16px; }
}

/* ── Utility classes ────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}.mt-5{margin-top:48px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:32px}
.pt-0{padding-top:0}.pb-0{padding-bottom:0}
.flex{display:flex}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}.flex-wrap{flex-wrap:wrap}
.text-sm{font-size:.83rem}.text-xs{font-size:.75rem}.text-muted{color:var(--text-muted)}.text-center{text-align:center}
.w-full{width:100%}.hidden{display:none}
.divider{border:none;border-top:1px solid var(--border);margin:24px 0}
