/* ============================================
   BJAFFSR Journal - Main Stylesheet
   Version: 2.0 | SEO Optimised | Responsive
   Includes: Hamburger Menu, Search, OG ready
============================================ */

:root {
  --purple-50:  #EEEDFE;
  --purple-100: #CECBF6;
  --purple-200: #AFA9EC;
  --purple-400: #7F77DD;
  --purple-600: #534AB7;
  --purple-800: #3C3489;
  --purple-900: #26215C;
  --gold:        #C9A84C;
  --gold-light:  #E8D4A0;
  --cream:       #FAF8F5;
  --off-white:   #F5F2EC;
  --ink:         #1A1628;
  --ink-muted:   #4A4360;
  --ink-light:   #7A709A;
  --border:      rgba(83,74,183,0.15);
  --shadow-sm:   0 4px 16px rgba(0,0,0,0.04);
  --transition:  all 0.22s ease;
  --nav-h:       70px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, .logo { font-family: 'Playfair Display', serif; }

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-600);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--purple-900);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.divider {
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin: 0.75rem 0 1.75rem;
}

/* ── NAVIGATION ── */
.navbar {
  background: var(--purple-900);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--gold);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.logo span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--purple-100);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: var(--transition);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── HAMBURGER BUTTON ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  cursor: pointer;
  padding: 8px;
  transition: var(--transition);
}
.hamburger:hover { border-color: var(--gold); }
.hamburger:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU ── */
.mobile-menu {
  background: var(--purple-800);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.3s ease;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-menu.open {
  max-height: 400px;
  padding: 0.5rem 0 1rem;
}
.mobile-menu ul {
  list-style: none;
  padding: 0 1.5rem;
}
.mobile-menu ul li a {
  display: block;
  padding: 0.85rem 0;
  color: var(--purple-100);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: var(--transition);
}
.mobile-menu ul li:last-child a { border-bottom: none; }
.mobile-menu ul li a:hover { color: var(--gold); padding-left: 0.5rem; }

/* ── HERO ── */
.hero {
  background: var(--purple-900);
  color: #fff;
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -35%; right: -12%;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: rgba(127,119,221,0.1);
  pointer-events: none;
}
.hero-inner { max-width: 1280px; margin: 0 auto; position: relative; }

.hero-tag {
  background: rgba(201,168,76,0.18);
  border: 1px solid rgba(201,168,76,0.4);
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  color: var(--gold-light);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
}
.hero h1 em { font-style: italic; color: var(--purple-200); }

.hero-desc {
  font-family: 'Source Serif 4', serif;
  font-size: 1.05rem;
  color: var(--purple-100);
  max-width: 620px;
  margin: 1rem 0 2rem;
  line-height: 1.7;
}

.hero-meta-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.3rem 1rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ── CONTAINER & SECTIONS ── */
.container { max-width: 1280px; margin: 0 auto; }
section { padding: 5rem 2rem; }

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text {
  font-family: 'Source Serif 4', serif;
  color: var(--ink-muted);
  line-height: 1.8;
  font-size: 1rem;
}
.scope-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.scope-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; color: var(--purple-800); }
.scope-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.scope-tag {
  background: var(--purple-50);
  padding: 0.25rem 0.85rem;
  border-radius: 30px;
  font-size: 0.75rem;
  color: var(--purple-800);
  border: 1px solid var(--purple-100);
  font-weight: 500;
}
.scope-note { font-size: 0.82rem; color: var(--ink-light); line-height: 1.6; }
.scope-note i { color: var(--purple-400); margin-right: 3px; }

/* ── ISSUE TABS ── */
.issue-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--purple-100);
  padding-bottom: 0;
}
.issue-tab {
  background: none;
  border: none;
  padding: 0.7rem 1.4rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--ink-muted);
  border-radius: 8px 8px 0 0;
  transition: var(--transition);
  position: relative;
  bottom: -2px;
}
.issue-tab:hover { color: var(--purple-600); }
.issue-tab.active {
  background: var(--purple-600);
  color: #fff;
  border-bottom: 2px solid var(--gold);
}
.issue-panel { display: none; animation: fadeIn 0.2s ease; }
.issue-panel.active-panel { display: block; }

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

/* ── SEARCH BAR ── */
.search-bar {
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--ink-light);
  font-size: 0.85rem;
  pointer-events: none;
}
#paperSearch {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: 40px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: var(--transition);
}
#paperSearch::placeholder { color: var(--ink-light); }
#paperSearch:focus { border-color: var(--purple-400); box-shadow: 0 0 0 3px rgba(127,119,221,0.12); }
.search-clear {
  position: absolute;
  right: 1rem;
  background: var(--purple-50);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 0.7rem;
  transition: var(--transition);
}
.search-clear:hover { background: var(--purple-100); color: var(--purple-800); }
.search-results-count {
  font-size: 0.8rem;
  color: var(--ink-light);
  padding-left: 1rem;
  min-height: 1.2em;
}
.search-results-count strong { color: var(--purple-600); }

/* ── PAPER CARDS ── */
.paper-list { display: flex; flex-direction: column; gap: 1rem; }

