/* ============================================
   土田研究室 論文リポジトリデータベース
   Design: Warm Academic — Terracotta & Ivory
   ============================================ */

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

html {
  overflow-y: scroll;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans JP', 'Lato', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: #2d2a26;
  line-height: 1.6;
  background: #faf8f5;
}

@media screen and (max-width: 640px) {
  body { font-size: 14px; }
}

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

input, select, button {
  font: inherit;
  outline: none;
}

/* --- CSS Variables --- */
:root {
  --primary: #b85c38;
  --primary-dark: #8b3a1f;
  --primary-light: #d4855e;
  --primary-pale: #f3e5da;
  --accent: #2e6b5e;
  --accent-light: #3d8b7a;

  --text-primary: #2d2a26;
  --text-secondary: #6b6560;
  --text-muted: #9e958d;
  --text-on-primary: #fffaf7;

  --bg-page: #faf8f5;
  --bg-white: #ffffff;
  --bg-warm: #f5f0ea;

  --border: #e4ddd5;
  --border-light: #ede8e2;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 4px rgba(45,42,38,0.06);
  --shadow-md: 0 3px 12px rgba(45,42,38,0.09);
  --shadow-lg: 0 6px 20px rgba(45,42,38,0.12);

  --pdf-color: #c0392b;
}

/* --- Navigation Bar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  width: 100%;
  height: 3.5rem;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar-left,
.navbar-right {
  display: flex;
  align-items: center;
}

.navbar-left {
  flex: 1;
  padding: 0 1.5rem;
  gap: 0.5rem;
}

.navbar-brand {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.navbar-left a:hover .navbar-brand {
  color: var(--primary);
}

.navbar-right {
  padding: 0 1.5rem;
}

/* Back button in navbar */
.nav-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.nav-back-btn:hover {
  background: var(--bg-warm);
  color: var(--primary);
}

/* --- Page Container --- */
.page-container {
  padding-top: 3.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Hero Header --- */
.hero {
  background: linear-gradient(135deg, #b85c38 0%, #d4855e 50%, #e8a97e 100%);
  color: var(--text-on-primary);
  padding: 3.5rem 3rem 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  right: -6rem;
  top: -6rem;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  left: 15%;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

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

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.4rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 0.5rem;
}

.paper-count {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
}

@media screen and (max-width: 640px) {
  .hero {
    padding: 2.5rem 1rem 2rem;
  }
  .hero h1 { font-size: 1.4rem; }
}

/* --- Filter Bar (inline between hero and list) --- */
.filter-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.filter-bar-inner {
  max-width: 73rem;
  margin: 0 auto;
  padding: 0.75rem 3rem;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

@media screen and (max-width: 640px) {
  .filter-bar-inner {
    padding: 0.75rem 1rem;
    gap: 0.6rem;
  }
}

.filter-bar-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

/* Search gets more space */
.filter-bar-group:first-child {
  flex: 1 1 14rem;
  min-width: 10rem;
}

/* Select dropdowns get fixed widths */
.filter-bar-group:not(:first-child) {
  flex: 0 0 auto;
  min-width: 7rem;
}

.filter-bar-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filter-input {
  height: 2.2rem;
  padding: 0 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg-page);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.filter-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(184,92,56,0.12);
  background: var(--bg-white);
}

.filter-input::placeholder {
  color: var(--text-muted);
}

.filter-row {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.filter-row .filter-input {
  flex: 1;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-icon:hover {
  color: var(--primary);
  border-color: var(--primary-light);
  background: var(--primary-pale);
}

/* --- Year Histogram & Range Slider --- */
.year-histogram-wrapper {
  width: 100%;
}

.year-range-label {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
  letter-spacing: 0.05em;
}

.year-histogram {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 44px;
  padding: 0;
  margin-bottom: 0.2rem;
}

.year-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  cursor: pointer;
  position: relative;
}

.year-bar {
  width: 100%;
  min-width: 4px;
  border-radius: 2px 2px 0 0;
  background: var(--primary);
  transition: background 0.2s, opacity 0.2s;
  margin-top: auto;
}

.year-bar-col[data-active="0"] .year-bar {
  background: #d5cec7;
  opacity: 0.5;
}

.year-bar-col:hover .year-bar {
  background: var(--primary-dark);
}

.year-bar-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  line-height: 1;
  margin-top: 1px;
}

.year-bar-col[data-active="0"] .year-bar-label {
  opacity: 0.4;
}

.year-slider-container {
  position: relative;
  width: 100%;
  height: 20px;
}

.year-range-input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  pointer-events: none;
  top: 6px;
  left: 0;
}

.year-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
  pointer-events: all;
  position: relative;
  z-index: 2;
}