.paper-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  transition: var(--transition);
  position: relative;
}
.paper-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--purple-200);
  border-radius: 12px 0 0 12px;
  transition: var(--transition);
}
.paper-card:hover { border-color: var(--purple-400); box-shadow: var(--shadow-sm); }
.paper-card:hover::before { background: var(--purple-600); }

.paper-card.hidden { display: none; }

.paper-info { flex: 1; min-width: 0; }
.paper-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--purple-400);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.paper-title {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 0.975rem;
  color: var(--purple-900);
  margin-bottom: 0.35rem;
  line-height: 1.45;
}
.paper-title mark {
  background: rgba(201,168,76,0.25);
  color: var(--purple-900);
  border-radius: 2px;
  padding: 0 2px;
}
.paper-authors {
  font-size: 0.8rem;
  color: var(--ink-light);
  font-style: italic;
  margin-bottom: 0.2rem;
}
.paper-meta {
  font-size: 0.74rem;
  color: var(--purple-600);
  font-weight: 500;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* DOI badges */
.doi-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.18rem 0.6rem;
  border-radius: 30px;
  white-space: nowrap;
  text-decoration: none;
  transition: var(--transition);
}
.doi-live {
  background: var(--purple-50);
  color: var(--purple-800);
  border: 1px solid var(--purple-200);
}
.doi-live:hover {
  background: var(--purple-100);
  border-color: var(--purple-400);
  color: var(--purple-900);
}
.doi-pending {
  background: #fff8e6;
  color: #8a6800;
  border: 1px solid #f0d080;
  cursor: default;
  font-style: italic;
  font-weight: 500;
}

.download-btn {
  background: var(--purple-50);
  border: 1px solid var(--purple-100);
  padding: 0.5rem 1.2rem;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--purple-800);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}
.download-btn:hover { background: var(--purple-100); border-color: var(--purple-400); color: var(--purple-900); }
.download-btn i { color: #E32636; }

/* No results state */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-light);
}
.no-results i { font-size: 2rem; margin-bottom: 0.75rem; display: block; color: var(--purple-200); }
.no-results p { font-size: 0.9rem; }

/* ── EDITORIAL BOARD ── */
#board { background: var(--purple-900); color: #fff; }
#board .section-title { color: #fff; }

.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }

.board-group h3 {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(201,168,76,0.25);
  padding-bottom: 0.6rem;
  margin-bottom: 1.1rem;
}
.board-member {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.board-member:last-child { border-bottom: none; }
.board-name { font-weight: 600; color: #fff; font-size: 0.9rem; margin-bottom: 0.1rem; }
.board-role { font-size: 0.76rem; color: var(--purple-200); }

/* ── SUBMIT ── */
#submit { background: var(--off-white); }

.submit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }

.guidelines-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.guidelines-list li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.6;
}
.gl-num {
  background: var(--purple-600);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin: 1rem 0 1.5rem;
  font-size: 0.875rem;
}
.fee-table th, .fee-table td {
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  text-align: left;
}
.fee-table th { background: var(--purple-50); color: var(--purple-800); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; }
.fee-table tr:hover td { background: var(--purple-50); }

.bank-box {
  background: var(--purple-50);
  border: 1px solid var(--purple-100);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.bank-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-600);
  margin-bottom: 0.9rem;
}
.bank-title i { margin-right: 5px; }
.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
  gap: 1rem;
}
.bank-row:last-child { border-bottom: none; }
.bank-label { color: var(--ink-light); }
.bank-val { font-weight: 600; color: var(--purple-800); text-align: right; }

.attestation-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(83,74,183,0.06);
  border-left: 3px solid var(--purple-400);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.1rem;
  margin-top: 1.25rem;
}
.attestation-note i { color: var(--purple-600); font-size: 1rem; margin-top: 2px; flex-shrink: 0; }
.attestation-note p { font-size: 0.82rem; color: var(--ink-muted); line-height: 1.6; }

/* ── CONTACT ── */
#contact { background: #fff; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.contact-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.6rem;
  transition: var(--transition);
}
.contact-card:hover { border-color: var(--purple-400); box-shadow: var(--shadow-sm); }
.contact-icon {
  width: 44px; height: 44px;
  background: var(--purple-50);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--purple-600);
  font-size: 1.15rem;
}
.contact-card h3 { font-size: 1rem; margin-bottom: 0.2rem; color: var(--purple-900); }
.contact-role {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--purple-400);
  margin-bottom: 0.9rem;
}
.contact-detail { font-size: 0.84rem; color: var(--ink-muted); line-height: 1.8; }
.contact-detail a { color: var(--purple-600); text-decoration: none; }
.contact-detail a:hover { text-decoration: underline; }

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.82rem;
  line-height: 1.8;
}
footer p { margin-bottom: 0.3rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .about-grid,
  .submit-grid,
  .board-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 780px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 3.5rem 1.25rem 2.5rem; }
  section { padding: 3.5rem 1.25rem; }
  .nav-container { padding: 0 1.25rem; }

  .paper-card { flex-direction: column; align-items: flex-start; }
  .download-btn { align-self: flex-start; }
}

@media (max-width: 480px) {
  .paper-title { font-size: 0.9rem; }
  .issue-tab { padding: 0.55rem 1rem; font-size: 0.8rem; }
  .hero h1 { font-size: clamp(1.7rem, 8vw, 2.5rem); }
  .bank-row { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
}