.year-range-input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
  pointer-events: all;
}

.year-range-input::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

.year-range-input::-moz-range-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

.year-reset-btn {
  display: block;
  margin: 0.25rem auto 0;
  padding: 0.15rem 0.6rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.year-reset-btn:hover {
  color: var(--primary);
  border-color: var(--primary-light);
  background: var(--primary-pale);
}

/* Paper list media icons */
.paper-list-icons {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
  margin-left: auto;
}

/* Year histogram filter group needs wider space */
.filter-bar-group:has(.year-histogram-wrapper) {
  flex: 0 0 auto;
  min-width: 12rem;
  max-width: 22rem;
}

/* --- Content (single column, no sidebar) --- */
.content-single {
  flex: 1;
  max-width: 73rem;
  width: 100%;
  padding: 1.25rem 3rem;
  margin: 0 auto;
}

@media screen and (max-width: 640px) {
  .content-single { padding: 0.75rem 1rem; }
}

/* --- Main Content --- */
.main-content,
.author-main {
  min-height: 25vh;
}

/* --- Paper List View --- */
.paper-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.paper-list-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1rem;
  background: var(--bg-white);
  transition: background 0.15s;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

.paper-list-item:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.paper-list-item:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border-bottom: none;
}

.paper-list-item:only-child {
  border-radius: var(--radius-md);
}

.paper-list-item:hover {
  background: var(--bg-warm);
}

.paper-list-body {
  flex: 1;
  min-width: 0;
}

.paper-list-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.paper-list-meta time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.type-badge {
  display: inline-block;
  color: #fff;
  border-radius: 4px;
  padding: 0.12rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.paper-list-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.paper-list-authors {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 0.2rem;
}

.paper-list-authors i,
.paper-list-source i {
  width: 1rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-right: 0.2rem;
}

.paper-list-source {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  padding-top: 0.2rem;
  border-top: 1px dashed var(--border-light);
  margin-top: 0.15rem;
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 20vh;
  color: var(--text-muted);
  gap: 0.5rem;
}

.empty-state i {
  font-size: 2.5rem;
  color: var(--border);
}

/* ============================================
   Paper Detail Page
   ============================================ */

.paper-hero {
  background: linear-gradient(135deg, #b85c38 0%, #c4793f 60%, #d4855e 100%);
  color: var(--text-on-primary);
  padding: 2.5rem 3rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.paper-hero::before {
  content: '';
  position: absolute;
  right: 0; top: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.06));
  pointer-events: none;
}

@media screen and (max-width: 640px) {
  .paper-hero { padding: 1.5rem 1rem 2.5rem; }
}

.paper-hero-inner {
  max-width: 68rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.paper-type-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-bottom: 0.5rem;
}

.paper-detail-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 1rem;
}

@media screen and (max-width: 640px) {
  .paper-detail-title { font-size: 1.25rem; }
}

.paper-author-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0;
}

.paper-author-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  height: 1.9rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.92);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
}

.paper-author-chip:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.45);
  color: #fff;
}

/* PDF / Slides buttons */
.paper-action-buttons {
  display: flex;
  gap: 0.75rem;
  position: absolute;
  right: 3rem;
  bottom: -1.25rem;
  z-index: 2;
}

@media screen and (max-width: 640px) {
  .paper-action-buttons {
    position: static;
    margin-top: 1.25rem;
    justify-content: flex-start;
  }
}

.paper-action-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 1.25rem;
  height: 2.4rem;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  text-decoration: none;
}

.paper-action-btn:hover,
.btn:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.paper-action-btn.pdf,
.paper-action-btn.btn-pdf,
.btn.btn-pdf,
.btn-pdf {
  background: var(--pdf-color, #c0392b);
}

.paper-action-btn.slides,
.paper-action-btn.btn-slides,
.btn.btn-slides {
  background: #2962a4;
}

.paper-action-btn.btn-youtube,
.btn.btn-youtube,
.btn-youtube {
  background: #ff0000;
}

.paper-action-btn.btn-doi,
.btn.btn-doi,
.btn-doi {
  background: #b85c38;
}

.paper-action-btn.btn-ext,
.btn.btn-ext,
.btn-ext {
  background: #555;
}

/* Paper detail main */
.paper-main {
  max-width: 68rem;
  padding: 2rem 3rem 3rem;
  margin: 0 auto;
  color: var(--text-primary);
}

@media screen and (max-width: 640px) {
  .paper-main { padding: 1.25rem 1rem 2rem; }
}

.paper-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-light);
}

.paper-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.paper-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--primary-pale);
  display: inline-block;
}

.paper-section-content {
  line-height: 1.85;
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Abstract block */
.paper-abstract {
  background: var(--bg-warm);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
}

/* title-en (English subtitle in hero) */
.paper-title-en {
  opacity: 0.78;
  font-size: 0.92rem;
  margin-top: 0.25rem;
  font-style: italic;
  color: rgba(255,255,255,0.85);
}

/* Citation text */
.citation-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
  background: var(--bg-warm);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
}

/* Keyword list spacing */
.kw-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.kw-chip {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: var(--primary-pale);
  color: var(--primary-dark);
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.18s;
  text-decoration: none;
}

.kw-chip:hover {
  background: var(--primary);
  color: #fff;
}

/* Link list */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: all 0.18s;
  text-decoration: none;
  color: var(--text-primary);
}

.link-list-item:hover {
  background: var(--bg-warm);
  border-color: var(--primary-pale);
  transform: translateX(3px);
}

.link-list-icon {
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

.link-list-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow: hidden;
}

.link-list-label {
  font-weight: 700;
  font-size: 0.88rem;
}

.link-list-url {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-list-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Embed label */
.paper-embed-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
  margin-top: 1rem;
}
.paper-embed-label:first-child {
  margin-top: 0;
}

/* Embed area */
.paper-embed {
  margin-bottom: 1.5rem;
}

.embed-responsive {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #000;
}

.embed-responsive-4by3 {
  position: relative;
  width: 100%;
  padding-top: 75%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #f0ece7;
}

.embed-responsive iframe,
.embed-responsive-4by3 iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* Paper hero title */
.paper-hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 0.5rem;
  color: #fff;
}

/* Paper hero authors */
.paper-hero-authors {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
}

.hero-author {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.35);
}

.hero-author:hover {
  opacity: 0.85;
  border-bottom-color: rgba(255,255,255,0.7);
}

/* Paper hero action buttons */
.paper-hero-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Paper info table */
.paper-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.paper-info-table th {
  text-align: left;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.5rem 1rem 0.5rem 0;
  width: 6rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.paper-info-table td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  word-break: break-word;
}

.paper-info-table a {
  color: var(--primary);
}

.paper-info-table a:hover {
  text-decoration: underline;
}

/* Paper thumbnail */
.paper-thumbnail {
  width: 100%;
  max-width: 36rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* Thumbnail display */
.paper-thumbnail-display {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
}

.paper-thumbnail-display img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* Info grid */
.info-grid {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.info-item {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-white);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item.full {
  flex: 0 0 100%;
}

.info-item.half {
  flex: 0 0 50%;
  border-right: 1px solid var(--border-light);
}

.info-item.half:nth-child(even) {
  border-right: none;
}

@media screen and (max-width: 640px) {
  .info-item.half {
    flex: 0 0 100%;
    border-right: none;
  }
}

.info-item-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.info-item-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.info-item-value a {
  color: var(--primary);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.info-item-value a:hover {
  border-bottom-color: var(--primary);
}

.keyword-link {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  margin: 0.15rem 0.15rem 0.15rem 0;
  border-radius: var(--radius-sm);
  background: var(--primary-pale);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(184,92,56,0.15);
  transition: all 0.2s;
}

.keyword-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* --- Footer --- */
.page-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 3rem;
  font-size: 0.8rem;
  background: var(--bg-warm);
  color: var(--text-muted);
  margin-top: auto;
  gap: 0.3rem;
  border-top: 1px solid var(--border);
}

.page-footer a {
  color: var(--primary);
  transition: color 0.2s;
}

.page-footer a:hover {
  color: var(--primary-dark);
}

/* ============================================
   Author Page
   ============================================ */

.author-hero {
  background: linear-gradient(135deg, #b85c38 0%, #c4793f 50%, #d4855e 100%);
  color: var(--text-on-primary);
  padding: 2.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.author-hero::before {
  content: '';
  position: absolute;
  right: -3rem; top: -3rem;
  width: 18rem; height: 18rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}

.author-hero-inner {
  max-width: 73rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.author-hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.3rem;
}

.author-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.author-paper-count {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
}

@media screen and (max-width: 640px) {
  .author-hero { padding: 2rem 1rem; }
  .author-hero h1 { font-size: 1.35rem; }
}

/* --- Utility --- */
.hidden {
  display: none !important;
}

.break-all {
  word-break: break-all;
}

/* --- Loading --- */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20vh;
  color: var(--text-muted);
  gap: 0.5rem;
  font-size: 0.9rem;
}
